@conduit-client/generator-ts 3.10.0 → 3.12.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/dist/types/v1/generators/aura-command-generator.d.ts +1 -0
- package/dist/types/v1/generators/aura-resource-cache-control-command-generator.d.ts +2 -1
- package/dist/types/v1/generators/base-command-generator.d.ts +19 -0
- package/dist/types/v1/generators/graphql-normalized-cache-control-generator-mixin.d.ts +1 -1
- package/dist/types/v1/generators/http-command-generator.d.ts +1 -0
- package/dist/types/v1/generators/normalized-cache-control-generator-mixin.d.ts +2 -1
- package/dist/v1/index.js +160 -10
- package/dist/v1/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -11,6 +11,7 @@ import { HttpCommandGenerator } from './http-command-generator';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class AuraCommandGenerator extends HttpCommandGenerator {
|
|
13
13
|
commandBaseClass: ImportableTypeReference;
|
|
14
|
+
get commandGeneratedClass(): ImportableTypeReference;
|
|
14
15
|
/**
|
|
15
16
|
* Constructs and returns an array of code blocks that form the body of the Aura-specific command class.
|
|
16
17
|
* @returns {Code[]} An array of code snippets that define the command class body, tailored for Aura components.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuraCommandGenerator } from './aura-command-generator';
|
|
2
|
-
import type { Code } from '../files';
|
|
2
|
+
import type { Code, ImportableTypeReference } from '../files';
|
|
3
3
|
/**
|
|
4
4
|
* Extends AuraCommandGenerator to add cache control strategies specific to resource caching in Aura components.
|
|
5
5
|
*
|
|
@@ -14,6 +14,7 @@ export declare class AuraResourceCacheControlCommandGenerator extends AuraComman
|
|
|
14
14
|
readonly exportedSymbol: "AuraResourceCacheControlCommand";
|
|
15
15
|
readonly isType: true;
|
|
16
16
|
};
|
|
17
|
+
get commandGeneratedClass(): ImportableTypeReference;
|
|
17
18
|
/**
|
|
18
19
|
* Generates a method to build cache control metadata based on the response type and cache strategy defined in the command model.
|
|
19
20
|
* Throws an error if the cache strategy is set to 'none'.
|
|
@@ -43,7 +43,14 @@ export declare abstract class CommandGenerator {
|
|
|
43
43
|
protected commandConfigTypeSymbol: symbol;
|
|
44
44
|
protected commandClassBodySymbol: symbol;
|
|
45
45
|
protected commandOptionsTypeSymbol: symbol;
|
|
46
|
+
protected commandBuildCommandClassReturnTypeSymbol: symbol;
|
|
47
|
+
protected commandBuildCommandClassReturnAssertionSymbol: symbol;
|
|
46
48
|
abstract get commandBaseClass(): ImportableTypeReference;
|
|
49
|
+
/**
|
|
50
|
+
* When set, the generated buildCommandClass is strongly typed to return this declare class type
|
|
51
|
+
* (e.g. GeneratedFetchNetworkCommand) and the return statement uses a type assertion.
|
|
52
|
+
*/
|
|
53
|
+
get commandGeneratedClass(): ImportableTypeReference | undefined;
|
|
47
54
|
get classBody(): Code[];
|
|
48
55
|
get commandTypeConstructorArgs(): Code;
|
|
49
56
|
get commandConstructorArgs(): Code;
|
|
@@ -77,6 +84,18 @@ export declare abstract class CommandGenerator {
|
|
|
77
84
|
protected buildCommandConfigType(): Code;
|
|
78
85
|
protected buildCommandConfigSchema(): Code;
|
|
79
86
|
protected buildCommandOptionsType(): Code;
|
|
87
|
+
/**
|
|
88
|
+
* Type arguments for the Generated class in the buildCommandClass return type.
|
|
89
|
+
* Default: same as buildCommandTypeGenerics(). Override (e.g. normalized cache control)
|
|
90
|
+
* to pass a full generic tuple so execute() and bindings are correctly typed.
|
|
91
|
+
*/
|
|
92
|
+
protected getBuildCommandClassReturnTypeGenerics(): Code;
|
|
93
|
+
/**
|
|
94
|
+
* Constructor parameter list for the buildCommandClass return type signature.
|
|
95
|
+
* Default: commandTypeConstructorArgs + ...args: CommandConstructorParams.
|
|
96
|
+
* Override (e.g. GraphQL) when the constructor has a fixed param list with no rest.
|
|
97
|
+
*/
|
|
98
|
+
protected getBuildCommandClassConstructorParams(): Code;
|
|
80
99
|
protected buildCommandTypeGenerics(): Code;
|
|
81
100
|
protected buildExtraServices(): Code | undefined;
|
|
82
101
|
protected generateAfterRequestHooks(): Code;
|
|
@@ -9,5 +9,5 @@ type Constructor = new (...args: any[]) => CommandGenerator & NormalizedCacheCon
|
|
|
9
9
|
* 2. Adding documentRootType parameter to constructor
|
|
10
10
|
* 3. Generating GraphQL-specific methods like buildRequestQuery
|
|
11
11
|
*/
|
|
12
|
-
export declare function GraphQLNormalizedCacheControlGeneratorMixin(Base: Constructor, commandBaseClass: ImportableTypeReference): Constructor;
|
|
12
|
+
export declare function GraphQLNormalizedCacheControlGeneratorMixin(Base: Constructor, commandBaseClass: ImportableTypeReference, commandGeneratedClass?: ImportableTypeReference): Constructor;
|
|
13
13
|
export {};
|
|
@@ -12,6 +12,7 @@ export declare const MEDIATYPE_APP_JSON = "application/json";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class HttpCommandGenerator extends CommandGenerator {
|
|
14
14
|
commandBaseClass: ImportableTypeReference;
|
|
15
|
+
get commandGeneratedClass(): ImportableTypeReference;
|
|
15
16
|
/**
|
|
16
17
|
* Constructs and returns an array of code blocks that form the body of the HTTP command class.
|
|
17
18
|
* Includes methods for generating fetch parameters and error coercion logic.
|
|
@@ -9,7 +9,8 @@ type NormalizedCacheControlConstructor = new (...args: any[]) => CommandGenerato
|
|
|
9
9
|
*
|
|
10
10
|
* @param Base The base class to mix in the normalized code generation logic to
|
|
11
11
|
* @param commandBaseClass An importable refernce to the command base class to use in the generated code
|
|
12
|
+
* @param commandGeneratedClass Optional importable reference to the declare-block type for strong typing (e.g. GeneratedHttpNormalizedCacheControlCommand)
|
|
12
13
|
* @returns A new class with the normalized generation behavior mixed in
|
|
13
14
|
*/
|
|
14
|
-
export declare function NormalizedCacheControlGeneratorMixin(Base: Constructor, commandBaseClass: ImportableTypeReference): NormalizedCacheControlConstructor;
|
|
15
|
+
export declare function NormalizedCacheControlGeneratorMixin(Base: Constructor, commandBaseClass: ImportableTypeReference, commandGeneratedClass?: ImportableTypeReference): NormalizedCacheControlConstructor;
|
|
15
16
|
export {};
|
package/dist/v1/index.js
CHANGED
|
@@ -962,6 +962,11 @@ const BUILD_READ_WRITE_RESULT = {
|
|
|
962
962
|
exportedSymbol: "buildReadWriteResult",
|
|
963
963
|
isType: false
|
|
964
964
|
};
|
|
965
|
+
const READ_RESULT = {
|
|
966
|
+
module: "@conduit-client/type-normalization/v1",
|
|
967
|
+
exportedSymbol: "ReadResult",
|
|
968
|
+
isType: true
|
|
969
|
+
};
|
|
965
970
|
const DEEP_EQUALS = {
|
|
966
971
|
module: "@conduit-client/utils",
|
|
967
972
|
exportedSymbol: "deepEquals",
|
|
@@ -1121,7 +1126,7 @@ function generateUnidentifiableType(services, type, options) {
|
|
|
1121
1126
|
return ${BUILD_READ_WRITE_RESULT}<NormalizedReference, ${WRITE_ERRORS}>(normalized, errors)
|
|
1122
1127
|
}
|
|
1123
1128
|
|
|
1124
|
-
read(cache: ${READONLY_CACHE}, input: ${readInput}){
|
|
1129
|
+
read(cache: ${READONLY_CACHE}, input: ${readInput}): ${READ_RESULT}<Data>{
|
|
1125
1130
|
const errors: ${READ_ERRORS} = []
|
|
1126
1131
|
const denormalized = ${normalizationCode.denormalize}
|
|
1127
1132
|
return ${BUILD_READ_WRITE_RESULT}<Data, ${READ_ERRORS}>(denormalized, errors)
|
|
@@ -2146,6 +2151,19 @@ class CommandGenerator {
|
|
|
2146
2151
|
this.commandConfigTypeSymbol = Symbol.for("commandConfigType");
|
|
2147
2152
|
this.commandClassBodySymbol = Symbol.for("commandClassBody");
|
|
2148
2153
|
this.commandOptionsTypeSymbol = Symbol.for("commandOptionsType");
|
|
2154
|
+
this.commandBuildCommandClassReturnTypeSymbol = Symbol.for(
|
|
2155
|
+
"commandBuildCommandClassReturnType"
|
|
2156
|
+
);
|
|
2157
|
+
this.commandBuildCommandClassReturnAssertionSymbol = Symbol.for(
|
|
2158
|
+
"commandBuildCommandClassReturnAssertion"
|
|
2159
|
+
);
|
|
2160
|
+
}
|
|
2161
|
+
/**
|
|
2162
|
+
* When set, the generated buildCommandClass is strongly typed to return this declare class type
|
|
2163
|
+
* (e.g. GeneratedFetchNetworkCommand) and the return statement uses a type assertion.
|
|
2164
|
+
*/
|
|
2165
|
+
get commandGeneratedClass() {
|
|
2166
|
+
return void 0;
|
|
2149
2167
|
}
|
|
2150
2168
|
get classBody() {
|
|
2151
2169
|
return [];
|
|
@@ -2213,14 +2231,18 @@ class CommandGenerator {
|
|
|
2213
2231
|
code`>;`,
|
|
2214
2232
|
code`export type CommandConstructorParams=ConstructorParameters<CommandConstructorType>;`,
|
|
2215
2233
|
this.generateCommandType(),
|
|
2216
|
-
code`export function buildCommandClass(baseClass: CommandConstructorType):
|
|
2234
|
+
code`export function buildCommandClass(baseClass: CommandConstructorType): `,
|
|
2235
|
+
this.commandBuildCommandClassReturnTypeSymbol,
|
|
2236
|
+
code`{`,
|
|
2217
2237
|
code`return class extends baseClass{`,
|
|
2218
2238
|
this.generateConstructor(),
|
|
2219
2239
|
...this.classBody,
|
|
2220
2240
|
this.exposeSubscribeAndRefresh,
|
|
2221
2241
|
this.generateOperationType(),
|
|
2222
2242
|
this.generateAfterRequestHooks(),
|
|
2223
|
-
code`}
|
|
2243
|
+
code`}`,
|
|
2244
|
+
this.commandBuildCommandClassReturnAssertionSymbol,
|
|
2245
|
+
code`};`
|
|
2224
2246
|
];
|
|
2225
2247
|
}
|
|
2226
2248
|
/**
|
|
@@ -2235,6 +2257,18 @@ class CommandGenerator {
|
|
|
2235
2257
|
file.pushTo(this.commandOptionsTypeSymbol, this.buildCommandOptionsType());
|
|
2236
2258
|
file.pushTo(this.commandTypeGenericsSymbol, this.buildCommandTypeGenerics());
|
|
2237
2259
|
file.pushTo(this.commandClassBodySymbol, ...this.classBody);
|
|
2260
|
+
const generatedClass = this.commandGeneratedClass;
|
|
2261
|
+
if (generatedClass) {
|
|
2262
|
+
const constructorSignature = code`new (${this.getBuildCommandClassConstructorParams()}) => ${generatedClass}<${this.getBuildCommandClassReturnTypeGenerics()}>`;
|
|
2263
|
+
file.pushTo(this.commandBuildCommandClassReturnTypeSymbol, constructorSignature);
|
|
2264
|
+
file.pushTo(
|
|
2265
|
+
this.commandBuildCommandClassReturnAssertionSymbol,
|
|
2266
|
+
code` as unknown as ${constructorSignature}`
|
|
2267
|
+
);
|
|
2268
|
+
} else {
|
|
2269
|
+
file.pushTo(this.commandBuildCommandClassReturnTypeSymbol, code`Command`);
|
|
2270
|
+
file.pushTo(this.commandBuildCommandClassReturnAssertionSymbol, code``);
|
|
2271
|
+
}
|
|
2238
2272
|
}
|
|
2239
2273
|
buildCommandConfigType() {
|
|
2240
2274
|
return this.services.typeDefinition.build(this.commandModel.configType);
|
|
@@ -2246,6 +2280,22 @@ class CommandGenerator {
|
|
|
2246
2280
|
const commandName = this.commandModel.className;
|
|
2247
2281
|
return code`export type ${commandName}Options = ${ABORTABLE_COMMAND_OPTIONS};`;
|
|
2248
2282
|
}
|
|
2283
|
+
/**
|
|
2284
|
+
* Type arguments for the Generated class in the buildCommandClass return type.
|
|
2285
|
+
* Default: same as buildCommandTypeGenerics(). Override (e.g. normalized cache control)
|
|
2286
|
+
* to pass a full generic tuple so execute() and bindings are correctly typed.
|
|
2287
|
+
*/
|
|
2288
|
+
getBuildCommandClassReturnTypeGenerics() {
|
|
2289
|
+
return this.buildCommandTypeGenerics();
|
|
2290
|
+
}
|
|
2291
|
+
/**
|
|
2292
|
+
* Constructor parameter list for the buildCommandClass return type signature.
|
|
2293
|
+
* Default: commandTypeConstructorArgs + ...args: CommandConstructorParams.
|
|
2294
|
+
* Override (e.g. GraphQL) when the constructor has a fixed param list with no rest.
|
|
2295
|
+
*/
|
|
2296
|
+
getBuildCommandClassConstructorParams() {
|
|
2297
|
+
return code`${this.commandTypeConstructorArgs}, ...args: CommandConstructorParams`;
|
|
2298
|
+
}
|
|
2249
2299
|
buildCommandTypeGenerics() {
|
|
2250
2300
|
var _a;
|
|
2251
2301
|
const extraServicesCode = this.buildExtraServices();
|
|
@@ -2417,6 +2467,11 @@ const FETCH_COMMAND_BASE_CLASS = {
|
|
|
2417
2467
|
exportedSymbol: "FetchNetworkCommand",
|
|
2418
2468
|
isType: true
|
|
2419
2469
|
};
|
|
2470
|
+
const GENERATED_FETCH_NETWORK_COMMAND = {
|
|
2471
|
+
module: "@conduit-client/command-fetch-network/v1",
|
|
2472
|
+
exportedSymbol: "GeneratedFetchNetworkCommand",
|
|
2473
|
+
isType: true
|
|
2474
|
+
};
|
|
2420
2475
|
const FETCH_RESPONSE$1 = {
|
|
2421
2476
|
module: "@conduit-client/utils",
|
|
2422
2477
|
exportedSymbol: "FetchResponse",
|
|
@@ -2438,6 +2493,9 @@ class HttpCommandGenerator extends CommandGenerator {
|
|
|
2438
2493
|
super(...arguments);
|
|
2439
2494
|
this.commandBaseClass = FETCH_COMMAND_BASE_CLASS;
|
|
2440
2495
|
}
|
|
2496
|
+
get commandGeneratedClass() {
|
|
2497
|
+
return GENERATED_FETCH_NETWORK_COMMAND;
|
|
2498
|
+
}
|
|
2441
2499
|
/**
|
|
2442
2500
|
* Constructs and returns an array of code blocks that form the body of the HTTP command class.
|
|
2443
2501
|
* Includes methods for generating fetch parameters and error coercion logic.
|
|
@@ -2604,11 +2662,19 @@ const AURA_COMMAND_BASE_CLASS = {
|
|
|
2604
2662
|
exportedSymbol: "AuraNetworkCommand",
|
|
2605
2663
|
isType: true
|
|
2606
2664
|
};
|
|
2665
|
+
const GENERATED_AURA_NETWORK_COMMAND = {
|
|
2666
|
+
module: "@conduit-client/command-aura-network/v1",
|
|
2667
|
+
exportedSymbol: "GeneratedAuraNetworkCommand",
|
|
2668
|
+
isType: true
|
|
2669
|
+
};
|
|
2607
2670
|
class AuraCommandGenerator extends HttpCommandGenerator {
|
|
2608
2671
|
constructor() {
|
|
2609
2672
|
super(...arguments);
|
|
2610
2673
|
this.commandBaseClass = AURA_COMMAND_BASE_CLASS;
|
|
2611
2674
|
}
|
|
2675
|
+
get commandGeneratedClass() {
|
|
2676
|
+
return GENERATED_AURA_NETWORK_COMMAND;
|
|
2677
|
+
}
|
|
2612
2678
|
/**
|
|
2613
2679
|
* Constructs and returns an array of code blocks that form the body of the Aura-specific command class.
|
|
2614
2680
|
* @returns {Code[]} An array of code snippets that define the command class body, tailored for Aura components.
|
|
@@ -2709,11 +2775,19 @@ const AURA_CACHE_CONTROL_COMMAND_BASE_CLASS = {
|
|
|
2709
2775
|
exportedSymbol: "AuraResourceCacheControlCommand",
|
|
2710
2776
|
isType: true
|
|
2711
2777
|
};
|
|
2778
|
+
const GENERATED_AURA_RESOURCE_CACHE_CONTROL_COMMAND = {
|
|
2779
|
+
module: "@conduit-client/command-aura-resource-cache-control/v1",
|
|
2780
|
+
exportedSymbol: "GeneratedAuraResourceCacheControlCommand",
|
|
2781
|
+
isType: true
|
|
2782
|
+
};
|
|
2712
2783
|
class AuraResourceCacheControlCommandGenerator extends AuraCommandGenerator {
|
|
2713
2784
|
constructor() {
|
|
2714
2785
|
super(...arguments);
|
|
2715
2786
|
this.commandBaseClass = AURA_CACHE_CONTROL_COMMAND_BASE_CLASS;
|
|
2716
2787
|
}
|
|
2788
|
+
get commandGeneratedClass() {
|
|
2789
|
+
return GENERATED_AURA_RESOURCE_CACHE_CONTROL_COMMAND;
|
|
2790
|
+
}
|
|
2717
2791
|
/**
|
|
2718
2792
|
* Generates a method to build cache control metadata based on the response type and cache strategy defined in the command model.
|
|
2719
2793
|
* Throws an error if the cache strategy is set to 'none'.
|
|
@@ -4008,12 +4082,30 @@ const DATA_OF = {
|
|
|
4008
4082
|
exportedSymbol: "DataOf",
|
|
4009
4083
|
isType: true
|
|
4010
4084
|
};
|
|
4011
|
-
|
|
4085
|
+
const READ_INPUT_OF = {
|
|
4086
|
+
module: "@conduit-client/type-normalization/v1",
|
|
4087
|
+
exportedSymbol: "ReadInputOf",
|
|
4088
|
+
isType: true
|
|
4089
|
+
};
|
|
4090
|
+
const WRITE_RESPONSE_OF = {
|
|
4091
|
+
module: "@conduit-client/type-normalization/v1",
|
|
4092
|
+
exportedSymbol: "WriteResponseOf",
|
|
4093
|
+
isType: true
|
|
4094
|
+
};
|
|
4095
|
+
const WRITE_INPUT_OF = {
|
|
4096
|
+
module: "@conduit-client/type-normalization/v1",
|
|
4097
|
+
exportedSymbol: "WriteInputOf",
|
|
4098
|
+
isType: true
|
|
4099
|
+
};
|
|
4100
|
+
function NormalizedCacheControlGeneratorMixin(Base, commandBaseClass, commandGeneratedClass) {
|
|
4012
4101
|
return class NormalizedCacheControl extends Base {
|
|
4013
4102
|
constructor() {
|
|
4014
4103
|
super(...arguments);
|
|
4015
4104
|
this.commandBaseClass = commandBaseClass;
|
|
4016
4105
|
}
|
|
4106
|
+
get commandGeneratedClass() {
|
|
4107
|
+
return commandGeneratedClass;
|
|
4108
|
+
}
|
|
4017
4109
|
get commandTypeConstructorArgs() {
|
|
4018
4110
|
return code`config: Config, typeRegistry: ${this.services.typeRegistryGenerator.build()}`;
|
|
4019
4111
|
}
|
|
@@ -4025,6 +4117,22 @@ function NormalizedCacheControlGeneratorMixin(Base, commandBaseClass) {
|
|
|
4025
4117
|
const builtType = this.buildResponseType();
|
|
4026
4118
|
return code`${builtType.typeClassRef}${extraServicesCode ? code`, ${extraServicesCode}` : ""}`;
|
|
4027
4119
|
}
|
|
4120
|
+
/**
|
|
4121
|
+
* Pass all 7 type args to the Generated declare class so Data, ReadInput, etc. are
|
|
4122
|
+
* inferred and execute() / bindings match (e.g. GetCommand<Pet[], Config>).
|
|
4123
|
+
* Only override when commandGeneratedClass is set (HTTP/Aura normalized); when this
|
|
4124
|
+
* mixin is used without it (e.g. as base for GraphQL), we do not add the 7-tuple so
|
|
4125
|
+
* the GraphQL mixin's single-type override is used.
|
|
4126
|
+
*/
|
|
4127
|
+
getBuildCommandClassReturnTypeGenerics() {
|
|
4128
|
+
if (!commandGeneratedClass) {
|
|
4129
|
+
return super.getBuildCommandClassReturnTypeGenerics();
|
|
4130
|
+
}
|
|
4131
|
+
const builtType = this.buildResponseType();
|
|
4132
|
+
const extraServicesCode = this.buildExtraServices();
|
|
4133
|
+
const resultType = builtType.typeClassRef;
|
|
4134
|
+
return code`${resultType}, ${DATA_OF}<${resultType}>, ${DATA_OF}<${resultType}>, ${READ_INPUT_OF}<${resultType}>, ${WRITE_RESPONSE_OF}<${resultType}>, ${WRITE_INPUT_OF}<${resultType}>${extraServicesCode ? code`, ${extraServicesCode}` : code`, object`}`;
|
|
4135
|
+
}
|
|
4028
4136
|
get classBody() {
|
|
4029
4137
|
return [
|
|
4030
4138
|
...super.classBody,
|
|
@@ -4155,13 +4263,16 @@ const NAMED_FETCH_SERVICE$2 = {
|
|
|
4155
4263
|
exportedSymbol: "NamedFetchService",
|
|
4156
4264
|
isType: true
|
|
4157
4265
|
};
|
|
4158
|
-
function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass) {
|
|
4266
|
+
function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass, commandGeneratedClass) {
|
|
4159
4267
|
return class GraphQLNormalizedCacheControl extends Base {
|
|
4160
4268
|
constructor() {
|
|
4161
4269
|
super(...arguments);
|
|
4162
4270
|
this.commandBaseClass = commandBaseClass;
|
|
4163
4271
|
this.documentRootTypeSymbol = Symbol.for("documentRootType");
|
|
4164
4272
|
}
|
|
4273
|
+
get commandGeneratedClass() {
|
|
4274
|
+
return commandGeneratedClass;
|
|
4275
|
+
}
|
|
4165
4276
|
get template() {
|
|
4166
4277
|
return [
|
|
4167
4278
|
code`export type DocumentRootType = ${GRAPHQL_DOCUMENT_ROOT_TYPE_REPOSITORY}<${GRAPHQL_DATA$1}, ${GRAPHQL_DATA$1}>;`,
|
|
@@ -4177,6 +4288,18 @@ function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass) {
|
|
|
4177
4288
|
get commandTypeConstructorArgs() {
|
|
4178
4289
|
return code`config: Config, documentRootType: DocumentRootType, services: ${NAMED_CACHE_CONTROLLER_SERVICE} & ${NAMED_PUBSUB_SERVICE$3} & ${this.buildNetworkServicesCode()} & object`;
|
|
4179
4290
|
}
|
|
4291
|
+
/**
|
|
4292
|
+
* GraphQL command constructor has exactly 3 params; no rest. Avoids "Expected 6 arguments, but got 3".
|
|
4293
|
+
*/
|
|
4294
|
+
getBuildCommandClassConstructorParams() {
|
|
4295
|
+
return this.commandTypeConstructorArgs;
|
|
4296
|
+
}
|
|
4297
|
+
/**
|
|
4298
|
+
* GraphQL Generated class has only ExtraServices; use buildCommandTypeGenerics() (do not use 7-tuple from mixin).
|
|
4299
|
+
*/
|
|
4300
|
+
getBuildCommandClassReturnTypeGenerics() {
|
|
4301
|
+
return this.buildCommandTypeGenerics();
|
|
4302
|
+
}
|
|
4180
4303
|
get commandConstructorArgs() {
|
|
4181
4304
|
return code`protected config: Config, protected documentRootType: DocumentRootType, protected services: ${NAMED_CACHE_CONTROLLER_SERVICE} & ${NAMED_PUBSUB_SERVICE$3} & ${this.buildNetworkServicesCode()} & object`;
|
|
4182
4305
|
}
|
|
@@ -4240,9 +4363,12 @@ function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass) {
|
|
|
4240
4363
|
generateConstructor() {
|
|
4241
4364
|
return code`constructor(${this.commandConstructorArgs}){${this.commandConstructorBody}}`;
|
|
4242
4365
|
}
|
|
4366
|
+
/**
|
|
4367
|
+
* GraphQL command has a single type param (ExtraServices). Return one type, no leading comma.
|
|
4368
|
+
*/
|
|
4243
4369
|
buildCommandTypeGenerics() {
|
|
4244
4370
|
const extraServicesCode = this.buildExtraServices();
|
|
4245
|
-
return
|
|
4371
|
+
return extraServicesCode ? extraServicesCode : code`object`;
|
|
4246
4372
|
}
|
|
4247
4373
|
};
|
|
4248
4374
|
}
|
|
@@ -4251,13 +4377,19 @@ const HTTP_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS = {
|
|
|
4251
4377
|
exportedSymbol: "HttpGraphQLNormalizedCacheControlCommand",
|
|
4252
4378
|
isType: true
|
|
4253
4379
|
};
|
|
4380
|
+
const GENERATED_HTTP_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND = {
|
|
4381
|
+
module: "@conduit-client/command-http-graphql-normalized-cache-control/v1",
|
|
4382
|
+
exportedSymbol: "GeneratedHttpGraphQLNormalizedCacheControlCommand",
|
|
4383
|
+
isType: true
|
|
4384
|
+
};
|
|
4254
4385
|
const HttpNormalizedCacheControlCommandGenerator$1 = NormalizedCacheControlGeneratorMixin(
|
|
4255
4386
|
HttpCommandGenerator,
|
|
4256
4387
|
HTTP_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS
|
|
4257
4388
|
);
|
|
4258
4389
|
const HttpGraphQLNormalizedCacheControlCommandGenerator = GraphQLNormalizedCacheControlGeneratorMixin(
|
|
4259
4390
|
HttpNormalizedCacheControlCommandGenerator$1,
|
|
4260
|
-
HTTP_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS
|
|
4391
|
+
HTTP_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS,
|
|
4392
|
+
GENERATED_HTTP_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND
|
|
4261
4393
|
);
|
|
4262
4394
|
class BaseCommandModel {
|
|
4263
4395
|
constructor(operation) {
|
|
@@ -4668,18 +4800,30 @@ const AURA_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS = {
|
|
|
4668
4800
|
exportedSymbol: "AuraNormalizedCacheControlCommand",
|
|
4669
4801
|
isType: true
|
|
4670
4802
|
};
|
|
4803
|
+
const GENERATED_AURA_NORMALIZED_CACHE_CONTROL_COMMAND = {
|
|
4804
|
+
module: "@conduit-client/command-aura-normalized-cache-control/v1",
|
|
4805
|
+
exportedSymbol: "GeneratedAuraNormalizedCacheControlCommand",
|
|
4806
|
+
isType: true
|
|
4807
|
+
};
|
|
4671
4808
|
const AuraNormalizedCacheControlCommandGenerator$1 = NormalizedCacheControlGeneratorMixin(
|
|
4672
4809
|
AuraCommandGenerator,
|
|
4673
|
-
AURA_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS
|
|
4810
|
+
AURA_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS,
|
|
4811
|
+
GENERATED_AURA_NORMALIZED_CACHE_CONTROL_COMMAND
|
|
4674
4812
|
);
|
|
4675
4813
|
const HTTP_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS = {
|
|
4676
4814
|
module: "@conduit-client/command-http-normalized-cache-control/v1",
|
|
4677
4815
|
exportedSymbol: "HttpNormalizedCacheControlCommand",
|
|
4678
4816
|
isType: true
|
|
4679
4817
|
};
|
|
4818
|
+
const GENERATED_HTTP_NORMALIZED_CACHE_CONTROL_COMMAND = {
|
|
4819
|
+
module: "@conduit-client/command-http-normalized-cache-control/v1",
|
|
4820
|
+
exportedSymbol: "GeneratedHttpNormalizedCacheControlCommand",
|
|
4821
|
+
isType: true
|
|
4822
|
+
};
|
|
4680
4823
|
const HttpNormalizedCacheControlCommandGenerator = NormalizedCacheControlGeneratorMixin(
|
|
4681
4824
|
HttpCommandGenerator,
|
|
4682
|
-
HTTP_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS
|
|
4825
|
+
HTTP_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS,
|
|
4826
|
+
GENERATED_HTTP_NORMALIZED_CACHE_CONTROL_COMMAND
|
|
4683
4827
|
);
|
|
4684
4828
|
const HTTP_CACHE_CONTROL_COMMAND_BASE_CLASS_DESCRIPTOR = {
|
|
4685
4829
|
module: "@conduit-client/command-http-normalized-cache-control/v1",
|
|
@@ -11199,13 +11343,19 @@ const AURA_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS = {
|
|
|
11199
11343
|
exportedSymbol: "AuraGraphQLNormalizedCacheControlCommand",
|
|
11200
11344
|
isType: true
|
|
11201
11345
|
};
|
|
11346
|
+
const GENERATED_AURA_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND = {
|
|
11347
|
+
module: "@conduit-client/command-aura-graphql-normalized-cache-control/v1",
|
|
11348
|
+
exportedSymbol: "GeneratedAuraGraphQLNormalizedCacheControlCommand",
|
|
11349
|
+
isType: true
|
|
11350
|
+
};
|
|
11202
11351
|
const AuraNormalizedCacheControlCommandGenerator = NormalizedCacheControlGeneratorMixin(
|
|
11203
11352
|
AuraCommandGenerator,
|
|
11204
11353
|
AURA_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS
|
|
11205
11354
|
);
|
|
11206
11355
|
const AuraGraphQLNormalizedCacheControlCommandGenerator = GraphQLNormalizedCacheControlGeneratorMixin(
|
|
11207
11356
|
AuraNormalizedCacheControlCommandGenerator,
|
|
11208
|
-
AURA_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS
|
|
11357
|
+
AURA_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND_BASE_CLASS,
|
|
11358
|
+
GENERATED_AURA_GRAPHQL_NORMALIZED_CACHE_CONTROL_COMMAND
|
|
11209
11359
|
);
|
|
11210
11360
|
function defaultCommandModelFactory(operation) {
|
|
11211
11361
|
let commandModel;
|