From da2bfcb77ef4e95b12853089ed8bfe81e90db016 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Thu, 7 Nov 2019 16:19:32 -0800 Subject: [PATCH] chore: rename datasource.json files to avoid conflicts with datasource.ts files See https://github.com/microsoft/TypeScript/issues/34761 Signed-off-by: Raymond Feng --- .../integration/shopping-cart.repository.integration.ts | 2 +- .../{mongo.datasource.json => mongo.datasource.config.json} | 0 packages/shopping/src/datasources/mongo.datasource.ts | 2 +- ....datasource.json => recommender-grpc.datasource.config.json} | 0 .../shopping/src/datasources/recommender-grpc.datasource.ts | 2 +- ...ender.datasource.json => recommender.datasource.config.json} | 0 packages/shopping/src/datasources/recommender.datasource.ts | 2 +- .../{redis.datasource.json => redis.datasource.config.json} | 0 packages/shopping/src/datasources/redis.datasource.ts | 2 +- 9 files changed, 5 insertions(+), 5 deletions(-) rename packages/shopping/src/datasources/{mongo.datasource.json => mongo.datasource.config.json} (100%) rename packages/shopping/src/datasources/{recommender-grpc.datasource.json => recommender-grpc.datasource.config.json} (100%) rename packages/shopping/src/datasources/{recommender.datasource.json => recommender.datasource.config.json} (100%) rename packages/shopping/src/datasources/{redis.datasource.json => redis.datasource.config.json} (100%) diff --git a/packages/shopping/src/__tests__/integration/shopping-cart.repository.integration.ts b/packages/shopping/src/__tests__/integration/shopping-cart.repository.integration.ts index c89530e3b..c9f362fc5 100644 --- a/packages/shopping/src/__tests__/integration/shopping-cart.repository.integration.ts +++ b/packages/shopping/src/__tests__/integration/shopping-cart.repository.integration.ts @@ -8,7 +8,7 @@ import {ShoppingCart, ShoppingCartItem} from '../../models'; import {expect} from '@loopback/testlab'; import {RedisDataSource} from '../../datasources'; -const config = require('../../datasources/redis.datasource.json'); +const config = require('../../datasources/redis.datasource.config.json'); describe('ShoppingCart KeyValue Repository', () => { let repo: ShoppingCartRepository; diff --git a/packages/shopping/src/datasources/mongo.datasource.json b/packages/shopping/src/datasources/mongo.datasource.config.json similarity index 100% rename from packages/shopping/src/datasources/mongo.datasource.json rename to packages/shopping/src/datasources/mongo.datasource.config.json diff --git a/packages/shopping/src/datasources/mongo.datasource.ts b/packages/shopping/src/datasources/mongo.datasource.ts index ccba12710..3fc4b50fc 100644 --- a/packages/shopping/src/datasources/mongo.datasource.ts +++ b/packages/shopping/src/datasources/mongo.datasource.ts @@ -5,7 +5,7 @@ import {inject, lifeCycleObserver, ValueOrPromise} from '@loopback/core'; import {juggler, AnyObject} from '@loopback/repository'; -const config = require('./mongo.datasource.json'); +const config = require('./mongo.datasource.config.json'); function updateConfig(dsConfig: AnyObject) { if (process.env.KUBERNETES_SERVICE_HOST) { diff --git a/packages/shopping/src/datasources/recommender-grpc.datasource.json b/packages/shopping/src/datasources/recommender-grpc.datasource.config.json similarity index 100% rename from packages/shopping/src/datasources/recommender-grpc.datasource.json rename to packages/shopping/src/datasources/recommender-grpc.datasource.config.json diff --git a/packages/shopping/src/datasources/recommender-grpc.datasource.ts b/packages/shopping/src/datasources/recommender-grpc.datasource.ts index 7b84063de..a3f677d78 100644 --- a/packages/shopping/src/datasources/recommender-grpc.datasource.ts +++ b/packages/shopping/src/datasources/recommender-grpc.datasource.ts @@ -2,7 +2,7 @@ import {inject} from '@loopback/core'; import {juggler, AnyObject} from '@loopback/repository'; import * as path from 'path'; -const config = require('./recommender-grpc.datasource.json'); +const config = require('./recommender-grpc.datasource.config.json'); function updateConfig(dsConfig: AnyObject) { if ( diff --git a/packages/shopping/src/datasources/recommender.datasource.json b/packages/shopping/src/datasources/recommender.datasource.config.json similarity index 100% rename from packages/shopping/src/datasources/recommender.datasource.json rename to packages/shopping/src/datasources/recommender.datasource.config.json diff --git a/packages/shopping/src/datasources/recommender.datasource.ts b/packages/shopping/src/datasources/recommender.datasource.ts index ae330abac..f99b1f837 100644 --- a/packages/shopping/src/datasources/recommender.datasource.ts +++ b/packages/shopping/src/datasources/recommender.datasource.ts @@ -5,7 +5,7 @@ import {inject} from '@loopback/core'; import {juggler, AnyObject} from '@loopback/repository'; -const config = require('./recommender.datasource.json'); +const config = require('./recommender.datasource.config.json'); function updateConfig(dsConfig: AnyObject) { if (process.env.KUBERNETES_SERVICE_HOST) { diff --git a/packages/shopping/src/datasources/redis.datasource.json b/packages/shopping/src/datasources/redis.datasource.config.json similarity index 100% rename from packages/shopping/src/datasources/redis.datasource.json rename to packages/shopping/src/datasources/redis.datasource.config.json diff --git a/packages/shopping/src/datasources/redis.datasource.ts b/packages/shopping/src/datasources/redis.datasource.ts index 4ccda9cdf..f288032b9 100644 --- a/packages/shopping/src/datasources/redis.datasource.ts +++ b/packages/shopping/src/datasources/redis.datasource.ts @@ -5,7 +5,7 @@ import {inject, lifeCycleObserver, ValueOrPromise} from '@loopback/core'; import {juggler, AnyObject} from '@loopback/repository'; -const config = require('./redis.datasource.json'); +const config = require('./redis.datasource.config.json'); function updateConfig(dsConfig: AnyObject) { if (process.env.KUBERNETES_SERVICE_HOST) {