@remkoj/optimizely-graph-functions 6.0.0-pre9 → 6.0.0-rc.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/README.md +60 -14
- package/dist/_transform/handleDependDirective.d.ts +11 -0
- package/dist/_transform/handleDependDirective.js +128 -0
- package/dist/_transform/handleDependDirective.js.map +1 -0
- package/dist/_transform/injectComponentDocuments.d.ts +3 -0
- package/dist/_transform/injectComponentDocuments.js +79 -24
- package/dist/_transform/injectComponentDocuments.js.map +1 -1
- package/dist/_transform/injectPageQueries.d.ts +1 -0
- package/dist/_transform/injectPageQueries.js +40 -7
- package/dist/_transform/injectPageQueries.js.map +1 -1
- package/dist/_transform/injectSectionQueries.d.ts +1 -0
- package/dist/_transform/injectSectionQueries.js +64 -17
- package/dist/_transform/injectSectionQueries.js.map +1 -1
- package/dist/_transform/normalizeFragmentNames.js +2 -0
- package/dist/_transform/normalizeFragmentNames.js.map +1 -1
- package/dist/_transform/performInjections.js +2 -35
- package/dist/_transform/performInjections.js.map +1 -1
- package/dist/cms/index.d.ts +4 -10
- package/dist/cms/index.js +57 -24
- package/dist/cms/index.js.map +1 -1
- package/dist/contenttype-loader.d.ts +1 -48
- package/dist/contenttype-loader.js +21 -286
- package/dist/contenttype-loader.js.map +1 -1
- package/dist/documents/fragments.cms13.js +77 -13
- package/dist/documents/fragments.cms13.js.map +1 -1
- package/dist/generator/collision-tracker.d.ts +22 -0
- package/dist/generator/collision-tracker.js +103 -0
- package/dist/generator/collision-tracker.js.map +1 -0
- package/dist/generator/generator.d.ts +77 -0
- package/dist/generator/generator.js +272 -0
- package/dist/generator/generator.js.map +1 -0
- package/dist/generator/index.d.ts +3 -0
- package/dist/generator/index.js +42 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/generator/virtual-location.d.ts +41 -0
- package/dist/generator/virtual-location.js +139 -0
- package/dist/generator/virtual-location.js.map +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/preset.js +103 -38
- package/dist/preset.js.map +1 -1
- package/dist/transform.d.ts +4 -3
- package/dist/transform.js +8 -1
- package/dist/transform.js.map +1 -1
- package/package.json +20 -16
package/dist/preset.js
CHANGED
|
@@ -51,20 +51,46 @@ exports.preset = {
|
|
|
51
51
|
*/
|
|
52
52
|
prepareDocuments: async (outputFilePath, outputSpecificDocuments) => {
|
|
53
53
|
// Get the configured documents
|
|
54
|
-
const optiDocs = outputSpecificDocuments.filter((x => typeof
|
|
55
|
-
const normalDocs = outputSpecificDocuments.filter(x => !(typeof
|
|
54
|
+
const optiDocs = outputSpecificDocuments.filter(((x) => typeof x == 'string' && x.startsWith('opti-cms:')));
|
|
55
|
+
const normalDocs = outputSpecificDocuments.filter((x) => !(typeof x == 'string' && x.startsWith('opti-cms:')));
|
|
56
56
|
// Get the base documents
|
|
57
|
-
const documents = client_preset_1.preset.prepareDocuments
|
|
58
|
-
await client_preset_1.preset.prepareDocuments(outputFilePath, normalDocs)
|
|
59
|
-
[...normalDocs, `!${outputFilePath}`];
|
|
57
|
+
const documents = client_preset_1.preset.prepareDocuments
|
|
58
|
+
? await client_preset_1.preset.prepareDocuments(outputFilePath, normalDocs)
|
|
59
|
+
: [...normalDocs, `!${outputFilePath}`];
|
|
60
60
|
// Transform / inject the Opti-CMS documents
|
|
61
|
-
const CmsDocLoaders = (optiDocs.length == 0
|
|
61
|
+
const CmsDocLoaders = (optiDocs.length == 0
|
|
62
|
+
? ['opti-cms:/fragments/13', /*'opti-cms:/queries/13'*/]
|
|
63
|
+
: optiDocs).map((optiDoc) => {
|
|
62
64
|
const loader = {};
|
|
63
|
-
loader[optiDoc] = { loader:
|
|
65
|
+
loader[optiDoc] = { loader: '@remkoj/optimizely-graph-functions/loader' };
|
|
64
66
|
return loader;
|
|
65
67
|
});
|
|
68
|
+
// Get page documents
|
|
69
|
+
const [pageDocuments, sectionDocuments, componentDocuments, injectionTargets] = await Promise.all([
|
|
70
|
+
(0, transform_1.getPageDocuments)(),
|
|
71
|
+
(0, transform_1.getSectionDocuments)(),
|
|
72
|
+
(0, transform_1.getComponentDocuments)(),
|
|
73
|
+
(0, transform_1.getInjectionTargetDocuments)()
|
|
74
|
+
]);
|
|
66
75
|
// Create a new, extended, array
|
|
67
|
-
|
|
76
|
+
const allDocuments = [
|
|
77
|
+
...CmsDocLoaders,
|
|
78
|
+
...pageDocuments,
|
|
79
|
+
...sectionDocuments,
|
|
80
|
+
...componentDocuments,
|
|
81
|
+
...injectionTargets
|
|
82
|
+
];
|
|
83
|
+
function compareOperationDocuments(a, b) {
|
|
84
|
+
const aPath = typeof (a) === 'string' ? a : Object.getOwnPropertyNames(a).join(';');
|
|
85
|
+
const bPath = typeof (b) === 'string' ? b : Object.getOwnPropertyNames(b).join(';');
|
|
86
|
+
if (aPath < bPath)
|
|
87
|
+
return -1;
|
|
88
|
+
if (aPath > bPath)
|
|
89
|
+
return 1;
|
|
90
|
+
return 0;
|
|
91
|
+
}
|
|
92
|
+
allDocuments.sort(compareOperationDocuments);
|
|
93
|
+
return [...documents, ...allDocuments];
|
|
68
94
|
},
|
|
69
95
|
buildGeneratesSection: async (options) => {
|
|
70
96
|
// Extend the default plugin configuration
|
|
@@ -75,9 +101,9 @@ exports.preset = {
|
|
|
75
101
|
// Provided options
|
|
76
102
|
...options.config,
|
|
77
103
|
// Enforced settings
|
|
78
|
-
namingConvention:
|
|
104
|
+
namingConvention: 'keep', // Keep casing "as-is" from Optimizely Graph
|
|
79
105
|
};
|
|
80
|
-
// Change the default for fragment masking from 'useFragment' to
|
|
106
|
+
// Change the default for fragment masking from 'useFragment' to
|
|
81
107
|
// 'getFragmentData', in order to prevent issues with code checks for
|
|
82
108
|
// React hooks
|
|
83
109
|
if (options.presetConfig.fragmentMasking !== false) {
|
|
@@ -85,43 +111,51 @@ exports.preset = {
|
|
|
85
111
|
...options.presetConfig,
|
|
86
112
|
fragmentMasking: {
|
|
87
113
|
unmaskFunctionName: 'getFragmentData',
|
|
88
|
-
...(typeof
|
|
89
|
-
|
|
114
|
+
...(typeof options.presetConfig?.fragmentMasking == 'object'
|
|
115
|
+
? options.presetConfig?.fragmentMasking
|
|
116
|
+
: {}),
|
|
117
|
+
},
|
|
90
118
|
};
|
|
91
119
|
}
|
|
92
120
|
// Apply all changes to the document set, prior to validating it. They're executed in the order of the array
|
|
121
|
+
options.documentTransforms = injectOptimizelyTransforms(options.documentTransforms, options);
|
|
93
122
|
options.documents = await (0, transform_1.executeDocumentTransforms)(options.documents, [
|
|
94
123
|
transform_1.cleanFragments, // Remove fragments that target non-existing types
|
|
95
124
|
transform_1.normalizeFragmentNames, // Allow overriding of built-in fragments
|
|
96
125
|
transform_1.normalizeQueryNames, // Allow overriding of built-in queries
|
|
97
|
-
transform_1.injectComponentDocuments, // Inject fragments to fetch component data
|
|
98
|
-
transform_1.injectPageQueries, // Inject queries to fetch page/experience data
|
|
99
|
-
transform_1.injectSectionQueries, // Inject queries to fetch section data
|
|
100
126
|
transform_1.performInjections, // Run injections of component fragments adjacent to placeholder fragments
|
|
101
|
-
transform_1.cleanFragmentSpreads // Remove all fragment spreads that target a fragment that does not exist in the documents
|
|
127
|
+
transform_1.cleanFragmentSpreads, // Remove all fragment spreads that target a fragment that does not exist in the documents
|
|
128
|
+
transform_1.handleDependDirective, // Remove the "item" field in queries and fragments from the "ContentReference" type if it's not in the schema
|
|
102
129
|
], options);
|
|
103
130
|
// Build the preset files
|
|
104
131
|
const section = await client_preset_1.preset.buildGeneratesSection(options);
|
|
105
|
-
// Add GraphQL Request Client.
|
|
132
|
+
// Add GraphQL Request Client.
|
|
106
133
|
section.push({
|
|
107
134
|
filename: `${options.baseOutputDir}client.ts`,
|
|
108
135
|
pluginMap: {
|
|
109
|
-
|
|
110
|
-
|
|
136
|
+
add: AddPlugin,
|
|
137
|
+
'typescript-graphql-request': GraphQLRequestPlugin,
|
|
111
138
|
},
|
|
112
139
|
plugins: [
|
|
113
140
|
{
|
|
114
141
|
add: {
|
|
115
|
-
content: [
|
|
142
|
+
content: [
|
|
143
|
+
'// This is an auto-generated file, do not modify',
|
|
144
|
+
'import type * as Schema from "./graphql";',
|
|
145
|
+
],
|
|
116
146
|
},
|
|
117
147
|
},
|
|
118
148
|
{
|
|
119
149
|
'typescript-graphql-request': {
|
|
120
|
-
...options.config,
|
|
121
150
|
useTypeImports: true,
|
|
122
|
-
importOperationTypesFrom:
|
|
123
|
-
|
|
124
|
-
|
|
151
|
+
importOperationTypesFrom: 'Schema',
|
|
152
|
+
//rawRequest: options.presetConfig.recursion ? true : undefined,
|
|
153
|
+
//documentMode: options.presetConfig.recursion ? DocumentMode.string : undefined,
|
|
154
|
+
experimentalAddDocumentNodeType: options.presetConfig.recursion ? true : undefined,
|
|
155
|
+
//rawString: options.presetConfig.recursion ? true : undefined,
|
|
156
|
+
...options.config,
|
|
157
|
+
},
|
|
158
|
+
},
|
|
125
159
|
],
|
|
126
160
|
schema: options.schema,
|
|
127
161
|
schemaAst: options.schemaAst,
|
|
@@ -130,19 +164,19 @@ exports.preset = {
|
|
|
130
164
|
},
|
|
131
165
|
profiler: options.profiler,
|
|
132
166
|
documents: options.documents,
|
|
133
|
-
documentTransforms: options.documentTransforms
|
|
167
|
+
documentTransforms: options.documentTransforms,
|
|
134
168
|
});
|
|
135
|
-
// Add the functions file, which will materialize the defined
|
|
136
|
-
// functions.
|
|
169
|
+
// Add the functions file, which will materialize the defined
|
|
170
|
+
// functions.
|
|
137
171
|
section.push({
|
|
138
172
|
filename: `${options.baseOutputDir}functions.ts`,
|
|
139
173
|
pluginMap: {
|
|
140
|
-
['optly-functions']: index_1.default
|
|
174
|
+
['optly-functions']: index_1.default,
|
|
141
175
|
},
|
|
142
176
|
plugins: [
|
|
143
177
|
{
|
|
144
|
-
['optly-functions']: {}
|
|
145
|
-
}
|
|
178
|
+
['optly-functions']: {},
|
|
179
|
+
},
|
|
146
180
|
],
|
|
147
181
|
schema: options.schema,
|
|
148
182
|
schemaAst: options.schemaAst,
|
|
@@ -152,41 +186,72 @@ exports.preset = {
|
|
|
152
186
|
...(0, index_1.pickPluginOptions)(options.presetConfig),
|
|
153
187
|
},
|
|
154
188
|
documents: options.documents,
|
|
155
|
-
documentTransforms: options.documentTransforms
|
|
189
|
+
documentTransforms: options.documentTransforms,
|
|
156
190
|
});
|
|
157
191
|
// Update file generation configs
|
|
158
192
|
section.forEach((fileConfig, idx) => {
|
|
159
193
|
// Modify index.ts with additional exports
|
|
160
|
-
if (fileConfig.filename.endsWith(
|
|
194
|
+
if (fileConfig.filename.endsWith('index.ts')) {
|
|
161
195
|
section[idx].plugins.unshift({
|
|
162
196
|
add: {
|
|
163
197
|
content: [
|
|
164
198
|
'export * as Schema from "./graphql";',
|
|
165
199
|
'export * from "./functions";',
|
|
166
200
|
'export { getSdk, type Sdk } from "./client";',
|
|
167
|
-
]
|
|
168
|
-
}
|
|
201
|
+
],
|
|
202
|
+
},
|
|
169
203
|
});
|
|
170
204
|
section[idx].plugins.push({
|
|
171
205
|
add: {
|
|
172
|
-
content: [
|
|
173
|
-
|
|
206
|
+
content: [
|
|
207
|
+
'',
|
|
208
|
+
`export const WITH_RECURSIVE_SUPPORT = ${options.presetConfig.recursion === true ? 'true' : 'false'};`,
|
|
209
|
+
],
|
|
210
|
+
},
|
|
174
211
|
});
|
|
175
212
|
}
|
|
213
|
+
//if (!hasOptimizelyTransform(fileConfig.documentTransforms))
|
|
214
|
+
// fileConfig.documentTransforms = injectOptimizelyTransforms(fileConfig.documentTransforms)
|
|
176
215
|
// Optimizely Graph supports recursive queries to allow fetching
|
|
177
216
|
// data as created in the CMS. This can cause issues when using
|
|
178
217
|
// multiple GraphQL sources, hence the ability to enable/disalbe
|
|
179
218
|
// the support for recursive queries.
|
|
180
|
-
if (fileConfig.skipDocumentsValidation != true &&
|
|
219
|
+
if (fileConfig.skipDocumentsValidation != true &&
|
|
220
|
+
options.presetConfig.recursion === true) {
|
|
181
221
|
const currentOptions = fileConfig.skipDocumentsValidation || {};
|
|
182
222
|
section[idx].skipDocumentsValidation = {
|
|
183
223
|
...currentOptions,
|
|
184
|
-
ignoreRules: [
|
|
224
|
+
ignoreRules: [
|
|
225
|
+
...(currentOptions.ignoreRules ?? []),
|
|
226
|
+
'NoFragmentCyclesRule',
|
|
227
|
+
],
|
|
185
228
|
};
|
|
186
229
|
}
|
|
187
230
|
});
|
|
188
231
|
return section;
|
|
189
232
|
},
|
|
190
233
|
};
|
|
234
|
+
function injectOptimizelyTransforms(currentTransforms, options) {
|
|
235
|
+
const dt = currentTransforms ?? [];
|
|
236
|
+
dt.unshift({
|
|
237
|
+
name: 'Optimizely.CMS',
|
|
238
|
+
transformObject: {
|
|
239
|
+
transform: (tOpts) => (0, transform_1.executeDocumentTransforms)(tOpts.documents, [
|
|
240
|
+
transform_1.cleanFragments, // Remove fragments that target non-existing types
|
|
241
|
+
transform_1.normalizeFragmentNames, // Allow overriding of built-in fragments
|
|
242
|
+
transform_1.normalizeQueryNames, // Allow overriding of built-in queries
|
|
243
|
+
transform_1.performInjections, // Run injections of component fragments adjacent to placeholder fragments
|
|
244
|
+
transform_1.cleanFragmentSpreads, // Remove all fragment spreads that target a fragment that does not exist in the documents
|
|
245
|
+
transform_1.handleDependDirective, // Remove the "item" field in queries and fragments from the "ContentReference" type if it's not in the schema
|
|
246
|
+
], options),
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
return dt;
|
|
250
|
+
}
|
|
251
|
+
function hasOptimizelyTransform(currentTransforms) {
|
|
252
|
+
if (!Array.isArray(currentTransforms))
|
|
253
|
+
return false;
|
|
254
|
+
return currentTransforms.some(x => x.name === 'Optimizely.CMS');
|
|
255
|
+
}
|
|
191
256
|
exports.default = exports.preset;
|
|
192
257
|
//# sourceMappingURL=preset.js.map
|
package/dist/preset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE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C,EAAE,CAAC,OAAO,CAAC;QACT,IAAI,EAAE,gBAAgB;QACtB,eAAe,EAAE;YACf,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CACnB,IAAA,qCAAyB,EACvB,KAAK,CAAC,SAAS,EACf;gBACE,0BAAc,EAAU,kDAAkD;gBAC1E,kCAAsB,EAAE,yCAAyC;gBACjE,+BAAmB,EAAK,uCAAuC;gBAC/D,6BAAiB,EAAO,0EAA0E;gBAClG,gCAAoB,EAAI,0FAA0F;gBAClH,iCAAqB,EAAG,8GAA8G;aACvI,EACD,OAAO,CACR;SACJ;KACF,CAAC,CAAA;IACF,OAAO,EAAE,CAAA;AACX,CAAC;AACD,SAAS,sBAAsB,CAAC,iBAA+D;IAE7F,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAAE,OAAO,KAAK,CAAA;IACnD,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAA;AACjE,CAAC;AAED,kBAAe,cAAM,CAAA"}
|
package/dist/transform.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { type Types } from '@graphql-codegen/plugin-helpers';
|
|
2
2
|
import type { TransformOptions } from './types';
|
|
3
3
|
export { cleanFragments } from "./_transform/cleanFragments";
|
|
4
|
-
export { injectComponentDocuments } from "./_transform/injectComponentDocuments";
|
|
4
|
+
export { injectComponentDocuments, getComponentDocuments, injectInjectionTargets, getInjectionTargetDocuments } from "./_transform/injectComponentDocuments";
|
|
5
5
|
export { normalizeFragmentNames } from "./_transform/normalizeFragmentNames";
|
|
6
6
|
export { normalizeQueryNames } from "./_transform/normalizeQueryNames";
|
|
7
7
|
export { pickTransformOptions } from "./_transform/options";
|
|
8
|
-
export { injectPageQueries } from "./_transform/injectPageQueries";
|
|
9
|
-
export { injectSectionQueries } from "./_transform/injectSectionQueries";
|
|
8
|
+
export { injectPageQueries, getPageDocuments } from "./_transform/injectPageQueries";
|
|
9
|
+
export { injectSectionQueries, getSectionDocuments } from "./_transform/injectSectionQueries";
|
|
10
10
|
export { performInjections } from "./_transform/performInjections";
|
|
11
11
|
export { cleanFragmentSpreads } from "./_transform/cleanSpreads";
|
|
12
|
+
export { handleDependDirective } from "./_transform/handleDependDirective";
|
|
12
13
|
export type TransformFn<T = any> = (files: Types.DocumentFile[], options: Types.PresetFnArgs<T>) => Promise<Types.DocumentFile[]> | Types.DocumentFile[];
|
|
13
14
|
export declare function executeDocumentTransforms<T = any>(files: Types.DocumentFile[], transforms: Array<TransformFn<T>>, options: Types.PresetFnArgs<T>): Promise<Types.DocumentFile[]>;
|
|
14
15
|
export declare const transform: Types.DocumentTransformFunction<TransformOptions>;
|
package/dist/transform.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transform = exports.cleanFragmentSpreads = exports.performInjections = exports.injectSectionQueries = exports.injectPageQueries = exports.pickTransformOptions = exports.normalizeQueryNames = exports.normalizeFragmentNames = exports.injectComponentDocuments = exports.cleanFragments = void 0;
|
|
3
|
+
exports.transform = exports.handleDependDirective = exports.cleanFragmentSpreads = exports.performInjections = exports.getSectionDocuments = exports.injectSectionQueries = exports.getPageDocuments = exports.injectPageQueries = exports.pickTransformOptions = exports.normalizeQueryNames = exports.normalizeFragmentNames = exports.getInjectionTargetDocuments = exports.injectInjectionTargets = exports.getComponentDocuments = exports.injectComponentDocuments = exports.cleanFragments = void 0;
|
|
4
4
|
exports.executeDocumentTransforms = executeDocumentTransforms;
|
|
5
5
|
const graphql_1 = require("graphql");
|
|
6
6
|
var cleanFragments_1 = require("./_transform/cleanFragments");
|
|
7
7
|
Object.defineProperty(exports, "cleanFragments", { enumerable: true, get: function () { return cleanFragments_1.cleanFragments; } });
|
|
8
8
|
var injectComponentDocuments_1 = require("./_transform/injectComponentDocuments");
|
|
9
9
|
Object.defineProperty(exports, "injectComponentDocuments", { enumerable: true, get: function () { return injectComponentDocuments_1.injectComponentDocuments; } });
|
|
10
|
+
Object.defineProperty(exports, "getComponentDocuments", { enumerable: true, get: function () { return injectComponentDocuments_1.getComponentDocuments; } });
|
|
11
|
+
Object.defineProperty(exports, "injectInjectionTargets", { enumerable: true, get: function () { return injectComponentDocuments_1.injectInjectionTargets; } });
|
|
12
|
+
Object.defineProperty(exports, "getInjectionTargetDocuments", { enumerable: true, get: function () { return injectComponentDocuments_1.getInjectionTargetDocuments; } });
|
|
10
13
|
var normalizeFragmentNames_1 = require("./_transform/normalizeFragmentNames");
|
|
11
14
|
Object.defineProperty(exports, "normalizeFragmentNames", { enumerable: true, get: function () { return normalizeFragmentNames_1.normalizeFragmentNames; } });
|
|
12
15
|
var normalizeQueryNames_1 = require("./_transform/normalizeQueryNames");
|
|
@@ -15,12 +18,16 @@ var options_1 = require("./_transform/options");
|
|
|
15
18
|
Object.defineProperty(exports, "pickTransformOptions", { enumerable: true, get: function () { return options_1.pickTransformOptions; } });
|
|
16
19
|
var injectPageQueries_1 = require("./_transform/injectPageQueries");
|
|
17
20
|
Object.defineProperty(exports, "injectPageQueries", { enumerable: true, get: function () { return injectPageQueries_1.injectPageQueries; } });
|
|
21
|
+
Object.defineProperty(exports, "getPageDocuments", { enumerable: true, get: function () { return injectPageQueries_1.getPageDocuments; } });
|
|
18
22
|
var injectSectionQueries_1 = require("./_transform/injectSectionQueries");
|
|
19
23
|
Object.defineProperty(exports, "injectSectionQueries", { enumerable: true, get: function () { return injectSectionQueries_1.injectSectionQueries; } });
|
|
24
|
+
Object.defineProperty(exports, "getSectionDocuments", { enumerable: true, get: function () { return injectSectionQueries_1.getSectionDocuments; } });
|
|
20
25
|
var performInjections_1 = require("./_transform/performInjections");
|
|
21
26
|
Object.defineProperty(exports, "performInjections", { enumerable: true, get: function () { return performInjections_1.performInjections; } });
|
|
22
27
|
var cleanSpreads_1 = require("./_transform/cleanSpreads");
|
|
23
28
|
Object.defineProperty(exports, "cleanFragmentSpreads", { enumerable: true, get: function () { return cleanSpreads_1.cleanFragmentSpreads; } });
|
|
29
|
+
var handleDependDirective_1 = require("./_transform/handleDependDirective");
|
|
30
|
+
Object.defineProperty(exports, "handleDependDirective", { enumerable: true, get: function () { return handleDependDirective_1.handleDependDirective; } });
|
|
24
31
|
async function executeDocumentTransforms(files, transforms, options) {
|
|
25
32
|
let transformedFiles = files;
|
|
26
33
|
for (const transform of transforms)
|
package/dist/transform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":";;;AAiBA,8DAKC;AAnBD,qCAAqC;AAErC,8DAA4D;AAAnD,gHAAA,cAAc,OAAA;AACvB,kFAA4J;AAAnJ,oIAAA,wBAAwB,OAAA;AAAE,iIAAA,qBAAqB,OAAA;AAAE,kIAAA,sBAAsB,OAAA;AAAE,uIAAA,2BAA2B,OAAA;AAC7G,8EAA4E;AAAnE,gIAAA,sBAAsB,OAAA;AAC/B,wEAAsE;AAA7D,0HAAA,mBAAmB,OAAA;AAC5B,gDAA2D;AAAlD,+GAAA,oBAAoB,OAAA;AAC7B,oEAAoF;AAA3E,sHAAA,iBAAiB,OAAA;AAAE,qHAAA,gBAAgB,OAAA;AAC5C,0EAA6F;AAApF,4HAAA,oBAAoB,OAAA;AAAE,2HAAA,mBAAmB,OAAA;AAClD,oEAAkE;AAAzD,sHAAA,iBAAiB,OAAA;AAC1B,0DAAgE;AAAvD,oHAAA,oBAAoB,OAAA;AAC7B,4EAA0E;AAAjE,8HAAA,qBAAqB,OAAA;AAGvB,KAAK,UAAU,yBAAyB,CAAU,KAA2B,EAAE,UAAiC,EAAE,OAA8B;IACrJ,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAC7B,KAAK,MAAM,SAAS,IA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AA;4BAC/H,aAAa,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAA;wBACxC,CAAC;oBACH,CAAC,CAAC,CAAA;oBAEF,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC;wBAC3B,OAAM;oBAER,MAAM,OAAO,GAAqB;wBAChC,GAAG,IAAI;wBACP,UAAU,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,aAAa,CAAC;qBACnD,CAAA;oBACD,OAAO,OAAO,CAAA;gBAChB,CAAC;aACF;SACF,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAEd,OAAO;YACL,GAAG,IAAI;YACP,QAAQ,EAAE,QAAQ;SACnB,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,IAAI,MAAM,CAAC,OAAO;QAChB,OAAO,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACnE,OAAO,gBAAgB,CAAA;AACzB,CAAC,CAAA;AA1FY,QAAA,SAAS,aA0FrB;AAED,kBAAe,EAAE,SAAS,EAAT,iBAAS,EAAE,CAAA;AAE5B,SAAS,oBAAoB,CAAI,MAAiB;IAChD,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,CAAA;AAChD,CAAC;AACD,SAAS,qBAAqB,CAAC,CAAmD;IAChF,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,SAAS,IAAI,CAAC,IAAI,IAAI;QACjD,OAAO,KAAK,CAAA;IACd,OAAQ,CAAa,CAAC,IAAI,IAAI,cAAI,CAAC,mBAAmB,IAAK,CAAa,CAAC,IAAI,IAAI,cAAI,CAAC,oBAAoB,CAAA;AAC5G,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"repository": "https://github.com/remkoj/optimizely-dxp-clients.git",
|
|
4
4
|
"author": "Remko Jantzen <693172+remkoj@users.noreply.github.com>",
|
|
5
5
|
"homepage": "https://github.com/remkoj/optimizely-dxp-clients",
|
|
6
|
-
"version": "6.0.0-
|
|
6
|
+
"version": "6.0.0-rc.1",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"type": "commonjs",
|
|
9
9
|
"description": "GraphQL Codegen preset for Optimizely Graph",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"./transform": "./dist/transform.js",
|
|
22
22
|
"./documents": "./dist/documents/index.js",
|
|
23
23
|
"./loader": "./dist/embedded-loader.js",
|
|
24
|
-
"./contenttype-loader": "./dist/contenttype-loader.js"
|
|
24
|
+
"./contenttype-loader": "./dist/contenttype-loader.js",
|
|
25
|
+
"./generate": "./dist/generator/index.js"
|
|
25
26
|
},
|
|
26
27
|
"typesVersions": {
|
|
27
28
|
"*": {
|
|
@@ -41,28 +42,31 @@
|
|
|
41
42
|
"./dist/embedded-loader.d.ts"
|
|
42
43
|
],
|
|
43
44
|
"contenttype-loader": [
|
|
44
|
-
"./dist/contenttype-loader.
|
|
45
|
+
"./dist/contenttype-loader.d.ts"
|
|
46
|
+
],
|
|
47
|
+
"generate": [
|
|
48
|
+
"./dist/generator/index.d.ts"
|
|
45
49
|
]
|
|
46
50
|
}
|
|
47
51
|
},
|
|
48
52
|
"devDependencies": {
|
|
49
53
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
50
|
-
"@remkoj/optimizely-cms-api": "6.0.0-
|
|
51
|
-
"@remkoj/optimizely-graph-client": "6.0.0-
|
|
52
|
-
"@types/node": "^22.
|
|
54
|
+
"@remkoj/optimizely-cms-api": "6.0.0-rc.1",
|
|
55
|
+
"@remkoj/optimizely-graph-client": "6.0.0-rc.1",
|
|
56
|
+
"@types/node": "^22.19.15",
|
|
53
57
|
"typescript": "^5.9.3"
|
|
54
58
|
},
|
|
55
59
|
"dependencies": {
|
|
56
60
|
"@graphql-codegen/add": "^6.0.0",
|
|
57
|
-
"@graphql-codegen/client-preset": "^5.
|
|
58
|
-
"@graphql-codegen/plugin-helpers": "^6.
|
|
59
|
-
"@graphql-codegen/typescript": "^5.0.
|
|
60
|
-
"@graphql-codegen/typescript-graphql-request": "^
|
|
61
|
-
"@graphql-codegen/typescript-operations": "^5.0.
|
|
62
|
-
"@remkoj/optimizely-cms-api": "
|
|
63
|
-
"@remkoj/optimizely-graph-client": "
|
|
64
|
-
"graphql": "^16.
|
|
65
|
-
"graphql-request": "^7.
|
|
61
|
+
"@graphql-codegen/client-preset": "^5.2.4",
|
|
62
|
+
"@graphql-codegen/plugin-helpers": "^6.2.0",
|
|
63
|
+
"@graphql-codegen/typescript": "^5.0.9",
|
|
64
|
+
"@graphql-codegen/typescript-graphql-request": "^7.0.0",
|
|
65
|
+
"@graphql-codegen/typescript-operations": "^5.0.9",
|
|
66
|
+
"@remkoj/optimizely-cms-api": "6.0.0-rc.1",
|
|
67
|
+
"@remkoj/optimizely-graph-client": "6.0.0-rc.1",
|
|
68
|
+
"graphql": "^16.13.1",
|
|
69
|
+
"graphql-request": "^7.4.0",
|
|
66
70
|
"graphql-sock": "^1.0.1",
|
|
67
71
|
"graphql-tag": "^2.12.6",
|
|
68
72
|
"node-object-hash": "^3.1.1",
|
|
@@ -75,5 +79,5 @@
|
|
|
75
79
|
"watch": "yarn tsc --watch",
|
|
76
80
|
"opti-patch": "yarn node dist/patch.js"
|
|
77
81
|
},
|
|
78
|
-
"stableVersion": "5.
|
|
82
|
+
"stableVersion": "5.2.0"
|
|
79
83
|
}
|