@transcend-io/cli 4.9.1 → 4.10.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.
Files changed (51) hide show
  1. package/build/cli-discover-silos.js +1 -9
  2. package/build/cli-discover-silos.js.map +1 -1
  3. package/build/cli-pull.js +1 -9
  4. package/build/cli-pull.js.map +1 -1
  5. package/build/cli-push.js +11 -15
  6. package/build/cli-push.js.map +1 -1
  7. package/build/graphql/buildTranscendGraphQLClient.d.ts +10 -0
  8. package/build/graphql/buildTranscendGraphQLClient.d.ts.map +1 -0
  9. package/build/graphql/buildTranscendGraphQLClient.js +24 -0
  10. package/build/graphql/buildTranscendGraphQLClient.js.map +1 -0
  11. package/build/graphql/createSombraGotInstance.d.ts +12 -0
  12. package/build/graphql/createSombraGotInstance.d.ts.map +1 -0
  13. package/build/graphql/createSombraGotInstance.js +39 -0
  14. package/build/graphql/createSombraGotInstance.js.map +1 -0
  15. package/build/graphql/gqls/apiKey.js +1 -1
  16. package/build/graphql/gqls/dataPoint.d.ts.map +1 -1
  17. package/build/graphql/gqls/dataPoint.js +7 -3
  18. package/build/graphql/gqls/dataPoint.js.map +1 -1
  19. package/build/graphql/gqls/dataSilo.js +4 -4
  20. package/build/graphql/gqls/dataSubject.js +2 -2
  21. package/build/graphql/gqls/enricher.js +3 -3
  22. package/build/graphql/gqls/identifier.d.ts.map +1 -1
  23. package/build/graphql/gqls/identifier.js +6 -3
  24. package/build/graphql/gqls/identifier.js.map +1 -1
  25. package/build/graphql/gqls/index.d.ts +1 -0
  26. package/build/graphql/gqls/index.d.ts.map +1 -1
  27. package/build/graphql/gqls/index.js +1 -0
  28. package/build/graphql/gqls/index.js.map +1 -1
  29. package/build/graphql/gqls/organization.d.ts +2 -0
  30. package/build/graphql/gqls/organization.d.ts.map +1 -0
  31. package/build/graphql/gqls/organization.js +14 -0
  32. package/build/graphql/gqls/organization.js.map +1 -0
  33. package/build/graphql/gqls/template.js +2 -2
  34. package/build/graphql/index.d.ts +3 -0
  35. package/build/graphql/index.d.ts.map +1 -1
  36. package/build/graphql/index.js +3 -0
  37. package/build/graphql/index.js.map +1 -1
  38. package/build/index.d.ts +1 -0
  39. package/build/index.d.ts.map +1 -1
  40. package/build/index.js +1 -0
  41. package/build/index.js.map +1 -1
  42. package/build/mergeTranscendInputs.d.ts +10 -0
  43. package/build/mergeTranscendInputs.d.ts.map +1 -0
  44. package/build/mergeTranscendInputs.js +32 -0
  45. package/build/mergeTranscendInputs.js.map +1 -0
  46. package/build/tests/mergeTranscendInputs.test.d.ts +2 -0
  47. package/build/tests/mergeTranscendInputs.test.d.ts.map +1 -0
  48. package/build/tests/mergeTranscendInputs.test.js +107 -0
  49. package/build/tests/mergeTranscendInputs.test.js.map +1 -0
  50. package/build/tsbuildinfo +1 -1
  51. package/package.json +2 -1
@@ -8,7 +8,6 @@ const yargs_parser_1 = __importDefault(require("yargs-parser"));
8
8
  const logger_1 = require("./logger");
9
9
  const colors_1 = __importDefault(require("colors"));
10
10
  const constants_1 = require("./constants");
11
- const graphql_request_1 = require("graphql-request");
12
11
  const plugins_1 = require("./plugins");
13
12
  const graphql_1 = require("./graphql");
14
13
  const findFilesToScan_1 = require("./plugins/findFilesToScan");
@@ -35,14 +34,7 @@ async function main() {
35
34
  process.exit(1);
36
35
  }
37
36
  // Create a GraphQL client
38
- // eslint-disable-next-line global-require
39
- const { version } = require('../package.json');
40
- const client = new graphql_request_1.GraphQLClient(`${transcendUrl}/graphql`, {
41
- headers: {
42
- Authorization: `Bearer ${auth}`,
43
- version,
44
- },
45
- });
37
+ const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, auth);
46
38
  const plugin = await (0, graphql_1.fetchActiveSiloDiscoPlugin)(client, dataSiloId);
47
39
  const config = plugins_1.SILO_DISCOVERY_FUNCTIONS[plugin.dataSilo.type];
48
40
  const results = await (0, findFilesToScan_1.findFilesToScan)(scanPath, fileGlobs, ignoreDirs, config);
@@ -1 +1 @@
1
- {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UAAU,EACV,MAAM,CACP,CAAC;IAEF,MAAM,IAAA,oCAA0B,EAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAE7D,mBAAmB;IACnB,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,cAAc,OAAO,CAAC,MAAM,4BAA4B,QAAQ,IAAI;QAClE,WAAW,sBAAU,gDAAgD,CACxE,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
package/build/cli-pull.js CHANGED
@@ -8,7 +8,6 @@ const yargs_parser_1 = __importDefault(require("yargs-parser"));
8
8
  const logger_1 = require("./logger");
9
9
  const colors_1 = __importDefault(require("colors"));
10
10
  const graphql_1 = require("./graphql");
11
- const graphql_request_1 = require("graphql-request");
12
11
  const readTranscendYaml_1 = require("./readTranscendYaml");
13
12
  const constants_1 = require("./constants");
14
13
  /**
@@ -29,14 +28,7 @@ async function main() {
29
28
  process.exit(1);
30
29
  }
31
30
  // Create a GraphQL client
32
- // eslint-disable-next-line global-require
33
- const { version } = require('../package.json');
34
- const client = new graphql_request_1.GraphQLClient(`${transcendUrl}/graphql`, {
35
- headers: {
36
- Authorization: `Bearer ${auth}`,
37
- version,
38
- },
39
- });
31
+ const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, auth);
40
32
  // Sync to Disk
41
33
  try {
42
34
  const configuration = await (0, graphql_1.pullTranscendConfiguration)(client, {
@@ -1 +1 @@
1
- {"version":3,"file":"cli-pull.js","sourceRoot":"","sources":["../src/cli-pull.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,qCAAkC;AAClC,oDAA4B;AAC5B,uCAAuD;AACvD,qDAAgD;AAChD,2DAAyD;AACzD,2CAAsD;AAEtD;;;;;;;;GAQG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,iBAAiB,EACxB,YAAY,GAAG,0BAA0B,EACzC,WAAW,GAAG,EAA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AW,EAAG,WAAsB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAClE,gBAAgB,EAAG,gBAA2B;iBAC3C,KAAK,CAAC,GAAG,CAAC;iBACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACrB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;YAChD,KAAK,EAAE,KAAK,KAAK,MAAM;SACxB,CAAC,CAAC;QAEH,eAAM,CAAC,IAAI,CAAC,gBAAM,CAAC,OAAO,CAAC,kCAAkC,IAAI,MAAM,CAAC,CAAC,CAAC;QAC1E,IAAA,sCAAkB,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KACzC;IAAC,OAAO,GAAG,EAAE;QACZ,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CAAC,yCAAyC,GAAG,CAAC,OAAO,EAAE,CAAC,CACnE,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,mBAAmB;IACnB,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,4CAA4C,IAAI,aAAa,mCAAuB,EAAE,CACvF,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
package/build/cli-push.js CHANGED
@@ -10,8 +10,8 @@ const fs_1 = require("fs");
10
10
  const readTranscendYaml_1 = require("./readTranscendYaml");
11
11
  const colors_1 = __importDefault(require("colors"));
12
12
  const graphql_1 = require("./graphql");
13
- const graphql_request_1 = require("graphql-request");
14
13
  const constants_1 = require("./constants");
14
+ const mergeTranscendInputs_1 = require("./mergeTranscendInputs");
15
15
  /**
16
16
  * Push the transcend.yml file remotely into a Transcend instance
17
17
  *
@@ -38,8 +38,10 @@ async function main() {
38
38
  });
39
39
  // If file list is a CSV
40
40
  const fileList = file.split(',');
41
- let contents = {};
42
- fileList.forEach((filePath) => {
41
+ if (fileList.length < 1) {
42
+ throw new Error('No file specified!');
43
+ }
44
+ const transcendInputs = fileList.map((filePath) => {
43
45
  // Ensure yaml file exists on disk
44
46
  if (!(0, fs_1.existsSync)(filePath)) {
45
47
  logger_1.logger.error(colors_1.default.red(
@@ -52,26 +54,20 @@ async function main() {
52
54
  }
53
55
  try {
54
56
  // Read in the yaml file and validate it's shape
55
- contents = {
56
- ...contents,
57
- ...(0, readTranscendYaml_1.readTranscendYaml)(filePath, vars),
58
- };
57
+ const newContents = (0, readTranscendYaml_1.readTranscendYaml)(filePath, vars);
59
58
  logger_1.logger.info(colors_1.default.green(`Successfully read in "${filePath}"`));
59
+ return newContents;
60
60
  }
61
61
  catch (err) {
62
62
  logger_1.logger.error(colors_1.default.red(`The shape of your yaml file is invalid with the following errors: ${err.message}`));
63
63
  process.exit(1);
64
+ throw err;
64
65
  }
65
66
  });
67
+ const [base, ...rest] = transcendInputs;
68
+ const contents = (0, mergeTranscendInputs_1.mergeTranscendInputs)(base, ...rest);
66
69
  // Create a GraphQL client
67
- // eslint-disable-next-line global-require
68
- const { version } = require('../package.json');
69
- const client = new graphql_request_1.GraphQLClient(`${transcendUrl}/graphql`, {
70
- headers: {
71
- Authorization: `Bearer ${auth}`,
72
- version,
73
- },
74
- });
70
+ const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, auth);
75
71
  // Sync to Transcend
76
72
  try {
77
73
  const encounteredError = await (0, graphql_1.syncConfigurationToTranscend)(contents, client, pageSize ? parseInt(pageSize, 10) : 50);
@@ -1 +1 @@
1
- {"version":3,"file":"cli-push.js","sourceRoot":"","sources":["../src/cli-push.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,qCAAkC;AAClC,2BAAgC;AAChC,2DAAwD;AACxD,oDAA4B;AAE5B,uCAAyD;AACzD,qDAAgD;AAEhD,2CAAsD;AAEtD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G,eAAe,CAAC;IACxC,MAAM,QAAQ,GAAG,IAAA,2CAAoB,EAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IAErD,0BAA0B;IAC1B,MAAM,MAAM,GAAG,IAAA,qCAA2B,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAE/D,oBAAoB;IACpB,IAAI;QACF,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAA4B,EACzD,QAAQ,EACR,MAAM,EACN,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CACvC,CAAC;QACF,IAAI,gBAAgB,EAAE;YACpB,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,GAAG,CACR,iFAAiF,mCAAuB,EAAE,CAC3G,CACF,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CAAC,yCAAyC,GAAG,CAAC,OAAO,EAAE,CAAC,CACnE,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,mBAAmB;IACnB,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,uDAAuD,mCAAuB,EAAE,CACjF,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { GraphQLClient } from 'graphql-request';
2
+ /**
3
+ * Create a GraphQL client
4
+ *
5
+ * @param transcendUrl - Transcend API URL
6
+ * @param auth - API key to authenticate to API
7
+ * @returns GraphQL client
8
+ */
9
+ export declare function buildTranscendGraphQLClient(transcendUrl: string, auth: string): GraphQLClient;
10
+ //# sourceMappingURL=buildTranscendGraphQLClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildTranscendGraphQLClient.d.ts","sourceRoot":"","sources":["../../src/graphql/buildTranscendGraphQLClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,GACX,aAAa,CAUf"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildTranscendGraphQLClient = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ /**
6
+ * Create a GraphQL client
7
+ *
8
+ * @param transcendUrl - Transcend API URL
9
+ * @param auth - API key to authenticate to API
10
+ * @returns GraphQL client
11
+ */
12
+ function buildTranscendGraphQLClient(transcendUrl, auth) {
13
+ // Create a GraphQL client
14
+ // eslint-disable-next-line global-require
15
+ const { version } = require('../../package.json');
16
+ return new graphql_request_1.GraphQLClient(`${transcendUrl}/graphql`, {
17
+ headers: {
18
+ Authorization: `Bearer ${auth}`,
19
+ version,
20
+ },
21
+ });
22
+ }
23
+ exports.buildTranscendGraphQLClient = buildTranscendGraphQLClient;
24
+ //# sourceMappingURL=buildTranscendGraphQLClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildTranscendGraphQLClient.js","sourceRoot":"","sources":["../../src/graphql/buildTranscendGraphQLClient.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD;;;;;;GAMG;AACH,SAAgB,2BAA2B,CACzC,YAAoB,EACpB,IAAY;IAEZ,0BAA0B;IAC1B,0CAA0C;IAC1C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClD,OAAO,IAAI,+BAAa,CAAC,GAAG,YAAY,UAAU,EAAE;QAClD,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,IAAI,EAAE;YAC/B,OAAO;SACR;KACF,CAAC,CAAC;AACL,CAAC;AAbD,kEAaC"}
@@ -0,0 +1,12 @@
1
+ import { Got } from 'got';
2
+ /**
3
+ * Instantiate an instance of got that is capable of making requests
4
+ * to a sombra gateway.
5
+ *
6
+ * @param transcendApiUrl - URL of Transcend API
7
+ * @param transcendApiKey - Transcend API key
8
+ * @param sombraApiKey - Sombra API key
9
+ * @returns The instance of got that is capable of making requests to the customer ingress
10
+ */
11
+ export declare function createSombraGotInstance(transcendApiUrl: string, transcendApiKey: string, sombraApiKey?: string): Promise<Got>;
12
+ //# sourceMappingURL=createSombraGotInstance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSombraGotInstance.d.ts","sourceRoot":"","sources":["../../src/graphql/createSombraGotInstance.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK/B;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,EACvB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,GAAG,CAAC,CAmBd"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createSombraGotInstance = void 0;
7
+ const got_1 = __importDefault(require("got"));
8
+ const gqls_1 = require("./gqls");
9
+ const makeGraphQLRequest_1 = require("./makeGraphQLRequest");
10
+ const buildTranscendGraphQLClient_1 = require("./buildTranscendGraphQLClient");
11
+ /**
12
+ * Instantiate an instance of got that is capable of making requests
13
+ * to a sombra gateway.
14
+ *
15
+ * @param transcendApiUrl - URL of Transcend API
16
+ * @param transcendApiKey - Transcend API key
17
+ * @param sombraApiKey - Sombra API key
18
+ * @returns The instance of got that is capable of making requests to the customer ingress
19
+ */
20
+ async function createSombraGotInstance(transcendApiUrl, transcendApiKey, sombraApiKey) {
21
+ // Create GraphQL client to connect to Transcend backend
22
+ const client = (0, buildTranscendGraphQLClient_1.buildTranscendGraphQLClient)(transcendApiUrl, transcendApiKey);
23
+ // Grab metadata about organization's sombra from GraphQL endpoint
24
+ const { organization } = await (0, makeGraphQLRequest_1.makeGraphQLRequest)(client, gqls_1.ORGANIZATION);
25
+ // Create got instance with default values
26
+ return got_1.default.extend({
27
+ prefixUrl: organization.sombra.customerUrl,
28
+ headers: {
29
+ Authorization: `Bearer ${transcendApiKey}`,
30
+ ...(sombraApiKey
31
+ ? {
32
+ 'X-Sombra-Authorization': `Bearer ${sombraApiKey}`,
33
+ }
34
+ : {}),
35
+ },
36
+ });
37
+ }
38
+ exports.createSombraGotInstance = createSombraGotInstance;
39
+ //# sourceMappingURL=createSombraGotInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSombraGotInstance.js","sourceRoot":"","sources":["../../src/graphql/createSombraGotInstance.ts"],"names":[],"mappings":";;;;;;AAAA,8CAA+B;AAC/B,iCAAsC;AACtC,6DAA0D;AAC1D,+EAA4E;AAE5E;;;;;;;;GAQG;AACI,KAAK,UAAU,uBAAuB,CAC3C,eAAuB,EACvB,eAAuB,EACvB,YAAqB;IAErB,wDAAwD;IACxD,MAAM,MAAM,GAAG,IAAA,yDAA2B,EAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAE7E,kEAAkE;IAClE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,uCAAkB,EAAC,MAAM,EAAE,mBAAY,CAAC,CAAC;IAExE,0CAA0C;IAC1C,OAAO,aAAG,CAAC,MAAM,CAAC;QAChB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,WAAW;QAC1C,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,eAAe,EAAE;YAC1C,GAAG,CAAC,YAAY;gBACd,CAAC,CAAC;oBACE,wBAAwB,EAAE,UAAU,YAAY,EAAE;iBACnD;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;KACF,CAAC,CAAC;AACL,CAAC;AAvBD,0DAuBC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.API_KEYS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.API_KEYS = (0, graphql_request_1.gql) `
6
- query SchemaSyncApiKeys($first: Int!, $offset: Int!, $titles: [String!]) {
6
+ query TranscendCliApiKeys($first: Int!, $offset: Int!, $titles: [String!]) {
7
7
  apiKeys(first: $first, offset: $offset, filterBy: { titles: $titles }) {
8
8
  nodes {
9
9
  id
@@ -1 +1 @@
1
- {"version":3,"file":"dataPoint.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAmCvB,CAAC;AAEF,eAAO,MAAM,eAAe,QAmC3B,CAAC;AAEF,eAAO,MAAM,2BAA2B,QA+BvC,CAAC"}
1
+ {"version":3,"file":"dataPoint.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAuCvB,CAAC;AAEF,eAAO,MAAM,eAAe,QAmC3B,CAAC;AAEF,eAAO,MAAM,2BAA2B,QA+BvC,CAAC"}
@@ -3,7 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UPDATE_OR_CREATE_DATA_POINT = exports.SUB_DATA_POINTS = exports.DATA_POINTS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.DATA_POINTS = (0, graphql_request_1.gql) `
6
- query SchemaSyncDataPoints($dataSiloIds: [ID!], $first: Int!, $offset: Int!) {
6
+ query TranscendCliDataPoints(
7
+ $dataSiloIds: [ID!]
8
+ $first: Int!
9
+ $offset: Int!
10
+ ) {
7
11
  dataPoints(
8
12
  filterBy: { dataSilos: $dataSiloIds }
9
13
  first: $first
@@ -39,7 +43,7 @@ exports.DATA_POINTS = (0, graphql_request_1.gql) `
39
43
  }
40
44
  `;
41
45
  exports.SUB_DATA_POINTS = (0, graphql_request_1.gql) `
42
- query SchemaSyncDataPoints(
46
+ query TranscendCliDataPoints(
43
47
  $dataPointIds: [ID!]
44
48
  $first: Int!
45
49
  $offset: Int!
@@ -75,7 +79,7 @@ exports.SUB_DATA_POINTS = (0, graphql_request_1.gql) `
75
79
  }
76
80
  `;
77
81
  exports.UPDATE_OR_CREATE_DATA_POINT = (0, graphql_request_1.gql) `
78
- mutation SchemaSyncUpdateOrCreateDataPoint(
82
+ mutation TranscendCliUpdateOrCreateDataPoint(
79
83
  $dataSiloId: ID!
80
84
  $name: String!
81
85
  $path: [String!]
@@ -1 +1 @@
1
- {"version":3,"file":"dataPoint.js","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC7B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCjC,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7C,CAAC"}
1
+ {"version":3,"file":"dataPoint.js","sourceRoot":"","sources":["../../../src/graphql/gqls/dataPoint.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC7B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCjC,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B7C,CAAC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UPDATE_PROMPT_A_VENDOR_SETTINGS = exports.CREATE_DATA_SILO = exports.UPDATE_DATA_SILO = exports.DATA_SILO = exports.DATA_SILOS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.DATA_SILOS = (0, graphql_request_1.gql) `
6
- query SchemaSyncDataSilos(
6
+ query TranscendCliDataSilos(
7
7
  $title: String
8
8
  $ids: [ID!]
9
9
  $types: [String!]
@@ -28,7 +28,7 @@ exports.DATA_SILOS = (0, graphql_request_1.gql) `
28
28
  }
29
29
  `;
30
30
  exports.DATA_SILO = (0, graphql_request_1.gql) `
31
- query SchemaSyncDataSilo($id: String!) {
31
+ query TranscendCliDataSilo($id: String!) {
32
32
  dataSilo(id: $id) {
33
33
  id
34
34
  title
@@ -75,7 +75,7 @@ exports.DATA_SILO = (0, graphql_request_1.gql) `
75
75
  }
76
76
  `;
77
77
  exports.UPDATE_DATA_SILO = (0, graphql_request_1.gql) `
78
- mutation SchemaSyncUpdateDataSilo(
78
+ mutation TranscendCliUpdateDataSilo(
79
79
  $id: ID!
80
80
  $title: String
81
81
  $description: String
@@ -114,7 +114,7 @@ exports.UPDATE_DATA_SILO = (0, graphql_request_1.gql) `
114
114
  }
115
115
  `;
116
116
  exports.CREATE_DATA_SILO = (0, graphql_request_1.gql) `
117
- mutation SchemaSyncCreateDataSilo(
117
+ mutation TranscendCliCreateDataSilo(
118
118
  $title: String!
119
119
  $description: String!
120
120
  $url: String
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CREATE_DATA_SUBJECT = exports.DATA_SUBJECTS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.DATA_SUBJECTS = (0, graphql_request_1.gql) `
6
- query SchemaDataSubjects {
6
+ query TranscendCliDataSubjects {
7
7
  internalSubjects {
8
8
  id
9
9
  type
@@ -11,7 +11,7 @@ exports.DATA_SUBJECTS = (0, graphql_request_1.gql) `
11
11
  }
12
12
  `;
13
13
  exports.CREATE_DATA_SUBJECT = (0, graphql_request_1.gql) `
14
- mutation SchemaSyncCreateDataSubject($type: String!) {
14
+ mutation TranscendCliCreateDataSubject($type: String!) {
15
15
  createSubject(input: { type: $type, title: $type, subjectClass: OTHER }) {
16
16
  subject {
17
17
  id
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UPDATE_ENRICHER = exports.CREATE_ENRICHER = exports.ENRICHERS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.ENRICHERS = (0, graphql_request_1.gql) `
6
- query SchemaSyncEnrichers($title: String, $first: Int!, $offset: Int!) {
6
+ query TranscendCliEnrichers($title: String, $first: Int!, $offset: Int!) {
7
7
  enrichers(filterBy: { text: $title }, first: $first, offset: $offset) {
8
8
  nodes {
9
9
  id
@@ -22,7 +22,7 @@ exports.ENRICHERS = (0, graphql_request_1.gql) `
22
22
  }
23
23
  `;
24
24
  exports.CREATE_ENRICHER = (0, graphql_request_1.gql) `
25
- mutation SchemaSyncCreateEnricher(
25
+ mutation TranscendCliCreateEnricher(
26
26
  $title: String!
27
27
  $description: String!
28
28
  $url: String!
@@ -48,7 +48,7 @@ exports.CREATE_ENRICHER = (0, graphql_request_1.gql) `
48
48
  }
49
49
  `;
50
50
  exports.UPDATE_ENRICHER = (0, graphql_request_1.gql) `
51
- mutation SchemaSyncUpdateEnricher(
51
+ mutation TranscendCliUpdateEnricher(
52
52
  $id: ID!
53
53
  $title: String!
54
54
  $description: String!
@@ -1 +1 @@
1
- {"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/identifier.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QASvB,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAS7B,CAAC"}
1
+ {"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/identifier.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QASvB,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAY7B,CAAC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CREATE_IDENTIFIER = exports.NEW_IDENTIFIER_TYPES = exports.IDENTIFIERS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.IDENTIFIERS = (0, graphql_request_1.gql) `
6
- query SchemaSyncIdentifiers($first: Int!, $offset: Int!) {
6
+ query TranscendCliIdentifiers($first: Int!, $offset: Int!) {
7
7
  identifiers(first: $first, offset: $offset) {
8
8
  nodes {
9
9
  id
@@ -13,14 +13,17 @@ exports.IDENTIFIERS = (0, graphql_request_1.gql) `
13
13
  }
14
14
  `;
15
15
  exports.NEW_IDENTIFIER_TYPES = (0, graphql_request_1.gql) `
16
- query SchemaSyncNewIdentifierTypes {
16
+ query TranscendCliNewIdentifierTypes {
17
17
  newIdentifierTypes {
18
18
  name
19
19
  }
20
20
  }
21
21
  `;
22
22
  exports.CREATE_IDENTIFIER = (0, graphql_request_1.gql) `
23
- mutation SchemaSyncCreateIdentifier($name: String!, $type: IdentifierType!) {
23
+ mutation TranscendCliCreateIdentifier(
24
+ $name: String!
25
+ $type: IdentifierType!
26
+ ) {
24
27
  createIdentifier(input: { name: $name, type: $type }) {
25
28
  identifier {
26
29
  id
@@ -1 +1 @@
1
- {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../src/graphql/gqls/identifier.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CAS7B,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMtC,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CASnC,CAAC"}
1
+ {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../src/graphql/gqls/identifier.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CAS7B,CAAC;AAEW,QAAA,oBAAoB,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMtC,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;CAYnC,CAAC"}
@@ -6,4 +6,5 @@ export * from './dataSubject';
6
6
  export * from './apiKey';
7
7
  export * from './siloDiscovery';
8
8
  export * from './template';
9
+ export * from './organization';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
@@ -18,4 +18,5 @@ __exportStar(require("./dataSubject"), exports);
18
18
  __exportStar(require("./apiKey"), exports);
19
19
  __exportStar(require("./siloDiscovery"), exports);
20
20
  __exportStar(require("./template"), exports);
21
+ __exportStar(require("./organization"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,iDAA+B"}
@@ -0,0 +1,2 @@
1
+ export declare const ORGANIZATION: string;
2
+ //# sourceMappingURL=organization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/organization.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,QAQxB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ORGANIZATION = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ exports.ORGANIZATION = (0, graphql_request_1.gql) `
6
+ query TranscendCliOrganization {
7
+ organization {
8
+ sombra {
9
+ customerUrl
10
+ }
11
+ }
12
+ }
13
+ `;
14
+ //# sourceMappingURL=organization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../src/graphql/gqls/organization.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,YAAY,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQ9B,CAAC"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CREATE_TEMPLATE = exports.TEMPLATES = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.TEMPLATES = (0, graphql_request_1.gql) `
6
- query SchemaSyncTemplates($title: String, $first: Int!, $offset: Int!) {
6
+ query TranscendCliTemplates($title: String, $first: Int!, $offset: Int!) {
7
7
  templates(filterBy: { text: $title }, first: $first, offset: $offset) {
8
8
  nodes {
9
9
  id
@@ -13,7 +13,7 @@ exports.TEMPLATES = (0, graphql_request_1.gql) `
13
13
  }
14
14
  `;
15
15
  exports.CREATE_TEMPLATE = (0, graphql_request_1.gql) `
16
- mutation SchemaSyncCreateTemplate($title: String!) {
16
+ mutation TranscendCliCreateTemplate($title: String!) {
17
17
  createTemplate(input: { title: $title, template: "", subject: $title }) {
18
18
  clientMutationId
19
19
  }
@@ -9,4 +9,7 @@ export * from './syncEnrichers';
9
9
  export * from './uploadSiloDiscoveryResults';
10
10
  export * from './syncTemplates';
11
11
  export * from './makeGraphQLRequest';
12
+ export * from './createSombraGotInstance';
13
+ export * from './buildTranscendGraphQLClient';
14
+ export * from './gqls';
12
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,QAAQ,CAAC"}
@@ -21,4 +21,7 @@ __exportStar(require("./syncEnrichers"), exports);
21
21
  __exportStar(require("./uploadSiloDiscoveryResults"), exports);
22
22
  __exportStar(require("./syncTemplates"), exports);
23
23
  __exportStar(require("./makeGraphQLRequest"), exports);
24
+ __exportStar(require("./createSombraGotInstance"), exports);
25
+ __exportStar(require("./buildTranscendGraphQLClient"), exports);
26
+ __exportStar(require("./gqls"), exports);
24
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA6C;AAC7C,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,+DAA6C;AAC7C,iEAA+C;AAC/C,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,kDAAgC;AAChC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA6C;AAC7C,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,+DAA6C;AAC7C,iEAA+C;AAC/C,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,kDAAgC;AAChC,uDAAqC;AACrC,4DAA0C;AAC1C,gEAA8C;AAC9C,yCAAuB"}
package/build/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './codecs';
2
2
  export * from './readTranscendYaml';
3
3
  export * from './graphql/syncConfigurationToTranscend';
4
+ export * from './mergeTranscendInputs';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC"}
package/build/index.js CHANGED
@@ -13,4 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./codecs"), exports);
14
14
  __exportStar(require("./readTranscendYaml"), exports);
15
15
  __exportStar(require("./graphql/syncConfigurationToTranscend"), exports);
16
+ __exportStar(require("./mergeTranscendInputs"), exports);
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,sDAAoC;AACpC,yEAAuD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,sDAAoC;AACpC,yEAAuD;AACvD,yDAAuC"}
@@ -0,0 +1,10 @@
1
+ import { TranscendInput } from './codecs';
2
+ /**
3
+ * Combine a set of TranscendInput yaml files into a single yaml
4
+ *
5
+ * @param base - Base input
6
+ * @param inputs - The list of inputs
7
+ * @returns Merged input
8
+ */
9
+ export declare function mergeTranscendInputs(base: TranscendInput, ...inputs: TranscendInput[]): TranscendInput;
10
+ //# sourceMappingURL=mergeTranscendInputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeTranscendInputs.d.ts","sourceRoot":"","sources":["../src/mergeTranscendInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,cAAc,EACpB,GAAG,MAAM,EAAE,cAAc,EAAE,GAC1B,cAAc,CAgBhB"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeTranscendInputs = void 0;
4
+ const type_utils_1 = require("@transcend-io/type-utils");
5
+ /**
6
+ * Combine a set of TranscendInput yaml files into a single yaml
7
+ *
8
+ * @param base - Base input
9
+ * @param inputs - The list of inputs
10
+ * @returns Merged input
11
+ */
12
+ function mergeTranscendInputs(base, ...inputs) {
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ const cloned = JSON.parse(JSON.stringify(base));
15
+ inputs.forEach((input) => {
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ (0, type_utils_1.getEntries)(input).forEach(([key, value]) => {
18
+ if (cloned[key] === undefined) {
19
+ cloned[key] = value;
20
+ }
21
+ else if (Array.isArray(value)) {
22
+ cloned[key] = [...cloned[key], ...value];
23
+ }
24
+ else {
25
+ cloned[key] = value;
26
+ }
27
+ });
28
+ });
29
+ return cloned;
30
+ }
31
+ exports.mergeTranscendInputs = mergeTranscendInputs;
32
+ //# sourceMappingURL=mergeTranscendInputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeTranscendInputs.js","sourceRoot":"","sources":["../src/mergeTranscendInputs.ts"],"names":[],"mappings":";;;AACA,yDAAsD;AAEtD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAClC,IAAoB,EACpB,GAAG,MAAwB;IAE3B,8DAA8D;IAC9D,MAAM,MAAM,GAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACvB,8DAA8D;QAC9D,IAAA,uBAAU,EAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAa,EAAE,EAAE;YACrD,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;gBAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACrB;iBAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBAC/B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC;aAC1C;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACrB;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAnBD,oDAmBC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mergeTranscendInputs.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeTranscendInputs.test.d.ts","sourceRoot":"","sources":["../../src/tests/mergeTranscendInputs.test.ts"],"names":[],"mappings":""}