From 449ec982888ba6d53c65552474e701b9bd2b1496 Mon Sep 17 00:00:00 2001 From: xadil Date: Mon, 20 May 2024 17:21:46 +0400 Subject: [PATCH] fix(api): removes hardcoding and add configured path for breaker config --- lib/typescript-fetch/api.mustache | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/typescript-fetch/api.mustache b/lib/typescript-fetch/api.mustache index 5661c4c..6e97414 100644 --- a/lib/typescript-fetch/api.mustache +++ b/lib/typescript-fetch/api.mustache @@ -10,7 +10,7 @@ import { Configuration } from "./configuration"; {{#dataSourceImportString}}import { {{dataSourceName}} } from '{{dataSourceImportString}}';{{/dataSourceImportString}} {{#withCircuitBreaker}} {{^circuitBreakerImportString}}import { circuitBreaker, handleWhen, SamplingBreaker } from 'cockatiel'{{/circuitBreakerImportString}} -{{#circuitBreakerImportString}}import { {{circuitBreakerConfigFn}} } from '@app/circuit-breakers/CircuitBreakerConfig'{{/circuitBreakerImportString}} +{{#circuitBreakerImportString}}import { {{circuitBreakerConfigFn}} } from '{{ circuitBreakerImportString }}'{{/circuitBreakerImportString}} {{/withCircuitBreaker}} type GenericObject = {} diff --git a/package-lock.json b/package-lock.json index 549e031..73a4966 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "chimp-datasources-generator", + "name": "@alefeducation/chimp-datasources-generator", "version": "0.0.0-development", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "chimp-datasources-generator", + "name": "@alefeducation/chimp-datasources-generator", "version": "0.0.0-development", "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 066cca7..4c381c8 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "jest", "lint": "eslint \"lib/**/*.js\" --quiet", "semantic-release": "semantic-release", - "generate-sample": "node ./lib/chimp-datasources-generator.js create ./sample-apis/generated/petstore sample-apis/api-spec/petstore.json -ds \"@app/apis/BaseDataSource#BaseDataSource\" -cb -cbc \"@app/circuit-breakers/CircuitBreakerConfig#getServiceCircuitBreaker\"" + "generate-sample": "node ./lib/chimp-datasources-generator.js create ./sample-apis/generated/petstore sample-apis/api-spec/petstore.json -ds \"@app/apis/BaseDataSource#BaseDataSource\" -cb true -cbc \"@app/circuitBreakers/CircuitBreakerConfig#getServiceCircuitBreaker\"" }, "repository": { "type": "git",