@docupace/ihub-config 1.0.4 → 1.0.6
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/README.md +82 -82
- package/dist/model/graphs/config/common.graphql +7 -7
- package/dist/model/graphs/config/fields.graphql +338 -338
- package/dist/model/graphs/config/menu.graphql +46 -41
- package/dist/model/graphs/config/mutation.graphql +30 -30
- package/dist/model/graphs/config/page.graphql +228 -227
- package/dist/model/graphs/config/panel.graphql +30 -30
- package/dist/model/graphs/config/query.graphql +55 -55
- package/dist/model/graphs/config/selectOptions.graphql +47 -47
- package/dist/model/graphs/config/table.graphql +135 -121
- package/dist/model/graphs/config/tests.graphql +16 -16
- package/dist/model/graphs/config/theme.graphql +41 -41
- package/dist/model/graphs/config/ui-components.graphql +10 -10
- package/dist/model/graphs/domains/scalars.graphql +3 -3
- package/dist/model/graphs/filter.graphql +5 -5
- package/dist/model/graphs/schema.graphql +7 -7
- package/model/graphs/config/common.graphql +7 -7
- package/model/graphs/config/fields.graphql +338 -338
- package/model/graphs/config/menu.graphql +46 -41
- package/model/graphs/config/mutation.graphql +30 -30
- package/model/graphs/config/page.graphql +228 -227
- package/model/graphs/config/panel.graphql +30 -30
- package/model/graphs/config/query.graphql +55 -55
- package/model/graphs/config/selectOptions.graphql +47 -47
- package/model/graphs/config/table.graphql +135 -121
- package/model/graphs/config/tests.graphql +16 -16
- package/model/graphs/config/theme.graphql +41 -41
- package/model/graphs/config/ui-components.graphql +10 -10
- package/model/graphs/domains/scalars.graphql +3 -3
- package/model/graphs/filter.graphql +5 -5
- package/model/graphs/schema.graphql +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
# @docupace/ihub-config
|
|
2
|
-
|
|
3
|
-
Reusable config-service GraphQL package extracted from docupace server.
|
|
4
|
-
|
|
5
|
-
## Run standalone server
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm install
|
|
9
|
-
pnpm start:dev
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Use as extension in another server
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
import { getConfigExtension } from '@docupace/ihub-config';
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Then add to server extensions array.
|
|
19
|
-
|
|
20
|
-
To resolve template expressions (for example `$${applicationPreference:...}`),
|
|
21
|
-
provide `configInjectorResolvers` from the host app:
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
import { getConfigExtension } from '@docupace/ihub-config';
|
|
25
|
-
import {
|
|
26
|
-
DashboardPageConfigProvider,
|
|
27
|
-
TablePageConfigProvider,
|
|
28
|
-
AnyPageConfigProvider,
|
|
29
|
-
DetailsPageConfigProvider,
|
|
30
|
-
} from './your-host-config-providers.js';
|
|
31
|
-
import { configResolvers } from './your-host-config-resolvers.js';
|
|
32
|
-
|
|
33
|
-
const APPLICATION_PREFERENCE_PREFIX = 'applicationPreference';
|
|
34
|
-
|
|
35
|
-
const applicationPreferenceResolver = async (keys, context) => {
|
|
36
|
-
const data = await loadApplicationPreferences(keys, context);
|
|
37
|
-
|
|
38
|
-
const result: Record<string, string | undefined> = {};
|
|
39
|
-
keys.forEach((key) => (result[key] = undefined));
|
|
40
|
-
data.records.forEach((record: { name: string; value: string }) => {
|
|
41
|
-
result[record.name] = record.value;
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const configExtension = await getConfigExtension({
|
|
48
|
-
configInjectorResolvers: {
|
|
49
|
-
[APPLICATION_PREFERENCE_PREFIX]: applicationPreferenceResolver,
|
|
50
|
-
},
|
|
51
|
-
providers: {
|
|
52
|
-
DashboardPage: DashboardPageConfigProvider,
|
|
53
|
-
TablePage: TablePageConfigProvider,
|
|
54
|
-
AnyPage: AnyPageConfigProvider,
|
|
55
|
-
DetailsPage: DetailsPageConfigProvider,
|
|
56
|
-
},
|
|
57
|
-
resolvers: configResolvers,
|
|
58
|
-
});
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Required environment variables
|
|
62
|
-
|
|
63
|
-
- `AUTH0_DOMAIN`
|
|
64
|
-
- `AUTH0_AUDIENCE`
|
|
65
|
-
- `AUTH0_CLIENT_ID`
|
|
66
|
-
- `AUTH0_CLIENT_SECRET`
|
|
67
|
-
|
|
68
|
-
Optional:
|
|
69
|
-
|
|
70
|
-
- `CORE_URL`
|
|
71
|
-
- `AUTH0_CC_CLIENT_ID`
|
|
72
|
-
- `AUTH0_CC_CLIENT_SECRET`
|
|
73
|
-
- `INTEGRATION_HUB_URL`
|
|
74
|
-
|
|
75
|
-
Config stores (repeat by prefix such as `STANDARD`, `SITE`):
|
|
76
|
-
|
|
77
|
-
- `<PREFIX>_CONFIG_LOCAL_PATH`
|
|
78
|
-
- `<PREFIX>_CONFIG_REMOTE_PATH`
|
|
79
|
-
- `<PREFIX>_CONFIG_REMOTE_BRANCH`
|
|
80
|
-
- `<PREFIX>_CONFIG_PRIORITY`
|
|
81
|
-
- `<PREFIX>_CONFIG_NAME`
|
|
82
|
-
- `CONFIG_LOCAL_PATH_ROOT` (optional fallback)
|
|
1
|
+
# @docupace/ihub-config
|
|
2
|
+
|
|
3
|
+
Reusable config-service GraphQL package extracted from docupace server.
|
|
4
|
+
|
|
5
|
+
## Run standalone server
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
pnpm start:dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Use as extension in another server
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { getConfigExtension } from '@docupace/ihub-config';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then add to server extensions array.
|
|
19
|
+
|
|
20
|
+
To resolve template expressions (for example `$${applicationPreference:...}`),
|
|
21
|
+
provide `configInjectorResolvers` from the host app:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { getConfigExtension } from '@docupace/ihub-config';
|
|
25
|
+
import {
|
|
26
|
+
DashboardPageConfigProvider,
|
|
27
|
+
TablePageConfigProvider,
|
|
28
|
+
AnyPageConfigProvider,
|
|
29
|
+
DetailsPageConfigProvider,
|
|
30
|
+
} from './your-host-config-providers.js';
|
|
31
|
+
import { configResolvers } from './your-host-config-resolvers.js';
|
|
32
|
+
|
|
33
|
+
const APPLICATION_PREFERENCE_PREFIX = 'applicationPreference';
|
|
34
|
+
|
|
35
|
+
const applicationPreferenceResolver = async (keys, context) => {
|
|
36
|
+
const data = await loadApplicationPreferences(keys, context);
|
|
37
|
+
|
|
38
|
+
const result: Record<string, string | undefined> = {};
|
|
39
|
+
keys.forEach((key) => (result[key] = undefined));
|
|
40
|
+
data.records.forEach((record: { name: string; value: string }) => {
|
|
41
|
+
result[record.name] = record.value;
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const configExtension = await getConfigExtension({
|
|
48
|
+
configInjectorResolvers: {
|
|
49
|
+
[APPLICATION_PREFERENCE_PREFIX]: applicationPreferenceResolver,
|
|
50
|
+
},
|
|
51
|
+
providers: {
|
|
52
|
+
DashboardPage: DashboardPageConfigProvider,
|
|
53
|
+
TablePage: TablePageConfigProvider,
|
|
54
|
+
AnyPage: AnyPageConfigProvider,
|
|
55
|
+
DetailsPage: DetailsPageConfigProvider,
|
|
56
|
+
},
|
|
57
|
+
resolvers: configResolvers,
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Required environment variables
|
|
62
|
+
|
|
63
|
+
- `AUTH0_DOMAIN`
|
|
64
|
+
- `AUTH0_AUDIENCE`
|
|
65
|
+
- `AUTH0_CLIENT_ID`
|
|
66
|
+
- `AUTH0_CLIENT_SECRET`
|
|
67
|
+
|
|
68
|
+
Optional:
|
|
69
|
+
|
|
70
|
+
- `CORE_URL`
|
|
71
|
+
- `AUTH0_CC_CLIENT_ID`
|
|
72
|
+
- `AUTH0_CC_CLIENT_SECRET`
|
|
73
|
+
- `INTEGRATION_HUB_URL`
|
|
74
|
+
|
|
75
|
+
Config stores (repeat by prefix such as `STANDARD`, `SITE`):
|
|
76
|
+
|
|
77
|
+
- `<PREFIX>_CONFIG_LOCAL_PATH`
|
|
78
|
+
- `<PREFIX>_CONFIG_REMOTE_PATH`
|
|
79
|
+
- `<PREFIX>_CONFIG_REMOTE_BRANCH`
|
|
80
|
+
- `<PREFIX>_CONFIG_PRIORITY`
|
|
81
|
+
- `<PREFIX>_CONFIG_NAME`
|
|
82
|
+
- `CONFIG_LOCAL_PATH_ROOT` (optional fallback)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
interface IElement {
|
|
2
|
-
name: String
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface IRowElement implements IElement {
|
|
6
|
-
cols: Int
|
|
7
|
-
name: String
|
|
1
|
+
interface IElement {
|
|
2
|
+
name: String
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface IRowElement implements IElement {
|
|
6
|
+
cols: Int
|
|
7
|
+
name: String
|
|
8
8
|
}
|