relay-compiler 0.0.0-main-e0f88a3b → 0.0.0-main-2087b512
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/RelayCompilerBin.js.flow +2 -3
- package/bin/RelayCompilerMain.js.flow +12 -14
- package/bin/relay-compiler +5613 -5548
- package/codegen/CodegenDirectory.js.flow +4 -5
- package/codegen/CodegenRunner.js.flow +11 -13
- package/codegen/CodegenWatcher.js.flow +3 -4
- package/codegen/NormalizationCodeGenerator.js.flow +13 -14
- package/codegen/ReaderCodeGenerator.js.flow +14 -16
- package/codegen/RelayCodeGenerator.js.flow +7 -7
- package/codegen/RelayFileWriter.js.flow +20 -22
- package/codegen/compileRelayArtifacts.js.flow +5 -6
- package/codegen/writeRelayGeneratedFile.js.flow +7 -9
- package/core/ASTCache.js.flow +3 -4
- package/core/ASTConvert.js.flow +7 -8
- package/core/CompilerContext.js.flow +5 -7
- package/core/CompilerError.js.flow +2 -2
- package/core/DotGraphQLParser.js.flow +4 -6
- package/core/IR.js.flow +2 -2
- package/core/IRPrinter.js.flow +3 -4
- package/core/IRTransformer.js.flow +4 -5
- package/core/IRValidator.js.flow +3 -4
- package/core/IRVisitor.js.flow +2 -2
- package/core/JSModuleParser.js.flow +2 -2
- package/core/RelayCompilerScope.js.flow +2 -2
- package/core/RelayFindGraphQLTags.js.flow +6 -7
- package/core/RelayGraphQLEnumsGenerator.js.flow +2 -2
- package/core/RelayIRTransforms.js.flow +3 -3
- package/core/RelayParser.js.flow +16 -18
- package/core/RelaySourceModuleParser.js.flow +7 -9
- package/core/Schema.js.flow +24 -24
- package/core/SchemaUtils.js.flow +3 -3
- package/core/filterContextForNode.js.flow +2 -3
- package/core/getFieldDefinition.js.flow +3 -3
- package/core/getIdentifierForArgumentValue.js.flow +2 -2
- package/core/getIdentifierForSelection.js.flow +3 -4
- package/core/inferRootArgumentDefinitions.js.flow +5 -6
- package/index.js +1 -1
- package/index.js.flow +33 -35
- package/language/RelayLanguagePluginInterface.js.flow +3 -3
- package/language/javascript/FindGraphQLTags.js.flow +2 -3
- package/language/javascript/RelayFlowBabelFactories.js.flow +1 -1
- package/language/javascript/RelayFlowGenerator.js.flow +16 -19
- package/language/javascript/RelayFlowTypeTransformers.js.flow +3 -5
- package/language/javascript/RelayLanguagePluginJavaScript.js.flow +2 -3
- package/lib/bin/RelayCompilerBin.js +2 -2
- package/lib/bin/RelayCompilerMain.js +10 -10
- package/lib/codegen/CodegenDirectory.js +2 -3
- package/lib/codegen/CodegenRunner.js +9 -9
- package/lib/codegen/CodegenWatcher.js +2 -2
- package/lib/codegen/NormalizationCodeGenerator.js +11 -4
- package/lib/codegen/ReaderCodeGenerator.js +7 -6
- package/lib/codegen/RelayCodeGenerator.js +11 -4
- package/lib/codegen/RelayFileWriter.js +14 -14
- package/lib/codegen/compileRelayArtifacts.js +3 -3
- package/lib/codegen/writeRelayGeneratedFile.js +4 -4
- package/lib/core/CompilerContext.js +5 -5
- package/lib/core/CompilerError.js +2 -1
- package/lib/core/DotGraphQLParser.js +4 -4
- package/lib/core/IRPrinter.js +2 -2
- package/lib/core/IRTransformer.js +2 -2
- package/lib/core/IRValidator.js +2 -2
- package/lib/core/RelayCompilerScope.js +34 -0
- package/lib/core/RelayFindGraphQLTags.js +2 -2
- package/lib/core/RelayIRTransforms.js +4 -4
- package/lib/core/RelayParser.js +10 -10
- package/lib/core/RelaySourceModuleParser.js +5 -5
- package/lib/core/Schema.js +2 -2
- package/lib/core/filterContextForNode.js +2 -1
- package/lib/core/getIdentifierForArgumentValue.js +2 -1
- package/lib/core/getIdentifierForSelection.js +3 -2
- package/lib/core/inferRootArgumentDefinitions.js +3 -3
- package/lib/index.js +46 -46
- package/lib/language/RelayLanguagePluginInterface.js +13 -1
- package/lib/language/javascript/FindGraphQLTags.js +2 -2
- package/lib/language/javascript/RelayFlowBabelFactories.js +2 -2
- package/lib/language/javascript/RelayFlowGenerator.js +3 -3
- package/lib/language/javascript/RelayFlowTypeTransformers.js +2 -2
- package/lib/language/javascript/RelayLanguagePluginJavaScript.js +2 -2
- package/lib/runner/Artifacts.js +3 -3
- package/lib/runner/BufferedFilesystem.js +2 -1
- package/lib/runner/GraphQLASTNodeGroup.js +2 -2
- package/lib/runner/GraphQLNodeMap.js +2 -2
- package/lib/runner/Sources.js +2 -2
- package/lib/runner/compileArtifacts.js +2 -2
- package/lib/runner/extractAST.js +2 -2
- package/lib/transforms/ApplyFragmentArgumentTransform.js +6 -6
- package/lib/transforms/ClientExtensionsTransform.js +2 -2
- package/lib/transforms/ConnectionTransform.js +6 -6
- package/lib/transforms/DeclarativeConnectionMutationTransform.js +2 -2
- package/lib/transforms/DeferStreamTransform.js +4 -4
- package/lib/transforms/DisallowIdAsAlias.js +2 -2
- package/lib/transforms/DisallowTypenameOnRoot.js +2 -2
- package/lib/transforms/FilterDirectivesTransform.js +2 -1
- package/lib/transforms/FlattenTransform.js +6 -6
- package/lib/transforms/InlineDataFragmentTransform.js +2 -2
- package/lib/transforms/MaskTransform.js +4 -4
- package/lib/transforms/MatchTransform.js +4 -4
- package/lib/transforms/ReactFlightComponentTransform.js +4 -4
- package/lib/transforms/RefetchableFragmentTransform.js +4 -4
- package/lib/transforms/RelayDirectiveTransform.js +2 -2
- package/lib/transforms/RequiredFieldTransform.js +4 -4
- package/lib/transforms/SkipHandleFieldTransform.js +2 -1
- package/lib/transforms/SkipRedundantNodesTransform.js +11 -3
- package/lib/transforms/SkipUnusedVariablesTransform.js +2 -1
- package/lib/transforms/SplitModuleImportTransform.js +2 -2
- package/lib/transforms/TestOperationTransform.js +3 -3
- package/lib/transforms/ValidateGlobalVariablesTransform.js +3 -2
- package/lib/transforms/ValidateRequiredArgumentsTransform.js +2 -2
- package/lib/transforms/ValidateServerOnlyDirectivesTransform.js +2 -2
- package/lib/transforms/ValidateUnusedVariablesTransform.js +2 -2
- package/lib/transforms/query-generators/FetchableQueryGenerator.js +2 -2
- package/lib/transforms/query-generators/NodeQueryGenerator.js +4 -4
- package/lib/transforms/query-generators/index.js +3 -3
- package/lib/util/joinArgumentDefinitions.js +2 -1
- package/package.json +2 -2
- package/relay-compiler.js +4 -4
- package/relay-compiler.min.js +4 -4
- package/reporters/ConsoleReporter.js.flow +2 -2
- package/runner/Artifacts.js.flow +4 -5
- package/runner/BufferedFilesystem.js.flow +3 -3
- package/runner/GraphQLASTNodeGroup.js.flow +2 -3
- package/runner/GraphQLNodeMap.js.flow +3 -3
- package/runner/Sources.js.flow +5 -6
- package/runner/compileArtifacts.js.flow +5 -6
- package/runner/extractAST.js.flow +4 -6
- package/runner/getChangedNodeNames.js.flow +2 -2
- package/runner/getSchemaInstance.js.flow +3 -3
- package/transforms/ApplyFragmentArgumentTransform.js.flow +9 -11
- package/transforms/ClientExtensionsTransform.js.flow +3 -4
- package/transforms/ConnectionTransform.js.flow +11 -13
- package/transforms/DeclarativeConnectionMutationTransform.js.flow +3 -5
- package/transforms/DeferStreamTransform.js.flow +5 -7
- package/transforms/DisallowIdAsAlias.js.flow +3 -4
- package/transforms/DisallowTypenameOnRoot.js.flow +3 -4
- package/transforms/FieldHandleTransform.js.flow +3 -5
- package/transforms/FilterCompilerDirectivesTransform.js.flow +2 -2
- package/transforms/FilterDirectivesTransform.js.flow +2 -2
- package/transforms/FlattenTransform.js.flow +5 -7
- package/transforms/GenerateIDFieldTransform.js.flow +4 -5
- package/transforms/GenerateTypeNameTransform.js.flow +4 -6
- package/transforms/InlineDataFragmentTransform.js.flow +3 -4
- package/transforms/InlineFragmentsTransform.js.flow +3 -4
- package/transforms/MaskTransform.js.flow +6 -8
- package/transforms/MatchTransform.js.flow +7 -9
- package/transforms/ReactFlightComponentTransform.js.flow +5 -6
- package/transforms/RefetchableFragmentTransform.js.flow +7 -9
- package/transforms/RelayDirectiveTransform.js.flow +3 -4
- package/transforms/RequiredFieldTransform.js.flow +10 -12
- package/transforms/SkipClientExtensionsTransform.js.flow +2 -2
- package/transforms/SkipHandleFieldTransform.js.flow +2 -2
- package/transforms/SkipRedundantNodesTransform.js.flow +6 -8
- package/transforms/SkipSplitOperationTransform.js.flow +2 -2
- package/transforms/SkipUnreachableNodeTransform.js.flow +3 -4
- package/transforms/SkipUnusedVariablesTransform.js.flow +2 -2
- package/transforms/SplitModuleImportTransform.js.flow +4 -5
- package/transforms/TestOperationTransform.js.flow +2 -2
- package/transforms/ValidateGlobalVariablesTransform.js.flow +3 -4
- package/transforms/ValidateRequiredArgumentsTransform.js.flow +5 -6
- package/transforms/ValidateServerOnlyDirectivesTransform.js.flow +3 -4
- package/transforms/ValidateUnusedVariablesTransform.js.flow +3 -4
- package/transforms/query-generators/FetchableQueryGenerator.js.flow +4 -5
- package/transforms/query-generators/NodeQueryGenerator.js.flow +5 -7
- package/transforms/query-generators/QueryQueryGenerator.js.flow +4 -4
- package/transforms/query-generators/ViewerQueryGenerator.js.flow +4 -4
- package/transforms/query-generators/index.js.flow +4 -5
- package/util/RelayCompilerCache.js.flow +0 -1
- package/util/TimeReporter.js.flow +2 -2
- package/util/argumentContainsVariables.js.flow +1 -1
- package/util/generateAbstractTypeRefinementKey.js.flow +2 -2
- package/util/getDefinitionNodeHash.js.flow +2 -3
- package/util/joinArgumentDefinitions.js.flow +2 -2
@@ -12,11 +12,10 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
import type {Config} from './RelayCompilerMain';
|
16
16
|
|
17
17
|
const {main} = require('./RelayCompilerMain');
|
18
|
-
|
19
|
-
import type {Config} from './RelayCompilerMain';
|
18
|
+
const _yargs = require('yargs');
|
20
19
|
|
21
20
|
let RelayConfig;
|
22
21
|
try {
|
@@ -12,23 +12,28 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
+
import type {WriteFilesOptions} from '../codegen/CodegenRunner';
|
16
|
+
import type {ScalarTypeMapping} from '../language/javascript/RelayFlowTypeTransformers';
|
17
|
+
import type {
|
18
|
+
PluginInitializer,
|
19
|
+
PluginInterface,
|
20
|
+
} from '../language/RelayLanguagePluginInterface';
|
21
|
+
|
15
22
|
const CodegenRunner = require('../codegen/CodegenRunner');
|
16
|
-
const ConsoleReporter = require('../reporters/ConsoleReporter');
|
17
|
-
const DotGraphQLParser = require('../core/DotGraphQLParser');
|
18
23
|
const RelayFileWriter = require('../codegen/RelayFileWriter');
|
24
|
+
const DotGraphQLParser = require('../core/DotGraphQLParser');
|
25
|
+
const WatchmanClient = require('../core/GraphQLWatchmanClient');
|
19
26
|
const RelayIRTransforms = require('../core/RelayIRTransforms');
|
20
|
-
const RelayLanguagePluginJavaScript = require('../language/javascript/RelayLanguagePluginJavaScript');
|
21
27
|
const RelaySourceModuleParser = require('../core/RelaySourceModuleParser');
|
22
|
-
const
|
23
|
-
|
28
|
+
const RelayLanguagePluginJavaScript = require('../language/javascript/RelayLanguagePluginJavaScript');
|
29
|
+
const ConsoleReporter = require('../reporters/ConsoleReporter');
|
24
30
|
const crypto = require('crypto');
|
25
31
|
const fs = require('fs');
|
26
32
|
const glob = require('glob');
|
33
|
+
const {Source, buildClientSchema, printSchema} = require('graphql');
|
27
34
|
const invariant = require('invariant');
|
28
35
|
const path = require('path');
|
29
36
|
|
30
|
-
const {buildClientSchema, Source, printSchema} = require('graphql');
|
31
|
-
|
32
37
|
const {
|
33
38
|
commonTransforms,
|
34
39
|
codegenTransforms,
|
@@ -38,13 +43,6 @@ const {
|
|
38
43
|
schemaExtensions: relaySchemaExtensions,
|
39
44
|
} = RelayIRTransforms;
|
40
45
|
|
41
|
-
import type {ScalarTypeMapping} from '../language/javascript/RelayFlowTypeTransformers';
|
42
|
-
import type {WriteFilesOptions} from '../codegen/CodegenRunner';
|
43
|
-
import type {
|
44
|
-
PluginInitializer,
|
45
|
-
PluginInterface,
|
46
|
-
} from '../language/RelayLanguagePluginInterface';
|
47
|
-
|
48
46
|
export type Config = {|
|
49
47
|
schema: string,
|
50
48
|
src: string,
|