@stepzen/transpiler 0.44.0 → 0.45.0-experimental.32a4304

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 (67) hide show
  1. package/lib/actions/configure.js +7 -9
  2. package/lib/actions/configure.js.map +1 -1
  3. package/lib/actions/lint.js +12 -14
  4. package/lib/actions/lint.js.map +1 -1
  5. package/lib/actions/merge.js +43 -45
  6. package/lib/actions/merge.js.map +1 -1
  7. package/lib/actions/print.js +4 -6
  8. package/lib/actions/print.js.map +1 -1
  9. package/lib/actions/stitch.js +23 -25
  10. package/lib/actions/stitch.js.map +1 -1
  11. package/lib/actions/transpile.js +18 -20
  12. package/lib/actions/transpile.js.map +1 -1
  13. package/lib/actions/validate.js +13 -15
  14. package/lib/actions/validate.js.map +1 -1
  15. package/lib/index.d.ts +7 -7
  16. package/lib/index.d.ts.map +1 -1
  17. package/lib/index.js +7 -17
  18. package/lib/index.js.map +1 -1
  19. package/lib/mutations/config/envvars.js +2 -4
  20. package/lib/mutations/config/envvars.js.map +1 -1
  21. package/lib/mutations/config/index.js +2 -4
  22. package/lib/mutations/config/index.js.map +1 -1
  23. package/lib/utils/constants.js +5 -8
  24. package/lib/utils/constants.js.map +1 -1
  25. package/lib/utils/copy-workspace-content.js +9 -13
  26. package/lib/utils/copy-workspace-content.js.map +1 -1
  27. package/lib/utils/dedupe-query-and-mutation-types.js +8 -10
  28. package/lib/utils/dedupe-query-and-mutation-types.js.map +1 -1
  29. package/lib/utils/ensure-query-and-mutation-types.js +6 -8
  30. package/lib/utils/ensure-query-and-mutation-types.js.map +1 -1
  31. package/lib/utils/graphql-helpers.js +1 -5
  32. package/lib/utils/graphql-helpers.js.map +1 -1
  33. package/lib/utils/merge-helpers.js +47 -61
  34. package/lib/utils/merge-helpers.js.map +1 -1
  35. package/lib/utils/rmtemp.js +6 -10
  36. package/lib/utils/rmtemp.js.map +1 -1
  37. package/lib/utils/set-files-in-sdl.d.ts +1 -1
  38. package/lib/utils/set-files-in-sdl.d.ts.map +1 -1
  39. package/lib/utils/set-files-in-sdl.js +37 -42
  40. package/lib/utils/set-files-in-sdl.js.map +1 -1
  41. package/lib/utils/strip-empty-queries-and-mutations.js +7 -9
  42. package/lib/utils/strip-empty-queries-and-mutations.js.map +1 -1
  43. package/lib/validators/config-exists/index.js +9 -11
  44. package/lib/validators/config-exists/index.js.map +1 -1
  45. package/lib/validators/index.js +2 -4
  46. package/lib/validators/index.js.map +1 -1
  47. package/package.json +6 -5
  48. package/src/actions/configure.ts +6 -6
  49. package/src/actions/lint.ts +8 -8
  50. package/src/actions/merge.ts +12 -12
  51. package/src/actions/print.ts +1 -1
  52. package/src/actions/stitch.ts +11 -11
  53. package/src/actions/transpile.ts +11 -11
  54. package/src/actions/validate.ts +6 -6
  55. package/src/index.ts +7 -7
  56. package/src/mutations/config/envvars.ts +1 -1
  57. package/src/mutations/config/index.ts +1 -1
  58. package/src/utils/constants.ts +2 -2
  59. package/src/utils/copy-workspace-content.ts +5 -5
  60. package/src/utils/dedupe-query-and-mutation-types.ts +1 -1
  61. package/src/utils/ensure-query-and-mutation-types.ts +1 -1
  62. package/src/utils/merge-helpers.ts +14 -14
  63. package/src/utils/rmtemp.ts +4 -4
  64. package/src/utils/set-files-in-sdl.ts +7 -7
  65. package/src/utils/strip-empty-queries-and-mutations.ts +1 -1
  66. package/src/validators/config-exists/index.ts +4 -4
  67. package/src/validators/index.ts +1 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {DocumentNode, parse, print, visit} from 'graphql'
4
4
 
5
- import {cloneDeep} from '../utils/graphql-helpers'
5
+ import {cloneDeep} from '../utils/graphql-helpers.js'
6
6
 
7
7
  export default (schema: string): string => {
8
8
  let ast: DocumentNode = parse(schema)
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {DocumentNode, visit} from 'graphql'
4
4
 
5
- import {cloneDeep} from '../utils/graphql-helpers'
5
+ import {cloneDeep} from '../utils/graphql-helpers.js'
6
6
 
7
7
  export default (ast: DocumentNode): DocumentNode => {
8
8
  let queries: any = []
@@ -1,21 +1,21 @@
1
1
  // Copyright IBM Corp. 2020, 2024
2
2
 
3
- import * as debug from 'debug'
3
+ import debug from 'debug'
4
4
  import {ASTNode, BREAK, GraphQLSchema, Kind, visit} from 'graphql'
5
- import {buildSchema} from 'graphql/utilities'
5
+ import {buildSchema} from 'graphql/utilities/index.js'
6
6
  import fetch from '@stepzen/fetch'
7
- import * as fsx from 'fs-extra'
8
- import * as glob from 'glob'
9
- import * as os from 'os'
10
- import * as path from 'path'
11
- import {replace} from 'lodash'
12
-
13
- import {cloneDeep} from '../utils/graphql-helpers'
14
- import {STEPZEN_SERVER_URL} from './constants'
15
-
16
- import configure from '../actions/configure'
17
- import transpile from '../actions/transpile'
18
- import {rmtemp} from './rmtemp'
7
+ import fsx from 'fs-extra'
8
+ import glob from 'glob'
9
+ import os from 'node:os'
10
+ import path from 'node:path'
11
+ import {replace} from 'lodash-es'
12
+
13
+ import {cloneDeep} from '../utils/graphql-helpers.js'
14
+ import {STEPZEN_SERVER_URL} from './constants.js'
15
+
16
+ import configure from '../actions/configure.js'
17
+ import transpile from '../actions/transpile.js'
18
+ import {rmtemp} from './rmtemp.js'
19
19
 
20
20
  export const dedupeTempFolder = (dirpath: string) => {
21
21
  do {
@@ -1,9 +1,9 @@
1
1
  // Copyright IBM Corp. 2020, 2024
2
2
 
3
- import * as fs from 'fs'
4
- import * as path from 'path'
5
- import * as os from 'os'
6
- import * as debug from 'debug'
3
+ import fs from 'node:fs'
4
+ import path from 'node:path'
5
+ import os from 'node:os'
6
+ import debug from 'debug'
7
7
 
8
8
  // ----------------------------------------------------------------------------
9
9
  // THIS ENTIRE FILE IS COPIED FROM packages/cli/src/shared/rmtemp.ts
@@ -1,7 +1,7 @@
1
1
  // Copyright IBM Corp. 2020, 2024
2
2
 
3
- import * as fs from 'fs'
4
- import * as glob from 'glob'
3
+ import fs from 'node:fs'
4
+ import glob from 'glob'
5
5
  import {
6
6
  ConstDirectiveNode,
7
7
  DirectiveNode,
@@ -13,12 +13,12 @@ import {
13
13
  OperationTypeNode,
14
14
  visit,
15
15
  } from 'graphql'
16
- import * as path from 'path'
16
+ import path from 'node:path'
17
17
 
18
- import {cloneDeep, DeepWriteable} from './graphql-helpers'
19
- import print from '../actions/print'
20
- import {ALL_GRAPHQL_FILES} from './constants'
21
- import {getAllGraphQLFiles} from './copy-workspace-content'
18
+ import {cloneDeep, DeepWriteable} from './graphql-helpers.js'
19
+ import print from '../actions/print.js'
20
+ import {ALL_GRAPHQL_FILES} from './constants.js'
21
+ import {getAllGraphQLFiles} from './copy-workspace-content.js'
22
22
 
23
23
  const normalizePathSep = (pathlike: string) =>
24
24
  pathlike.replace(path.sep, path.posix.sep)
@@ -2,7 +2,7 @@
2
2
 
3
3
  import {DocumentNode, visit} from 'graphql'
4
4
 
5
- import {cloneDeep} from './graphql-helpers'
5
+ import {cloneDeep} from './graphql-helpers.js'
6
6
 
7
7
  export default (ast: DocumentNode): DocumentNode => {
8
8
  // Loop through the AST and nuke `__query` and `__mutation` stubs
@@ -1,10 +1,10 @@
1
1
  // Copyright IBM Corp. 2020, 2024
2
2
 
3
3
  import {DocumentNode, visit} from 'graphql'
4
- import {filter, uniq} from 'lodash'
5
- import * as fs from 'fs'
6
- import * as path from 'path'
7
- import * as yaml from 'yaml'
4
+ import {filter, uniq} from 'lodash-es'
5
+ import fs from 'node:fs'
6
+ import path from 'node:path'
7
+ import yaml from 'yaml'
8
8
 
9
9
  const STEPZEN_DEFAULTS = [
10
10
  'fedex_default',
@@ -1,5 +1,5 @@
1
1
  // Copyright IBM Corp. 2020, 2024
2
2
 
3
- import configExists from './config-exists'
3
+ import configExists from './config-exists/index.js'
4
4
 
5
5
  export default [configExists]