@aws-amplify/graphql-transformer-core
Advanced tools
Comparing version 2.5.1-iam-auth-with-identityPool-provider-1.0 to 2.5.1
@@ -253,2 +253,5 @@ ## API Report File for "@aws-amplify/graphql-transformer-core" | ||
// @public (undocumented) | ||
export const getStrategyDbTypeFromModel: (ctx: DataSourceStrategiesProvider, typename: string) => ModelDataSourceStrategyDbType; | ||
// @public (undocumented) | ||
export const getStrategyDbTypeFromTypeNode: (type: TypeNode, ctx: TransformerContextProvider) => ModelDataSourceStrategyDbType; | ||
@@ -255,0 +258,0 @@ |
@@ -5,3 +5,3 @@ export { constructDataSourceStrategies, constructSqlDirectiveDataSourceStrategies, getModelTypeNames, GraphQLTransform, GraphQLTransformOptions, SyncUtils, } from './transformation'; | ||
export { ConflictDetectionType, ConflictHandlerType, ResolverConfig, SyncConfig, SyncConfigOptimistic, SyncConfigServer, SyncConfigLambda, TransformConfig, } from './config/index'; | ||
export { APICategory, collectDirectives, collectDirectivesByTypeNames, DirectiveWrapper, fieldsWithSqlDirective, generateGetArgumentsInput, GetArgumentsOptions, getModelDataSourceNameForTypeName, getDefaultStrategyNameForDbType, getImportedRDSTypeFromStrategyDbType, getKeySchema, getModelDataSourceStrategy, getParameterStoreSecretPath, getPrimaryKeyFields, getResourceName, getResourceNamesForStrategy, getResourceNamesForStrategyName, getSortKeyFieldNames, getStrategyDbTypeFromTypeNode, getTable, isAmplifyDynamoDbModelDataSourceStrategy, isBuiltInGraphqlNode, isDefaultDynamoDbModelDataSourceStrategy, isDynamoDbModel, isDynamoDbType, isModelType, isMutationNode, isObjectTypeDefinitionNode, isQueryNode, isSqlDbType, isSqlModel, isSqlStrategy, normalizeDbType, setResourceName, SQLLambdaResourceNames, getFilterInputName, getConditionInputName, getSubscriptionFilterInputName, getConnectionName, } from './utils'; | ||
export { APICategory, collectDirectives, collectDirectivesByTypeNames, DirectiveWrapper, fieldsWithSqlDirective, generateGetArgumentsInput, GetArgumentsOptions, getModelDataSourceNameForTypeName, getDefaultStrategyNameForDbType, getImportedRDSTypeFromStrategyDbType, getKeySchema, getModelDataSourceStrategy, getParameterStoreSecretPath, getPrimaryKeyFields, getResourceName, getResourceNamesForStrategy, getResourceNamesForStrategyName, getSortKeyFieldNames, getStrategyDbTypeFromTypeNode, getTable, isAmplifyDynamoDbModelDataSourceStrategy, isBuiltInGraphqlNode, isDefaultDynamoDbModelDataSourceStrategy, isDynamoDbModel, isDynamoDbType, isModelType, isMutationNode, isObjectTypeDefinitionNode, isQueryNode, isSqlDbType, isSqlModel, isSqlStrategy, normalizeDbType, setResourceName, SQLLambdaResourceNames, getFilterInputName, getConditionInputName, getSubscriptionFilterInputName, getConnectionName, getStrategyDbTypeFromModel, } from './utils'; | ||
export type { SetResourceNameProps } from './utils'; | ||
@@ -8,0 +8,0 @@ export * from './utils/operation-names'; |
@@ -17,4 +17,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StackManager = exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.getConnectionName = exports.getSubscriptionFilterInputName = exports.getConditionInputName = exports.getFilterInputName = exports.setResourceName = exports.normalizeDbType = exports.isSqlStrategy = exports.isSqlModel = exports.isSqlDbType = exports.isQueryNode = exports.isObjectTypeDefinitionNode = exports.isMutationNode = exports.isModelType = exports.isDynamoDbType = exports.isDynamoDbModel = exports.isDefaultDynamoDbModelDataSourceStrategy = exports.isBuiltInGraphqlNode = exports.isAmplifyDynamoDbModelDataSourceStrategy = exports.getTable = exports.getStrategyDbTypeFromTypeNode = exports.getSortKeyFieldNames = exports.getResourceNamesForStrategyName = exports.getResourceNamesForStrategy = exports.getResourceName = exports.getPrimaryKeyFields = exports.getParameterStoreSecretPath = exports.getModelDataSourceStrategy = exports.getKeySchema = exports.getImportedRDSTypeFromStrategyDbType = exports.getDefaultStrategyNameForDbType = exports.getModelDataSourceNameForTypeName = exports.generateGetArgumentsInput = exports.fieldsWithSqlDirective = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.APICategory = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = exports.getModelTypeNames = exports.constructSqlDirectiveDataSourceStrategies = exports.constructDataSourceStrategies = void 0; | ||
exports.ObjectDefinitionWrapper = exports.InputObjectDefinitionWrapper = exports.InputFieldWrapper = exports.FieldWrapper = exports.EnumWrapper = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.SQL_SCHEMA_FILE_NAME = exports.POSTGRES_DB_TYPE = exports.MYSQL_DB_TYPE = exports.ImportedRDSType = exports.DDB_DEFAULT_DATASOURCE_STRATEGY = exports.DDB_DB_TYPE = exports.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY = void 0; | ||
exports.TransformerResolver = exports.TransformerAuthBase = exports.TransformerPluginBase = exports.TransformerModelEnhancerBase = exports.TransformerModelBase = exports.getStrategyDbTypeFromModel = exports.getConnectionName = exports.getSubscriptionFilterInputName = exports.getConditionInputName = exports.getFilterInputName = exports.setResourceName = exports.normalizeDbType = exports.isSqlStrategy = exports.isSqlModel = exports.isSqlDbType = exports.isQueryNode = exports.isObjectTypeDefinitionNode = exports.isMutationNode = exports.isModelType = exports.isDynamoDbType = exports.isDynamoDbModel = exports.isDefaultDynamoDbModelDataSourceStrategy = exports.isBuiltInGraphqlNode = exports.isAmplifyDynamoDbModelDataSourceStrategy = exports.getTable = exports.getStrategyDbTypeFromTypeNode = exports.getSortKeyFieldNames = exports.getResourceNamesForStrategyName = exports.getResourceNamesForStrategy = exports.getResourceName = exports.getPrimaryKeyFields = exports.getParameterStoreSecretPath = exports.getModelDataSourceStrategy = exports.getKeySchema = exports.getImportedRDSTypeFromStrategyDbType = exports.getDefaultStrategyNameForDbType = exports.getModelDataSourceNameForTypeName = exports.generateGetArgumentsInput = exports.fieldsWithSqlDirective = exports.DirectiveWrapper = exports.collectDirectivesByTypeNames = exports.collectDirectives = exports.APICategory = exports.ConflictHandlerType = exports.validateModelSchema = exports.SyncUtils = exports.GraphQLTransform = exports.getModelTypeNames = exports.constructSqlDirectiveDataSourceStrategies = exports.constructDataSourceStrategies = void 0; | ||
exports.ObjectDefinitionWrapper = exports.InputObjectDefinitionWrapper = exports.InputFieldWrapper = exports.FieldWrapper = exports.EnumWrapper = exports.MappingTemplate = exports.getAppSyncServiceExtraDirectives = exports.SQL_SCHEMA_FILE_NAME = exports.POSTGRES_DB_TYPE = exports.MYSQL_DB_TYPE = exports.ImportedRDSType = exports.DDB_DEFAULT_DATASOURCE_STRATEGY = exports.DDB_DB_TYPE = exports.DDB_AMPLIFY_MANAGED_DATASOURCE_STRATEGY = exports.StackManager = void 0; | ||
const graphql_1 = require("graphql"); | ||
@@ -70,2 +70,3 @@ const validation_1 = require("./transformation/validation"); | ||
Object.defineProperty(exports, "getConnectionName", { enumerable: true, get: function () { return utils_1.getConnectionName; } }); | ||
Object.defineProperty(exports, "getStrategyDbTypeFromModel", { enumerable: true, get: function () { return utils_1.getStrategyDbTypeFromModel; } }); | ||
__exportStar(require("./utils/operation-names"), exports); | ||
@@ -72,0 +73,0 @@ __exportStar(require("./errors"), exports); |
@@ -33,2 +33,3 @@ "use strict"; | ||
const validate_1 = require("graphql/validation/validate"); | ||
const graphql_directives_1 = require("@aws-amplify/graphql-directives"); | ||
exports.specifiedRules = [ | ||
@@ -74,14 +75,12 @@ UniqueOperationNamesRule_1.UniqueOperationNamesRule, | ||
`); | ||
exports.EXTRA_DIRECTIVES_DOCUMENT = (0, language_1.parse)(` | ||
directive @aws_subscribe(mutations: [String!]!) on FIELD_DEFINITION | ||
directive @aws_auth(cognito_groups: [String!]!) on FIELD_DEFINITION | ||
directive @aws_api_key on FIELD_DEFINITION | OBJECT | ||
directive @aws_iam on FIELD_DEFINITION | OBJECT | ||
directive @aws_oidc on FIELD_DEFINITION | OBJECT | ||
directive @aws_cognito_user_pools(cognito_groups: [String!]) on FIELD_DEFINITION | OBJECT | ||
directive @aws_lambda on FIELD_DEFINITION | OBJECT | ||
# Allows transformer libraries to deprecate directive arguments. | ||
directive @deprecated(reason: String) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ENUM | ENUM_VALUE | ||
`); | ||
exports.EXTRA_DIRECTIVES_DOCUMENT = (0, language_1.parse)([ | ||
graphql_directives_1.AwsSubscribeDirective.definition, | ||
graphql_directives_1.AwsAuthDirective.definition, | ||
graphql_directives_1.AwsApiKeyDirective.definition, | ||
graphql_directives_1.AwsIamDirective.definition, | ||
graphql_directives_1.AwsOidcDirective.definition, | ||
graphql_directives_1.AwsCognitoUserPoolsDirective.definition, | ||
graphql_directives_1.AwsLambdaDirective.definition, | ||
graphql_directives_1.DeprecatedDirective.definition, | ||
].join('\n')); | ||
const NOOP_QUERY = (0, language_1.parse)(` | ||
@@ -88,0 +87,0 @@ type Query { |
@@ -14,3 +14,4 @@ import { AmplifyDynamoDbModelDataSourceStrategy, DataSourceStrategiesProvider, DefaultDynamoDbModelDataSourceStrategy, ModelDataSourceStrategy, ModelDataSourceStrategyDbType, ModelDataSourceStrategySqlDbType, SQLLambdaModelDataSourceStrategy } from '@aws-amplify/graphql-transformer-interfaces'; | ||
export declare const isSqlStrategy: (strategy: ModelDataSourceStrategy) => strategy is SQLLambdaModelDataSourceStrategy; | ||
export declare const getStrategyDbTypeFromModel: (ctx: DataSourceStrategiesProvider, typename: string) => ModelDataSourceStrategyDbType; | ||
export declare const normalizeDbType: (candidate: string) => ModelDataSourceStrategyDbType; | ||
//# sourceMappingURL=model-datasource-strategy-utils.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.normalizeDbType = exports.isSqlStrategy = exports.isSqlModel = exports.isSqlDbType = exports.isModelType = exports.isDynamoDbType = exports.isDynamoDbModel = exports.isDefaultDynamoDbModelDataSourceStrategy = exports.isAmplifyDynamoDbModelDataSourceStrategy = exports.getModelDataSourceStrategy = exports.getImportedRDSTypeFromStrategyDbType = exports.getModelDataSourceNameForTypeName = void 0; | ||
exports.normalizeDbType = exports.getStrategyDbTypeFromModel = exports.isSqlStrategy = exports.isSqlModel = exports.isSqlDbType = exports.isModelType = exports.isDynamoDbType = exports.isDynamoDbModel = exports.isDefaultDynamoDbModelDataSourceStrategy = exports.isAmplifyDynamoDbModelDataSourceStrategy = exports.getModelDataSourceStrategy = exports.getImportedRDSTypeFromStrategyDbType = exports.getModelDataSourceNameForTypeName = void 0; | ||
const types_1 = require("../types"); | ||
@@ -87,2 +87,9 @@ const graphql_utils_1 = require("./graphql-utils"); | ||
exports.isSqlStrategy = isSqlStrategy; | ||
const getStrategyDbTypeFromModel = (ctx, typename) => { | ||
if ((0, graphql_utils_1.isBuiltInGraphqlType)(typename)) { | ||
return types_1.DDB_DB_TYPE; | ||
} | ||
return (0, exports.getModelDataSourceStrategy)(ctx, typename).dbType; | ||
}; | ||
exports.getStrategyDbTypeFromModel = getStrategyDbTypeFromModel; | ||
const normalizeDbType = (candidate) => { | ||
@@ -89,0 +96,0 @@ switch (candidate.toLowerCase()) { |
{ | ||
"name": "@aws-amplify/graphql-transformer-core", | ||
"version": "2.5.1-iam-auth-with-identityPool-provider-1.0", | ||
"version": "2.5.1", | ||
"description": "A framework to transform from GraphQL SDL to AWS CloudFormation.", | ||
@@ -31,6 +31,7 @@ "repository": { | ||
"dependencies": { | ||
"@aws-amplify/graphql-transformer-interfaces": "3.4.1-iam-auth-with-identityPool-provider-1.0", | ||
"@aws-amplify/graphql-directives": "1.0.1", | ||
"@aws-amplify/graphql-transformer-interfaces": "3.5.0", | ||
"fs-extra": "^8.1.0", | ||
"graphql": "^15.5.0", | ||
"graphql-transformer-common": "4.28.2-iam-auth-with-identityPool-provider-1.0", | ||
"graphql-transformer-common": "4.29.0", | ||
"hjson": "^3.2.2", | ||
@@ -89,3 +90,3 @@ "lodash": "^4.17.21", | ||
}, | ||
"gitHead": "dafa4bb5ea5cec5dc90b722bf138064897f4f24a" | ||
"gitHead": "ac8990dd06d7b6a29c079e84a7c1e23ec5708fc1" | ||
} |
Sorry, the diff of this file is too big to display
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
626710
5414
1
12
+ Added@aws-amplify/graphql-directives@1.0.1(transitive)
+ Added@aws-amplify/graphql-transformer-interfaces@3.5.0(transitive)
+ Addedgraphql-mapping-template@4.20.15(transitive)
+ Addedgraphql-transformer-common@4.29.0(transitive)
- Removed@aws-amplify/graphql-transformer-interfaces@3.4.1-iam-auth-with-identityPool-provider-1.0(transitive)
- Removedgraphql-mapping-template@4.20.16-iam-auth-with-identityPool-provider-1.0(transitive)
- Removedgraphql-transformer-common@4.28.2-iam-auth-with-identityPool-provider-1.0(transitive)