@tsed/directus-sdk 8.33.0 → 8.35.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.
@@ -1,7 +1,7 @@
1
1
  import "@tsed/logger-connect";
2
- import { useLogger } from "@directus/api/logger/index";
3
- import { attachLogger } from "@tsed/di";
4
2
  import { $log } from "@tsed/logger";
3
+ import { attachLogger } from "@tsed/di";
4
+ import { useLogger } from "@directus/api/logger/index";
5
5
  const cmsLogger = useLogger();
6
6
  function print(o) {
7
7
  if (o?.data?.length && typeof o?.data[0] === "string") {
@@ -1,7 +1,7 @@
1
1
  import "./attach-logger.js";
2
- import { withOptions } from "@tsed/config";
3
2
  import { EnvsConfigSource } from "@tsed/config/envs";
4
3
  import { configuration } from "@tsed/di";
4
+ import { withOptions } from "@tsed/config";
5
5
  configuration().set({
6
6
  extends: [
7
7
  withOptions(EnvsConfigSource, {
@@ -1,6 +1,6 @@
1
+ import { bindIntercept, injectable } from "@tsed/di";
1
2
  import { classOf } from "@tsed/core/utils/classOf.js";
2
3
  import { nameOf } from "@tsed/core/utils/nameOf.js";
3
- import { bindIntercept, injectable } from "@tsed/di";
4
4
  import { snakeCase } from "change-case";
5
5
  /**
6
6
  * Default cache key generator that serializes method arguments into a cache key.
@@ -1,5 +1,5 @@
1
- import { Intercept } from "@tsed/di";
2
1
  import { DirectusCacheInterceptor } from "../DirectusCacheInterceptor.js";
2
+ import { Intercept } from "@tsed/di";
3
3
  /**
4
4
  * Decorator to cache method results using Directus cache system.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { ProviderBuilder } from "@tsed/di";
2
1
  import { DirectusCacheInterceptor } from "../cache/index.js";
2
+ import { ProviderBuilder } from "@tsed/di";
3
3
  ProviderBuilder.add("directusCache", function directusCache(propertyKey, options = {}) {
4
4
  this.intercept(propertyKey, DirectusCacheInterceptor, options);
5
5
  return this;
@@ -1,7 +1,7 @@
1
1
  import "../bootstrap/runtime.js";
2
2
  import { DIContext, inject, injector, runInContext } from "@tsed/di";
3
- import { nanoid } from "nanoid";
4
3
  import { DirectusContextService } from "../services/DirectusContextService.js";
4
+ import { nanoid } from "nanoid";
5
5
  /**
6
6
  * Defines a Directus hook with Ts.ED dependency injection support.
7
7
  *
@@ -1,7 +1,7 @@
1
1
  import "../bootstrap/runtime.js";
2
- import { attachLogger, DIContext, inject, injector, runInContext } from "@tsed/di";
3
- import { nanoid } from "nanoid";
2
+ import { DIContext, attachLogger, inject, injector, runInContext } from "@tsed/di";
4
3
  import { DirectusContextService } from "../services/DirectusContextService.js";
4
+ import { nanoid } from "nanoid";
5
5
  const VERBS = ["get", "put", "post", "delete", "head", "use", "all", "options"];
6
6
  /**
7
7
  * Wraps an endpoint handler to provide Ts.ED dependency injection and error handling.
@@ -1,7 +1,7 @@
1
1
  import "../bootstrap/runtime.js";
2
2
  import { DIContext, inject, injector, runInContext } from "@tsed/di";
3
- import { nanoid } from "nanoid";
4
3
  import { DirectusContextService } from "../services/DirectusContextService.js";
4
+ import { nanoid } from "nanoid";
5
5
  /**
6
6
  * Wraps an operation handler to provide Ts.ED dependency injection and error handling.
7
7
  *
@@ -1,5 +1,5 @@
1
- import { inject } from "@tsed/di";
2
1
  import { DirectusContextService } from "./DirectusContextService.js";
2
+ import { inject } from "@tsed/di";
3
3
  /**
4
4
  * Abstract base class for creating typed repository patterns with Directus collections.
5
5
  *
@@ -1,5 +1,5 @@
1
- import type { Type } from "@tsed/core";
2
1
  import { type InterceptorContext, type InterceptorMethods } from "@tsed/di";
2
+ import type { Type } from "@tsed/core";
3
3
  /**
4
4
  * Configuration options for the DirectusCacheInterceptor.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { type Type } from "@tsed/core";
2
1
  import { type DirectusCacheOptions } from "../cache/index.js";
2
+ import { type Type } from "@tsed/core";
3
3
  declare global {
4
4
  namespace TsED {
5
5
  interface ClassProviderBuilder<Token extends Type> {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@tsed/directus-sdk",
3
+ "version": "8.35.0",
3
4
  "description": "A library to integrate Directus SDK with Ts.ED, facilitating the creation of extensions (endpoints, hooks, operations) and the use of Directus services.",
4
- "type": "module",
5
- "version": "8.33.0",
6
5
  "source": "./src/index.ts",
6
+ "type": "module",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
9
9
  "typings": "./lib/types/index.d.ts",
@@ -39,17 +39,18 @@
39
39
  "tslib": "2.8.1"
40
40
  },
41
41
  "devDependencies": {
42
- "@directus/api": "35.0.1",
43
- "@directus/extensions-sdk": "17.1.1",
44
- "@directus/sdk": "21.2.2",
45
- "@directus/types": "15.0.1",
46
- "@tsed/barrels": "8.33.0",
47
- "@tsed/config": "8.33.0",
48
- "@tsed/core": "8.33.0",
49
- "@tsed/di": "8.33.0",
42
+ "@directus/api": "^37.0.1",
43
+ "@directus/extensions-sdk": "^18.0.1",
44
+ "@directus/sdk": "^23.0.0",
45
+ "@directus/types": "^16.0.0",
46
+ "@tsed/barrels": "8.35.0",
47
+ "@tsed/config": "8.35.0",
48
+ "@tsed/core": "8.35.0",
49
+ "@tsed/di": "8.35.0",
50
50
  "@tsed/logger": "^8.0.0",
51
51
  "@tsed/logger-connect": "8.0.4",
52
52
  "@types/express": "4.17.21",
53
+ "sqlite3": "^6.0.1",
53
54
  "typescript": "6.0.2",
54
55
  "vitest": "4.1.4"
55
56
  },