@ldsg/schedule 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.
@@ -1,6 +1,6 @@
1
- import { HandlerSpecificResourceSettings } from '@ldsg/handler';
2
- import { ResourceDefinitionSpecificResourceSettings } from '@ldsg/resource-definition';
3
- import { GeneralResourceSettings } from '@ldsg/types';
1
+ import { HandlerSpecificResourceSettings } from "@ldsg/handler";
2
+ import { ResourceDefinitionSpecificResourceSettings } from "@ldsg/resource-definition";
3
+ import { GeneralResourceSettings } from "@ldsg/types";
4
4
  export declare const INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS: GeneralResourceSettings;
5
5
  export declare const INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS: HandlerSpecificResourceSettings;
6
6
  export declare const RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS: GeneralResourceSettings;
@@ -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;AAEtD,eAAO,MAAM,sDAAsD,EAAE,uBAGpE,CAAC;AAEF,eAAO,MAAM,uDAAuD,EAAE,+BAOrE,CAAC;AAEF,eAAO,MAAM,6CAA6C,EAAE,uBAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,0CAE5D,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;AAEtD,eAAO,MAAM,sDAAsD,EAAE,uBAGpE,CAAC;AAEF,eAAO,MAAM,uDAAuD,EAAE,+BAQnE,CAAC;AAEJ,eAAO,MAAM,6CAA6C,EAAE,uBAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,0CAG1D,CAAC"}
package/dist/constants.js CHANGED
@@ -2,21 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = exports.INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS = exports.INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS = void 0;
4
4
  exports.INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS = {
5
- title: '定时任务实例化资源处理程序',
6
- description: ''
5
+ title: "定时任务实例化资源处理程序",
6
+ description: "",
7
7
  };
8
8
  exports.INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS = {
9
9
  code: `export * from "@ldsg/schedule";`,
10
10
  dependencies: [
11
11
  {
12
- name: '@ldsg/schedule'
13
- }
14
- ]
12
+ name: "@ldsg/schedule",
13
+ },
14
+ ],
15
15
  };
16
16
  exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = {
17
- title: '定时任务资源定义',
18
- description: ''
17
+ title: "定时任务资源定义",
18
+ description: "",
19
19
  };
20
20
  exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = {
21
- kind: 'schedule'
21
+ kind: "schedule",
22
22
  };
package/dist/handler.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Handler } from '@ldsg/handler';
2
- import { InstantiateResourceParams, InstantiateResourceRes } from '@ldsg/resource';
3
- import { ScheduleResource } from './resource';
4
- import { ScheduleSpecificResourceSettings } from './types';
1
+ import { Handler } from "@ldsg/handler";
2
+ import { InstantiateResourceParams, InstantiateResourceRes } from "@ldsg/resource";
3
+ import { ScheduleResource } from "./resource";
4
+ import { ScheduleSpecificResourceSettings } from "./types";
5
5
  export declare const handler: Handler<InstantiateResourceParams<ScheduleSpecificResourceSettings>, InstantiateResourceRes<ScheduleResource>>;
6
6
  //# sourceMappingURL=handler.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from './constants';
2
- export * from './handler';
3
- export * from './instantiate-resource';
4
- export * from './resource';
5
- export * from './types';
1
+ export * from "./constants";
2
+ export * from "./handler";
3
+ export * from "./instantiate-resource";
4
+ export * from "./resource";
5
+ export * from "./types";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import { InstantiateResource } from '@ldsg/resource';
2
- import { ScheduleResource } from './resource';
3
- import { ScheduleSpecificResourceSettings } from './types';
1
+ import { InstantiateResource } from "@ldsg/resource";
2
+ import { ScheduleResource } from "./resource";
3
+ import { ScheduleSpecificResourceSettings } from "./types";
4
4
  export declare const instantiateResource: InstantiateResource<ScheduleSpecificResourceSettings, ScheduleResource>;
5
5
  //# sourceMappingURL=instantiate-resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instantiate-resource.d.ts","sourceRoot":"","sources":["../src/instantiate-resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAE3D,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,gCAAgC,EAAE,gBAAgB,CAYvG,CAAC"}
1
+ {"version":3,"file":"instantiate-resource.d.ts","sourceRoot":"","sources":["../src/instantiate-resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAE3D,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CACnD,gCAAgC,EAChC,gBAAgB,CAWjB,CAAC"}
@@ -6,7 +6,7 @@ const instantiateResource = (params) => {
6
6
  const { resourceConstructorParams } = params;
7
7
  const resource = new resource_1.ScheduleResource(resourceConstructorParams);
8
8
  const res = {
9
- resource
9
+ resource,
10
10
  };
11
11
  return res;
12
12
  };
@@ -1,5 +1,5 @@
1
- import { Resource } from '@ldsg/resource';
2
- import { ScheduleSpecificResourceSettings } from './types';
1
+ import { Resource } from "@ldsg/resource";
2
+ import { ScheduleSpecificResourceSettings } from "./types";
3
3
  export declare class ScheduleResource extends Resource<ScheduleSpecificResourceSettings> {
4
4
  getScheduleInfo: () => {
5
5
  scheduleInfo: {
package/dist/resource.js CHANGED
@@ -6,7 +6,7 @@ class ScheduleResource extends resource_1.Resource {
6
6
  constructor() {
7
7
  super(...arguments);
8
8
  this.getScheduleInfo = () => {
9
- const { settings: { triggerType, workflowResourceId, workflowVariables, delay, scheduledAt, cron }, id } = this;
9
+ const { settings: { triggerType, workflowResourceId, workflowVariables, delay, scheduledAt, cron }, id, } = this;
10
10
  const scheduleInfo = {
11
11
  id,
12
12
  triggerType,
@@ -14,7 +14,7 @@ class ScheduleResource extends resource_1.Resource {
14
14
  workflowVariables,
15
15
  delay,
16
16
  scheduledAt,
17
- cron
17
+ cron,
18
18
  };
19
19
  return { scheduleInfo };
20
20
  };
@@ -1,2 +1,2 @@
1
- export * from './specific-resource-settings';
1
+ export * from "./specific-resource-settings";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
2
  /** 触发类型:now-立即,once-单次,every-周期 */
3
3
  export declare const TriggerTypeSchema: z.ZodEnum<{
4
4
  now: "now";
@@ -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,mCAAmC;AACnC,eAAO,MAAM,iBAAiB;;;;EAAmC,CAAC;AAElE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,sCAAsC;;;;;;;;;;;8BAe/B,CAAC;AAErB,eAAO,MAAM,8BAA8B;;;;;;;;;;;8BAAyC,CAAC;AACrF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;8BAE7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,IAAI;QAAE,YAAY,EAAE,YAAY,CAAA;KAAE,CAAC;CACpC"}
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,mCAAmC;AACnC,eAAO,MAAM,iBAAiB;;;;EAAmC,CAAC;AAElE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,sCAAsC;;;;;;;;;;;8BAe/B,CAAC;AAErB,eAAO,MAAM,8BAA8B;;;;;;;;;;;8BAAyC,CAAC;AACrF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;8BAE7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,IAAI;QAAE,YAAY,EAAE,YAAY,CAAA;KAAE,CAAC;CACpC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ScheduleInfoSchema = exports.SpecificResourceSettingsSchema = exports.ScheduleSpecificResourceSettingsSchema = exports.TriggerTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  /** 触发类型:now-立即,once-单次,every-周期 */
6
- exports.TriggerTypeSchema = zod_1.z.enum(['now', 'once', 'every']);
6
+ exports.TriggerTypeSchema = zod_1.z.enum(["now", "once", "every"]);
7
7
  exports.ScheduleSpecificResourceSettingsSchema = zod_1.z
8
8
  .object({
9
9
  /** 触发类型 */
@@ -17,10 +17,10 @@ exports.ScheduleSpecificResourceSettingsSchema = zod_1.z
17
17
  /** 计划执行时间(毫秒时间戳),优先生效 */
18
18
  scheduledAt: zod_1.z.number().optional(),
19
19
  /** cron 表达式,仅 every 类型下使用 */
20
- cron: zod_1.z.string().optional()
20
+ cron: zod_1.z.string().optional(),
21
21
  })
22
22
  .catchall(zod_1.z.any());
23
23
  exports.SpecificResourceSettingsSchema = exports.ScheduleSpecificResourceSettingsSchema;
24
24
  exports.ScheduleInfoSchema = exports.ScheduleSpecificResourceSettingsSchema.extend({
25
- id: zod_1.z.string()
25
+ id: zod_1.z.string(),
26
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldsg/schedule",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -12,19 +12,21 @@
12
12
  ],
13
13
  "dependencies": {
14
14
  "zod": "^4.1.11",
15
- "@ldsg/handler": "0.3.31",
16
- "@ldsg/resource-definition": "0.3.31",
17
- "@ldsg/resource": "0.3.31"
15
+ "@ldsg/handler": "0.3.32",
16
+ "@ldsg/resource": "0.3.32",
17
+ "@ldsg/resource-definition": "0.3.32"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/jest": "^29.5.2",
21
21
  "@types/node": "^20.13.0",
22
22
  "jest": "^29.5.0",
23
+ "oxfmt": "latest",
24
+ "oxlint": "latest",
23
25
  "ts-jest": "^29.1.5",
24
26
  "ts-node": "^10.9.2",
25
27
  "typescript": "^5.8.3",
26
- "@ldsg/application": "0.3.31",
27
- "@ldsg/types": "0.3.31"
28
+ "@ldsg/application": "0.3.32",
29
+ "@ldsg/types": "0.3.32"
28
30
  },
29
31
  "publishConfig": {
30
32
  "access": "public"
@@ -32,6 +34,8 @@
32
34
  "scripts": {
33
35
  "build": "tsc --project tsconfig.build.json",
34
36
  "clean": "rm -rf dist",
37
+ "format": "oxfmt --write src/",
38
+ "lint": "oxlint src/",
35
39
  "test": "jest"
36
40
  }
37
41
  }