@occultist/occultist 0.0.5 → 0.0.6

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 (82) hide show
  1. package/dist/accept.js +0 -1
  2. package/dist/actions/actionSets.d.ts +3 -3
  3. package/dist/actions/actions.d.ts +69 -48
  4. package/dist/actions/actions.js +39 -4
  5. package/dist/actions/context.d.ts +15 -11
  6. package/dist/actions/context.js +5 -0
  7. package/dist/actions/meta.d.ts +18 -12
  8. package/dist/actions/meta.js +114 -38
  9. package/dist/actions/spec.d.ts +3 -3
  10. package/dist/actions/types.d.ts +45 -16
  11. package/dist/actions/writer.d.ts +1 -1
  12. package/dist/actions/writer.test.js +2 -2
  13. package/dist/cache/cache.d.ts +3 -3
  14. package/dist/cache/cache.js +111 -42
  15. package/dist/cache/etag.test.js +1 -1
  16. package/dist/cache/file.d.ts +32 -1
  17. package/dist/cache/file.js +89 -10
  18. package/dist/cache/memory.d.ts +12 -2
  19. package/dist/cache/memory.js +63 -1
  20. package/dist/cache/types.d.ts +51 -22
  21. package/dist/errors.d.ts +1 -1
  22. package/dist/jsonld.d.ts +1 -1
  23. package/dist/makeTypeDefs.d.ts +2 -2
  24. package/dist/mod.d.ts +17 -15
  25. package/dist/mod.js +17 -15
  26. package/dist/processAction.d.ts +2 -2
  27. package/dist/processAction.js +1 -1
  28. package/dist/registry.d.ts +74 -8
  29. package/dist/registry.js +70 -8
  30. package/dist/registry.test.js +1 -1
  31. package/dist/scopes.d.ts +8 -8
  32. package/dist/scopes.js +8 -5
  33. package/dist/utils/contextBuilder.d.ts +1 -1
  34. package/dist/utils/getActionContext.d.ts +2 -2
  35. package/dist/utils/getPropertyValueSpecifications.d.ts +1 -1
  36. package/dist/utils/getRequestBodyValues.d.ts +3 -3
  37. package/dist/utils/getRequestIRIValues.d.ts +2 -2
  38. package/dist/utils/isPopulatedObject.js +1 -1
  39. package/dist/utils/makeAppendProblemDetails.d.ts +1 -1
  40. package/dist/utils/makeURLPattern.js +1 -0
  41. package/dist/utils/parseSearchParams.d.ts +2 -2
  42. package/dist/validators.d.ts +2 -2
  43. package/dist/validators.js +2 -2
  44. package/lib/accept.test.ts +1 -1
  45. package/lib/accept.ts +0 -2
  46. package/lib/actions/actionSets.ts +4 -4
  47. package/lib/actions/actions.ts +159 -99
  48. package/lib/actions/context.ts +22 -10
  49. package/lib/actions/meta.ts +140 -55
  50. package/lib/actions/path.test.ts +1 -1
  51. package/lib/actions/path.ts +1 -1
  52. package/lib/actions/spec.ts +3 -3
  53. package/lib/actions/types.ts +60 -15
  54. package/lib/actions/writer.test.ts +2 -2
  55. package/lib/actions/writer.ts +1 -1
  56. package/lib/cache/cache.ts +138 -52
  57. package/lib/cache/etag.test.ts +1 -1
  58. package/lib/cache/file.ts +109 -13
  59. package/lib/cache/memory.ts +85 -3
  60. package/lib/cache/types.ts +70 -23
  61. package/lib/errors.ts +1 -1
  62. package/lib/jsonld.ts +1 -1
  63. package/lib/makeTypeDefs.ts +5 -5
  64. package/lib/mod.ts +17 -15
  65. package/lib/processAction.ts +14 -14
  66. package/lib/registry.test.ts +1 -1
  67. package/lib/registry.ts +96 -19
  68. package/lib/request.ts +1 -1
  69. package/lib/scopes.test.ts +2 -2
  70. package/lib/scopes.ts +14 -11
  71. package/lib/utils/contextBuilder.ts +3 -3
  72. package/lib/utils/getActionContext.ts +4 -4
  73. package/lib/utils/getInternalName.ts +1 -1
  74. package/lib/utils/getPropertyValueSpecifications.ts +4 -4
  75. package/lib/utils/getRequestBodyValues.ts +5 -5
  76. package/lib/utils/getRequestIRIValues.ts +4 -4
  77. package/lib/utils/isPopulatedObject.ts +1 -1
  78. package/lib/utils/makeAppendProblemDetails.ts +1 -1
  79. package/lib/utils/makeURLPattern.ts +1 -0
  80. package/lib/utils/parseSearchParams.ts +2 -2
  81. package/lib/validators.ts +5 -5
  82. package/package.json +4 -2
@@ -1,4 +1,4 @@
1
- import { isObject } from './isObject.js';
1
+ import { isObject } from './isObject.ts';
2
2
 
3
3
  /**
4
4
  * Returns true if the input value is a plain Javascript object with
@@ -1,4 +1,4 @@
1
- import type {ProblemDetailsParam, ProblemDetails} from '../types.js';
1
+ import type {ProblemDetailsParam, ProblemDetails} from '../types.ts';
2
2
 
3
3
  export type AppendProblemDetails = (args: {
4
4
  status: number;
@@ -10,6 +10,7 @@ type URLPatternConstructor = new (input: string, baseURL: string) => URLPattern;
10
10
  export function makeURLPattern(pattern: string, baseURL: string): URLPattern {
11
11
  if (typeof URLPattern === 'undefined') {
12
12
  const URLPattern = (url as unknown as { URLPattern: URLPatternConstructor }).URLPattern;
13
+ console.log(url.URLPattern);
13
14
 
14
15
  return new URLPattern(pattern, baseURL);
15
16
  }
@@ -1,5 +1,5 @@
1
- import type {ActionSpec, ContextState} from "../actions/spec.js";
2
- import type { EmptyObject, JSONObject, JSONValue } from "../jsonld.js";
1
+ import type {ActionSpec, ContextState} from "../actions/spec.ts";
2
+ import type { EmptyObject, JSONObject, JSONValue } from "../jsonld.ts";
3
3
 
4
4
  export function parseSearchParams<
5
5
  ActionState extends ContextState = EmptyObject,
package/lib/validators.ts CHANGED
@@ -1,12 +1,12 @@
1
- import {
1
+ import type {
2
2
  ArraySpec,
3
3
  ObjectArraySpec,
4
4
  ObjectSpec,
5
5
  PropertySpec,
6
- } from './actions/spec.js';
7
- import { isObject } from './utils/isObject.js';
8
- import { preferredMediaTypes } from './utils/preferredMediaTypes.js';
9
- import { JSONValue } from "./jsonld.js";
6
+ } from './actions/spec.ts';
7
+ import { isObject } from './utils/isObject.ts';
8
+ import { preferredMediaTypes } from './utils/preferredMediaTypes.ts';
9
+ import type { JSONValue } from "./jsonld.ts";
10
10
 
11
11
 
12
12
  // deno-lint-ignore no-explicit-any
package/package.json CHANGED
@@ -28,14 +28,16 @@
28
28
  "jsonld": "^9.0.0"
29
29
  },
30
30
  "devDependencies": {
31
+ "@types/jsonld": "^1.5.15",
31
32
  "@types/node": "^24.10.1",
32
33
  "esbuild": "^0.27.0",
33
34
  "json-ptr": "^3.1.1",
34
35
  "jsonld": "^9.0.0",
35
36
  "typescript": "^5.9.3"
36
37
  },
37
- "version": "0.0.5",
38
+ "version": "0.0.6",
38
39
  "scripts": {
39
- "build": "tsc"
40
+ "build": "tsc -p tsconfig.build.json",
41
+ "test": "node --test"
40
42
  }
41
43
  }