Skip to content

Commit

Permalink
Merge pull request #74 from hasura/lyndon/prevendor-by-default
Browse files Browse the repository at this point in the history
`preVendor: true` by default
  • Loading branch information
sordina authored Nov 23, 2023
2 parents 34ea797 + 24bca84 commit 40b4189
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ This changelog documents the changes between release versions.

Changes to be included in the next upcoming releaase.

## v0.16

Prevendoring by default.

PR: https://github.com/hasura/ndc-typescript-deno/pull/74

* Using defaults of `{"preVendor": true}` to minimise setup required for development

## v0.15

Updating TypeScript target version from ES2017 to ES2022.
Expand Down
8 changes: 6 additions & 2 deletions src/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const CONFIGURATION_SCHEMA: JSONSchemaObject = {
type: 'string'
},
preVendor: {
description: 'Perform vendoring prior to inference in a sub-process (default: false)',
description: 'Perform vendoring prior to inference in a sub-process (default: true)',
type: 'boolean'
},
schemaMode: {
Expand Down Expand Up @@ -250,7 +250,11 @@ export const connector: sdk.Connector<Configuration, Configuration, State> = {

// TODO: https://github.com/hasura/ndc-typescript-deno/issues/27 Make this add in the defaults
update_configuration(configuration: Configuration): Promise<Configuration> {
return Promise.resolve(configuration);
const defaults = {
preVendor: true,
}
const response = { ...defaults, ...configuration }
return Promise.resolve(response);
},

validate_raw_configuration(configuration: Configuration): Promise<Configuration> {
Expand Down
2 changes: 1 addition & 1 deletion src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ then
fi

# The config is always the same for `connector create`
echo '{"functions": "/functions/index.ts", "vendor": "/functions/vendor", "schemaMode": "READ", "schemaLocation": "/functions/schema.json"}' \
echo '{"functions": "/functions/index.ts", "vendor": "/functions/vendor", "preVendor": false, "schemaMode": "READ", "schemaLocation": "/functions/schema.json"}' \
> /config.json

deno run \
Expand Down

0 comments on commit 40b4189

Please sign in to comment.