@ldsg/graphql-workflows 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.
- package/dist/constants.d.ts +3 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +9 -9
- package/dist/handler.d.ts +4 -4
- package/dist/handler.d.ts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/instantiate-resource.d.ts +4 -4
- package/dist/instantiate-resource.js +1 -1
- package/dist/resource.d.ts +3 -3
- package/dist/resource.js +7 -7
- package/dist/types/graphql-path-fragment-info.d.ts +2 -2
- package/dist/types/graphql-workflow-info.ts.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/specific-resource-settings.d.ts +1 -1
- package/dist/utils/get-graphql-path-info-string.d.ts +1 -1
- package/dist/utils/get-graphql-path-info-string.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +14 -10
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HandlerSpecificResourceSettings } from
|
|
2
|
-
import { ResourceDefinitionSpecificResourceSettings } from
|
|
3
|
-
import { GeneralResourceSettings } from
|
|
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
|
* 实例化资源处理程序普通资源配置
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -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,+
|
|
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:
|
|
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:
|
|
22
|
-
}
|
|
23
|
-
]
|
|
21
|
+
name: "@ldsg/graphql-workflows",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
24
|
};
|
|
25
25
|
exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = {
|
|
26
|
-
title:
|
|
27
|
-
description:
|
|
26
|
+
title: "GraphQL工作流组资源定义",
|
|
27
|
+
description: "",
|
|
28
28
|
};
|
|
29
29
|
exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = {
|
|
30
|
-
kind:
|
|
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
|
|
2
|
-
import { InstantiateResourceParams, InstantiateResourceRes } from
|
|
3
|
-
import { GraphqlWorkflowsResource } from
|
|
4
|
-
import { GraphqlWorkflowsSpecificResourceSettings } from
|
|
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
|
package/dist/handler.d.ts.map
CHANGED
|
@@ -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,
|
|
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
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
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
|
|
2
|
-
import { InstantiateResource } from
|
|
3
|
-
import { GraphqlWorkflowsResource } from
|
|
4
|
-
import { GraphqlWorkflowsSpecificResourceSettings } from
|
|
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
|
package/dist/resource.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GetGraphqlMiddlewareInfo } from
|
|
2
|
-
import { Resource } from
|
|
3
|
-
import { GraphqlWorkflowsSpecificResourceSettings } from
|
|
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
|
|
2
|
-
export type GraphqlPathFragmentInfo = Pick<GraphQLResolveInfo[
|
|
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
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
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
|
|
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>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
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.
|
|
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": "
|
|
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.
|
|
19
|
-
"@ldsg/resource": "0.3.
|
|
20
|
-
"@ldsg/resource-definition": "0.3.
|
|
21
|
-
"@ldsg/workflow": "0.3.
|
|
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.
|
|
33
|
-
"@ldsg/
|
|
34
|
-
"@ldsg/
|
|
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
|
}
|