@ldsg/graphql-workflow 0.3.9 → 0.3.11

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":"AACA,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,uBAIlE,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,uDAAuD,EAAE,+BAQnE,CAAC;AAEJ,eAAO,MAAM,6CAA6C,EAAE,uBACd,CAAC;AAE/C,eAAO,MAAM,8CAA8C,EAAE,0CAI1D,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,+BAOrE,CAAC;AAEF,eAAO,MAAM,6CAA6C,EAAE,uBAG3D,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,0CAE5D,CAAC"}
package/dist/constants.js CHANGED
@@ -1,14 +1,13 @@
1
1
  "use strict";
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
- const graphql_workflows_1 = require("@ldsg/graphql-workflows");
5
4
  /**
6
5
  * Instantiate Resource Handler General Resource Settings
7
6
  * 实例化资源处理程序普通资源配置
8
7
  */
9
8
  exports.INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS = {
10
- title: "GraphQL工作流实例化资源处理程序",
11
- description: "",
9
+ title: 'GraphQL工作流实例化资源处理程序',
10
+ description: ''
12
11
  };
13
12
  /**
14
13
  * Instantiate Resource Handler Specific Resource Settings
@@ -19,12 +18,14 @@ exports.INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS = {
19
18
  code: `export * from "@ldsg/graphql-workflow";`,
20
19
  dependencies: [
21
20
  {
22
- name: "@ldsg/graphql-workflow",
23
- },
24
- ],
21
+ name: '@ldsg/graphql-workflow'
22
+ }
23
+ ]
24
+ };
25
+ exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = {
26
+ title: 'GraphQL工作流资源定义',
27
+ description: ''
25
28
  };
26
- exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = { title: "GraphQL工作流资源定义", description: "" };
27
29
  exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = {
28
- kind: "graphql-workflow",
29
- parentKind: graphql_workflows_1.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS.kind,
30
+ kind: 'graphql_workflow'
30
31
  };
package/dist/handler.d.ts CHANGED
@@ -1,8 +1,6 @@
1
- import { Handler, HandlerExtendedResourceSettings } from "@ldsg/handler";
2
- import { InstantiateResourceParams, InstantiateResourceRes } from "@ldsg/resource";
3
- import { GraphqlWorkflowResource } from "./resource";
4
- import { GraphqlWorkflowSpecificResourceSettings } from "./types";
5
- export declare const handler: Handler<[
6
- InstantiateResourceParams<HandlerExtendedResourceSettings<GraphqlWorkflowSpecificResourceSettings>>
7
- ], InstantiateResourceRes<GraphqlWorkflowResource>>;
1
+ import { Handler, HandlerExtendedResourceSettings } from '@ldsg/handler';
2
+ import { InstantiateResourceParams, InstantiateResourceRes } from '@ldsg/resource';
3
+ import { GraphqlWorkflowResource } from './resource';
4
+ import { GraphqlWorkflowSpecificResourceSettings } from './types';
5
+ export declare const handler: Handler<InstantiateResourceParams<HandlerExtendedResourceSettings<GraphqlWorkflowSpecificResourceSettings>>, InstantiateResourceRes<GraphqlWorkflowResource>>;
8
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,EACL,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,uCAAuC,EAAE,MAAM,SAAS,CAAC;AAElE,eAAO,MAAM,OAAO,EAAE,OAAO,CAC3B;IACE,yBAAyB,CACvB,+BAA+B,CAAC,uCAAuC,CAAC,CACzE;CACF,EACD,sBAAsB,CAAC,uBAAuB,CAAC,CAC1B,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,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,uCAAuC,EAAE,MAAM,SAAS,CAAC;AAElE,eAAO,MAAM,OAAO,EAAE,OAAO,CAC3B,yBAAyB,CAAC,+BAA+B,CAAC,uCAAuC,CAAC,CAAC,EACnG,sBAAsB,CAAC,uBAAuB,CAAC,CAC1B,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 { GraphqlWorkflowResource } from "./resource";
4
- import { GraphqlWorkflowSpecificResourceSettings } from "./types";
1
+ import { HandlerExtendedResourceSettings } from '@ldsg/handler';
2
+ import { InstantiateResource } from '@ldsg/resource';
3
+ import { GraphqlWorkflowResource } from './resource';
4
+ import { GraphqlWorkflowSpecificResourceSettings } from './types';
5
5
  export declare const instantiateResource: InstantiateResource<HandlerExtendedResourceSettings<GraphqlWorkflowSpecificResourceSettings>, GraphqlWorkflowResource>;
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.GraphqlWorkflowResource(resourceConstructorParams);
8
8
  const res = {
9
- resource,
9
+ resource
10
10
  };
11
11
  return res;
12
12
  };
@@ -1,6 +1,6 @@
1
- import { GetGraphqlWorkflowInfo } from "@ldsg/graphql-workflows";
2
- import { Resource } from "@ldsg/resource";
3
- import { GraphqlWorkflowSpecificResourceSettings } from "./types";
1
+ import { GetGraphqlWorkflowInfo } from '@ldsg/graphql-workflows';
2
+ import { Resource } from '@ldsg/resource';
3
+ import { GraphqlWorkflowSpecificResourceSettings } from './types';
4
4
  export declare class GraphqlWorkflowResource extends Resource<GraphqlWorkflowSpecificResourceSettings> {
5
5
  getGraphqlWorkflowInfo: GetGraphqlWorkflowInfo;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,uCAAuC,EAAE,MAAM,SAAS,CAAC;AAElE,qBAAa,uBAAwB,SAAQ,QAAQ,CAAC,uCAAuC,CAAC;IAC5F,sBAAsB,EAAE,sBAAsB,CAkB5C;CACH"}
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAuB,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,uCAAuC,EAAE,MAAM,SAAS,CAAC;AAElE,qBAAa,uBAAwB,SAAQ,QAAQ,CAAC,uCAAuC,CAAC;IAC5F,sBAAsB,EAAE,sBAAsB,CAiB5C;CACH"}
package/dist/resource.js CHANGED
@@ -6,12 +6,13 @@ class GraphqlWorkflowResource extends resource_1.Resource {
6
6
  constructor() {
7
7
  super(...arguments);
8
8
  this.getGraphqlWorkflowInfo = () => {
9
- const { settings: { graphqlPathInfoString }, getResourcesFromSettings, } = this;
9
+ const { settings: { typeName, fieldName }, getResourcesFromSettings } = this;
10
10
  const { workflowResource } = getResourcesFromSettings();
11
11
  const { workflowInfo } = workflowResource.getWorkflowInfo();
12
12
  const res = {
13
- graphqlPathInfoString,
14
- workflowInfo,
13
+ typeName,
14
+ fieldName,
15
+ workflowInfo
15
16
  };
16
17
  return res;
17
18
  };
@@ -1,2 +1,2 @@
1
- export * from "./specific-resource-settings";
1
+ export * from './specific-resource-settings';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,10 +1,13 @@
1
- import { SpecificResourceSettings } from "@ldsg/types";
1
+ import { SpecificResourceSettings } from '@ldsg/types';
2
2
  export interface GraphqlWorkflowSpecificResourceSettings extends SpecificResourceSettings {
3
3
  /**
4
- * GraphQL Path Info String
5
- * include key and typename
4
+ * GraphQL Type Name
6
5
  */
7
- graphqlPathInfoString: string;
6
+ typeName: string;
7
+ /**
8
+ * GraphQL Field Name
9
+ */
10
+ fieldName: string;
8
11
  /**
9
12
  * Workflow Resource Id
10
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"specific-resource-settings.d.ts","sourceRoot":"","sources":["../../src/types/specific-resource-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,uCACf,SAAQ,wBAAwB;IAChC;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
1
+ {"version":3,"file":"specific-resource-settings.d.ts","sourceRoot":"","sources":["../../src/types/specific-resource-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,uCAAwC,SAAQ,wBAAwB;IACvF;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
package/package.json CHANGED
@@ -1,32 +1,38 @@
1
1
  {
2
2
  "name": "@ldsg/graphql-workflow",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "",
5
+ "keywords": [],
6
+ "license": "MIT",
7
+ "author": "wanxger",
5
8
  "main": "dist/index.js",
9
+ "types": "dist",
6
10
  "files": [
7
11
  "dist/"
8
12
  ],
9
- "types": "dist",
10
- "keywords": [],
11
- "author": "wanxger",
12
- "license": "MIT",
13
- "publishConfig": {
14
- "access": "public"
15
- },
16
13
  "dependencies": {
17
14
  "graphql-compose": "^9.1.0",
18
15
  "graphql-yoga": "^5.13.4",
19
- "@ldsg/handler": "0.3.9",
20
- "@ldsg/resource": "0.3.9",
21
- "@ldsg/resource-definition": "0.3.9"
16
+ "@ldsg/handler": "0.3.10",
17
+ "@ldsg/resource": "0.3.10",
18
+ "@ldsg/resource-definition": "0.3.10",
19
+ "@ldsg/workflow": "0.3.11"
22
20
  },
23
21
  "devDependencies": {
22
+ "@types/jest": "^29.5.2",
24
23
  "@types/supertest": "^6.0.0",
25
24
  "graphql": "16.11.0",
25
+ "jest": "^29.5.0",
26
26
  "supertest": "^6.3.4",
27
- "@ldsg/application": "0.3.9",
28
- "@ldsg/graphql-workflows": "0.3.9",
29
- "@ldsg/types": "0.3.9"
27
+ "ts-jest": "^29.1.5",
28
+ "ts-node": "^10.9.2",
29
+ "typescript": "^5.8.3",
30
+ "@ldsg/application": "0.3.10",
31
+ "@ldsg/graphql-workflows": "0.3.11",
32
+ "@ldsg/types": "0.3.10"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
30
36
  },
31
37
  "scripts": {
32
38
  "build": "tsc --project tsconfig.build.json",