@shakerquiz/utilities 0.2.37 → 0.2.39

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakerquiz/utilities",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "author": "yurkimus <yurkimus@gmail.com>",
5
5
  "license": "ISC",
6
6
  "exports": {
@@ -128,7 +128,7 @@ export var FeaturePathnames = /** @type {const} */ ({
128
128
  })
129
129
 
130
130
  /**
131
- * @satisfies {Record<Feature, RequestMethod>}
131
+ * @satisfies {Record<Feature, Record<RequestMethod, Set<Requirement>>}
132
132
  */
133
133
  export var FeatureMethodRequirements = {
134
134
  [Features.Checkin]: {
@@ -277,6 +277,9 @@ export var FeatureMethodRequirements = {
277
277
  },
278
278
  }
279
279
 
280
+ /**
281
+ * @satisfies {Map<Feature, Map<Network, string>>}
282
+ */
280
283
  export var FeatureNetworkOrigins = new Map([
281
284
  [
282
285
  Features.Checkin,
@@ -408,6 +411,9 @@ export var FeatureNetworkOrigins = new Map([
408
411
  ],
409
412
  ])
410
413
 
414
+ /**
415
+ * @type {Map<Feature, Map<Network, Nullable<(options?: import('@yurkimus/url').URLOptions) => URL>>>}
416
+ */
411
417
  export var FeatureNetworkUrls = new Map([
412
418
  [
413
419
  Features.Checkin,
@@ -468,9 +474,9 @@ export var FeatureNetworkUrls = new Map([
468
474
  [
469
475
  Features.Home,
470
476
  new Map([
471
- [Networks.Docker, ''],
472
- [Networks.Local, ''],
473
- [Networks.Public, ''],
477
+ [Networks.Docker, null],
478
+ [Networks.Local, null],
479
+ [Networks.Public, null],
474
480
  ]),
475
481
  ],
476
482
  [
@@ -1,10 +1,27 @@
1
+ /**
2
+ * @description Enumeration definition related to `Request.method`
3
+ *
4
+ * Related specifications:
5
+ * - HTTP/1.1 (Core Methods): {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3}
6
+ * - PATCH: {@link https://datatracker.ietf.org/doc/html/rfc5789}
7
+ * - CONNECT: {@link https://datatracker.ietf.org/doc/html/rfc9110}
8
+ * - WebDAV Extensions {@link https://datatracker.ietf.org/doc/html/rfc4918}
9
+ */
1
10
  export var RequestMethods = /** @type {const} */ ({
2
11
  'CONNECT': 'CONNECT',
12
+ 'COPY': 'COPY',
3
13
  'DELETE': 'DELETE',
4
14
  'GET': 'GET',
5
15
  'HEAD': 'HEAD',
16
+ 'LOCK': 'LOCK',
17
+ 'MKCOL': 'MKCOL',
18
+ 'MOVE': 'MOVE',
6
19
  'OPTIONS': 'OPTIONS',
20
+ 'PATCH': 'PATCH',
7
21
  'POST': 'POST',
22
+ 'PROPFIND': 'PROPFIND',
23
+ 'PROPPATCH': 'PROPPATCH',
8
24
  'PUT': 'PUT',
9
25
  'TRACE': 'TRACE',
26
+ 'UNLOCK': 'UNLOCK',
10
27
  })
@@ -12,7 +12,7 @@ interface RequestInit {
12
12
  /**
13
13
  * @description A method string defined by RFC7231 @see {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3}
14
14
  */
15
- method: RequestMethod
15
+ method?: RequestMethod
16
16
  /**
17
17
  * @description A string to declaratively set the Authorization header.
18
18
  */
@@ -38,6 +38,9 @@ type Network = keyof typeof import('./enumerations/networks.js').Networks
38
38
 
39
39
  type Service = keyof typeof import('./enumerations/services.js').Services
40
40
 
41
+ type Requirement =
42
+ keyof typeof import('./enumerations/requirements.js').Requirements
43
+
41
44
  type RequestMethod =
42
45
  keyof typeof import('./enumerations/request-methods.js').RequestMethods
43
46