@things-factory/worklist-client 9.1.19 → 10.0.0-beta.1
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-client/pages/work-center/work-center-list-page.d.ts +1 -7
- package/dist-client/pages/work-center/work-center-list-page.js +52 -98
- package/dist-client/pages/work-center/work-center-list-page.js.map +1 -1
- package/dist-client/pages/work-center/work-center-page.d.ts +1 -10
- package/dist-client/pages/work-center/work-center-page.js +2 -4
- package/dist-client/pages/work-center/work-center-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/graphql-client.js +1 -3
- package/dist-server/controllers/graphql-client.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
|
@@ -20,9 +20,7 @@ const defaultOptions = {
|
|
|
20
20
|
errorPolicy: 'all'
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
const cache = new core_1.InMemoryCache(
|
|
24
|
-
addTypename: false
|
|
25
|
-
});
|
|
23
|
+
const cache = new core_1.InMemoryCache();
|
|
26
24
|
const uri = env_1.config.get('worklist/endpoint', 'https://gangsters.hatiolab.com/graphql');
|
|
27
25
|
async function connect() {
|
|
28
26
|
var ERROR_HANDLER = ({ graphQLErrors, networkError }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.js","sourceRoot":"","sources":["../../server/controllers/graphql-client.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"graphql-client.js","sourceRoot":"","sources":["../../server/controllers/graphql-client.ts"],"names":[],"mappings":";;AA0BA,0BAsCC;AAhED,gCAA6B;AAE7B,8CAA6F;AAC7F,qDAAmD;AACnD,iEAA4D;AAC5D,iDAAqD;AACrD,6CAAoD;AAEpD,MAAM,cAAc,GAAQ;IAC1B,UAAU,EAAE;QACV,WAAW,EAAE,UAAU;QACvB,WAAW,EAAE,QAAQ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F,OAAO,IAAI,mBAAY,CAAC;QACtB,cAAc;QACd,KAAK;QACL,IAAI,EAAE,IAAA,WAAI,EAAC;YACT,cAAc;YACd,IAAA,eAAO,EAAC,aAAa,CAAC;YACtB,IAAI,eAAQ,CAAC;gBACX,GAAG;gBACH,WAAW,EAAE,SAAS;aACvB,CAAC;SACH,CAAC;KACH,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import 'cross-fetch/polyfill'\n\nimport { ApolloClient, ApolloLink, from, HttpLink, InMemoryCache } from '@apollo/client/core'\nimport { onError } from '@apollo/client/link/error'\nimport { Oauth2Client } from '@things-factory/oauth2-client'\nimport { getRepository } from '@things-factory/shell'\nimport { config, logger } from '@things-factory/env'\n\nconst defaultOptions: any = {\n watchQuery: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'ignore'\n },\n query: {\n fetchPolicy: 'no-cache', //'network-only'\n errorPolicy: 'all'\n },\n mutate: {\n errorPolicy: 'all'\n }\n}\n\nconst cache = new InMemoryCache()\n\nconst uri = config.get('worklist/endpoint', 'https://gangsters.hatiolab.com/graphql')\n\nexport async function connect() {\n var ERROR_HANDLER: any = ({ graphQLErrors, networkError }) => {\n if (graphQLErrors)\n graphQLErrors.map(({ message, locations, path }) => {\n logger.error(`[GraphQL error] Message: ${message}, Location: ${locations}, Path: ${path}`)\n })\n\n if (networkError) {\n logger.error(`[Network error - ${networkError.statusCode}] ${networkError}`)\n }\n }\n\n const oauth2Client: Oauth2Client = await getRepository(Oauth2Client).findOneBy({ name: 'WORKLIST' })\n\n const authMiddleware = new ApolloLink((operation, forward) => {\n // add the authorization to the headers\n operation.setContext(({ headers = {} }) => ({\n headers: {\n ...headers,\n ...oauth2Client.getAuthHeaders()\n }\n }))\n\n return forward(operation)\n })\n\n return new ApolloClient({\n defaultOptions,\n cache,\n link: from([\n authMiddleware,\n onError(ERROR_HANDLER),\n new HttpLink({\n uri,\n credentials: 'include'\n })\n ])\n })\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './activity/activity';
|
|
2
2
|
export * from './work-center/work-center';
|
|
3
|
-
export declare const entities: (typeof import("./work-center/work-center").WorkCenter | typeof import("./
|
|
3
|
+
export declare const entities: (typeof import("./work-center/work-center").WorkCenter | typeof import("./work-center/work-center-history").WorkCenterHistory | typeof import("./activity/activity").Activity)[];
|
|
4
4
|
export declare const subscribers: any[];
|
|
5
5
|
export declare const schema: {
|
|
6
6
|
resolverClasses: (typeof import("./activity/activity-query").ActivityQuery | typeof import("./work-center/work-center-query").WorkCenterQuery | typeof import("./work-center/work-center-mutation").WorkCenterMutation)[];
|