From 33207801329ffb786c5b10570897fff9c8d50b11 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Tue, 5 Nov 2019 14:14:32 -0800 Subject: [PATCH] feat(cli): generate datasource json with '.config.json` extension Workaround for https://github.com/microsoft/TypeScript/issues/34761 --- docs/site/DataSource-generator.md | 2 +- docs/site/DataSources.md | 4 ++-- docs/site/Inside-Loopback-Application.md | 4 ++-- docs/site/Repositories.md | 8 ++++---- docs/site/Testing-your-application.md | 2 +- docs/site/deployment/Deploying-to-IBM-Cloud.md | 10 +++++----- .../soap-calculator-tutorial-add-datasource.md | 6 +++--- docs/site/tutorials/todo/todo-tutorial-datasource.md | 2 +- .../tutorials/todo/todo-tutorial-geocoding-service.md | 4 ++-- .../datasources/{ds.datasource.json => ds.config.json} | 0 .../src/datasources/ds.datasource.ts | 2 +- ...lculator.datasource.json => calculator.config.json} | 0 .../src/datasources/calculator.datasource.ts | 2 +- .../datasources/{db.datasource.json => db.config.json} | 0 examples/todo-list/src/datasources/db.datasource.ts | 2 +- examples/todo/src/__tests__/helpers.ts | 2 +- .../datasources/{db.datasource.json => db.config.json} | 0 examples/todo/src/datasources/db.datasource.ts | 2 +- .../{geocoder.datasource.json => geocoder.config.json} | 0 examples/todo/src/datasources/geocoder.datasource.ts | 4 ++-- packages/cli/generators/datasource/index.js | 2 +- packages/cli/lib/utils.js | 2 +- .../generators/datasource.integration.snapshots.js | 10 +++++----- packages/cli/test/fixtures/relation/index.js | 10 +++++----- packages/cli/test/fixtures/repository/index.js | 10 +++++----- packages/cli/test/fixtures/service/index.js | 8 ++++---- .../integration/generators/datasource.integration.js | 2 +- .../integration/generators/repository.integration.js | 1 + packages/cli/test/unit/utils.unit.js | 2 +- 29 files changed, 52 insertions(+), 51 deletions(-) rename examples/express-composition/src/datasources/{ds.datasource.json => ds.config.json} (100%) rename examples/soap-calculator/src/datasources/{calculator.datasource.json => calculator.config.json} (100%) rename examples/todo-list/src/datasources/{db.datasource.json => db.config.json} (100%) rename examples/todo/src/datasources/{db.datasource.json => db.config.json} (100%) rename examples/todo/src/datasources/{geocoder.datasource.json => geocoder.config.json} (100%) diff --git a/docs/site/DataSource-generator.md b/docs/site/DataSource-generator.md index 8f06ec99e3bd..140c2c50fd98 100644 --- a/docs/site/DataSource-generator.md +++ b/docs/site/DataSource-generator.md @@ -51,7 +51,7 @@ Once all the prompts have been answered, the CLI will do the following: - Install `@loopback/repository` and the connector package (if it's not a custom connector). - Create a file with the connector configuration as follows: - `/src/datasources/${dataSource.dataSourceName}.datasource.json` + `/src/datasources/${dataSource.dataSourceName}.config.json` - Create a DataSource class which recieves the connector config using [Dependency Injection](Dependency-injection.md) as follows: `/src/datasources/${dataSource.dataSourceName}.datasource.ts` diff --git a/docs/site/DataSources.md b/docs/site/DataSources.md index a57875509c78..f517501c4223 100644 --- a/docs/site/DataSources.md +++ b/docs/site/DataSources.md @@ -20,7 +20,7 @@ It is recommended to use the [`lb4 datasource` command](DataSource-generator.md) provided by the CLI to generate a DataSource. The CLI will prompt for all necessary connector information and create the following files: -- `${dataSource.dataSourceName}.datasource.json` containing the connector +- `${dataSource.dataSourceName}.config.json` containing the connector configuration - `${dataSource.dataSourceName}.datasource.ts` containing a class extending `juggler.DataSource`. This class can be used to override the default @@ -37,7 +37,7 @@ Example DataSource Class: ```ts import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './db.datasource.json'; +import * as config from './db.config.json'; export class DbDataSource extends juggler.DataSource { static dataSourceName = 'db'; diff --git a/docs/site/Inside-Loopback-Application.md b/docs/site/Inside-Loopback-Application.md index 3007cd6ad7c4..7b64f4c58b57 100644 --- a/docs/site/Inside-Loopback-Application.md +++ b/docs/site/Inside-Loopback-Application.md @@ -258,9 +258,9 @@ We need appropriate drivers to connect with the backend datasources. > to provide easy to use CRUD operations and connection configurations. In the example, -[Redis datasource definition](https://github.com/strongloop/loopback4-example-shopping/blob/master/packages/shopping/src/datasources/redis.datasource.json) +[Redis datasource definition](https://github.com/strongloop/loopback4-example-shopping/blob/master/packages/shopping/src/datasources/redis.config.json) uses the LoopBack `kv-redis` connector and -[MongoDB datasource definition](https://github.com/strongloop/loopback4-example-shopping/blob/master/packages/shopping/src/datasources/mongo.datasource.json) +[MongoDB datasource definition](https://github.com/strongloop/loopback4-example-shopping/blob/master/packages/shopping/src/datasources/mongo.config.json) uses the LoopBack `mongodb` connector. ## Application startup diff --git a/docs/site/Repositories.md b/docs/site/Repositories.md index f296cab91411..ae5c0a516bd1 100644 --- a/docs/site/Repositories.md +++ b/docs/site/Repositories.md @@ -312,7 +312,7 @@ better flexibility, we split the datasource definition into two files. The json file captures the configuration properties and it can be possibly overridden by dependency injection. -1. redis.datasource.json +1. redis.config.json ```json { @@ -328,14 +328,14 @@ dependency injection. 2. redis.datasource.ts The class uses a configuration object to set up a datasource for the Redis -instance. By default, the configuration is loaded from `redis.datasource.json`. -We can override it by binding a new object to `datasources.config.redis` for a +instance. By default, the configuration is loaded from `redis.config.json`. We +can override it by binding a new object to `datasources.config.redis` for a context. ```ts import {inject} from '@loopback/core'; import {juggler, AnyObject} from '@loopback/repository'; -import * as config from './redis.datasource.json'; +import * as config from './redis.config.json'; export class RedisDataSource extends juggler.DataSource { static dataSourceName = 'redis'; diff --git a/docs/site/Testing-your-application.md b/docs/site/Testing-your-application.md index 3c7f087798d9..428b5d1d0860 100644 --- a/docs/site/Testing-your-application.md +++ b/docs/site/Testing-your-application.md @@ -740,7 +740,7 @@ instance: ```ts import {merge} from 'lodash'; -import * as GEO_CODER_CONFIG from '../datasources/geo.datasource.json'; +import * as GEO_CODER_CONFIG from '../datasources/geo.config.json'; function givenGeoService() { const config = merge({}, GEO_CODER_CONFIG, { diff --git a/docs/site/deployment/Deploying-to-IBM-Cloud.md b/docs/site/deployment/Deploying-to-IBM-Cloud.md index d6be47f03eb7..09b0a0d70d71 100644 --- a/docs/site/deployment/Deploying-to-IBM-Cloud.md +++ b/docs/site/deployment/Deploying-to-IBM-Cloud.md @@ -69,10 +69,10 @@ Cloudant connector, so data is persisted. ### Step 3: Updating your DataSource -Update `db.datasource.json` to use the Cloudant connector. The value for the -`url` property is just a placeholder and does not need to have the correct -credential because we will be binding the app with the Cloudant service once -it's pushed to IBM Cloud. +Update `db.config.json` to use the Cloudant connector. The value for the `url` +property is just a placeholder and does not need to have the correct credential +because we will be binding the app with the Cloudant service once it's pushed to +IBM Cloud. ```js { @@ -106,7 +106,7 @@ $ npm i loopback-connector-cloudant import {TodoListApplication} from './application'; import {ApplicationConfig} from '@loopback/core'; // --------- ADD THIS SNIPPET --------- - const datasourceDb = require('./datasources/db.datasource.json'); + const datasourceDb = require('./datasources/db.config.json'); const cfenv = require('cfenv'); const appEnv = cfenv.getAppEnv(); // --------- ADD THIS SNIPPET --------- diff --git a/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-add-datasource.md b/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-add-datasource.md index 3a4e72d95325..fb3b99289843 100644 --- a/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-add-datasource.md +++ b/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-add-datasource.md @@ -67,7 +67,7 @@ JSON configuration file and a .ts file with the Datasource name and added an entry inside the index.ts file. ```sh - create src/datasources/calculator.datasource.json + create src/datasources/calculator.config.json create src/datasources/calculator.datasource.ts update src/datasources/index.ts @@ -103,10 +103,10 @@ bind the Node.js method _Multiply_. } ``` -Edit the file `src/datasources/calculator.datasource.json` and add the following +Edit the file `src/datasources/calculator.config.json` and add the following configuration after the `remoteEnabled: true,` property as follows: -{% include code-caption.html content="src/datasources/calculator.datasource.json" %} +{% include code-caption.html content="src/datasources/calculator.config.json" %} ```ts "operations": { diff --git a/docs/site/tutorials/todo/todo-tutorial-datasource.md b/docs/site/tutorials/todo/todo-tutorial-datasource.md index 872a6f261880..f83de75316be 100644 --- a/docs/site/tutorials/todo/todo-tutorial-datasource.md +++ b/docs/site/tutorials/todo/todo-tutorial-datasource.md @@ -39,7 +39,7 @@ lb4 datasource ? window.localStorage key to use for persistence (browser only): ? Full path to file for persistence (server only): ./data/db.json - create src/datasources/db.datasource.json + create src/datasources/db.config.json create src/datasources/db.datasource.ts update src/datasources/index.ts diff --git a/docs/site/tutorials/todo/todo-tutorial-geocoding-service.md b/docs/site/tutorials/todo/todo-tutorial-geocoding-service.md index 19798dfc92f2..e4441fd45600 100644 --- a/docs/site/tutorials/todo/todo-tutorial-geocoding-service.md +++ b/docs/site/tutorials/todo/todo-tutorial-geocoding-service.md @@ -47,7 +47,7 @@ $ lb4 datasource ? Default options for the request: ? An array of operation templates: ? Use default CRUD mapping: No - create src/datasources/geocoder.datasource.json + create src/datasources/geocoder.config.json create src/datasources/geocoder.datasource.ts # npm will install dependencies now update src/datasources/index.ts @@ -59,7 +59,7 @@ Edit the newly created datasource configuration to configure Geocoder API endpoints. Configuration options provided by REST Connector are described in our docs here: [REST connector](/doc/en/lb3/REST-connector.html). -{% include code-caption.html content="/src/datasources/geocoder.datasource.json" %} +{% include code-caption.html content="/src/datasources/geocoder.config.json" %} ```json { diff --git a/examples/express-composition/src/datasources/ds.datasource.json b/examples/express-composition/src/datasources/ds.config.json similarity index 100% rename from examples/express-composition/src/datasources/ds.datasource.json rename to examples/express-composition/src/datasources/ds.config.json diff --git a/examples/express-composition/src/datasources/ds.datasource.ts b/examples/express-composition/src/datasources/ds.datasource.ts index 66534a4a928f..0505694f3c25 100644 --- a/examples/express-composition/src/datasources/ds.datasource.ts +++ b/examples/express-composition/src/datasources/ds.datasource.ts @@ -5,7 +5,7 @@ import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './ds.datasource.json'; +import * as config from './ds.config.json'; export class DsDataSource extends juggler.DataSource { static dataSourceName = 'ds'; diff --git a/examples/soap-calculator/src/datasources/calculator.datasource.json b/examples/soap-calculator/src/datasources/calculator.config.json similarity index 100% rename from examples/soap-calculator/src/datasources/calculator.datasource.json rename to examples/soap-calculator/src/datasources/calculator.config.json diff --git a/examples/soap-calculator/src/datasources/calculator.datasource.ts b/examples/soap-calculator/src/datasources/calculator.datasource.ts index 84d4b16b4f12..e54bcb4e7025 100644 --- a/examples/soap-calculator/src/datasources/calculator.datasource.ts +++ b/examples/soap-calculator/src/datasources/calculator.datasource.ts @@ -5,7 +5,7 @@ import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './calculator.datasource.json'; +import * as config from './calculator.config.json'; export class CalculatorDataSource extends juggler.DataSource { static dataSourceName = 'calculator'; diff --git a/examples/todo-list/src/datasources/db.datasource.json b/examples/todo-list/src/datasources/db.config.json similarity index 100% rename from examples/todo-list/src/datasources/db.datasource.json rename to examples/todo-list/src/datasources/db.config.json diff --git a/examples/todo-list/src/datasources/db.datasource.ts b/examples/todo-list/src/datasources/db.datasource.ts index f97cc8ad360b..ea1a71234e79 100644 --- a/examples/todo-list/src/datasources/db.datasource.ts +++ b/examples/todo-list/src/datasources/db.datasource.ts @@ -5,7 +5,7 @@ import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './db.datasource.json'; +import * as config from './db.config.json'; export class DbDataSource extends juggler.DataSource { static dataSourceName = 'db'; diff --git a/examples/todo/src/__tests__/helpers.ts b/examples/todo/src/__tests__/helpers.ts index 0928f9c695e3..6f51ff5cbf31 100644 --- a/examples/todo/src/__tests__/helpers.ts +++ b/examples/todo/src/__tests__/helpers.ts @@ -6,7 +6,7 @@ import {HttpCachingProxy} from '@loopback/http-caching-proxy'; import {merge} from 'lodash'; import * as path from 'path'; -import * as GEO_CODER_CONFIG from '../datasources/geocoder.datasource.json'; +import * as GEO_CODER_CONFIG from '../datasources/geocoder.config.json'; import {Todo} from '../models/index'; import {GeocoderService, GeoPoint} from '../services/geocoder.service'; diff --git a/examples/todo/src/datasources/db.datasource.json b/examples/todo/src/datasources/db.config.json similarity index 100% rename from examples/todo/src/datasources/db.datasource.json rename to examples/todo/src/datasources/db.config.json diff --git a/examples/todo/src/datasources/db.datasource.ts b/examples/todo/src/datasources/db.datasource.ts index 155368826c50..4ca6b837573d 100644 --- a/examples/todo/src/datasources/db.datasource.ts +++ b/examples/todo/src/datasources/db.datasource.ts @@ -5,7 +5,7 @@ import {inject} from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './db.datasource.json'; +import * as config from './db.config.json'; export class DbDataSource extends juggler.DataSource { static dataSourceName = 'db'; diff --git a/examples/todo/src/datasources/geocoder.datasource.json b/examples/todo/src/datasources/geocoder.config.json similarity index 100% rename from examples/todo/src/datasources/geocoder.datasource.json rename to examples/todo/src/datasources/geocoder.config.json diff --git a/examples/todo/src/datasources/geocoder.datasource.ts b/examples/todo/src/datasources/geocoder.datasource.ts index b391a9005d78..61cf602f95d3 100644 --- a/examples/todo/src/datasources/geocoder.datasource.ts +++ b/examples/todo/src/datasources/geocoder.datasource.ts @@ -4,8 +4,8 @@ // License text available at https://opensource.org/licenses/MIT import {inject} from '@loopback/core'; -import {juggler, AnyObject} from '@loopback/repository'; -import * as config from './geocoder.datasource.json'; +import {AnyObject, juggler} from '@loopback/repository'; +import * as config from './geocoder.config.json'; export class GeocoderDataSource extends juggler.DataSource { static dataSourceName = 'geocoder'; diff --git a/packages/cli/generators/datasource/index.js b/packages/cli/generators/datasource/index.js index 01ca9d981794..1a9f1da8c80a 100644 --- a/packages/cli/generators/datasource/index.js +++ b/packages/cli/generators/datasource/index.js @@ -240,7 +240,7 @@ module.exports = class DataSourceGenerator extends ArtifactGenerator { this.artifactInfo.className = utils.toClassName(this.artifactInfo.name); this.artifactInfo.fileName = utils.toFileName(this.artifactInfo.name); // prettier-ignore - this.artifactInfo.jsonFileName = `${this.artifactInfo.fileName}.datasource.json`; + this.artifactInfo.jsonFileName = `${this.artifactInfo.fileName}.config.json`; // prettier-ignore this.artifactInfo.outFile = `${this.artifactInfo.fileName}.datasource.ts`; diff --git a/packages/cli/lib/utils.js b/packages/cli/lib/utils.js index 253b081a7dd2..158b1b4a1f7a 100644 --- a/packages/cli/lib/utils.js +++ b/packages/cli/lib/utils.js @@ -562,7 +562,7 @@ exports.getDataSourceName = function(datasourcesDir, dataSourceClass) { exports.dataSourceToJSONFileName = function(dataSourceClass) { return path.join( - toFileName(dataSourceClass.replace('Datasource', '')) + '.datasource.json', + toFileName(dataSourceClass.replace('Datasource', '')) + '.config.json', ); }; diff --git a/packages/cli/snapshots/integration/generators/datasource.integration.snapshots.js b/packages/cli/snapshots/integration/generators/datasource.integration.snapshots.js index 1d6aad76aff4..1f15e802d076 100644 --- a/packages/cli/snapshots/integration/generators/datasource.integration.snapshots.js +++ b/packages/cli/snapshots/integration/generators/datasource.integration.snapshots.js @@ -15,7 +15,7 @@ import { ValueOrPromise, } from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './ds.datasource.json'; +import * as config from './ds.config.json'; @lifeCycleObserver('datasource') export class DsDataSource extends juggler.DataSource @@ -56,7 +56,7 @@ import { ValueOrPromise, } from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './ds.datasource.json'; +import * as config from './ds.config.json'; @lifeCycleObserver('datasource') export class DsDataSource extends juggler.DataSource @@ -97,7 +97,7 @@ import { ValueOrPromise, } from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './ds.datasource.json'; +import * as config from './ds.config.json'; @lifeCycleObserver('datasource') export class DsDataSource extends juggler.DataSource @@ -138,7 +138,7 @@ import { ValueOrPromise, } from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './ds.datasource.json'; +import * as config from './ds.config.json'; @lifeCycleObserver('datasource') export class DsDataSource extends juggler.DataSource @@ -179,7 +179,7 @@ import { ValueOrPromise, } from '@loopback/core'; import {juggler} from '@loopback/repository'; -import * as config from './ds.datasource.json'; +import * as config from './ds.config.json'; @lifeCycleObserver('datasource') export class DsDataSource extends juggler.DataSource diff --git a/packages/cli/test/fixtures/relation/index.js b/packages/cli/test/fixtures/relation/index.js index 5c1f42baf1ed..a6c48d9df701 100644 --- a/packages/cli/test/fixtures/relation/index.js +++ b/packages/cli/test/fixtures/relation/index.js @@ -108,7 +108,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'dbkv.datasource.json', + file: 'dbkv.config.json', content: JSON.stringify({ name: 'dbkv', connector: 'kv-redis', @@ -121,7 +121,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'dbmem.datasource.json', + file: 'dbmem.config.json', content: JSON.stringify({ name: 'dbmem', connector: 'memory', @@ -129,7 +129,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'my-ds.datasource.json', + file: 'my-ds.config.json', content: JSON.stringify({ name: 'MyDS', connector: 'memory', @@ -142,7 +142,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'restdb.datasource.json', + file: 'restdb.config.json', content: JSON.stringify({ name: 'restdb', connector: 'rest', @@ -150,7 +150,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'sqlite3.datasource.json', + file: 'sqlite3.config.json', content: JSON.stringify({ name: 'sqlite3', connector: 'loopback-connector-sqlite3', diff --git a/packages/cli/test/fixtures/repository/index.js b/packages/cli/test/fixtures/repository/index.js index 835f97dab984..e75fe2419021 100644 --- a/packages/cli/test/fixtures/repository/index.js +++ b/packages/cli/test/fixtures/repository/index.js @@ -21,7 +21,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'dbkv.datasource.json', + file: 'dbkv.config.json', content: JSON.stringify({ name: 'dbkv', connector: 'kv-redis', @@ -34,7 +34,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'dbmem.datasource.json', + file: 'dbmem.config.json', content: JSON.stringify({ name: 'dbmem', connector: 'memory', @@ -42,7 +42,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'my-ds.datasource.json', + file: 'my-ds.config.json', content: JSON.stringify({ name: 'MyDS', connector: 'memory', @@ -55,7 +55,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'restdb.datasource.json', + file: 'restdb.config.json', content: JSON.stringify({ name: 'restdb', connector: 'rest', @@ -63,7 +63,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'sqlite3.datasource.json', + file: 'sqlite3.config.json', content: JSON.stringify({ name: 'sqlite3', connector: 'loopback-connector-sqlite3', diff --git a/packages/cli/test/fixtures/service/index.js b/packages/cli/test/fixtures/service/index.js index c53ecf131b2f..4c264a5ce0a5 100644 --- a/packages/cli/test/fixtures/service/index.js +++ b/packages/cli/test/fixtures/service/index.js @@ -26,7 +26,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'myds.datasource.json', + file: 'myds.config.json', content: JSON.stringify({ name: 'myds', connector: 'soap', @@ -34,7 +34,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'map-ds.datasource.json', + file: 'map-ds.config.json', content: JSON.stringify({ name: 'MapDS', connector: 'soap', @@ -47,7 +47,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'dbmem.datasource.json', + file: 'dbmem.config.json', content: JSON.stringify({ name: 'dbmem', connector: 'memory', @@ -60,7 +60,7 @@ exports.SANDBOX_FILES = [ }, { path: DATASOURCE_APP_PATH, - file: 'restdb.datasource.json', + file: 'restdb.config.json', content: JSON.stringify({ name: 'restdb', connector: 'rest', diff --git a/packages/cli/test/integration/generators/datasource.integration.js b/packages/cli/test/integration/generators/datasource.integration.js index 9e2e858fd0f9..e3aeda7c7222 100644 --- a/packages/cli/test/integration/generators/datasource.integration.js +++ b/packages/cli/test/integration/generators/datasource.integration.js @@ -64,7 +64,7 @@ const expectedTSFile = path.join( const expectedJSONFile = path.join( SANDBOX_PATH, - 'src/datasources/ds.datasource.json', + 'src/datasources/ds.config.json', ); const expectedIndexFile = path.join(SANDBOX_PATH, 'src/datasources/index.ts'); diff --git a/packages/cli/test/integration/generators/repository.integration.js b/packages/cli/test/integration/generators/repository.integration.js index 8b50e44172e9..11fdb3c8a1ea 100644 --- a/packages/cli/test/integration/generators/repository.integration.js +++ b/packages/cli/test/integration/generators/repository.integration.js @@ -328,6 +328,7 @@ describe('lb4 repository', function() { const files = SANDBOX_FILES.filter( e => e.path !== 'src/datasources' || + e.file.includes('sqlite3.config.') || e.file.includes('sqlite3.datasource.'), ); const basicPrompt = { diff --git a/packages/cli/test/unit/utils.unit.js b/packages/cli/test/unit/utils.unit.js index c7bbbccd516e..e02b083e9e65 100644 --- a/packages/cli/test/unit/utils.unit.js +++ b/packages/cli/test/unit/utils.unit.js @@ -495,7 +495,7 @@ describe('Utils', () => { describe('dataSourceToJSONFileName', () => { it('returns the datasource json file name', () => { expect(utils.dataSourceToJSONFileName('MapDS')).to.equal( - 'map-ds.datasource.json', + 'map-ds.config.json', ); }); });