@ldsg/field-type 0.3.31 → 0.3.32

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 (38) hide show
  1. package/dist/__tests__/unit.js +3 -3
  2. package/dist/constants.d.ts +4 -4
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +14 -14
  5. package/dist/handler.d.ts +4 -4
  6. package/dist/index.d.ts +6 -6
  7. package/dist/instantiate-resource.d.ts +4 -4
  8. package/dist/instantiate-resource.js +1 -1
  9. package/dist/resource-records/array.d.ts +3 -3
  10. package/dist/resource-records/array.d.ts.map +1 -1
  11. package/dist/resource-records/array.js +15 -15
  12. package/dist/resource-records/boolean.d.ts +3 -3
  13. package/dist/resource-records/boolean.d.ts.map +1 -1
  14. package/dist/resource-records/boolean.js +16 -16
  15. package/dist/resource-records/index.d.ts +6 -6
  16. package/dist/resource-records/index.js +1 -1
  17. package/dist/resource-records/mongo-id.d.ts +3 -3
  18. package/dist/resource-records/mongo-id.d.ts.map +1 -1
  19. package/dist/resource-records/mongo-id.js +17 -17
  20. package/dist/resource-records/number.d.ts +3 -3
  21. package/dist/resource-records/number.d.ts.map +1 -1
  22. package/dist/resource-records/number.js +23 -23
  23. package/dist/resource-records/object.d.ts +3 -3
  24. package/dist/resource-records/object.d.ts.map +1 -1
  25. package/dist/resource-records/object.js +15 -15
  26. package/dist/resource-records/string.d.ts +3 -3
  27. package/dist/resource-records/string.d.ts.map +1 -1
  28. package/dist/resource-records/string.js +16 -16
  29. package/dist/resource.d.ts +2 -2
  30. package/dist/resource.js +3 -3
  31. package/dist/types/get-field-type-info.d.ts +1 -1
  32. package/dist/types/get-field-type.d.ts +1 -1
  33. package/dist/types/index.d.ts +5 -5
  34. package/dist/types/resource-extended-handler.d.ts +3 -3
  35. package/dist/types/resource-extended-handler.d.ts.map +1 -1
  36. package/dist/types/specific-resource-settings.d.ts +1 -1
  37. package/dist/types/specific-resource-settings.d.ts.map +1 -1
  38. package/package.json +10 -6
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const handler_1 = require("@ldsg/handler");
4
4
  const resource_1 = require("../resource");
5
5
  const resource_records_1 = require("../resource-records");
6
- test('field type', () => {
6
+ test("field type", () => {
7
7
  new handler_1.HandlerResource(resource_records_1.stringFieldTypeHandlerResourceRecord);
8
8
  const fieldTypeResource = new resource_1.FieldTypeResource(resource_records_1.stringFieldTypeResourceRecord);
9
9
  const { fieldTypeInfo } = fieldTypeResource.getFieldTypeInfo({
10
10
  fieldProperties: {
11
- max: '10'
12
- }
11
+ max: "10",
12
+ },
13
13
  });
14
14
  expect(fieldTypeInfo).toMatchSnapshot();
15
15
  });
@@ -1,7 +1,7 @@
1
- import { HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceDefinitionSpecificResourceSettings } from '@ldsg/resource-definition';
3
- import { GeneralResourceSettings } from '@ldsg/types';
4
- import { FieldTypeBasePlatform } from './types/field-type-info';
1
+ import { HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceDefinitionSpecificResourceSettings } from "@ldsg/resource-definition";
3
+ import { GeneralResourceSettings } from "@ldsg/types";
4
+ import { FieldTypeBasePlatform } from "./types/field-type-info";
5
5
  /**
6
6
  * Instantiate Resource Handler General Resource Settings
7
7
  * 实例化资源处理程序普通资源配置
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,0CAA0C,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,sDAAsD,EAAE,uBAGpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uDAAuD,EAAE,+BAOrE,CAAC;AAEF,eAAO,MAAM,6CAA6C,EAAE,uBAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,0CAE5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,yBAKrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kDAAkD,EAAE,uBAGhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mDAAmD,EAAE,+BAwCjE,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,0CAA0C,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,sDAAsD,EAAE,uBAGpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uDAAuD,EAAE,+BAQnE,CAAC;AAEJ,eAAO,MAAM,6CAA6C,EAAE,uBAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,0CAG1D,CAAC;AAEJ,eAAO,MAAM,yBAAyB,yBAKrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kDAAkD,EAAE,uBAGhE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mDAAmD,EAAE,+BAyC/D,CAAC"}
package/dist/constants.js CHANGED
@@ -7,8 +7,8 @@ const field_type_info_1 = require("./types/field-type-info");
7
7
  * 实例化资源处理程序普通资源配置
8
8
  */
9
9
  exports.INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS = {
10
- title: '字段类型实例化资源处理程序',
11
- description: ''
10
+ title: "字段类型实例化资源处理程序",
11
+ description: "",
12
12
  };
13
13
  /**
14
14
  * Instantiate Resource Handler Specific Resource Settings
@@ -19,30 +19,30 @@ exports.INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS = {
19
19
  code: `export * from "@ldsg/field-type";`,
20
20
  dependencies: [
21
21
  {
22
- name: '@ldsg/field-type'
23
- }
24
- ]
22
+ name: "@ldsg/field-type",
23
+ },
24
+ ],
25
25
  };
26
26
  exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = {
27
- title: '字段类型资源定义',
28
- description: ''
27
+ title: "字段类型资源定义",
28
+ description: "",
29
29
  };
30
30
  exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = {
31
- kind: 'field_type'
31
+ kind: "field_type",
32
32
  };
33
33
  exports.FieldTypeBasePlatformList = [
34
34
  field_type_info_1.FieldTypeBasePlatform.COMMON,
35
35
  field_type_info_1.FieldTypeBasePlatform.GRAPHQL,
36
36
  field_type_info_1.FieldTypeBasePlatform.JSON,
37
- field_type_info_1.FieldTypeBasePlatform.MONGOOSE
37
+ field_type_info_1.FieldTypeBasePlatform.MONGOOSE,
38
38
  ];
39
39
  /**
40
40
  * Default Extended Handler General Resource Settings
41
41
  * 默认扩展处理程序普通资源配置
42
42
  */
43
43
  exports.DEFAULT_EXTENDED_HANDLER_GENERAL_RESOURCE_SETTINGS = {
44
- title: '字段类型默认扩展处理程序',
45
- description: ''
44
+ title: "字段类型默认扩展处理程序",
45
+ description: "",
46
46
  };
47
47
  /**
48
48
  * Default Extended Handler Specific Resource Settings
@@ -85,7 +85,7 @@ export const handler: FieldTypeResourceExtendedHandler = (params) => {
85
85
  `,
86
86
  dependencies: [
87
87
  {
88
- name: '@ldsg/field-type'
89
- }
90
- ]
88
+ name: "@ldsg/field-type",
89
+ },
90
+ ],
91
91
  };
package/dist/handler.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Handler, HandlerExtendedResourceSettings } from '@ldsg/handler';
2
- import { InstantiateResourceParams, InstantiateResourceRes } from '@ldsg/resource';
3
- import { FieldTypeResource } from './resource';
4
- import { FieldTypeSpecificResourceSettings } from './types';
1
+ import { Handler, HandlerExtendedResourceSettings } from "@ldsg/handler";
2
+ import { InstantiateResourceParams, InstantiateResourceRes } from "@ldsg/resource";
3
+ import { FieldTypeResource } from "./resource";
4
+ import { FieldTypeSpecificResourceSettings } from "./types";
5
5
  export declare const handler: Handler<InstantiateResourceParams<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>>, InstantiateResourceRes<FieldTypeResource>>;
6
6
  //# sourceMappingURL=handler.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from './constants';
2
- export * from './handler';
3
- export * from './instantiate-resource';
4
- export * from './resource';
5
- export * from './resource-records';
6
- export * from './types';
1
+ export * from "./constants";
2
+ export * from "./handler";
3
+ export * from "./instantiate-resource";
4
+ export * from "./resource";
5
+ export * from "./resource-records";
6
+ export * from "./types";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings } from '@ldsg/handler';
2
- import { InstantiateResource } from '@ldsg/resource';
3
- import { FieldTypeResource } from './resource';
4
- import { FieldTypeSpecificResourceSettings } from './types';
1
+ import { HandlerExtendedResourceSettings } from "@ldsg/handler";
2
+ import { InstantiateResource } from "@ldsg/resource";
3
+ import { FieldTypeResource } from "./resource";
4
+ import { FieldTypeSpecificResourceSettings } from "./types";
5
5
  export declare const instantiateResource: InstantiateResource<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>, FieldTypeResource>;
6
6
  //# sourceMappingURL=instantiate-resource.d.ts.map
@@ -6,7 +6,7 @@ const instantiateResource = (params) => {
6
6
  const { resourceConstructorParams } = params;
7
7
  const resource = new resource_1.FieldTypeResource(resourceConstructorParams);
8
8
  const res = {
9
- resource
9
+ resource,
10
10
  };
11
11
  return res;
12
12
  };
@@ -1,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceRecord } from '@ldsg/types';
3
- import { FieldTypeSpecificResourceSettings } from '../types';
1
+ import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceRecord } from "@ldsg/types";
3
+ import { FieldTypeSpecificResourceSettings } from "../types";
4
4
  export declare const arrayFieldTypeResourceRecord: ResourceRecord<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>>;
5
5
  export declare const arrayFieldTypeHandlerResourceRecord: ResourceRecord<HandlerSpecificResourceSettings>;
6
6
  //# sourceMappingURL=array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/resource-records/array.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,4BAA4B,EAAE,cAAc,CACvD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AAyBF,eAAO,MAAM,mCAAmC,EAAE,cAAc,CAAC,+BAA+B,CAW/F,CAAC"}
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/resource-records/array.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,4BAA4B,EAAE,cAAc,CACvD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AAyBF,eAAO,MAAM,mCAAmC,EAAE,cAAc,CAAC,+BAA+B,CAY7F,CAAC"}
@@ -5,18 +5,18 @@ const constants_1 = require("@ldsg/constants");
5
5
  const constants_2 = require("../constants");
6
6
  const types_1 = require("../types");
7
7
  exports.arrayFieldTypeResourceRecord = {
8
- id: 'array-field-type',
8
+ id: "array-field-type",
9
9
  kind: constants_2.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS.kind,
10
10
  parentId: constants_1.ROOT_RESOURCE_ID,
11
11
  settings: {
12
- title: '数组字段类型',
13
- description: '',
12
+ title: "数组字段类型",
13
+ description: "",
14
14
  fieldPropertiesSchema: {
15
- type: 'object',
16
- properties: {}
15
+ type: "object",
16
+ properties: {},
17
17
  },
18
- handlerResourceId: 'array-field-type-handler'
19
- }
18
+ handlerResourceId: "array-field-type-handler",
19
+ },
20
20
  };
21
21
  const handler = (params) => {
22
22
  const { fieldProperties, platform } = params;
@@ -25,7 +25,7 @@ const handler = (params) => {
25
25
  case types_1.FieldTypeBasePlatform.COMMON: {
26
26
  res = {
27
27
  ...fieldProperties,
28
- type: 'array'
28
+ type: "array",
29
29
  };
30
30
  break;
31
31
  }
@@ -36,14 +36,14 @@ const handler = (params) => {
36
36
  return res;
37
37
  };
38
38
  exports.arrayFieldTypeHandlerResourceRecord = {
39
- id: 'array-field-type-handler',
40
- kind: 'handler',
39
+ id: "array-field-type-handler",
40
+ kind: "handler",
41
41
  parentId: constants_1.ROOT_RESOURCE_ID,
42
42
  settings: {
43
- title: '数组字段类型处理程序',
44
- description: '',
45
- code: '',
43
+ title: "数组字段类型处理程序",
44
+ description: "",
45
+ code: "",
46
46
  dependencies: [],
47
- handler
48
- }
47
+ handler,
48
+ },
49
49
  };
@@ -1,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceRecord } from '@ldsg/types';
3
- import { FieldTypeSpecificResourceSettings } from '../types';
1
+ import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceRecord } from "@ldsg/types";
3
+ import { FieldTypeSpecificResourceSettings } from "../types";
4
4
  export declare const booleanFieldTypeResourceRecord: ResourceRecord<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>>;
5
5
  export declare const booleanFieldTypeHandlerResourceRecord: ResourceRecord<HandlerSpecificResourceSettings>;
6
6
  //# sourceMappingURL=boolean.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src/resource-records/boolean.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,8BAA8B,EAAE,cAAc,CACzD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AA+BF,eAAO,MAAM,qCAAqC,EAAE,cAAc,CAAC,+BAA+B,CAWjG,CAAC"}
1
+ {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src/resource-records/boolean.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,8BAA8B,EAAE,cAAc,CACzD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AA+BF,eAAO,MAAM,qCAAqC,EAAE,cAAc,CAAC,+BAA+B,CAY/F,CAAC"}
@@ -5,18 +5,18 @@ const constants_1 = require("@ldsg/constants");
5
5
  const constants_2 = require("../constants");
6
6
  const types_1 = require("../types");
7
7
  exports.booleanFieldTypeResourceRecord = {
8
- id: 'boolean-field-type',
8
+ id: "boolean-field-type",
9
9
  kind: constants_2.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS.kind,
10
10
  parentId: constants_1.ROOT_RESOURCE_ID,
11
11
  settings: {
12
- title: '布尔字段类型',
13
- description: '',
12
+ title: "布尔字段类型",
13
+ description: "",
14
14
  fieldPropertiesSchema: {
15
- type: 'object',
16
- properties: {}
15
+ type: "object",
16
+ properties: {},
17
17
  },
18
- handlerResourceId: 'boolean-field-type-handler'
19
- }
18
+ handlerResourceId: "boolean-field-type-handler",
19
+ },
20
20
  };
21
21
  const handler = (params) => {
22
22
  const { fieldProperties, platform } = params;
@@ -25,12 +25,12 @@ const handler = (params) => {
25
25
  case types_1.FieldTypeBasePlatform.COMMON: {
26
26
  res = {
27
27
  ...fieldProperties,
28
- type: 'boolean'
28
+ type: "boolean",
29
29
  };
30
30
  break;
31
31
  }
32
32
  case types_1.FieldTypeBasePlatform.GRAPHQL: {
33
- res = 'Boolean';
33
+ res = "Boolean";
34
34
  break;
35
35
  }
36
36
  default: {
@@ -40,14 +40,14 @@ const handler = (params) => {
40
40
  return res;
41
41
  };
42
42
  exports.booleanFieldTypeHandlerResourceRecord = {
43
- id: 'boolean-field-type-handler',
44
- kind: 'handler',
43
+ id: "boolean-field-type-handler",
44
+ kind: "handler",
45
45
  parentId: constants_1.ROOT_RESOURCE_ID,
46
46
  settings: {
47
- title: '布尔字段类型处理程序',
48
- description: '',
49
- code: '',
47
+ title: "布尔字段类型处理程序",
48
+ description: "",
49
+ code: "",
50
50
  dependencies: [],
51
- handler
52
- }
51
+ handler,
52
+ },
53
53
  };
@@ -1,9 +1,9 @@
1
- export * from './array';
2
- export * from './boolean';
3
- export * from './mongo-id';
4
- export * from './number';
5
- export * from './object';
6
- export * from './string';
1
+ export * from "./array";
2
+ export * from "./boolean";
3
+ export * from "./mongo-id";
4
+ export * from "./number";
5
+ export * from "./object";
6
+ export * from "./string";
7
7
  export declare const FIELD_TYPE_RELATED_RESOURCE_RECORD: (import("@ldsg/types").ResourceRecord<import("@ldsg/handler").HandlerExtendedResourceSettings<{
8
8
  [x: string]: any;
9
9
  }>> | import("@ldsg/types").ResourceRecord<{
@@ -39,5 +39,5 @@ exports.FIELD_TYPE_RELATED_RESOURCE_RECORD = [
39
39
  object_1.objectFieldTypeHandlerResourceRecord,
40
40
  object_1.objectFieldTypeResourceRecord,
41
41
  string_1.stringFieldTypeHandlerResourceRecord,
42
- string_1.stringFieldTypeResourceRecord
42
+ string_1.stringFieldTypeResourceRecord,
43
43
  ];
@@ -1,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceRecord } from '@ldsg/types';
3
- import { FieldTypeSpecificResourceSettings } from '../types';
1
+ import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceRecord } from "@ldsg/types";
3
+ import { FieldTypeSpecificResourceSettings } from "../types";
4
4
  export declare const mongoIdFieldTypeResourceRecord: ResourceRecord<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>>;
5
5
  export declare const mongoIdFieldTypeHandlerResourceRecord: ResourceRecord<HandlerSpecificResourceSettings>;
6
6
  //# sourceMappingURL=mongo-id.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mongo-id.d.ts","sourceRoot":"","sources":["../../src/resource-records/mongo-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,8BAA8B,EAAE,cAAc,CACzD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AAuCF,eAAO,MAAM,qCAAqC,EAAE,cAAc,CAAC,+BAA+B,CAWjG,CAAC"}
1
+ {"version":3,"file":"mongo-id.d.ts","sourceRoot":"","sources":["../../src/resource-records/mongo-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,8BAA8B,EAAE,cAAc,CACzD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AAuCF,eAAO,MAAM,qCAAqC,EAAE,cAAc,CAAC,+BAA+B,CAY/F,CAAC"}
@@ -39,18 +39,18 @@ const mongodb = __importStar(require("mongodb"));
39
39
  const constants_2 = require("../constants");
40
40
  const types_1 = require("../types");
41
41
  exports.mongoIdFieldTypeResourceRecord = {
42
- id: 'mongo-id-field-type',
42
+ id: "mongo-id-field-type",
43
43
  kind: constants_2.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS.kind,
44
44
  parentId: constants_1.ROOT_RESOURCE_ID,
45
45
  settings: {
46
- title: 'MongoID字段类型',
47
- description: '',
46
+ title: "MongoID字段类型",
47
+ description: "",
48
48
  fieldPropertiesSchema: {
49
- type: 'object',
50
- properties: {}
49
+ type: "object",
50
+ properties: {},
51
51
  },
52
- handlerResourceId: 'mongo-id-field-type-handler'
53
- }
52
+ handlerResourceId: "mongo-id-field-type-handler",
53
+ },
54
54
  };
55
55
  const handler = (params) => {
56
56
  const { fieldProperties, platform } = params;
@@ -59,17 +59,17 @@ const handler = (params) => {
59
59
  case types_1.FieldTypeBasePlatform.COMMON: {
60
60
  res = {
61
61
  ...fieldProperties,
62
- type: 'mongo_id'
62
+ type: "mongo_id",
63
63
  };
64
64
  break;
65
65
  }
66
66
  case types_1.FieldTypeBasePlatform.GRAPHQL: {
67
- res = 'ID';
67
+ res = "ID";
68
68
  break;
69
69
  }
70
70
  case types_1.FieldTypeBasePlatform.MONGOOSE: {
71
71
  res = {
72
- type: mongodb.ObjectId
72
+ type: mongodb.ObjectId,
73
73
  };
74
74
  break;
75
75
  }
@@ -80,14 +80,14 @@ const handler = (params) => {
80
80
  return res;
81
81
  };
82
82
  exports.mongoIdFieldTypeHandlerResourceRecord = {
83
- id: 'mongo-id-field-type-handler',
84
- kind: 'handler',
83
+ id: "mongo-id-field-type-handler",
84
+ kind: "handler",
85
85
  parentId: constants_1.ROOT_RESOURCE_ID,
86
86
  settings: {
87
- title: 'MongoID字段类型处理程序',
88
- description: '',
89
- code: '',
87
+ title: "MongoID字段类型处理程序",
88
+ description: "",
89
+ code: "",
90
90
  dependencies: [],
91
- handler
92
- }
91
+ handler,
92
+ },
93
93
  };
@@ -1,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceRecord } from '@ldsg/types';
3
- import { FieldTypeSpecificResourceSettings } from '../types';
1
+ import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceRecord } from "@ldsg/types";
3
+ import { FieldTypeSpecificResourceSettings } from "../types";
4
4
  export declare const numberFieldTypeResourceRecord: ResourceRecord<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>>;
5
5
  export declare const numberFieldTypeHandlerResourceRecord: ResourceRecord<HandlerSpecificResourceSettings>;
6
6
  //# sourceMappingURL=number.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/resource-records/number.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,6BAA6B,EAAE,cAAc,CACxD,+BAA+B,CAAC,iCAAiC,CAAC,CAyBnE,CAAC;AA+BF,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,+BAA+B,CAWhG,CAAC"}
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/resource-records/number.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,6BAA6B,EAAE,cAAc,CACxD,+BAA+B,CAAC,iCAAiC,CAAC,CAyBnE,CAAC;AA+BF,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,+BAA+B,CAY9F,CAAC"}
@@ -5,29 +5,29 @@ const constants_1 = require("@ldsg/constants");
5
5
  const constants_2 = require("../constants");
6
6
  const types_1 = require("../types");
7
7
  exports.numberFieldTypeResourceRecord = {
8
- id: 'number-field-type',
8
+ id: "number-field-type",
9
9
  kind: constants_2.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS.kind,
10
10
  parentId: constants_1.ROOT_RESOURCE_ID,
11
11
  settings: {
12
- title: '数字字段类型',
13
- description: '可用来存储各种数字',
12
+ title: "数字字段类型",
13
+ description: "可用来存储各种数字",
14
14
  fieldPropertiesSchema: {
15
- type: 'object',
15
+ type: "object",
16
16
  properties: {
17
17
  max: {
18
- type: 'integer',
19
- title: '最大值',
20
- description: ''
18
+ type: "integer",
19
+ title: "最大值",
20
+ description: "",
21
21
  },
22
22
  min: {
23
- type: 'integer',
24
- title: '最小值',
25
- description: ''
26
- }
27
- }
23
+ type: "integer",
24
+ title: "最小值",
25
+ description: "",
26
+ },
27
+ },
28
28
  },
29
- handlerResourceId: 'number-field-type-handler'
30
- }
29
+ handlerResourceId: "number-field-type-handler",
30
+ },
31
31
  };
32
32
  const handler = (params) => {
33
33
  const { fieldProperties, platform } = params;
@@ -36,12 +36,12 @@ const handler = (params) => {
36
36
  case types_1.FieldTypeBasePlatform.COMMON: {
37
37
  res = {
38
38
  ...fieldProperties,
39
- type: 'number'
39
+ type: "number",
40
40
  };
41
41
  break;
42
42
  }
43
43
  case types_1.FieldTypeBasePlatform.GRAPHQL: {
44
- res = 'Float';
44
+ res = "Float";
45
45
  break;
46
46
  }
47
47
  default: {
@@ -51,14 +51,14 @@ const handler = (params) => {
51
51
  return res;
52
52
  };
53
53
  exports.numberFieldTypeHandlerResourceRecord = {
54
- id: 'number-field-type-handler',
55
- kind: 'handler',
54
+ id: "number-field-type-handler",
55
+ kind: "handler",
56
56
  parentId: constants_1.ROOT_RESOURCE_ID,
57
57
  settings: {
58
- title: '数字字段类型处理程序',
59
- description: '',
60
- code: '',
58
+ title: "数字字段类型处理程序",
59
+ description: "",
60
+ code: "",
61
61
  dependencies: [],
62
- handler
63
- }
62
+ handler,
63
+ },
64
64
  };
@@ -1,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceRecord } from '@ldsg/types';
3
- import { FieldTypeSpecificResourceSettings } from '../types';
1
+ import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceRecord } from "@ldsg/types";
3
+ import { FieldTypeSpecificResourceSettings } from "../types";
4
4
  export declare const objectFieldTypeResourceRecord: ResourceRecord<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>>;
5
5
  export declare const objectFieldTypeHandlerResourceRecord: ResourceRecord<HandlerSpecificResourceSettings>;
6
6
  //# sourceMappingURL=object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/resource-records/object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,6BAA6B,EAAE,cAAc,CACxD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AAyBF,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,+BAA+B,CAWhG,CAAC"}
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/resource-records/object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,6BAA6B,EAAE,cAAc,CACxD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AAyBF,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,+BAA+B,CAY9F,CAAC"}
@@ -5,18 +5,18 @@ const constants_1 = require("@ldsg/constants");
5
5
  const constants_2 = require("../constants");
6
6
  const types_1 = require("../types");
7
7
  exports.objectFieldTypeResourceRecord = {
8
- id: 'object-field-type',
8
+ id: "object-field-type",
9
9
  kind: constants_2.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS.kind,
10
10
  parentId: constants_1.ROOT_RESOURCE_ID,
11
11
  settings: {
12
- title: '对象字段类型',
13
- description: '',
12
+ title: "对象字段类型",
13
+ description: "",
14
14
  fieldPropertiesSchema: {
15
- type: 'object',
16
- properties: {}
15
+ type: "object",
16
+ properties: {},
17
17
  },
18
- handlerResourceId: 'object-field-type-handler'
19
- }
18
+ handlerResourceId: "object-field-type-handler",
19
+ },
20
20
  };
21
21
  const handler = (params) => {
22
22
  const { fieldProperties, platform } = params;
@@ -25,7 +25,7 @@ const handler = (params) => {
25
25
  case types_1.FieldTypeBasePlatform.COMMON: {
26
26
  res = {
27
27
  ...fieldProperties,
28
- type: 'object'
28
+ type: "object",
29
29
  };
30
30
  break;
31
31
  }
@@ -36,14 +36,14 @@ const handler = (params) => {
36
36
  return res;
37
37
  };
38
38
  exports.objectFieldTypeHandlerResourceRecord = {
39
- id: 'object-field-type-handler',
40
- kind: 'handler',
39
+ id: "object-field-type-handler",
40
+ kind: "handler",
41
41
  parentId: constants_1.ROOT_RESOURCE_ID,
42
42
  settings: {
43
- title: '对象字段类型处理程序',
44
- description: '',
45
- code: '',
43
+ title: "对象字段类型处理程序",
44
+ description: "",
45
+ code: "",
46
46
  dependencies: [],
47
- handler
48
- }
47
+ handler,
48
+ },
49
49
  };
@@ -1,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceRecord } from '@ldsg/types';
3
- import { FieldTypeSpecificResourceSettings } from '../types';
1
+ import { HandlerExtendedResourceSettings, HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceRecord } from "@ldsg/types";
3
+ import { FieldTypeSpecificResourceSettings } from "../types";
4
4
  export declare const stringFieldTypeResourceRecord: ResourceRecord<HandlerExtendedResourceSettings<FieldTypeSpecificResourceSettings>>;
5
5
  export declare const stringFieldTypeHandlerResourceRecord: ResourceRecord<HandlerSpecificResourceSettings>;
6
6
  //# sourceMappingURL=string.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/resource-records/string.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,6BAA6B,EAAE,cAAc,CACxD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AA+BF,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,+BAA+B,CAWhG,CAAC"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/resource-records/string.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAGL,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,6BAA6B,EAAE,cAAc,CACxD,+BAA+B,CAAC,iCAAiC,CAAC,CAcnE,CAAC;AA+BF,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,+BAA+B,CAY9F,CAAC"}
@@ -5,18 +5,18 @@ const constants_1 = require("@ldsg/constants");
5
5
  const constants_2 = require("../constants");
6
6
  const types_1 = require("../types");
7
7
  exports.stringFieldTypeResourceRecord = {
8
- id: 'string-field-type',
8
+ id: "string-field-type",
9
9
  kind: constants_2.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS.kind,
10
10
  parentId: constants_1.ROOT_RESOURCE_ID,
11
11
  settings: {
12
- title: '字符串字段类型',
13
- description: '',
12
+ title: "字符串字段类型",
13
+ description: "",
14
14
  fieldPropertiesSchema: {
15
- type: 'object',
16
- properties: {}
15
+ type: "object",
16
+ properties: {},
17
17
  },
18
- handlerResourceId: 'string-field-type-handler'
19
- }
18
+ handlerResourceId: "string-field-type-handler",
19
+ },
20
20
  };
21
21
  const handler = (params) => {
22
22
  const { fieldProperties, platform } = params;
@@ -25,12 +25,12 @@ const handler = (params) => {
25
25
  case types_1.FieldTypeBasePlatform.COMMON: {
26
26
  res = {
27
27
  ...fieldProperties,
28
- type: 'string'
28
+ type: "string",
29
29
  };
30
30
  break;
31
31
  }
32
32
  case types_1.FieldTypeBasePlatform.GRAPHQL: {
33
- res = 'String';
33
+ res = "String";
34
34
  break;
35
35
  }
36
36
  default: {
@@ -40,14 +40,14 @@ const handler = (params) => {
40
40
  return res;
41
41
  };
42
42
  exports.stringFieldTypeHandlerResourceRecord = {
43
- id: 'string-field-type-handler',
44
- kind: 'handler',
43
+ id: "string-field-type-handler",
44
+ kind: "handler",
45
45
  parentId: constants_1.ROOT_RESOURCE_ID,
46
46
  settings: {
47
- title: '字符串字段类型处理程序',
48
- description: '',
49
- code: '',
47
+ title: "字符串字段类型处理程序",
48
+ description: "",
49
+ code: "",
50
50
  dependencies: [],
51
- handler
52
- }
51
+ handler,
52
+ },
53
53
  };
@@ -1,5 +1,5 @@
1
- import { HandlerExtendedResource } from '@ldsg/handler';
2
- import { FieldTypeSpecificResourceSettings, GetFieldTypeInfo } from './types';
1
+ import { HandlerExtendedResource } from "@ldsg/handler";
2
+ import { FieldTypeSpecificResourceSettings, GetFieldTypeInfo } from "./types";
3
3
  export declare class FieldTypeResource extends HandlerExtendedResource<FieldTypeSpecificResourceSettings> {
4
4
  getFieldTypeInfo: GetFieldTypeInfo;
5
5
  }
package/dist/resource.js CHANGED
@@ -18,14 +18,14 @@ class FieldTypeResource extends handler_1.HandlerExtendedResource {
18
18
  for (const platform of platforms) {
19
19
  const fieldType = getFieldType({
20
20
  fieldProperties,
21
- platform
21
+ platform,
22
22
  });
23
23
  platformToTypeMap[platform] = fieldType;
24
24
  }
25
25
  const res = {
26
26
  fieldTypeInfo: {
27
- platformToTypeMap
28
- }
27
+ platformToTypeMap,
28
+ },
29
29
  };
30
30
  return res;
31
31
  };
@@ -1,4 +1,4 @@
1
- import { FieldTypeInfo, FieldTypePlatform } from './field-type-info';
1
+ import { FieldTypeInfo, FieldTypePlatform } from "./field-type-info";
2
2
  export interface PlatformsParams {
3
3
  /**
4
4
  * Platforms
@@ -1,4 +1,4 @@
1
- import { FieldType, FieldTypePlatform } from './field-type-info';
1
+ import { FieldType, FieldTypePlatform } from "./field-type-info";
2
2
  export interface PlatformParams {
3
3
  /**
4
4
  * Platform
@@ -1,6 +1,6 @@
1
- export * from './field-type-info';
2
- export * from './get-field-type';
3
- export * from './get-field-type-info';
4
- export * from './resource-extended-handler';
5
- export * from './specific-resource-settings';
1
+ export * from "./field-type-info";
2
+ export * from "./get-field-type";
3
+ export * from "./get-field-type-info";
4
+ export * from "./resource-extended-handler";
5
+ export * from "./specific-resource-settings";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import { ResourceExtendedHandler } from '@ldsg/handler';
2
- import { FieldType } from './field-type-info';
3
- import { GetFieldTypeParams } from './get-field-type';
1
+ import { ResourceExtendedHandler } from "@ldsg/handler";
2
+ import { FieldType } from "./field-type-info";
3
+ import { GetFieldTypeParams } from "./get-field-type";
4
4
  export type FieldTypeResourceExtendedHandler = ResourceExtendedHandler<GetFieldTypeParams, FieldType>;
5
5
  //# sourceMappingURL=resource-extended-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource-extended-handler.d.ts","sourceRoot":"","sources":["../../src/types/resource-extended-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"resource-extended-handler.d.ts","sourceRoot":"","sources":["../../src/types/resource-extended-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CACpE,kBAAkB,EAClB,SAAS,CACV,CAAC"}
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
2
  export declare const FieldTypeSpecificResourceSettingsSchema: z.ZodObject<{}, z.core.$catchall<z.ZodAny>>;
3
3
  export declare const SpecificResourceSettingsSchema: z.ZodObject<{}, z.core.$catchall<z.ZodAny>>;
4
4
  export type FieldTypeSpecificResourceSettings = z.infer<typeof FieldTypeSpecificResourceSettingsSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"specific-resource-settings.d.ts","sourceRoot":"","sources":["../../src/types/specific-resource-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uCAAuC,6CAAiC,CAAC;AAEtF,eAAO,MAAM,8BAA8B,6CAA0C,CAAC;AACtF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
1
+ {"version":3,"file":"specific-resource-settings.d.ts","sourceRoot":"","sources":["../../src/types/specific-resource-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uCAAuC,6CAAiC,CAAC;AAEtF,eAAO,MAAM,8BAA8B,6CAA0C,CAAC;AACtF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldsg/field-type",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,20 +14,22 @@
14
14
  "json-schema": "0.4.0",
15
15
  "mongodb": "^6.16.0",
16
16
  "zod": "^4.1.11",
17
- "@ldsg/constants": "0.3.31",
18
- "@ldsg/handler": "0.3.31",
19
- "@ldsg/resource": "0.3.31",
20
- "@ldsg/resource-definition": "0.3.31"
17
+ "@ldsg/constants": "0.3.32",
18
+ "@ldsg/handler": "0.3.32",
19
+ "@ldsg/resource-definition": "0.3.32",
20
+ "@ldsg/resource": "0.3.32"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/jest": "^29.5.2",
24
24
  "@types/json-schema": "^7.0.15",
25
25
  "jest": "^29.5.0",
26
+ "oxfmt": "latest",
27
+ "oxlint": "latest",
26
28
  "supertest": "^6.3.4",
27
29
  "ts-jest": "^29.1.5",
28
30
  "ts-node": "^10.9.2",
29
31
  "typescript": "^5.8.3",
30
- "@ldsg/types": "0.3.31"
32
+ "@ldsg/types": "0.3.32"
31
33
  },
32
34
  "publishConfig": {
33
35
  "access": "public"
@@ -35,6 +37,8 @@
35
37
  "scripts": {
36
38
  "build": "tsc --project tsconfig.build.json",
37
39
  "clean": "rm -rf dist",
40
+ "format": "oxfmt --write src/",
41
+ "lint": "oxlint src/",
38
42
  "test": "jest"
39
43
  }
40
44
  }