@ldsg/graphql-workflows 0.3.30 → 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
  /**
5
5
  * Instantiate Resource Handler General Resource Settings
6
6
  * 实例化资源处理程序普通资源配置
@@ -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;;;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,wCAAwC,QAAQ,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;;;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,wCAAwC,QAAQ,CAAC"}
package/dist/constants.js CHANGED
@@ -6,8 +6,8 @@ exports.GRAPHQL_GLOBAL_WORKFLOW_PATH_INFO_STRING = exports.RESOURCE_DEFINITION_S
6
6
  * 实例化资源处理程序普通资源配置
7
7
  */
8
8
  exports.INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS = {
9
- title: 'GraphQL工作流组实例化资源处理程序',
10
- description: ''
9
+ title: "GraphQL工作流组实例化资源处理程序",
10
+ description: "",
11
11
  };
12
12
  /**
13
13
  * Instantiate Resource Handler Specific Resource Settings
@@ -18,15 +18,15 @@ exports.INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS = {
18
18
  code: `export * from "@ldsg/graphql-workflows";`,
19
19
  dependencies: [
20
20
  {
21
- name: '@ldsg/graphql-workflows'
22
- }
23
- ]
21
+ name: "@ldsg/graphql-workflows",
22
+ },
23
+ ],
24
24
  };
25
25
  exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = {
26
- title: 'GraphQL工作流组资源定义',
27
- description: ''
26
+ title: "GraphQL工作流组资源定义",
27
+ description: "",
28
28
  };
29
29
  exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = {
30
- kind: 'graphql_workflows'
30
+ kind: "graphql_workflows",
31
31
  };
32
- exports.GRAPHQL_GLOBAL_WORKFLOW_PATH_INFO_STRING = '*:*';
32
+ exports.GRAPHQL_GLOBAL_WORKFLOW_PATH_INFO_STRING = "*:*";
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 { GraphqlWorkflowsResource } from './resource';
4
- import { GraphqlWorkflowsSpecificResourceSettings } from './types';
1
+ import { Handler, HandlerExtendedResourceSettings } from "@ldsg/handler";
2
+ import { InstantiateResourceParams, InstantiateResourceRes } from "@ldsg/resource";
3
+ import { GraphqlWorkflowsResource } from "./resource";
4
+ import { GraphqlWorkflowsSpecificResourceSettings } from "./types";
5
5
  export declare const handler: Handler<InstantiateResourceParams<HandlerExtendedResourceSettings<GraphqlWorkflowsSpecificResourceSettings>>, InstantiateResourceRes<GraphqlWorkflowsResource>>;
6
6
  //# sourceMappingURL=handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,wCAAwC,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,OAAO,EAAE,OAAO,CAC3B,yBAAyB,CAAC,+BAA+B,CAAC,wCAAwC,CAAC,CAAC,EACpG,sBAAsB,CAAC,wBAAwB,CAAC,CAC3B,CAAC"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,wCAAwC,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,OAAO,EAAE,OAAO,CAC3B,yBAAyB,CACvB,+BAA+B,CAAC,wCAAwC,CAAC,CAC1E,EACD,sBAAsB,CAAC,wBAAwB,CAAC,CAC3B,CAAC"}
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,6 +1,6 @@
1
- import { HandlerExtendedResourceSettings } from '@ldsg/handler';
2
- import { InstantiateResource } from '@ldsg/resource';
3
- import { GraphqlWorkflowsResource } from './resource';
4
- import { GraphqlWorkflowsSpecificResourceSettings } from './types';
1
+ import { HandlerExtendedResourceSettings } from "@ldsg/handler";
2
+ import { InstantiateResource } from "@ldsg/resource";
3
+ import { GraphqlWorkflowsResource } from "./resource";
4
+ import { GraphqlWorkflowsSpecificResourceSettings } from "./types";
5
5
  export declare const instantiateResource: InstantiateResource<HandlerExtendedResourceSettings<GraphqlWorkflowsSpecificResourceSettings>, GraphqlWorkflowsResource>;
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.GraphqlWorkflowsResource(resourceConstructorParams);
8
8
  const res = {
9
- resource
9
+ resource,
10
10
  };
11
11
  return res;
12
12
  };
@@ -1,6 +1,6 @@
1
- import { GetGraphqlMiddlewareInfo } from '@ldsg/graphql';
2
- import { Resource } from '@ldsg/resource';
3
- import { GraphqlWorkflowsSpecificResourceSettings } from './types';
1
+ import { GetGraphqlMiddlewareInfo } from "@ldsg/graphql";
2
+ import { Resource } from "@ldsg/resource";
3
+ import { GraphqlWorkflowsSpecificResourceSettings } from "./types";
4
4
  export declare class GraphqlWorkflowsResource extends Resource<GraphqlWorkflowsSpecificResourceSettings> {
5
5
  getGraphqlMiddlewareInfo: GetGraphqlMiddlewareInfo;
6
6
  }
package/dist/resource.js CHANGED
@@ -10,7 +10,7 @@ class GraphqlWorkflowsResource extends resource_1.Resource {
10
10
  this.getGraphqlMiddlewareInfo = () => {
11
11
  const { id, getFilteredResources } = this;
12
12
  const { resources } = getFilteredResources({
13
- parentId: id
13
+ parentId: id,
14
14
  });
15
15
  const graphqlPathInfoStringToWorkflowInfoMap = {};
16
16
  resources.forEach((resource) => {
@@ -28,7 +28,7 @@ class GraphqlWorkflowsResource extends resource_1.Resource {
28
28
  const graphqlGlobalWorkflowInfo = graphqlPathInfoStringToWorkflowInfoMap[constants_1.GRAPHQL_GLOBAL_WORKFLOW_PATH_INFO_STRING];
29
29
  const workflowMiddleware = async (resolve, source, args, context, info) => {
30
30
  const { graphqlPathInfoString } = (0, utils_1.getGraphqlPathInfoString)({
31
- info
31
+ info,
32
32
  });
33
33
  /**
34
34
  * GraphQL 字段工作流
@@ -42,11 +42,11 @@ class GraphqlWorkflowsResource extends resource_1.Resource {
42
42
  args,
43
43
  context,
44
44
  info,
45
- fieldWorkflowInfo: graphqlFieldWorkflowInfo
45
+ fieldWorkflowInfo: graphqlFieldWorkflowInfo,
46
46
  };
47
47
  const executeRes = await graphqlGlobalWorkflowInfo.execute({
48
48
  context,
49
- variables
49
+ variables,
50
50
  });
51
51
  res = executeRes.variables.result;
52
52
  }
@@ -56,11 +56,11 @@ class GraphqlWorkflowsResource extends resource_1.Resource {
56
56
  source,
57
57
  args,
58
58
  context,
59
- info
59
+ info,
60
60
  };
61
61
  const executeRes = await graphqlFieldWorkflowInfo.execute({
62
62
  context,
63
- variables
63
+ variables,
64
64
  });
65
65
  res = executeRes.variables.result;
66
66
  }
@@ -71,7 +71,7 @@ class GraphqlWorkflowsResource extends resource_1.Resource {
71
71
  };
72
72
  const res = {
73
73
  sort: 0,
74
- middleware: workflowMiddleware
74
+ middleware: workflowMiddleware,
75
75
  };
76
76
  return res;
77
77
  };
@@ -1,4 +1,4 @@
1
- import { GraphQLResolveInfo } from 'graphql';
2
- export type GraphqlPathFragmentInfo = Pick<GraphQLResolveInfo['path'], 'key' | 'typename'>;
1
+ import { GraphQLResolveInfo } from "graphql";
2
+ export type GraphqlPathFragmentInfo = Pick<GraphQLResolveInfo["path"], "key" | "typename">;
3
3
  export type GraphqlPathFragmentInfos = GraphqlPathFragmentInfo[];
4
4
  //# sourceMappingURL=graphql-path-fragment-info.d.ts.map
@@ -1,4 +1,4 @@
1
- import { WorkflowInfo } from '@ldsg/workflow';
1
+ import { WorkflowInfo } from "@ldsg/workflow";
2
2
  export interface GraphqlWorkflowInfo {
3
3
  /**
4
4
  * GraphQL Type Name
@@ -1,4 +1,4 @@
1
- export * from './graphql-path-fragment-info';
2
- export * from './graphql-workflow-info.ts';
3
- export * from './specific-resource-settings';
1
+ export * from "./graphql-path-fragment-info";
2
+ export * from "./graphql-workflow-info.ts";
3
+ export * from "./specific-resource-settings";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
2
  export declare const GraphqlWorkflowsSpecificResourceSettingsSchema: z.ZodObject<{}, z.core.$catchall<z.ZodAny>>;
3
3
  export declare const SpecificResourceSettingsSchema: z.ZodObject<{}, z.core.$catchall<z.ZodAny>>;
4
4
  export type GraphqlWorkflowsSpecificResourceSettings = z.infer<typeof GraphqlWorkflowsSpecificResourceSettingsSchema>;
@@ -1,4 +1,4 @@
1
- import { GraphQLResolveInfo } from 'graphql';
1
+ import { GraphQLResolveInfo } from "graphql";
2
2
  interface GetGraphqlPathInfoStringParmas {
3
3
  info: GraphQLResolveInfo;
4
4
  }
@@ -8,7 +8,7 @@ const getGraphqlPathInfoString = (params) => {
8
8
  const { info } = params;
9
9
  const graphqlPathInfoString = `${info.parentType.name}:${info.fieldName}`;
10
10
  const res = {
11
- graphqlPathInfoString
11
+ graphqlPathInfoString,
12
12
  };
13
13
  return res;
14
14
  };
@@ -1,2 +1,2 @@
1
- export * from './get-graphql-path-info-string';
1
+ export * from "./get-graphql-path-info-string";
2
2
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldsg/graphql-workflows",
3
- "version": "0.3.30",
3
+ "version": "0.3.32",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -11,33 +11,37 @@
11
11
  "dist/"
12
12
  ],
13
13
  "dependencies": {
14
- "graphql-compose": "^9.1.0",
14
+ "graphql-compose": "9.1.0",
15
15
  "graphql-middleware": "^6.1.35",
16
16
  "graphql-yoga": "^5.13.4",
17
17
  "zod": "^4.1.11",
18
- "@ldsg/handler": "0.3.30",
19
- "@ldsg/resource": "0.3.30",
20
- "@ldsg/resource-definition": "0.3.30",
21
- "@ldsg/workflow": "0.3.30"
18
+ "@ldsg/handler": "0.3.32",
19
+ "@ldsg/resource": "0.3.32",
20
+ "@ldsg/resource-definition": "0.3.32",
21
+ "@ldsg/workflow": "0.3.32"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/jest": "^29.5.2",
25
25
  "@types/supertest": "^6.0.0",
26
26
  "graphql": "16.11.0",
27
27
  "jest": "^29.5.0",
28
+ "oxfmt": "latest",
29
+ "oxlint": "latest",
28
30
  "supertest": "^6.3.4",
29
31
  "ts-jest": "^29.1.5",
30
32
  "ts-node": "^10.9.2",
31
33
  "typescript": "^5.8.3",
32
- "@ldsg/application": "0.3.30",
33
- "@ldsg/graphql": "0.3.30",
34
- "@ldsg/types": "0.3.30"
34
+ "@ldsg/application": "0.3.32",
35
+ "@ldsg/types": "0.3.32",
36
+ "@ldsg/graphql": "0.3.32"
35
37
  },
36
38
  "publishConfig": {
37
39
  "access": "public"
38
40
  },
39
41
  "scripts": {
40
42
  "build": "tsc --project tsconfig.build.json",
41
- "clean": "rm -rf dist"
43
+ "clean": "rm -rf dist",
44
+ "format": "oxfmt --write src/",
45
+ "lint": "oxlint src/"
42
46
  }
43
47
  }