@stepzen/transpiler 0.58.0-experimental.a42e35b → 0.58.0-experimental.a56f2f6

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 (85) hide show
  1. package/package.json +3 -3
  2. package/lib/actions/configure.d.ts +0 -12
  3. package/lib/actions/configure.d.ts.map +0 -1
  4. package/lib/actions/configure.js +0 -131
  5. package/lib/actions/configure.js.map +0 -1
  6. package/lib/actions/lint.d.ts +0 -5
  7. package/lib/actions/lint.d.ts.map +0 -1
  8. package/lib/actions/lint.js +0 -38
  9. package/lib/actions/lint.js.map +0 -1
  10. package/lib/actions/merge.d.ts +0 -16
  11. package/lib/actions/merge.d.ts.map +0 -1
  12. package/lib/actions/merge.js +0 -193
  13. package/lib/actions/merge.js.map +0 -1
  14. package/lib/actions/print.d.ts +0 -4
  15. package/lib/actions/print.d.ts.map +0 -1
  16. package/lib/actions/print.js +0 -9
  17. package/lib/actions/print.js.map +0 -1
  18. package/lib/actions/stitch.d.ts +0 -3
  19. package/lib/actions/stitch.d.ts.map +0 -1
  20. package/lib/actions/stitch.js +0 -111
  21. package/lib/actions/stitch.js.map +0 -1
  22. package/lib/actions/transpile.d.ts +0 -17
  23. package/lib/actions/transpile.d.ts.map +0 -1
  24. package/lib/actions/transpile.js +0 -68
  25. package/lib/actions/transpile.js.map +0 -1
  26. package/lib/actions/validate.d.ts +0 -5
  27. package/lib/actions/validate.d.ts.map +0 -1
  28. package/lib/actions/validate.js +0 -39
  29. package/lib/actions/validate.js.map +0 -1
  30. package/lib/index.d.ts +0 -8
  31. package/lib/index.d.ts.map +0 -1
  32. package/lib/index.js +0 -9
  33. package/lib/index.js.map +0 -1
  34. package/lib/mutations/config/envvars.d.ts +0 -3
  35. package/lib/mutations/config/envvars.d.ts.map +0 -1
  36. package/lib/mutations/config/envvars.js +0 -54
  37. package/lib/mutations/config/envvars.js.map +0 -1
  38. package/lib/mutations/config/index.d.ts +0 -3
  39. package/lib/mutations/config/index.d.ts.map +0 -1
  40. package/lib/mutations/config/index.js +0 -4
  41. package/lib/mutations/config/index.js.map +0 -1
  42. package/lib/utils/constants.d.ts +0 -4
  43. package/lib/utils/constants.d.ts.map +0 -1
  44. package/lib/utils/constants.js +0 -17
  45. package/lib/utils/constants.js.map +0 -1
  46. package/lib/utils/copy-workspace-content.d.ts +0 -15
  47. package/lib/utils/copy-workspace-content.d.ts.map +0 -1
  48. package/lib/utils/copy-workspace-content.js +0 -41
  49. package/lib/utils/copy-workspace-content.js.map +0 -1
  50. package/lib/utils/dedupe-query-and-mutation-types.d.ts +0 -3
  51. package/lib/utils/dedupe-query-and-mutation-types.d.ts.map +0 -1
  52. package/lib/utils/dedupe-query-and-mutation-types.js +0 -67
  53. package/lib/utils/dedupe-query-and-mutation-types.js.map +0 -1
  54. package/lib/utils/ensure-query-and-mutation-types.d.ts +0 -4
  55. package/lib/utils/ensure-query-and-mutation-types.d.ts.map +0 -1
  56. package/lib/utils/ensure-query-and-mutation-types.js +0 -48
  57. package/lib/utils/ensure-query-and-mutation-types.js.map +0 -1
  58. package/lib/utils/graphql-helpers.d.ts +0 -5
  59. package/lib/utils/graphql-helpers.d.ts.map +0 -1
  60. package/lib/utils/graphql-helpers.js +0 -3
  61. package/lib/utils/graphql-helpers.js.map +0 -1
  62. package/lib/utils/merge-helpers.d.ts +0 -13
  63. package/lib/utils/merge-helpers.d.ts.map +0 -1
  64. package/lib/utils/merge-helpers.js +0 -183
  65. package/lib/utils/merge-helpers.js.map +0 -1
  66. package/lib/utils/rmtemp.d.ts +0 -11
  67. package/lib/utils/rmtemp.d.ts.map +0 -1
  68. package/lib/utils/rmtemp.js +0 -39
  69. package/lib/utils/rmtemp.js.map +0 -1
  70. package/lib/utils/set-files-in-sdl.d.ts +0 -6
  71. package/lib/utils/set-files-in-sdl.d.ts.map +0 -1
  72. package/lib/utils/set-files-in-sdl.js +0 -121
  73. package/lib/utils/set-files-in-sdl.js.map +0 -1
  74. package/lib/utils/strip-empty-queries-and-mutations.d.ts +0 -4
  75. package/lib/utils/strip-empty-queries-and-mutations.d.ts.map +0 -1
  76. package/lib/utils/strip-empty-queries-and-mutations.js +0 -43
  77. package/lib/utils/strip-empty-queries-and-mutations.js.map +0 -1
  78. package/lib/validators/config-exists/index.d.ts +0 -4
  79. package/lib/validators/config-exists/index.d.ts.map +0 -1
  80. package/lib/validators/config-exists/index.js +0 -45
  81. package/lib/validators/config-exists/index.js.map +0 -1
  82. package/lib/validators/index.d.ts +0 -3
  83. package/lib/validators/index.d.ts.map +0 -1
  84. package/lib/validators/index.js +0 -4
  85. package/lib/validators/index.js.map +0 -1
@@ -1,68 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import { parse } from 'graphql';
3
- import dotenv from 'dotenv';
4
- import debug from 'debug';
5
- import fs from 'node:fs';
6
- import { globSync } from 'glob';
7
- import path from 'node:path';
8
- import yaml from 'yaml';
9
- import print from '../actions/print.js';
10
- import stitch from '../actions/stitch.js';
11
- import configure from './configure.js';
12
- import configMutations from '../mutations/config/index.js';
13
- import { rmtemp } from '../utils/rmtemp.js';
14
- /**
15
- * Read a StepZen workspace directory, apply StepZen-specific schema and config
16
- * transformations, and return its effective GraphQL schema and configuration
17
- * as in-memory strings.
18
- *
19
- * @param {*} source absolute path to a schema root folder
20
- * @return {*} schema, configuration, and a "transpiled" flag indicating
21
- * whether or not any StepZen-specific transformations have actually
22
- * been applied.
23
- */
24
- export default async (source) => {
25
- // Ensure source and output directories exist
26
- if (!fs.existsSync(source)) {
27
- throw new Error(`Cannot find source directory ${source}`);
28
- }
29
- // Load env vars, from working and source directories
30
- debug('stepzen:dotenv')(`loading .env from ${process.cwd()}, at transpiler/src/actions/transpile.ts:24`);
31
- dotenv.config();
32
- debug('stepzen:dotenv')(`loading .env from ${path.resolve(source)}` +
33
- `, at transpiler/src/actions/transpile.ts:29`);
34
- dotenv.config({ path: path.resolve(source, '.env') });
35
- // State of whether we've transpiled or not
36
- let transpiledConfig = false;
37
- // See whether to transpile config
38
- let config = await configure(source, true);
39
- const configCopy = config;
40
- if (config) {
41
- for await (const mutation of configMutations) {
42
- config = await mutation(config);
43
- }
44
- }
45
- if (configCopy !== config) {
46
- transpiledConfig = true;
47
- }
48
- // See whether to transpile GraphQL
49
- const graphqlFiles = globSync('**/*.graphql', { cwd: source });
50
- let schema = '';
51
- if (graphqlFiles.length > 0) {
52
- const stitched = await stitch(source);
53
- try {
54
- const index = path.join(stitched, 'index.graphql');
55
- const graphql = fs.readFileSync(index, 'utf8');
56
- schema = print(parse(graphql));
57
- }
58
- finally {
59
- rmtemp(stitched);
60
- }
61
- }
62
- return {
63
- config: yaml.stringify(config),
64
- schema,
65
- transpiled: transpiledConfig,
66
- };
67
- };
68
- //# sourceMappingURL=transpile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transpile.js","sourceRoot":"","sources":["../../src/actions/transpile.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAC,QAAQ,EAAC,MAAM,MAAM,CAAA;AAC7B,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,KAAK,MAAM,qBAAqB,CAAA;AACvC,OAAO,MAAM,MAAM,sBAAsB,CAAA;AACzC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC,OAAO,eAAe,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAA;AAEzC;;;;;;;;;GASG;AACH,eAAe,KAAK,EAAE,MAAc,EAAE,EAAE;IACtC,6CAA6C;IAC7C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,M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D,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;YAC9C,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;QAChC,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,QAAQ,CAAC,CAAA;QAClB,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QAC9B,MAAM;QACN,UAAU,EAAE,gBAAgB;KAC7B,CAAA;AACH,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- declare const _default: (source: string, options?: {
2
- extensions: string;
3
- }) => boolean;
4
- export default _default;
5
- //# sourceMappingURL=validate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/actions/validate.ts"],"names":[],"mappings":"yBAYE,QAAQ,MAAM,EACd,UAAS;IACP,UAAU,EAAE,MAAM,CAAA;CAGnB;AANH,wBA4CC"}
@@ -1,39 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import { buildASTSchema, parse, print } from 'graphql';
3
- import fsx from 'fs-extra';
4
- import os from 'node:os';
5
- import path from 'node:path';
6
- import ensureQueryAndMutationTypes from '../utils/ensure-query-and-mutation-types.js';
7
- import { EXPERIMENTAL_EXTENSIONS } from '../utils/constants.js';
8
- import validators from '../validators/index.js';
9
- export default (source, options = {
10
- extensions: '',
11
- }) => {
12
- // Ensure source and output directories exist
13
- if (!fsx.existsSync(source)) {
14
- throw new Error(`Cannot find source directory ${source}`);
15
- }
16
- // Ensure index.graphql exists
17
- if (!fsx.existsSync(`${source}/index.graphql`)) {
18
- throw new Error(`Cannot find index.graphql in ${source}`);
19
- }
20
- // Get the index.graphql file
21
- const file = path.join(source, 'index.graphql');
22
- const index = fsx.readFileSync(file, 'utf8');
23
- // Parse
24
- let ast = parse(`${EXPERIMENTAL_EXTENSIONS}${os.EOL}${options.extensions}${os.EOL}${index}`, {
25
- noLocation: true,
26
- });
27
- // We make an exception for 'no type Query' or 'no type Mutation'
28
- ast = ensureQueryAndMutationTypes(ast);
29
- // Build and print, to validate
30
- buildASTSchema(ast);
31
- print(ast);
32
- // Custom validators
33
- for (const validator of validators) {
34
- validator(ast, source);
35
- }
36
- // Return true
37
- return true;
38
- };
39
- //# sourceMappingURL=validate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/actions/validate.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,EAAC,cAAc,EAAgB,KAAK,EAAE,KAAK,EAAC,MAAM,SAAS,CAAA;AAClE,OAAO,GAAG,MAAM,UAAU,CAAA;AAC1B,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,2BAA2B,MAAM,6CAA6C,CAAA;AACrF,OAAO,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAA;AAC7D,OAAO,UAAU,MAAM,wBAAwB,CAAA;AAE/C,eAAe,CACb,MAAc,EACd,UAEI;IACF,UAAU,EAAE,EAAE;CACf,EACD,EAAE;IACF,6CAA6C;IAC7C,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,gCAAgC,MAAM,EAAE,CAAC,CAAA;IAC3D,CAAC;IAED,8BAA8B;IAC9B,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,gCAAgC,MAAM,EAAE,CAAC,CAAA;IAC3D,CAAC;IAED,6BAA6B;IAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC/C,MAAM,KAAK,GAAG,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAE5C,QAAQ;IACR,IAAI,GAAG,GAAiB,KAAK,CAC3B,GAAG,uBAAuB,GAAG,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,GAAG,EAAE,CAAC,GAAG,GAAG,KAAK,EAAE,EAC3E;QACE,UAAU,EAAE,IAAI;KACjB,CACF,CAAA;IAED,iEAAiE;IACjE,GAAG,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAA;IAEtC,+BAA+B;IAC/B,cAAc,CAAC,GAAG,CAAC,CAAA;IACnB,KAAK,CAAC,GAAG,CAAC,CAAA;IAEV,oBAAoB;IACpB,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IACxB,CAAC;IAED,cAAc;IACd,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
package/lib/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export { default as configure } from './actions/configure.js';
2
- export { default as lint } from './actions/lint.js';
3
- export { default as merge } from './actions/merge.js';
4
- export { default as print } from './actions/print.js';
5
- export { default as stitch } from './actions/stitch.js';
6
- export { default as transpile } from './actions/transpile.js';
7
- export { default as validate } from './actions/validate.js';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,uBAAuB,CAAA"}
package/lib/index.js DELETED
@@ -1,9 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- export { default as configure } from './actions/configure.js';
3
- export { default as lint } from './actions/lint.js';
4
- export { default as merge } from './actions/merge.js';
5
- export { default as print } from './actions/print.js';
6
- export { default as stitch } from './actions/stitch.js';
7
- export { default as transpile } from './actions/transpile.js';
8
- export { default as validate } from './actions/validate.js';
9
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,uBAAuB,CAAA"}
@@ -1,3 +0,0 @@
1
- declare const _default: (config: Record<string, any>) => Promise<Record<string, any>>;
2
- export default _default;
3
- //# sourceMappingURL=envvars.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"envvars.d.ts","sourceRoot":"","sources":["../../../src/mutations/config/envvars.ts"],"names":[],"mappings":"yBAwDE,QAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC1B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAF/B,wBA4BC"}
@@ -1,54 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import debug from 'debug';
3
- function replaceVars(value, envvars, path = '') {
4
- if (!value) {
5
- return [value, 0];
6
- }
7
- let replacements = 0;
8
- if (Array.isArray(value)) {
9
- const processed = value.map((element, idx) => {
10
- const [processedElement, replacementsInElement] = replaceVars(element, envvars, `${path}[${idx}]`);
11
- replacements += replacementsInElement;
12
- return processedElement;
13
- });
14
- return replacements ? [processed, replacements] : [value, 0];
15
- }
16
- switch (typeof value) {
17
- case 'object': {
18
- const processed = Object.fromEntries(Object.entries(value).map(([key, value]) => {
19
- const [subtree, replacementsInSubtree] = replaceVars(value, envvars, `${path}.${key}`);
20
- replacements += replacementsInSubtree;
21
- return [key, subtree];
22
- }));
23
- return replacements ? [processed, replacements] : [value, 0];
24
- }
25
- case 'string': {
26
- if (envvars.hasOwnProperty(value)) {
27
- debug('stepzen:transpiler:config')(`replacing ${value} at path ${path}`);
28
- return [envvars[value], 1];
29
- }
30
- }
31
- default:
32
- return [value, 0];
33
- }
34
- }
35
- export default async (config) => {
36
- const envvars = Object.keys(process.env)
37
- .filter(key => {
38
- return key.startsWith(`STEPZEN_`);
39
- })
40
- .reduce((obj, key) => {
41
- obj[key] = process.env[key];
42
- return obj;
43
- }, {});
44
- debug('stepzen:transpiler:config')(`STEPZEN_* env vars available for replacement:` +
45
- ` ${JSON.stringify(Object.keys(envvars), undefined, 2)}`);
46
- if (Object.entries(envvars).length === 0) {
47
- debug('stepzen:transpiler:config')(`nothing to replace, returning the config unchanged`);
48
- return config;
49
- }
50
- const [updated, replacements] = replaceVars(config, envvars);
51
- debug('stepzen:transpiler:config')(`total replacements made: ${replacements}`);
52
- return updated;
53
- };
54
- //# sourceMappingURL=envvars.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"envvars.js","sourceRoot":"","sources":["../../../src/mutations/config/envvars.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,SAAS,W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D,KAAK,CAAC,2BAA2B,CAAC,CAAC,4BAA4B,YAAY,EAAE,CAAC,CAAA;IAE9E,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- declare const _default: ((config: Record<string, any>) => Promise<Record<string, any>>)[];
2
- export default _default;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mutations/config/index.ts"],"names":[],"mappings":";AAIA,wBAAwB"}
@@ -1,4 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import envvars from './envvars.js';
3
- export default [envvars];
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mutations/config/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,OAAO,MAAM,cAAc,CAAA;AAElC,eAAe,CAAC,OAAO,CAAC,CAAA"}
@@ -1,4 +0,0 @@
1
- export declare const EXPERIMENTAL_EXTENSIONS = "\ndirective @experimental(\n debug: Boolean\n function: String\n mock: String\n setter: String\n) on OBJECT | FIELD_DEFINITION\n";
2
- export declare const STEPZEN_SERVER_URL: string;
3
- export declare const ALL_GRAPHQL_FILES = "**/*.graphql";
4
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,uBAAuB,yIAOnC,CAAA;AAED,eAAO,MAAM,kBAAkB,QAC8C,CAAA;AAE7E,eAAO,MAAM,iBAAiB,iBAAiB,CAAA"}
@@ -1,17 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import dotenv from 'dotenv';
3
- import debug from 'debug';
4
- debug('stepzen:dotenv')(`loading .env from ${process.cwd()}, at transpiler/src/utils/constants.ts`);
5
- dotenv.config();
6
- const { STEPZEN_SERVER_URL: ENV_VAR_STEPZEN_SERVER_URL } = process.env;
7
- export const EXPERIMENTAL_EXTENSIONS = `
8
- directive @experimental(
9
- debug: Boolean
10
- function: String
11
- mock: String
12
- setter: String
13
- ) on OBJECT | FIELD_DEFINITION
14
- `;
15
- export const STEPZEN_SERVER_URL = ENV_VAR_STEPZEN_SERVER_URL || 'https://{account}.us-east-a.ibm.stepzen.net';
16
- export const ALL_GRAPHQL_FILES = '**/*.graphql';
17
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,CAAC,gBAAgB,CAAC,CACrB,qBAAqB,OAAO,CAAC,GAAG,EAAE,wCAAwC,CAC3E,CAAA;AACD,MAAM,CAAC,MAAM,EAAE,CAAA;AAEf,MAAM,EAAC,kBAAkB,EAAE,0BAA0B,EAAC,GAAG,OAAO,CAAC,GAAG,CAAA;AAEpE,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;CAOtC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAC7B,0BAA0B,IAAI,6CAA6C,CAAA;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAA"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Copy StepZen workspace content from one directory to another.
3
- *
4
- * Include only the files relevant to StepZen:
5
- * - **​/*.graphql
6
- * - config.yaml
7
- * - stepzen.config.json
8
- *
9
- * Exclude all other files.
10
- * Exclude special folders, e.g. node_modules
11
- */
12
- declare const _default: (srcPath: string, dstPath: string) => void;
13
- export default _default;
14
- export declare const getAllGraphQLFiles: (srcPath: string) => string[];
15
- //# sourceMappingURL=copy-workspace-content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy-workspace-content.d.ts","sourceRoot":"","sources":["../../src/utils/copy-workspace-content.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;GAUG;yBACa,SAAS,MAAM,EAAE,SAAS,MAAM;AAAhD,wBAgBC;AAED,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,aAIjD,CAAA"}
@@ -1,41 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import fsx from 'fs-extra';
3
- import { globSync } from 'glob';
4
- import path from 'node:path';
5
- import { flatMap } from 'lodash-es';
6
- import { ALL_GRAPHQL_FILES } from './constants.js';
7
- const WORKSPACE_FILE_PATTERNS = [
8
- '**/*.graphql',
9
- 'stepzen.config.json',
10
- 'config.yaml',
11
- ];
12
- const IGNORED_PATTERNS = ['node_modules/**'];
13
- /**
14
- * Copy StepZen workspace content from one directory to another.
15
- *
16
- * Include only the files relevant to StepZen:
17
- * - **​/*.graphql
18
- * - config.yaml
19
- * - stepzen.config.json
20
- *
21
- * Exclude all other files.
22
- * Exclude special folders, e.g. node_modules
23
- */
24
- export default (srcPath, dstPath) => {
25
- if (!fsx.existsSync(srcPath)) {
26
- throw new Error(`Cannot find source directory ${srcPath}`);
27
- }
28
- flatMap(WORKSPACE_FILE_PATTERNS, pattern => globSync(pattern, {
29
- cwd: srcPath,
30
- ignore: IGNORED_PATTERNS,
31
- })).forEach(relativePath => {
32
- const srcFileFullPath = path.join(srcPath, relativePath);
33
- const dstFileFullPath = path.join(dstPath, relativePath);
34
- fsx.ensureDirSync(path.dirname(dstFileFullPath));
35
- fsx.copyFileSync(srcFileFullPath, dstFileFullPath);
36
- });
37
- };
38
- export const getAllGraphQLFiles = (srcPath) => {
39
- return globSync(ALL_GRAPHQL_FILES, { cwd: srcPath }).filter(file => file !== 'index.graphql');
40
- };
41
- //# sourceMappingURL=copy-workspace-content.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy-workspace-content.js","sourceRoot":"","sources":["../../src/utils/copy-workspace-content.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,GAAG,MAA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AC,EAAE,CAAC,IAAI,KAAK,eAAe,CACjC,CAAA;AACH,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- declare const _default: (schema: string) => string;
2
- export default _default;
3
- //# sourceMappingURL=dedupe-query-and-mutation-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dedupe-query-and-mutation-types.d.ts","sourceRoot":"","sources":["../../src/utils/dedupe-query-and-mutation-types.ts"],"names":[],"mappings":"yBAMgB,QAAQ,MAAM,KAAG,MAAM;AAAvC,wBAqEC"}
@@ -1,67 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import { parse, print, visit } from 'graphql';
3
- import { cloneDeep } from '../utils/graphql-helpers.js';
4
- export default (schema) => {
5
- let ast = parse(schema);
6
- let queries = [];
7
- let mutations = [];
8
- // Loop through the AST and find Query and Mutation types.
9
- // Store their fields.
10
- // Return null to remove it from the tree
11
- ast = visit(ast, {
12
- ObjectTypeDefinition: {
13
- enter(node) {
14
- if (node.name.kind === 'Name' && node.name.value === 'Query') {
15
- queries = queries.concat(node.fields);
16
- return null;
17
- }
18
- if (node.name.kind === 'Name' && node.name.value === 'Mutation') {
19
- mutations = mutations.concat(node.fields);
20
- return null;
21
- }
22
- },
23
- },
24
- });
25
- // This is the template for the new Query type
26
- const queryTemplate = {
27
- kind: 'ObjectTypeDefinition',
28
- description: undefined,
29
- name: { kind: 'Name', value: 'Query' },
30
- interfaces: [],
31
- directives: [],
32
- fields: [],
33
- };
34
- // This is the template for the new Mutation type
35
- const mutationTemplate = {
36
- kind: 'ObjectTypeDefinition',
37
- description: undefined,
38
- name: { kind: 'Name', value: 'Mutation' },
39
- interfaces: [],
40
- directives: [],
41
- fields: [],
42
- };
43
- // If there are queries, add a single Query type
44
- // with all the concatenated queries
45
- if (queries.length > 0) {
46
- const mutated = cloneDeep(ast);
47
- const query = {
48
- ...queryTemplate,
49
- fields: queries,
50
- };
51
- mutated.definitions.push(query);
52
- ast = mutated;
53
- }
54
- // If there are mutations, add a single Query type
55
- // with all the concatenated mutations
56
- if (mutations.length > 0) {
57
- const mutated = cloneDeep(ast);
58
- const query = {
59
- ...mutationTemplate,
60
- fields: mutations,
61
- };
62
- mutated.definitions.push(query);
63
- ast = mutated;
64
- }
65
- return print(ast);
66
- };
67
- //# sourceMappingURL=dedupe-query-and-mutation-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dedupe-query-and-mutation-types.js","sourceRoot":"","sources":["../../src/utils/dedupe-query-and-mutation-types.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,OAAO,EAAe,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,SAAS,CAAA;AAEzD,OAAO,EAAC,SAAS,EAAC,MAAM,6BAA6B,CAAA;AAErD,eAAe,CAAC,MAAc,EAAU,EAAE;IACxC,IAAI,GAAG,GAAiB,KAAK,CAAC,MAAM,CAAC,CAAA;IAErC,IAAI,OAAO,GAAQ,EAAE,CAAA;IACrB,IAAI,SAAS,GAAQ,EAAE,CAAA;IAEvB,0DAA0D;IAC1D,sBAAsB;IACtB,yCAAyC;IACzC,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE;QACf,oBAAoB,EAAE;YACpB,KAAK,CAAC,IAAI;gBACR,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;oBAC7D,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;oBACrC,OAAO,IAAI,CAAA;gBACb,CAAC;gBACD,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;oBAChE,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;oBACzC,OAAO,IAAI,CAAA;gBACb,CAAC;YACH,CAAC;SACF;KACF,C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'graphql';
2
- declare const _default: (ast: DocumentNode) => DocumentNode;
3
- export default _default;
4
- //# sourceMappingURL=ensure-query-and-mutation-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ensure-query-and-mutation-types.d.ts","sourceRoot":"","sources":["../../src/utils/ensure-query-and-mutation-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAQ,MAAM,SAAS,CAAA;yBAI3B,KAAK,YAAY,KAAG,YAAY;AAAhD,wBA+CC"}
@@ -1,48 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- import { visit } from 'graphql';
3
- import { cloneDeep } from '../utils/graphql-helpers.js';
4
- export default (ast) => {
5
- let queries = [];
6
- let mutations = [];
7
- // Loop through the AST and find Query and Mutation types.
8
- ast = visit(ast, {
9
- ObjectTypeDefinition: {
10
- enter(node) {
11
- if (node.name.kind === 'Name' && node.name.value === 'Query') {
12
- queries = queries.concat(node.fields);
13
- }
14
- if (node.name.kind === 'Name' && node.name.value === 'Mutation') {
15
- mutations = mutations.concat(node.fields);
16
- }
17
- },
18
- },
19
- });
20
- // If there are no queries, add a single empty Query type
21
- if (queries.length === 0) {
22
- const mutated = cloneDeep(ast);
23
- mutated.definitions.push({
24
- kind: 'ObjectTypeDefinition',
25
- description: undefined,
26
- name: { kind: 'Name', value: 'Query' },
27
- interfaces: [],
28
- directives: [],
29
- fields: [],
30
- });
31
- ast = mutated;
32
- }
33
- // If there are mutations, add a single empty Mutation type
34
- if (mutations.length === 0) {
35
- const mutated = cloneDeep(ast);
36
- mutated.definitions.push({
37
- kind: 'ObjectTypeDefinition',
38
- description: undefined,
39
- name: { kind: 'Name', value: 'Mutation' },
40
- interfaces: [],
41
- directives: [],
42
- fields: [],
43
- });
44
- ast = mutated;
45
- }
46
- return ast;
47
- };
48
- //# sourceMappingURL=ensure-query-and-mutation-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ensure-query-and-mutation-types.js","sourceRoot":"","sources":["../../src/utils/ens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C3D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAQ,SAAS,CAAC,GAAG,CAAC,CAAA;QACnC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAC;YACvC,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,EAAE;SACX,CAAC,CAAA;QACF,GAAG,GAAG,OAAO,CAAA;IACf,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export type DeepWriteable<T> = T extends Function ? T : {
2
- -readonly [P in keyof T]: DeepWriteable<T[P]>;
3
- };
4
- export declare const cloneDeep: <T>(obj: T) => DeepWriteable<T>;
5
- //# sourceMappingURL=graphql-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/graphql-helpers.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,QAAQ,GAC7C,CAAC,GACD;IAAC,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAC,CAAA;AACnD,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,KAAK,CAAC,KAAG,aAAa,CAAC,CAAC,CACpB,CAAA"}
@@ -1,3 +0,0 @@
1
- // Copyright IBM Corp. 2020, 2025
2
- export const cloneDeep = (obj) => JSON.parse(JSON.stringify(obj));
3
- //# sourceMappingURL=graphql-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql-helpers.js","sourceRoot":"","sources":["../../src/utils/graphql-helpers.ts"],"names":[],"mappings":"AAAA,iCAAiC;AAKjC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,GAAM,EAAoB,EAAE,CACvD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAA"}
@@ -1,13 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- export declare const dedupeTempFolder: (dirpath: string) => string;
3
- export declare const findNextAvailableSubfolder: (folder: string, name: string) => string;
4
- export declare const findQueryMutationInSchema: (name: string, files: any) => Boolean;
5
- export declare const findTypeInSchema: (name: string, files: any) => Boolean;
6
- export declare const getConfiguration: (directories: string[], silent?: boolean, answers?: any) => Promise<Record<string, any> | undefined>;
7
- export declare const getExtensions: () => Promise<string>;
8
- export declare const getSchema: (directory: string, extensions: string) => Promise<GraphQLSchema>;
9
- export declare const mergeQueryMutationIntoSchema: (type: any, files: any) => any;
10
- export declare const mergeTypeIntoSchema: (type: any, files: any) => any;
11
- export declare const removeQueryMutationFromSchema: (name: string, files: any) => any;
12
- export declare const removeTypeFromSchema: (name: string, files: any) => any;
13
- //# sourceMappingURL=merge-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/merge-helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,aAAa,EAAc,MAAM,SAAS,CAAA;AAgBlE,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,WAQ/C,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,EAAE,MAAM,MAAM,WAStE,CAAA;AAgBD,eAAO,MAAM,yBAAyB,GACpC,MAAM,MAAM,EACZ,OAAO,GAAG,KACT,OAiBF,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,OAAO,GAAG,KAAG,OAc3D,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC3B,aAAa,MAAM,EAAE,EACrB,SAAQ,OAAe,EACvB,UAAS,GAAQ,KAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CA6BzC,CAAA;AAED,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,MAAM,CAoBpD,CAAA;AAED,eAAO,MAAM,SAAS,GACpB,WAAW,MAAM,EACjB,YAAY,MAAM,KACjB,OAAO,CAAC,aAAa,CAGvB,CAAA;AAED,eAAO,MAAM,4BAA4B,GAAI,MAAM,GAAG,EAAE,OAAO,GAAG,QAoBjE,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,MAAM,GAAG,EAAE,OAAO,GAAG,QAmBxD,CAAA;AAED,eAAO,MAAM,6BAA6B,GAAI,MAAM,MAAM,EAAE,OAAO,GAAG,QAiBrE,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,OAAO,GAAG,QAc5D,CAAA"}