wgc 0.58.7 → 0.59.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/commands/feature-subgraph/commands/publish.d.ts +4 -0
- package/dist/commands/feature-subgraph/commands/publish.js +136 -0
- package/dist/commands/feature-subgraph/commands/publish.js.map +1 -0
- package/dist/commands/feature-subgraph/index.js +3 -1
- package/dist/commands/feature-subgraph/index.js.map +1 -1
- package/dist/commands/subgraph/commands/create.js +1 -1
- package/dist/commands/subgraph/commands/create.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import Table from 'cli-table3';
|
|
4
|
+
import { Command, program } from 'commander';
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
import { resolve } from 'pathe';
|
|
7
|
+
import pc from 'picocolors';
|
|
8
|
+
import { EnumStatusCode } from '@wundergraph/cosmo-connect/dist/common/common_pb';
|
|
9
|
+
import { parseGraphQLSubscriptionProtocol, parseGraphQLWebsocketSubprotocol } from '@wundergraph/cosmo-shared';
|
|
10
|
+
import { getBaseHeaders } from '../../../core/config.js';
|
|
11
|
+
import { validateSubscriptionProtocols } from '../../../utils.js';
|
|
12
|
+
import { websocketSubprotocolDescription } from '../../../constants.js';
|
|
13
|
+
export default (opts) => {
|
|
14
|
+
const command = new Command('publish');
|
|
15
|
+
command.description("Publishes a feature subgraph on the control plane. If the feature subgraph doesn't exists, it will be created.\nIf the publication leads to composition errors, the errors will be visible in the Studio.\nThe router will continue to work with the latest valid schema.");
|
|
16
|
+
command.argument('<name>', 'The name of the feature subgraph to push the schema to. It is usually in the format of <org>.<service.name> and is used to uniquely identify your feature subgraph.');
|
|
17
|
+
command.requiredOption('--schema <path-to-schema>', 'The schema file to upload to the feature subgraph.');
|
|
18
|
+
command.option('-n, --namespace [string]', 'The namespace of the feature subgraph.');
|
|
19
|
+
command.option('-r, --routing-url <url>', 'The routing URL of the feature subgraph. This is the URL at which the feature subgraph will be accessible.' +
|
|
20
|
+
' This parameter is always ignored if the feature subgraph has already been created.');
|
|
21
|
+
command.option('--subscription-url [url]', 'The url used for subscriptions. If empty, it defaults to same url used for routing.' +
|
|
22
|
+
' This parameter is always ignored if the feature subgraph has already been created.');
|
|
23
|
+
command.option('--subscription-protocol <protocol>', 'The protocol to use when subscribing to the feature subgraph. The supported protocols are ws, sse, and sse_post.' +
|
|
24
|
+
' This parameter is always ignored if the feature subgraph has already been created.');
|
|
25
|
+
command.option('--websocket-subprotocol <protocol>', websocketSubprotocolDescription +
|
|
26
|
+
' This parameter is always ignored if the feature subgraph has already been created.');
|
|
27
|
+
command.option('--fail-on-composition-error', 'If set, the command will fail if the composition of the federated graph fails.', false);
|
|
28
|
+
command.option('--fail-on-admission-webhook-error', 'If set, the command will fail if the admission webhook fails.', false);
|
|
29
|
+
command.option('--subgraph <subgraph>', 'The base subgraph name for which the feature subgraph is to be created' +
|
|
30
|
+
' This parameter is always ignored if the feature subgraph has already been created.');
|
|
31
|
+
command.action(async (name, options) => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
const schemaFile = resolve(process.cwd(), options.schema);
|
|
34
|
+
if (!existsSync(schemaFile)) {
|
|
35
|
+
program.error(pc.red(pc.bold(`The schema file '${pc.bold(schemaFile)}' does not exist. Please check the path and try again.`)));
|
|
36
|
+
}
|
|
37
|
+
const schemaBuffer = await readFile(schemaFile);
|
|
38
|
+
const schema = new TextDecoder().decode(schemaBuffer);
|
|
39
|
+
if (schema.trim().length === 0) {
|
|
40
|
+
program.error(pc.red(pc.bold(`The schema file '${pc.bold(schemaFile)}' is empty. Please provide a valid schema.`)));
|
|
41
|
+
}
|
|
42
|
+
validateSubscriptionProtocols({
|
|
43
|
+
subscriptionProtocol: options.subscriptionProtocol,
|
|
44
|
+
websocketSubprotocol: options.websocketSubprotocol,
|
|
45
|
+
});
|
|
46
|
+
const spinner = ora('Feature Subgraph is being published...').start();
|
|
47
|
+
const resp = await opts.client.platform.publishFederatedSubgraph({
|
|
48
|
+
name,
|
|
49
|
+
namespace: options.namespace,
|
|
50
|
+
// Publish schema only
|
|
51
|
+
schema,
|
|
52
|
+
// Optional when feature subgraph does not exist yet
|
|
53
|
+
routingUrl: options.routingUrl,
|
|
54
|
+
subscriptionUrl: options.subscriptionUrl,
|
|
55
|
+
subscriptionProtocol: options.subscriptionProtocol
|
|
56
|
+
? parseGraphQLSubscriptionProtocol(options.subscriptionProtocol)
|
|
57
|
+
: undefined,
|
|
58
|
+
websocketSubprotocol: options.websocketSubprotocol
|
|
59
|
+
? parseGraphQLWebsocketSubprotocol(options.websocketSubprotocol)
|
|
60
|
+
: undefined,
|
|
61
|
+
labels: [],
|
|
62
|
+
isFeatureSubgraph: true,
|
|
63
|
+
baseSubgraphName: options.subgraph,
|
|
64
|
+
}, {
|
|
65
|
+
headers: getBaseHeaders(),
|
|
66
|
+
});
|
|
67
|
+
switch ((_a = resp.response) === null || _a === void 0 ? void 0 : _a.code) {
|
|
68
|
+
case EnumStatusCode.OK: {
|
|
69
|
+
spinner.succeed((resp === null || resp === void 0 ? void 0 : resp.hasChanged) === false ? 'No new changes to publish.' : 'Feature subgraph published successfully.');
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
case EnumStatusCode.ERR_SUBGRAPH_COMPOSITION_FAILED: {
|
|
73
|
+
spinner.warn('Feature subgraph published but with composition errors.');
|
|
74
|
+
const compositionErrorsTable = new Table({
|
|
75
|
+
head: [
|
|
76
|
+
pc.bold(pc.white('FEDERATED_GRAPH_NAME')),
|
|
77
|
+
pc.bold(pc.white('NAMESPACE')),
|
|
78
|
+
pc.bold(pc.white('FEATURE_FLAG')),
|
|
79
|
+
pc.bold(pc.white('ERROR_MESSAGE')),
|
|
80
|
+
],
|
|
81
|
+
colWidths: [30, 30, 30, 120],
|
|
82
|
+
wordWrap: true,
|
|
83
|
+
});
|
|
84
|
+
console.log(pc.red(`We found composition errors, while composing the federated graph.\nThe router will continue to work with the latest valid schema.\n${pc.bold('Please check the errors below:')}`));
|
|
85
|
+
for (const compositionError of resp.compositionErrors) {
|
|
86
|
+
compositionErrorsTable.push([
|
|
87
|
+
compositionError.federatedGraphName,
|
|
88
|
+
compositionError.namespace,
|
|
89
|
+
compositionError.featureFlag || '-',
|
|
90
|
+
compositionError.message,
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
// Don't exit here with 1 because the change was still applied
|
|
94
|
+
console.log(compositionErrorsTable.toString());
|
|
95
|
+
if (options.failOnCompositionError) {
|
|
96
|
+
program.error(pc.red(pc.bold('The command failed due to composition errors.')));
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case EnumStatusCode.ERR_DEPLOYMENT_FAILED: {
|
|
101
|
+
spinner.warn("Feature subgraph was published, but the updated composition hasn't been deployed, so it's not accessible to the router. Check the errors listed below for details.");
|
|
102
|
+
const deploymentErrorsTable = new Table({
|
|
103
|
+
head: [
|
|
104
|
+
pc.bold(pc.white('FEDERATED_GRAPH_NAME')),
|
|
105
|
+
pc.bold(pc.white('NAMESPACE')),
|
|
106
|
+
pc.bold(pc.white('ERROR_MESSAGE')),
|
|
107
|
+
],
|
|
108
|
+
colWidths: [30, 30, 120],
|
|
109
|
+
wordWrap: true,
|
|
110
|
+
});
|
|
111
|
+
for (const deploymentError of resp.deploymentErrors) {
|
|
112
|
+
deploymentErrorsTable.push([
|
|
113
|
+
deploymentError.federatedGraphName,
|
|
114
|
+
deploymentError.namespace,
|
|
115
|
+
deploymentError.message,
|
|
116
|
+
]);
|
|
117
|
+
}
|
|
118
|
+
// Don't exit here with 1 because the change was still applied
|
|
119
|
+
console.log(deploymentErrorsTable.toString());
|
|
120
|
+
if (options.failOnAdmissionWebhookError) {
|
|
121
|
+
program.error(pc.red(pc.bold('The command failed due to admission webhook errors.')));
|
|
122
|
+
}
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
default: {
|
|
126
|
+
spinner.fail(`Failed to publish feature subgraph "${name}".`);
|
|
127
|
+
if ((_b = resp.response) === null || _b === void 0 ? void 0 : _b.details) {
|
|
128
|
+
program.error(pc.red(pc.bold((_c = resp.response) === null || _c === void 0 ? void 0 : _c.details)));
|
|
129
|
+
}
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
return command;
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/commands/feature-subgraph/commands/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,gCAAgC,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAE/G,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAExE,eAAe,CAAC,IAAwB,EAAE,EAAE;IAC1C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,OAAO,CAAC,WAAW,CACjB,2QAA2Q,CAC5Q,CAAC;IACF,OAAO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AAC,uCAAuC,IAAI,IAAI,CAAC,CAAC;gBAC9D,IAAI,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,EAAE,CAAC;oBAC3B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,CAAC,CAAC,CAAC,CAAC;gBACzD,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import { checkAuth } from '../auth/utils.js';
|
|
3
3
|
import CreateFeatureSubgraphCommand from './commands/create.js';
|
|
4
|
+
import PublishFeatureSubgraphCommand from './commands/publish.js';
|
|
4
5
|
export default (opts) => {
|
|
5
6
|
const command = new Command('feature-subgraph').alias('fs');
|
|
6
|
-
command.description('
|
|
7
|
+
command.description('A feature subgraph serves as an "override" of an existing subgraph. When composing for a feature flag that includes the feature subgraph, the feature subgraph replaces the base subgraph. This provides commands for creating and managing feature subgraphs.');
|
|
7
8
|
command.addCommand(CreateFeatureSubgraphCommand(opts));
|
|
9
|
+
command.addCommand(PublishFeatureSubgraphCommand(opts));
|
|
8
10
|
command.hook('preAction', async () => {
|
|
9
11
|
await checkAuth();
|
|
10
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/feature-subgraph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,4BAA4B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/feature-subgraph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,4BAA4B,MAAM,sBAAsB,CAAC;AAChE,OAAO,6BAA6B,MAAM,uBAAuB,CAAC;AAElE,eAAe,CAAC,IAAwB,EAAE,EAAE;IAC1C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,CAAC,WAAW,CACjB,iQAAiQ,CAClQ,CAAC;IAEF,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,CAAC;IACvD,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC;IAExD,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;QACnC,MAAM,SAAS,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -24,7 +24,7 @@ export default (opts) => {
|
|
|
24
24
|
' Returns an error if the event-driven-graph flag is set.');
|
|
25
25
|
command.option('--websocket-subprotocol <protocol>', websocketSubprotocolDescription + ' Returns an error if the event-driven-graph flag is set.');
|
|
26
26
|
command.option('--readme <path-to-readme>', 'The markdown file which describes the subgraph.');
|
|
27
|
-
command.option('
|
|
27
|
+
command.option('--edg, --event-driven-graph', 'Set whether the subgraph is an Event-Driven Graph (EDG).' +
|
|
28
28
|
' Errors will be returned for the inclusion of most other parameters if the subgraph is an Event-Driven Graph.');
|
|
29
29
|
command.action(async (name, options) => {
|
|
30
30
|
var _a, _b, _c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/subgraph/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,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