apollo-codegen
Advanced tools
Comparing version 0.20.1 to 0.20.2
@@ -12,2 +12,3 @@ #!/usr/bin/env node | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
require("apollo-codegen-core/lib/polyfills"); | ||
const glob = require("glob"); | ||
@@ -105,2 +106,3 @@ const process = require("process"); | ||
output: { | ||
demand: true, | ||
describe: 'Output directory for the generated files', | ||
@@ -113,3 +115,3 @@ normalize: true, | ||
describe: 'Code generation target language', | ||
choices: ['swift', 'scala', 'json', 'ts', 'ts-modern', 'typescript', 'typescript-modern', 'flow', 'flow-modern'], | ||
choices: ['swift', 'scala', 'json', 'ts-legacy', 'ts', 'typescript-legacy', 'typescript', 'flow-legacy', 'flow'], | ||
default: 'swift' | ||
@@ -145,3 +147,3 @@ }, | ||
demand: false, | ||
describe: "Use Flow exact objects for generated types [flow-modern only]", | ||
describe: "Use Flow exact objects for generated types [flow only]", | ||
default: false, | ||
@@ -152,3 +154,3 @@ type: 'boolean' | ||
demand: false, | ||
describe: "Use Flow read only types for generated types [flow-modern only]", | ||
describe: "Use Flow read only types for generated types [flow only]", | ||
default: false, | ||
@@ -155,0 +157,0 @@ type: 'boolean' |
@@ -38,5 +38,5 @@ "use strict"; | ||
} | ||
else if (target === 'flow-modern' || target === 'typescript-modern' || target === 'ts-modern') { | ||
else if (target === 'flow' || target === 'typescript' || target === 'ts') { | ||
const context = compiler_1.compileToIR(schema, document, options); | ||
const { generatedFiles, common } = target === 'flow-modern' | ||
const { generatedFiles, common } = target === 'flow' | ||
? apollo_codegen_flow_1.generateSource(context) | ||
@@ -66,7 +66,7 @@ : apollo_codegen_typescript_1.generateSource(context); | ||
break; | ||
case 'ts': | ||
case 'typescript': | ||
case 'ts-legacy': | ||
case 'typescript-legacy': | ||
output = apollo_codegen_typescript_legacy_1.generateSource(context); | ||
break; | ||
case 'flow': | ||
case 'flow-legacy': | ||
output = apollo_codegen_flow_legacy_1.generateSource(context); | ||
@@ -73,0 +73,0 @@ break; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
require("apollo-codegen-core/lib/polyfills"); | ||
var downloadSchema_1 = require("./downloadSchema"); | ||
@@ -5,0 +4,0 @@ exports.downloadSchema = downloadSchema_1.default; |
{ | ||
"name": "apollo-codegen", | ||
"description": "Generate API code or type annotations based on a GraphQL schema and query documents", | ||
"version": "0.20.1", | ||
"version": "0.20.2", | ||
"main": "./lib/index.js", | ||
@@ -13,3 +13,3 @@ "bin": "./lib/cli.js", | ||
"test": "./node_modules/.bin/jest", | ||
"test:smoke": "npm run build && node ./lib/cli.js && echo 'Smoke Test Passed'" | ||
"test:smoke": "npm run build && node ./lib/cli.js generate ../common-test/fixtures/starwars/HeroAndFriends.graphql --schema ../common-test/fixtures/starwars/schema.json --output API.swift && echo 'Smoke Test Passed' && rm API.swift" | ||
}, | ||
@@ -16,0 +16,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55237
1002