great 1.3.0 → 1.4.0
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 +32 -16
- package/dist/generated/operations.d.ts +23 -1
- package/dist/generated/schema.d.ts +16 -0
- package/dist/generated/schema.js.map +1 -1
- package/dist/import/index.d.ts +3 -1
- package/dist/import/index.js +27 -6
- package/dist/import/index.js.map +1 -1
- package/dist/include/index.d.ts +3 -1
- package/dist/include/index.js +129 -11
- package/dist/include/index.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/index.js +5 -0
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/list.d.ts +2 -0
- package/dist/integrations/list.js +30 -16
- package/dist/integrations/list.js.map +1 -1
- package/dist/push/index.js +37 -14
- package/dist/push/index.js.map +1 -1
- package/dist/remove/index.d.ts +5 -0
- package/dist/remove/index.js +71 -0
- package/dist/remove/index.js.map +1 -0
- package/dist/rename/index.js +4 -3
- package/dist/rename/index.js.map +1 -1
- package/dist/run/index.d.ts +1 -1
- package/dist/utils/elementFiles.d.ts +8 -0
- package/dist/utils/elementFiles.js +33 -0
- package/dist/utils/elementFiles.js.map +1 -1
- package/dist/utils/graphqlError.js +16 -2
- package/dist/utils/graphqlError.js.map +1 -1
- package/dist/utils/mergeEndpointLists.d.ts +7 -0
- package/dist/utils/mergeEndpointLists.js +32 -0
- package/dist/utils/mergeEndpointLists.js.map +1 -0
- package/dist/utils/promptForEndpoints.d.ts +5 -0
- package/dist/utils/promptForEndpoints.js +37 -0
- package/dist/utils/promptForEndpoints.js.map +1 -0
- package/dist/utils/promptForReplaceLocal.d.ts +5 -0
- package/dist/utils/promptForReplaceLocal.js +18 -0
- package/dist/utils/promptForReplaceLocal.js.map +1 -0
- package/dist/utils/promptForValue.d.ts +1 -0
- package/dist/utils/promptForValue.js +5 -3
- package/dist/utils/promptForValue.js.map +1 -1
- package/dist/utils/resolveElementIncludes.d.ts +6 -0
- package/dist/utils/resolveElementIncludes.js +113 -0
- package/dist/utils/resolveElementIncludes.js.map +1 -0
- package/dist/utils/serviceFile.d.ts +3 -0
- package/dist/utils/serviceFile.js +7 -1
- package/dist/utils/serviceFile.js.map +1 -1
- package/dist/utils/writeShadowElement.d.ts +10 -7
- package/dist/utils/writeShadowElement.js +89 -50
- package/dist/utils/writeShadowElement.js.map +1 -1
- package/package.json +7 -7
- package/dist/utils/resolveElementInclude.d.ts +0 -3
- package/dist/utils/resolveElementInclude.js +0 -27
- package/dist/utils/resolveElementInclude.js.map +0 -1
package/README.md
CHANGED
|
@@ -63,8 +63,10 @@ commands never silently fall back to the current folder in that case.
|
|
|
63
63
|
### Integration Management
|
|
64
64
|
|
|
65
65
|
- `great integrations` or `great integrations list`: Display list of
|
|
66
|
-
integrations. Supports `-a` to filter by account,
|
|
67
|
-
integrations ignoring the default account.
|
|
66
|
+
integrations, with their type and account. Supports `-a` to filter by account,
|
|
67
|
+
or `--all` to list all integrations ignoring the default account. Use
|
|
68
|
+
`-t <type>` to only list integrations of a given type (`integration`,
|
|
69
|
+
`library`, or `template`).
|
|
68
70
|
- `great integrations create <name>`: Create a new integration in Integreat.
|
|
69
71
|
Requires `-a`. Returns integration ID to add to local `integration.json` for
|
|
70
72
|
linking with workspace.
|
|
@@ -88,20 +90,26 @@ commands never silently fall back to the current folder in that case.
|
|
|
88
90
|
an `integration.json` file; supports `-a` when creating a new integration, to
|
|
89
91
|
create it in the right account. Will check for conflicts and abort.
|
|
90
92
|
- `great import <template>`: Import a template, creating a local **shadow file**
|
|
91
|
-
for each of its elements.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
different
|
|
99
|
-
|
|
93
|
+
for each of its elements. `<template>` can be a template id or key; supports
|
|
94
|
+
`-a`. A shadow file is an ordinary element file carrying a `$shadow: true`
|
|
95
|
+
marker; it does not own its content (that lives in the source element) — the
|
|
96
|
+
link to the source and the template import are recorded in `.great.json`.
|
|
97
|
+
Several templates may import the same element; re-importing updates the
|
|
98
|
+
existing shadow. Editing a shadow's content locally and pushing detaches it
|
|
99
|
+
from its source (push asks first). When templates share a service with
|
|
100
|
+
different endpoint lists, the lists are merged into a local endpoint list that
|
|
101
|
+
remembers every template it came from. This fails only when the lists order
|
|
102
|
+
their endpoints differently.Must be run from a folder with an
|
|
103
|
+
`integration.json` file (no push required first).
|
|
100
104
|
- `great include <element>`: Include a single element from another integration
|
|
101
|
-
as a shadow file
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
as a shadow file. Use `-p, --pinned-at <timestamp>` to pin the shadow to the
|
|
106
|
+
source as it stood at that ISO timestamp; omit it to follow the source's
|
|
107
|
+
latest content. Including a service with an endpoint list, you're asked which
|
|
108
|
+
endpoints to include with it as shadow elements. Leaving any out makes the
|
|
109
|
+
endpoint list a local element with only the selected endpoints, detached from
|
|
110
|
+
its source. Including an element that already exists replaces it with a
|
|
111
|
+
shadow. You're asked first when local content would be overwritten. Must be
|
|
112
|
+
run from a folder with an `integration.json` file.
|
|
105
113
|
- `great rename <target> <new-key>`: Rename an element or the account key,
|
|
106
114
|
keeping the link to the remote element intact. `<target>` is
|
|
107
115
|
`"<folder>/<key>"` for an element (e.g. `schemas/entry`), or the literal
|
|
@@ -112,6 +120,13 @@ commands never silently fall back to the current folder in that case.
|
|
|
112
120
|
every service listing it. An endpoint list can't be renamed on its own. (To
|
|
113
121
|
rename the integration itself, rename its folder — the folder name is the
|
|
114
122
|
integration key.)
|
|
123
|
+
- `great remove <target>`: Remove an element file and its link in `.great.json`.
|
|
124
|
+
`<target>` is `"<folder>/<key>"` (e.g. `schemas/entry`). Removing an endpoint
|
|
125
|
+
also drops it from every service listing it. Nothing is changed in Integreat
|
|
126
|
+
right away: the next `great push` deletes the removed elements there. Use this
|
|
127
|
+
instead of deleting an element file by hand, which leaves a stale link behind
|
|
128
|
+
for an element that hasn't been pushed. Must be run from a folder with an
|
|
129
|
+
`integration.json` file.
|
|
115
130
|
|
|
116
131
|
### Deployment & Runtime
|
|
117
132
|
|
|
@@ -195,7 +210,8 @@ An integration folder contains:
|
|
|
195
210
|
with one JSON file per element. These hold only configuration. Keys come from
|
|
196
211
|
names, not stored fields: an element's key is its file name without the
|
|
197
212
|
extension (e.g. `schemas/entry.json` has key `entry`). Rename an element with
|
|
198
|
-
`great rename` (a plain file rename is treated as delete + recreate)
|
|
213
|
+
`great rename` (a plain file rename is treated as delete + recreate), and
|
|
214
|
+
remove one with `great remove`.
|
|
199
215
|
- `.great.json` at the folder root. This holds the sync bookkeeping that links
|
|
200
216
|
local files to their remote counterparts — the integration and element ids,
|
|
201
217
|
the owning account, the last-synced timestamps and content hashes. It is
|
|
@@ -108,7 +108,7 @@ export type CreateIntegrationMutation = {
|
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
export type IntegrationsQueryVariables = Exact<{
|
|
111
|
-
|
|
111
|
+
type?: Types.IntegrationType | null | undefined;
|
|
112
112
|
}>;
|
|
113
113
|
export type IntegrationsQuery = {
|
|
114
114
|
integrations: {
|
|
@@ -117,21 +117,28 @@ export type IntegrationsQuery = {
|
|
|
117
117
|
id: string;
|
|
118
118
|
name: string;
|
|
119
119
|
key: string;
|
|
120
|
+
type: Types.IntegrationType;
|
|
121
|
+
account: {
|
|
122
|
+
key: string;
|
|
123
|
+
};
|
|
120
124
|
}>;
|
|
121
125
|
};
|
|
122
126
|
};
|
|
123
127
|
export type IntegrationsForAccountQueryVariables = Exact<{
|
|
124
128
|
accountId: string | number;
|
|
129
|
+
type?: Types.IntegrationType | null | undefined;
|
|
125
130
|
}>;
|
|
126
131
|
export type IntegrationsForAccountQuery = {
|
|
127
132
|
account: {
|
|
128
133
|
name: string;
|
|
134
|
+
key: string;
|
|
129
135
|
integrations: {
|
|
130
136
|
totalCount: number;
|
|
131
137
|
nodes: Array<{
|
|
132
138
|
id: string;
|
|
133
139
|
name: string;
|
|
134
140
|
key: string;
|
|
141
|
+
type: Types.IntegrationType;
|
|
135
142
|
}>;
|
|
136
143
|
};
|
|
137
144
|
} | null;
|
|
@@ -163,6 +170,7 @@ export type IntegrationForPushQuery = {
|
|
|
163
170
|
content: {
|
|
164
171
|
checksum: string | null;
|
|
165
172
|
createdAt: string;
|
|
173
|
+
sourceId: string | null;
|
|
166
174
|
sourceTimestamp: string | null;
|
|
167
175
|
provenance: Array<string>;
|
|
168
176
|
} | null;
|
|
@@ -245,6 +253,7 @@ export type UpdateElementMutation = {
|
|
|
245
253
|
export type SetElementContentMutationVariables = Exact<{
|
|
246
254
|
id: string | number;
|
|
247
255
|
content?: Record<string, unknown> | null | undefined;
|
|
256
|
+
provenance?: Array<string | number> | string | number | null | undefined;
|
|
248
257
|
}>;
|
|
249
258
|
export type SetElementContentMutation = {
|
|
250
259
|
setElementContent: {
|
|
@@ -511,6 +520,9 @@ export type ResolveElementIncludeQuery = {
|
|
|
511
520
|
name: string;
|
|
512
521
|
description: string | null;
|
|
513
522
|
type: Types.ElementType;
|
|
523
|
+
integration: {
|
|
524
|
+
id: string;
|
|
525
|
+
} | null;
|
|
514
526
|
content: {
|
|
515
527
|
sourceId: string | null;
|
|
516
528
|
sourceTimestamp: string | null;
|
|
@@ -519,6 +531,16 @@ export type ResolveElementIncludeQuery = {
|
|
|
519
531
|
} | null;
|
|
520
532
|
};
|
|
521
533
|
};
|
|
534
|
+
export type ElementIdByKeyQueryVariables = Exact<{
|
|
535
|
+
integrationId: string | number;
|
|
536
|
+
key: string | number;
|
|
537
|
+
type: Types.ElementType;
|
|
538
|
+
}>;
|
|
539
|
+
export type ElementIdByKeyQuery = {
|
|
540
|
+
elementByKey: {
|
|
541
|
+
id: string;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
522
544
|
export type IntegrationQueryVariables = Exact<{
|
|
523
545
|
id: string | number;
|
|
524
546
|
}>;
|
|
@@ -103,6 +103,7 @@ export type Auth = Element & {
|
|
|
103
103
|
createdAt: Scalars['DateTime']['output'];
|
|
104
104
|
description?: Maybe<Scalars['String']['output']>;
|
|
105
105
|
id: Scalars['ID']['output'];
|
|
106
|
+
integration?: Maybe<Integration>;
|
|
106
107
|
key: Scalars['ID']['output'];
|
|
107
108
|
name: Scalars['String']['output'];
|
|
108
109
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -113,6 +114,7 @@ export type ConfigElement = Element & {
|
|
|
113
114
|
createdAt: Scalars['DateTime']['output'];
|
|
114
115
|
description?: Maybe<Scalars['String']['output']>;
|
|
115
116
|
id: Scalars['ID']['output'];
|
|
117
|
+
integration?: Maybe<Integration>;
|
|
116
118
|
key: Scalars['ID']['output'];
|
|
117
119
|
name: Scalars['String']['output'];
|
|
118
120
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -123,6 +125,7 @@ export type Dictionary = Element & {
|
|
|
123
125
|
createdAt: Scalars['DateTime']['output'];
|
|
124
126
|
description?: Maybe<Scalars['String']['output']>;
|
|
125
127
|
id: Scalars['ID']['output'];
|
|
128
|
+
integration?: Maybe<Integration>;
|
|
126
129
|
key: Scalars['ID']['output'];
|
|
127
130
|
name: Scalars['String']['output'];
|
|
128
131
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -136,6 +139,7 @@ export type Element = {
|
|
|
136
139
|
createdAt: Scalars['DateTime']['output'];
|
|
137
140
|
description?: Maybe<Scalars['String']['output']>;
|
|
138
141
|
id: Scalars['ID']['output'];
|
|
142
|
+
integration?: Maybe<Integration>;
|
|
139
143
|
key: Scalars['ID']['output'];
|
|
140
144
|
name: Scalars['String']['output'];
|
|
141
145
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -170,6 +174,7 @@ export type Endpoint = Element & {
|
|
|
170
174
|
createdAt: Scalars['DateTime']['output'];
|
|
171
175
|
description?: Maybe<Scalars['String']['output']>;
|
|
172
176
|
id: Scalars['ID']['output'];
|
|
177
|
+
integration?: Maybe<Integration>;
|
|
173
178
|
key: Scalars['ID']['output'];
|
|
174
179
|
name: Scalars['String']['output'];
|
|
175
180
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -180,6 +185,7 @@ export type EndpointList = Element & {
|
|
|
180
185
|
createdAt: Scalars['DateTime']['output'];
|
|
181
186
|
description?: Maybe<Scalars['String']['output']>;
|
|
182
187
|
id: Scalars['ID']['output'];
|
|
188
|
+
integration?: Maybe<Integration>;
|
|
183
189
|
key: Scalars['ID']['output'];
|
|
184
190
|
name: Scalars['String']['output'];
|
|
185
191
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -199,6 +205,7 @@ export type Flow = Element & {
|
|
|
199
205
|
createdAt: Scalars['DateTime']['output'];
|
|
200
206
|
description?: Maybe<Scalars['String']['output']>;
|
|
201
207
|
id: Scalars['ID']['output'];
|
|
208
|
+
integration?: Maybe<Integration>;
|
|
202
209
|
key: Scalars['ID']['output'];
|
|
203
210
|
lastRun?: Maybe<Log>;
|
|
204
211
|
name: Scalars['String']['output'];
|
|
@@ -276,6 +283,7 @@ export type Job = Element & {
|
|
|
276
283
|
cron?: Maybe<Scalars['String']['output']>;
|
|
277
284
|
description?: Maybe<Scalars['String']['output']>;
|
|
278
285
|
id: Scalars['ID']['output'];
|
|
286
|
+
integration?: Maybe<Integration>;
|
|
279
287
|
isSubJob?: Maybe<Scalars['Boolean']['output']>;
|
|
280
288
|
key: Scalars['ID']['output'];
|
|
281
289
|
lastRun?: Maybe<Log>;
|
|
@@ -595,6 +603,7 @@ export type MutationRollbackPromptArgs = {
|
|
|
595
603
|
export type MutationSetElementContentArgs = {
|
|
596
604
|
content?: InputMaybe<Scalars['JSON']['input']>;
|
|
597
605
|
id: Scalars['ID']['input'];
|
|
606
|
+
provenance?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
598
607
|
};
|
|
599
608
|
export type MutationSetExternalReferenceArgs = {
|
|
600
609
|
externalId: Scalars['String']['input'];
|
|
@@ -866,6 +875,7 @@ export type ResolvedShadowElement = {
|
|
|
866
875
|
__typename?: 'ResolvedShadowElement';
|
|
867
876
|
content?: Maybe<ElementContent>;
|
|
868
877
|
description?: Maybe<Scalars['String']['output']>;
|
|
878
|
+
integration?: Maybe<Integration>;
|
|
869
879
|
key: Scalars['ID']['output'];
|
|
870
880
|
name: Scalars['String']['output'];
|
|
871
881
|
type: ElementType;
|
|
@@ -913,6 +923,7 @@ export type RetryRule = Element & {
|
|
|
913
923
|
createdAt: Scalars['DateTime']['output'];
|
|
914
924
|
description?: Maybe<Scalars['String']['output']>;
|
|
915
925
|
id: Scalars['ID']['output'];
|
|
926
|
+
integration?: Maybe<Integration>;
|
|
916
927
|
key: Scalars['ID']['output'];
|
|
917
928
|
name: Scalars['String']['output'];
|
|
918
929
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -962,6 +973,7 @@ export type Schema = Element & {
|
|
|
962
973
|
createdAt: Scalars['DateTime']['output'];
|
|
963
974
|
description?: Maybe<Scalars['String']['output']>;
|
|
964
975
|
id: Scalars['ID']['output'];
|
|
976
|
+
integration?: Maybe<Integration>;
|
|
965
977
|
key: Scalars['ID']['output'];
|
|
966
978
|
name: Scalars['String']['output'];
|
|
967
979
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -972,6 +984,7 @@ export type SchemaMutation = Element & {
|
|
|
972
984
|
createdAt: Scalars['DateTime']['output'];
|
|
973
985
|
description?: Maybe<Scalars['String']['output']>;
|
|
974
986
|
id: Scalars['ID']['output'];
|
|
987
|
+
integration?: Maybe<Integration>;
|
|
975
988
|
key: Scalars['ID']['output'];
|
|
976
989
|
name: Scalars['String']['output'];
|
|
977
990
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -982,6 +995,7 @@ export type Service = Element & {
|
|
|
982
995
|
createdAt: Scalars['DateTime']['output'];
|
|
983
996
|
description?: Maybe<Scalars['String']['output']>;
|
|
984
997
|
id: Scalars['ID']['output'];
|
|
998
|
+
integration?: Maybe<Integration>;
|
|
985
999
|
key: Scalars['ID']['output'];
|
|
986
1000
|
name: Scalars['String']['output'];
|
|
987
1001
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -1055,6 +1069,7 @@ export type Value = Element & {
|
|
|
1055
1069
|
description?: Maybe<Scalars['String']['output']>;
|
|
1056
1070
|
hasValue: Scalars['Boolean']['output'];
|
|
1057
1071
|
id: Scalars['ID']['output'];
|
|
1072
|
+
integration?: Maybe<Integration>;
|
|
1058
1073
|
key: Scalars['ID']['output'];
|
|
1059
1074
|
name: Scalars['String']['output'];
|
|
1060
1075
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -1064,6 +1079,7 @@ export type Version = {
|
|
|
1064
1079
|
__typename?: 'Version';
|
|
1065
1080
|
auths: Array<Auth>;
|
|
1066
1081
|
config?: Maybe<ConfigElement>;
|
|
1082
|
+
configuration: Scalars['JSON']['output'];
|
|
1067
1083
|
dictionaries: Array<Dictionary>;
|
|
1068
1084
|
elements: Array<Element>;
|
|
1069
1085
|
endpointLists: Array<EndpointList>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"AA0DA,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAE3B,4CAAuB,CAAA;IAEvB,kCAAa,CAAA;IAEb,4CAAuB,CAAA;AACzB,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAGD,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,gCAAiB,CAAA;IACjB,8BAAe,CAAA;AACjB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"AA0DA,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAE3B,4CAAuB,CAAA;IAEvB,kCAAa,CAAA;IAEb,4CAAuB,CAAA;AACzB,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAGD,MA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@@ import { type GraphQLRequestClient } from '../utils/graphqlClient.js';
|
|
|
3
3
|
import type { ConfigSchema } from '../utils/config.js';
|
|
4
4
|
import type { Command } from 'commander';
|
|
5
5
|
import type { GreatFs } from '../types.js';
|
|
6
|
-
export declare const action: (log: (message: string) => void, apiToken?: string, client?: GraphQLRequestClient, fsImpl?: GreatFs, config?: Conf<ConfigSchema>) => (
|
|
6
|
+
export declare const action: (log: (message: string) => void, apiToken?: string, client?: GraphQLRequestClient, fsImpl?: GreatFs, config?: Conf<ConfigSchema>) => (templateIdOrKey: string, options?: {
|
|
7
|
+
account?: string;
|
|
8
|
+
}) => Promise<void>;
|
|
7
9
|
declare const _default: (program: Command, apiToken?: string) => Command;
|
|
8
10
|
export default _default;
|
package/dist/import/index.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { getClient } from '../utils/graphqlClient.js';
|
|
3
|
+
import { handleGraphQLError } from '../utils/graphqlError.js';
|
|
3
4
|
import { fetchIntegrationFromFile } from '../utils/fetchLocal.js';
|
|
4
5
|
import { resolveTemplateImport } from '../utils/resolveTemplateImport.js';
|
|
6
|
+
import { resolveAccountId } from '../utils/resolveAccount.js';
|
|
7
|
+
import { resolveIntegration } from '../utils/resolveIntegration.js';
|
|
5
8
|
import { readGreatFile, writeGreatFile, upsertImportRecord, } from '../utils/greatFile.js';
|
|
6
9
|
import { writeShadowElements, logShadowConflicts, } from '../utils/writeShadowElement.js';
|
|
7
|
-
export const action = (log, apiToken, client, fsImpl, config) => async function importTemplate(
|
|
8
|
-
if (!
|
|
9
|
-
log(chalk.red('Template id is required'));
|
|
10
|
-
log(`Usage: ${chalk.bold('great import <template-id>')}`);
|
|
10
|
+
export const action = (log, apiToken, client, fsImpl, config) => async function importTemplate(templateIdOrKey, options) {
|
|
11
|
+
if (!templateIdOrKey) {
|
|
12
|
+
log(chalk.red('Template id or key is required'));
|
|
13
|
+
log(`Usage: ${chalk.bold('great import <template-id-or-key>')}`);
|
|
11
14
|
return;
|
|
12
15
|
}
|
|
13
16
|
if (!fetchIntegrationFromFile(fsImpl)) {
|
|
@@ -16,12 +19,26 @@ export const action = (log, apiToken, client, fsImpl, config) => async function
|
|
|
16
19
|
return;
|
|
17
20
|
}
|
|
18
21
|
const graphqlClient = getClient(apiToken, client, config);
|
|
22
|
+
const { accountId, error: accountError } = await resolveAccountId(options ?? {}, apiToken ?? '', graphqlClient, config, fsImpl);
|
|
23
|
+
if (accountError) {
|
|
24
|
+
handleGraphQLError(accountError, log);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const template = await resolveIntegration(templateIdOrKey, accountId, apiToken, graphqlClient);
|
|
28
|
+
if (template.error) {
|
|
29
|
+
handleGraphQLError(new Error(template.error), log);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const templateId = template.id;
|
|
19
33
|
const resolved = await resolveTemplateImport(graphqlClient, templateId, log);
|
|
20
34
|
if (!resolved) {
|
|
21
35
|
return;
|
|
22
36
|
}
|
|
23
37
|
const great = readGreatFile(undefined, fsImpl);
|
|
24
|
-
const result = writeShadowElements(great, resolved.elements, {
|
|
38
|
+
const result = writeShadowElements(great, resolved.elements, {
|
|
39
|
+
mode: 'import',
|
|
40
|
+
fsImpl,
|
|
41
|
+
});
|
|
25
42
|
if (result.conflicts.length > 0) {
|
|
26
43
|
logShadowConflicts('Import', result.conflicts, log);
|
|
27
44
|
return;
|
|
@@ -29,12 +46,16 @@ export const action = (log, apiToken, client, fsImpl, config) => async function
|
|
|
29
46
|
upsertImportRecord(great, templateId, resolved.timestamp);
|
|
30
47
|
writeGreatFile(great, undefined, fsImpl);
|
|
31
48
|
log(chalk.green(`Imported ${result.written.length} element(s) from template ${templateId}`));
|
|
49
|
+
for (const merged of result.merged) {
|
|
50
|
+
log(chalk.green(`Merged ${merged.folder}/${merged.key} from template ${templateId} (now a local endpoint list)`));
|
|
51
|
+
}
|
|
32
52
|
if (result.skipped.length > 0) {
|
|
33
53
|
log(chalk.yellow(`Skipped ${result.skipped.length} config element(s)`));
|
|
34
54
|
}
|
|
35
55
|
};
|
|
36
56
|
export default (program, apiToken) => program
|
|
37
57
|
.command('import <template>')
|
|
38
|
-
.description('import a template, creating a shadow file for each element')
|
|
58
|
+
.description('import a template, creating a shadow file for each element, `<template>` can be a template id or key')
|
|
59
|
+
.option('-a, --account <id>', 'account id or key (uses default from config if not provided)')
|
|
39
60
|
.action(action(console.log, apiToken));
|
|
40
61
|
//# sourceMappingURL=index.js.map
|
package/dist/import/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAA6B,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EACL,aAAa,EACb,cAAc,EACd,kBAAkB,GACnB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gCAAgC,CAAA;AAKvC,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,GAA8B,EAC9B,QAAiB,EACjB,MAA6B,EAC7B,MAAgB,EAChB,MAA2B,EAC3B,EAAE,CACF,KAAK,UAAU,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAA6B,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAA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B,UAAU,8BAA8B,CAChG,CACF,CAAA;IACH,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,MAAM,CAAC,OAAO,CAAC,MAAM,oBAAoB,CAAC,CAAC,CAAA;IACzE,CAAC;AACH,CAAC,CAAA;AAEH,eAAe,CAAC,OAAgB,EAAE,QAAiB,EAAE,EAAE,CACrD,OAAO;KACJ,OAAO,CAAC,mBAAmB,CAAC;KAC5B,WAAW,CACV,sGAAsG,CACvG;KACA,MAAM,CACL,oBAAoB,EACpB,8DAA8D,CAC/D;KACA,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAA"}
|
package/dist/include/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import Conf from 'conf';
|
|
2
2
|
import { type GraphQLRequestClient } from '../utils/graphqlClient.js';
|
|
3
|
+
import promptForEndpoints from '../utils/promptForEndpoints.js';
|
|
4
|
+
import promptForReplaceLocal from '../utils/promptForReplaceLocal.js';
|
|
3
5
|
import type { ConfigSchema } from '../utils/config.js';
|
|
4
6
|
import type { Command } from 'commander';
|
|
5
7
|
import type { GreatFs } from '../types.js';
|
|
6
|
-
export declare const action: (log: (message: string) => void, apiToken?: string, client?: GraphQLRequestClient, fsImpl?: GreatFs, config?: Conf<ConfigSchema
|
|
8
|
+
export declare const action: (log: (message: string) => void, apiToken?: string, client?: GraphQLRequestClient, fsImpl?: GreatFs, config?: Conf<ConfigSchema>, promptForEndpointsFn?: typeof promptForEndpoints, promptForReplaceLocalFn?: typeof promptForReplaceLocal) => (elementId: string, options?: {
|
|
7
9
|
pinnedAt?: string;
|
|
8
10
|
}) => Promise<void>;
|
|
9
11
|
declare const _default: (program: Command, apiToken?: string) => Command;
|
package/dist/include/index.js
CHANGED
|
@@ -1,10 +1,127 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
1
2
|
import chalk from 'chalk';
|
|
2
3
|
import { getClient } from '../utils/graphqlClient.js';
|
|
3
4
|
import { fetchIntegrationFromFile } from '../utils/fetchLocal.js';
|
|
4
|
-
import {
|
|
5
|
-
import { readGreatFile, writeGreatFile } from '../utils/greatFile.js';
|
|
6
|
-
import { writeShadowElements, logShadowConflicts, } from '../utils/writeShadowElement.js';
|
|
7
|
-
|
|
5
|
+
import resolveElementIncludes, { resolveEndpointIncludes, } from '../utils/resolveElementIncludes.js';
|
|
6
|
+
import { getElementRecord, readGreatFile, removeElementRecord, setElementRecord, writeGreatFile, } from '../utils/greatFile.js';
|
|
7
|
+
import { findLocalOccupants, isLocalOccupant, writeShadowElements, logShadowConflicts, } from '../utils/writeShadowElement.js';
|
|
8
|
+
import { readEndpointListKeys, writeElementFile, } from '../utils/elementFiles.js';
|
|
9
|
+
import { ENDPOINT_LISTS_FOLDER, isEndpointKeys } from '../utils/serviceFile.js';
|
|
10
|
+
import promptForEndpoints from '../utils/promptForEndpoints.js';
|
|
11
|
+
import promptForReplaceLocal from '../utils/promptForReplaceLocal.js';
|
|
12
|
+
import { ElementType } from '../generated/schema.js';
|
|
13
|
+
async function selectEndpointShadows(graphqlClient, resolved, great, sourceTimestamp, log, promptForEndpointsFn) {
|
|
14
|
+
const list = resolved.find((element) => element.type === ElementType.EndpointList);
|
|
15
|
+
if (!list) {
|
|
16
|
+
return { shadows: resolved };
|
|
17
|
+
}
|
|
18
|
+
const endpoints = await resolveEndpointIncludes(graphqlClient, list, sourceTimestamp, log);
|
|
19
|
+
if (!endpoints) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
else if (endpoints.length === 0) {
|
|
23
|
+
return { shadows: resolved };
|
|
24
|
+
}
|
|
25
|
+
const hasShadowList = Boolean(getElementRecord(great, ENDPOINT_LISTS_FOLDER, list.key)?.source);
|
|
26
|
+
let selected;
|
|
27
|
+
try {
|
|
28
|
+
selected = await promptForEndpointsFn(list.key, endpoints, log, hasShadowList);
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
log(chalk.yellow('\nInclude cancelled'));
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
if (selected.length === endpoints.length) {
|
|
35
|
+
return { shadows: [...resolved, ...endpoints] };
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
shadows: [
|
|
39
|
+
...resolved.filter((element) => element !== list),
|
|
40
|
+
...endpoints.filter((endpoint) => selected.includes(endpoint.key)),
|
|
41
|
+
],
|
|
42
|
+
localList: { key: list.key, endpoints: selected, total: endpoints.length },
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function replacementListKeys(selection, key) {
|
|
46
|
+
if (selection.localList?.key === key) {
|
|
47
|
+
return selection.localList.endpoints;
|
|
48
|
+
}
|
|
49
|
+
const list = selection.shadows.find((element) => element.type === ElementType.EndpointList && element.key === key);
|
|
50
|
+
const endpoints = list?.content?.data?.endpoints;
|
|
51
|
+
return isEndpointKeys(endpoints) ? endpoints : [];
|
|
52
|
+
}
|
|
53
|
+
function withDroppedKeys(target, selection, fsImpl) {
|
|
54
|
+
if (target.folder !== ENDPOINT_LISTS_FOLDER) {
|
|
55
|
+
return target;
|
|
56
|
+
}
|
|
57
|
+
const kept = new Set(replacementListKeys(selection, target.key));
|
|
58
|
+
const droppedKeys = readEndpointListKeys(undefined, target.key, fsImpl).filter((key) => !kept.has(key));
|
|
59
|
+
return { ...target, droppedKeys };
|
|
60
|
+
}
|
|
61
|
+
function findReplacedLocals(great, selection, fsImpl) {
|
|
62
|
+
const { localList } = selection;
|
|
63
|
+
const listSlot = localList &&
|
|
64
|
+
isLocalOccupant(great, ENDPOINT_LISTS_FOLDER, localList.key, undefined, fsImpl)
|
|
65
|
+
? [{ folder: ENDPOINT_LISTS_FOLDER, key: localList.key }]
|
|
66
|
+
: [];
|
|
67
|
+
return [
|
|
68
|
+
...findLocalOccupants(great, selection.shadows, undefined, fsImpl),
|
|
69
|
+
...listSlot,
|
|
70
|
+
]
|
|
71
|
+
.map((target) => withDroppedKeys(target, selection, fsImpl))
|
|
72
|
+
.filter((element) => element.droppedKeys?.length !== 0);
|
|
73
|
+
}
|
|
74
|
+
async function confirmReplaceLocals(replaced, log, promptForReplaceLocalFn) {
|
|
75
|
+
if (replaced.length === 0) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
let confirmed = false;
|
|
79
|
+
try {
|
|
80
|
+
confirmed = await promptForReplaceLocalFn(replaced, log);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
}
|
|
84
|
+
if (!confirmed) {
|
|
85
|
+
log(chalk.yellow('\nInclude cancelled'));
|
|
86
|
+
}
|
|
87
|
+
return confirmed;
|
|
88
|
+
}
|
|
89
|
+
function writeLocalEndpointList(great, localList, fsImpl) {
|
|
90
|
+
const existing = getElementRecord(great, ENDPOINT_LISTS_FOLDER, localList.key);
|
|
91
|
+
const record = {
|
|
92
|
+
...(existing?.id ? { id: existing.id } : {}),
|
|
93
|
+
...(existing?.timestamp ? { timestamp: existing.timestamp } : {}),
|
|
94
|
+
};
|
|
95
|
+
if (Object.keys(record).length > 0) {
|
|
96
|
+
setElementRecord(great, ENDPOINT_LISTS_FOLDER, localList.key, record);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
removeElementRecord(great, ENDPOINT_LISTS_FOLDER, localList.key);
|
|
100
|
+
}
|
|
101
|
+
writeElementFile(undefined, ENDPOINT_LISTS_FOLDER, localList.key, { endpoints: localList.endpoints }, great, fsImpl);
|
|
102
|
+
}
|
|
103
|
+
function writeSelection(great, selection, fsImpl, log) {
|
|
104
|
+
const result = writeShadowElements(great, selection.shadows, {
|
|
105
|
+
mode: 'include',
|
|
106
|
+
fsImpl,
|
|
107
|
+
});
|
|
108
|
+
if (result.conflicts.length > 0) {
|
|
109
|
+
logShadowConflicts('Include', result.conflicts, log);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (selection.localList) {
|
|
113
|
+
writeLocalEndpointList(great, selection.localList, fsImpl);
|
|
114
|
+
}
|
|
115
|
+
writeGreatFile(great, undefined, fsImpl);
|
|
116
|
+
for (const written of result.written) {
|
|
117
|
+
log(chalk.green(`Included ${written.folder}/${written.key} as a shadow element`));
|
|
118
|
+
}
|
|
119
|
+
if (selection.localList) {
|
|
120
|
+
const { key, endpoints, total } = selection.localList;
|
|
121
|
+
log(chalk.green(`Kept ${ENDPOINT_LISTS_FOLDER}/${key} as a local endpoint list with ${endpoints.length} of ${total} endpoints`));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export const action = (log, apiToken, client, fsImpl, config, promptForEndpointsFn = promptForEndpoints, promptForReplaceLocalFn = promptForReplaceLocal) => async function includeElement(elementId, options) {
|
|
8
125
|
if (!elementId) {
|
|
9
126
|
log(chalk.red('Element id is required'));
|
|
10
127
|
log(`Usage: ${chalk.bold('great include <element-id>')}`);
|
|
@@ -16,19 +133,20 @@ export const action = (log, apiToken, client, fsImpl, config) => async function
|
|
|
16
133
|
return;
|
|
17
134
|
}
|
|
18
135
|
const graphqlClient = getClient(apiToken, client, config);
|
|
19
|
-
const resolved = await
|
|
136
|
+
const resolved = await resolveElementIncludes(graphqlClient, elementId, options?.pinnedAt, log);
|
|
20
137
|
if (!resolved) {
|
|
21
138
|
return;
|
|
22
139
|
}
|
|
23
140
|
const great = readGreatFile(undefined, fsImpl);
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
logShadowConflicts('Include', result.conflicts, log);
|
|
141
|
+
const selection = await selectEndpointShadows(graphqlClient, resolved, great, options?.pinnedAt, log, promptForEndpointsFn);
|
|
142
|
+
if (!selection) {
|
|
27
143
|
return;
|
|
28
144
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
145
|
+
const replaced = findReplacedLocals(great, selection, fsImpl ?? fs);
|
|
146
|
+
if (!(await confirmReplaceLocals(replaced, log, promptForReplaceLocalFn))) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
writeSelection(great, selection, fsImpl, log);
|
|
32
150
|
};
|
|
33
151
|
export default (program, apiToken) => program
|
|
34
152
|
.command('include <element>')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/include/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAA6B,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/include/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAA6B,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,sBAAsB,EAAE,EAC7B,uBAAuB,GAExB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,GACf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,kBAAkB,MAAM,gCAAgC,CAAA;AAC/D,OAAO,qBAAqB,MAAM,mCAAmC,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AA0BpD,KAAK,UAAU,qBAAqB,CAClC,aAAmC,EACnC,QAA2B,EAC3B,KAAgB,EA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package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ import now from './now/index.js';
|
|
|
18
18
|
import integrations from './integrations/index.js';
|
|
19
19
|
import pull from './pull/index.js';
|
|
20
20
|
import push from './push/index.js';
|
|
21
|
+
import remove from './remove/index.js';
|
|
21
22
|
import rename from './rename/index.js';
|
|
22
23
|
import repl from './repl/index.js';
|
|
23
24
|
import run from './run/index.js';
|
|
@@ -26,7 +27,7 @@ import value from './values/index.js';
|
|
|
26
27
|
import whoami from './whoami/index.js';
|
|
27
28
|
import { getStoredToken } from './utils/token.js';
|
|
28
29
|
const apiToken = getStoredToken();
|
|
29
|
-
program.version('1.
|
|
30
|
+
program.version('1.4.0', '-v, --version').description('Integreat CLI');
|
|
30
31
|
program.enablePositionalOptions();
|
|
31
32
|
accounts(program, apiToken);
|
|
32
33
|
clone(program, apiToken);
|
|
@@ -46,6 +47,7 @@ now(program);
|
|
|
46
47
|
integrations(program, apiToken);
|
|
47
48
|
pull(program, apiToken);
|
|
48
49
|
push(program, apiToken);
|
|
50
|
+
remove(program);
|
|
49
51
|
rename(program, apiToken);
|
|
50
52
|
repl(program, apiToken);
|
|
51
53
|
run(program, apiToken);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,QAAQ,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,GAAG,MAAM,gBAAgB,CAAA;AAChC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,OAAO,MAAM,oBAAoB,CAAA;AACxC,OAAO,OAAO,MAAM,oBAAoB,CAAA;AACxC,OAAO,cAAc,MAAM,mBAAmB,CA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