@cloudflare/util-routes 5.0.53 → 5.0.55

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.0.55](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-routes@5.0.54...@cloudflare/util-routes@5.0.55) (2020-02-22)
7
+
8
+ **Note:** Version bump only for package @cloudflare/util-routes
9
+
10
+
11
+
12
+
13
+
14
+ ## [5.0.54](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-routes@5.0.53...@cloudflare/util-routes@5.0.54) (2020-02-21)
15
+
16
+ **Note:** Version bump only for package @cloudflare/util-routes
17
+
18
+
19
+
20
+
21
+
6
22
  ## [5.0.53](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-routes@5.0.52...@cloudflare/util-routes@5.0.53) (2020-02-20)
7
23
 
8
24
  **Note:** Version bump only for package @cloudflare/util-routes
package/README.md CHANGED
@@ -11,9 +11,9 @@ $ npm install @cloudflare/util-workers
11
11
  ## Examples
12
12
 
13
13
  ```typescript
14
- import { $route } from '@cloudflare/util-routes'
14
+ import { route } from '@cloudflare/util-routes'
15
15
 
16
- const apiRoute = $route`/api/v4/accounts/${'accountId'}`
16
+ const apiRoute = route`/api/v4/accounts/${'accountId'}`
17
17
 
18
18
  // toUrl requires `accountId` to be passed in according to the route pattern
19
19
  apiRoute.toUrl()
@@ -22,11 +22,11 @@ apiRoute.toUrl()
22
22
  apiRoute.toUrl({ accountId: '123' }) // => /api/v4/accounts/123
23
23
 
24
24
  // Routes can be composed
25
- const domainsRoute = $route`${apiRoute}/domains`
25
+ const domainsRoute = route`${apiRoute}/domains`
26
26
  domainsRoute.toUrl({ accountId: '123' }) // => /api/v4/accounts/123
27
27
 
28
- const domainRoute = $route`${domainsRoute}/${'domainName'}`
28
+ const domainRoute = route`${domainsRoute}/${'domainName'}`
29
29
  // Now accountId and domainName are required
30
30
  // => /api/v4/accounts/123/domains/abc.com
31
31
  domainRoute.toUrl({ accountId: '123', domainName: 'abc.com' })
32
- ```
32
+ ```
package/es/index.d.js ADDED
@@ -0,0 +1 @@
1
+ export * from './route';
package/es/route.d.js ADDED
@@ -0,0 +1,3 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ export {};
package/lib/index.d.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _route = require("./route");
8
+
9
+ Object.keys(_route).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ Object.defineProperty(exports, key, {
12
+ enumerable: true,
13
+ get: function get() {
14
+ return _route[key];
15
+ }
16
+ });
17
+ });
package/lib/route.d.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudflare/util-routes",
3
3
  "description": "Wraps path-to-regexp with a convenient, type-safe tagged template function",
4
- "version": "5.0.53",
4
+ "version": "5.0.55",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -25,7 +25,7 @@
25
25
  "path-to-regexp": "^3.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@cloudflare/types": "^6.4.24"
28
+ "@cloudflare/types": "^6.4.25"
29
29
  },
30
- "gitHead": "37ad3910a2c7c9d3d9cc382f31d641b18cd62f49"
30
+ "gitHead": "d3c9309193b110e9f3ed319d254cd108311cd407"
31
31
  }