@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.
- package/lib/actions/configure.js +7 -9
- package/lib/actions/configure.js.map +1 -1
- package/lib/actions/lint.js +12 -14
- package/lib/actions/lint.js.map +1 -1
- package/lib/actions/merge.js +43 -45
- package/lib/actions/merge.js.map +1 -1
- package/lib/actions/print.js +4 -6
- package/lib/actions/print.js.map +1 -1
- package/lib/actions/stitch.js +23 -25
- package/lib/actions/stitch.js.map +1 -1
- package/lib/actions/transpile.js +18 -20
- package/lib/actions/transpile.js.map +1 -1
- package/lib/actions/validate.js +13 -15
- package/lib/actions/validate.js.map +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -17
- package/lib/index.js.map +1 -1
- package/lib/mutations/config/envvars.js +2 -4
- package/lib/mutations/config/envvars.js.map +1 -1
- package/lib/mutations/config/index.js +2 -4
- package/lib/mutations/config/index.js.map +1 -1
- package/lib/utils/constants.js +5 -8
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/copy-workspace-content.js +9 -13
- package/lib/utils/copy-workspace-content.js.map +1 -1
- package/lib/utils/dedupe-query-and-mutation-types.js +8 -10
- package/lib/utils/dedupe-query-and-mutation-types.js.map +1 -1
- package/lib/utils/ensure-query-and-mutation-types.js +6 -8
- package/lib/utils/ensure-query-and-mutation-types.js.map +1 -1
- package/lib/utils/graphql-helpers.js +1 -5
- package/lib/utils/graphql-helpers.js.map +1 -1
- package/lib/utils/merge-helpers.js +47 -61
- package/lib/utils/merge-helpers.js.map +1 -1
- package/lib/utils/rmtemp.js +6 -10
- package/lib/utils/rmtemp.js.map +1 -1
- package/lib/utils/set-files-in-sdl.d.ts +1 -1
- package/lib/utils/set-files-in-sdl.d.ts.map +1 -1
- package/lib/utils/set-files-in-sdl.js +37 -42
- package/lib/utils/set-files-in-sdl.js.map +1 -1
- package/lib/utils/strip-empty-queries-and-mutations.js +7 -9
- package/lib/utils/strip-empty-queries-and-mutations.js.map +1 -1
- package/lib/validators/config-exists/index.js +9 -11
- package/lib/validators/config-exists/index.js.map +1 -1
- package/lib/validators/index.js +2 -4
- package/lib/validators/index.js.map +1 -1
- package/package.json +6 -5
- package/src/actions/configure.ts +6 -6
- package/src/actions/lint.ts +8 -8
- package/src/actions/merge.ts +12 -12
- package/src/actions/print.ts +1 -1
- package/src/actions/stitch.ts +11 -11
- package/src/actions/transpile.ts +11 -11
- package/src/actions/validate.ts +6 -6
- package/src/index.ts +7 -7
- package/src/mutations/config/envvars.ts +1 -1
- package/src/mutations/config/index.ts +1 -1
- package/src/utils/constants.ts +2 -2
- package/src/utils/copy-workspace-content.ts +5 -5
- package/src/utils/dedupe-query-and-mutation-types.ts +1 -1
- package/src/utils/ensure-query-and-mutation-types.ts +1 -1
- package/src/utils/merge-helpers.ts +14 -14
- package/src/utils/rmtemp.ts +4 -4
- package/src/utils/set-files-in-sdl.ts +7 -7
- package/src/utils/strip-empty-queries-and-mutations.ts +1 -1
- package/src/validators/config-exists/index.ts +4 -4
- package/src/validators/index.ts +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// Copyright IBM Corp. 2020, 2024
|
|
2
2
|
|
|
3
|
-
import
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
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 {
|
package/src/utils/rmtemp.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Copyright IBM Corp. 2020, 2024
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
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
|
|
4
|
-
import
|
|
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
|
|
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
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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',
|
package/src/validators/index.ts
CHANGED