From e1d87d61c7e12f3c0bb08bc46da885aaabc36a83 Mon Sep 17 00:00:00 2001 From: Olha Tomylko Date: Wed, 18 Feb 2026 11:15:51 +0100 Subject: [PATCH] build(entitlements): restructure to generate into src directory Align entitlements package with notifications/integrations build pattern: generate TypeScript into src/, add clean-generate and clean-build targets, update tsconfig to target ES2021 for ESM. Regenerated from current OpenAPI spec with no API changes. --- packages/entitlements/custom.d.ts | 1 - packages/entitlements/doc/.nojekyll | 1 - packages/entitlements/doc/README.md | 69 --------- .../entitlements/doc/classes/Configuration.md | 146 ------------------ .../entitlements/doc/classes/ServicesApi.md | 129 ---------------- .../doc/interfaces/ConfigurationParameters.md | 84 ---------- .../doc/interfaces/ServiceDetails.md | 27 ---- packages/entitlements/doc/modules.md | 107 ------------- packages/entitlements/package.json | 26 ++-- packages/entitlements/project.json | 12 +- packages/entitlements/src/.gitignore | 4 + packages/entitlements/src/.npmignore | 6 + .../src/.openapi-generator-ignore | 23 +++ .../{ => src}/.openapi-generator/FILES | 1 + .../{ => src}/.openapi-generator/VERSION | 0 .../{ => src}/ServicesGet/index.ts | 0 packages/entitlements/{ => src}/api.ts | 0 packages/entitlements/{ => src}/index.ts | 2 - .../entitlements/{ => src}/types/index.ts | 0 packages/entitlements/tsconfig.cjs.json | 17 +- packages/entitlements/tsconfig.esm.json | 25 ++- 21 files changed, 92 insertions(+), 588 deletions(-) delete mode 100644 packages/entitlements/custom.d.ts delete mode 100644 packages/entitlements/doc/.nojekyll delete mode 100644 packages/entitlements/doc/README.md delete mode 100644 packages/entitlements/doc/classes/Configuration.md delete mode 100644 packages/entitlements/doc/classes/ServicesApi.md delete mode 100644 packages/entitlements/doc/interfaces/ConfigurationParameters.md delete mode 100644 packages/entitlements/doc/interfaces/ServiceDetails.md delete mode 100644 packages/entitlements/doc/modules.md create mode 100644 packages/entitlements/src/.gitignore create mode 100644 packages/entitlements/src/.npmignore create mode 100644 packages/entitlements/src/.openapi-generator-ignore rename packages/entitlements/{ => src}/.openapi-generator/FILES (78%) rename packages/entitlements/{ => src}/.openapi-generator/VERSION (100%) rename packages/entitlements/{ => src}/ServicesGet/index.ts (100%) rename packages/entitlements/{ => src}/api.ts (100%) rename packages/entitlements/{ => src}/index.ts (67%) rename packages/entitlements/{ => src}/types/index.ts (100%) diff --git a/packages/entitlements/custom.d.ts b/packages/entitlements/custom.d.ts deleted file mode 100644 index 32534cb16..000000000 --- a/packages/entitlements/custom.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'url'; \ No newline at end of file diff --git a/packages/entitlements/doc/.nojekyll b/packages/entitlements/doc/.nojekyll deleted file mode 100644 index e2ac6616a..000000000 --- a/packages/entitlements/doc/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/packages/entitlements/doc/README.md b/packages/entitlements/doc/README.md deleted file mode 100644 index 6c7a234f8..000000000 --- a/packages/entitlements/doc/README.md +++ /dev/null @@ -1,69 +0,0 @@ -@redhat-cloud-services/entitlements-client / [Exports](modules.md) - -# Javascript client for Inventory API -If you want to use [RedHatInsights/entitlements-api](https://github.com/RedHatInsights/entitlements-api) you shouldn't use get requests directly, but rather use this client to integrate with this service. - -## Install -NPM -```bash -npm install --save @redhat-cloud-services/entitlements-client -``` - -Or Yarn -```bash -yarn add @redhat-cloud-services/entitlements-client -``` - -### Usage -This client is using typescript and axios. Types are distributed with this package, so no need to define or install them separately. - -To correctly bootstrap this API you should use this config (no need to define it multiple times, just one config and reimport it anywhere you want to use it). -```JS -// api.js -import axios from 'axios'; -import { ActionApi } from '@redhat-cloud-services/entitlements-client'; -const instance = axios.create(); - -// BASE_PATH should be set in your constants file -const actionAPI = new ActionApi(undefined, BASE_PATH, instance); -export actionAPI; -``` - -If you want to add some interceptors you can use axios build in interceptors -```JS -// api.js -import axios from 'axios'; -import { ActionApi } from '@redhat-cloud-services/entitlements-client'; -const instance = axios.create(); - -// Request interceptor -instance.interceptors.request.use((request) => { - // some logic to do with request -}); - -// Response interceptor -instance.interceptors.response.use((response) => { - // some logic to do with request -}); - -// Error interceptor -instance.interceptors.response.use(null, (error) => { - // some logic to do with error -}); - -// BASE_PATH should be set in your constants file -const actionAPI = new ActionApi(undefined, BASE_PATH, instance); -export actionAPI; -``` - -## Building - -Run `nx build @redhat-cloud-services/entitlements-client` to build the library. - -## Running unit tests - -Run `nx test @redhat-cloud-services/entitlements-client` to execute the unit tests via [Jest](https://jestjs.io). - -## API documentation - -* [README](doc/README.md) diff --git a/packages/entitlements/doc/classes/Configuration.md b/packages/entitlements/doc/classes/Configuration.md deleted file mode 100644 index 82ab8073d..000000000 --- a/packages/entitlements/doc/classes/Configuration.md +++ /dev/null @@ -1,146 +0,0 @@ -[@redhat-cloud-services/entitlements-client](../README.md) / [Exports](../modules.md) / Configuration - -# Class: Configuration - -## Table of contents - -### Constructors - -- [constructor](Configuration.md#constructor) - -### Properties - -- [accessToken](Configuration.md#accesstoken) -- [apiKey](Configuration.md#apikey) -- [baseOptions](Configuration.md#baseoptions) -- [basePath](Configuration.md#basepath) -- [password](Configuration.md#password) -- [username](Configuration.md#username) - -## Constructors - -### constructor - -• **new Configuration**(`param?`): [`Configuration`](Configuration.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `param` | [`ConfigurationParameters`](../interfaces/ConfigurationParameters.md) | - -#### Returns - -[`Configuration`](Configuration.md) - -#### Defined in - -[configuration.ts:67](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L67) - -## Properties - -### accessToken - -• `Optional` **accessToken**: `string` \| (`name?`: `string`, `scopes?`: `string`[]) => `string` - -parameter for oauth2 security - -**`Param`** - -security name - -**`Param`** - -oauth2 scope - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L51) - -___ - -### apiKey - -• `Optional` **apiKey**: `string` \| `Promise`\<`string`\> \| (`name`: `string`) => `string` \| (`name`: `string`) => `Promise`\<`string`\> - -parameter for apiKey security - -**`Param`** - -security name - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:30](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L30) - -___ - -### baseOptions - -• `Optional` **baseOptions**: `any` - -base options for axios calls - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:65](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L65) - -___ - -### basePath - -• `Optional` **basePath**: `string` - -override base path - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:58](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L58) - -___ - -### password - -• `Optional` **password**: `string` - -parameter for basic security - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:44](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L44) - -___ - -### username - -• `Optional` **username**: `string` - -parameter for basic security - -**`Memberof`** - -Configuration - -#### Defined in - -[configuration.ts:37](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L37) diff --git a/packages/entitlements/doc/classes/ServicesApi.md b/packages/entitlements/doc/classes/ServicesApi.md deleted file mode 100644 index 4aec032cf..000000000 --- a/packages/entitlements/doc/classes/ServicesApi.md +++ /dev/null @@ -1,129 +0,0 @@ -[@redhat-cloud-services/entitlements-client](../README.md) / [Exports](../modules.md) / ServicesApi - -# Class: ServicesApi - -ServicesApi - object-oriented interface - -**`Export`** - -ServicesApi - -## Hierarchy - -- `BaseAPI` - - ↳ **`ServicesApi`** - -## Table of contents - -### Constructors - -- [constructor](ServicesApi.md#constructor) - -### Properties - -- [axios](ServicesApi.md#axios) -- [basePath](ServicesApi.md#basepath) -- [configuration](ServicesApi.md#configuration) - -### Methods - -- [servicesGet](ServicesApi.md#servicesget) - -## Constructors - -### constructor - -• **new ServicesApi**(`configuration?`, `basePath?`, `axios?`): [`ServicesApi`](ServicesApi.md) - -#### Parameters - -| Name | Type | Default value | -| :------ | :------ | :------ | -| `configuration?` | [`Configuration`](Configuration.md) | `undefined` | -| `basePath` | `string` | `BASE_PATH` | -| `axios` | `AxiosInstance` | `globalAxios` | - -#### Returns - -[`ServicesApi`](ServicesApi.md) - -#### Inherited from - -BaseAPI.constructor - -#### Defined in - -[base.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/base.ts#L51) - -## Properties - -### axios - -• `Protected` **axios**: `AxiosInstance` = `globalAxios` - -#### Inherited from - -BaseAPI.axios - -#### Defined in - -[base.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/base.ts#L51) - -___ - -### basePath - -• `Protected` **basePath**: `string` = `BASE_PATH` - -#### Inherited from - -BaseAPI.basePath - -#### Defined in - -[base.ts:51](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/base.ts#L51) - -___ - -### configuration - -• `Protected` **configuration**: `undefined` \| [`Configuration`](Configuration.md) - -#### Inherited from - -BaseAPI.configuration - -#### Defined in - -[base.ts:49](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/base.ts#L49) - -## Methods - -### servicesGet - -▸ **servicesGet**(`options?`): `Promise`\<`AxiosResponse`\<\{ `[key: string]`: [`ServiceDetails`](../interfaces/ServiceDetails.md); }, `any`\>\> - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `options?` | `any` | Override http request option. | - -#### Returns - -`Promise`\<`AxiosResponse`\<\{ `[key: string]`: [`ServiceDetails`](../interfaces/ServiceDetails.md); }, `any`\>\> - -**`Summary`** - -get a list of services a user is entitled to - -**`Throws`** - -**`Memberof`** - -ServicesApi - -#### Defined in - -[api.ts:129](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/api.ts#L129) diff --git a/packages/entitlements/doc/interfaces/ConfigurationParameters.md b/packages/entitlements/doc/interfaces/ConfigurationParameters.md deleted file mode 100644 index 9cb63bb23..000000000 --- a/packages/entitlements/doc/interfaces/ConfigurationParameters.md +++ /dev/null @@ -1,84 +0,0 @@ -[@redhat-cloud-services/entitlements-client](../README.md) / [Exports](../modules.md) / ConfigurationParameters - -# Interface: ConfigurationParameters - -Entitlements -Service for determining subscriptions in cloud management [cloud.redhat.com](http://cloud.redhat.com/api/v1/entitlements) - -The version of the OpenAPI document: 1.0.0 -Contact: ihands@redhat.com - -NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -https://openapi-generator.tech -Do not edit the class manually. - -## Table of contents - -### Properties - -- [accessToken](ConfigurationParameters.md#accesstoken) -- [apiKey](ConfigurationParameters.md#apikey) -- [baseOptions](ConfigurationParameters.md#baseoptions) -- [basePath](ConfigurationParameters.md#basepath) -- [password](ConfigurationParameters.md#password) -- [username](ConfigurationParameters.md#username) - -## Properties - -### accessToken - -• `Optional` **accessToken**: `string` \| (`name?`: `string`, `scopes?`: `string`[]) => `string` - -#### Defined in - -[configuration.ts:19](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L19) - -___ - -### apiKey - -• `Optional` **apiKey**: `string` \| `Promise`\<`string`\> \| (`name`: `string`) => `string` \| (`name`: `string`) => `Promise`\<`string`\> - -#### Defined in - -[configuration.ts:16](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L16) - -___ - -### baseOptions - -• `Optional` **baseOptions**: `any` - -#### Defined in - -[configuration.ts:21](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L21) - -___ - -### basePath - -• `Optional` **basePath**: `string` - -#### Defined in - -[configuration.ts:20](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L20) - -___ - -### password - -• `Optional` **password**: `string` - -#### Defined in - -[configuration.ts:18](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L18) - -___ - -### username - -• `Optional` **username**: `string` - -#### Defined in - -[configuration.ts:17](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/configuration.ts#L17) diff --git a/packages/entitlements/doc/interfaces/ServiceDetails.md b/packages/entitlements/doc/interfaces/ServiceDetails.md deleted file mode 100644 index 383bb6d99..000000000 --- a/packages/entitlements/doc/interfaces/ServiceDetails.md +++ /dev/null @@ -1,27 +0,0 @@ -[@redhat-cloud-services/entitlements-client](../README.md) / [Exports](../modules.md) / ServiceDetails - -# Interface: ServiceDetails - -**`Export`** - -ServiceDetails - -## Table of contents - -### Properties - -- [isEntitled](ServiceDetails.md#isentitled) - -## Properties - -### isEntitled - -• `Optional` **isEntitled**: `boolean` - -**`Memberof`** - -ServiceDetails - -#### Defined in - -[api.ts:33](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/api.ts#L33) diff --git a/packages/entitlements/doc/modules.md b/packages/entitlements/doc/modules.md deleted file mode 100644 index 2489cca38..000000000 --- a/packages/entitlements/doc/modules.md +++ /dev/null @@ -1,107 +0,0 @@ -[@redhat-cloud-services/entitlements-client](README.md) / Exports - -# @redhat-cloud-services/entitlements-client - -## Table of contents - -### Classes - -- [Configuration](classes/Configuration.md) -- [ServicesApi](classes/ServicesApi.md) - -### Interfaces - -- [ConfigurationParameters](interfaces/ConfigurationParameters.md) -- [ServiceDetails](interfaces/ServiceDetails.md) - -### Functions - -- [ServicesApiAxiosParamCreator](modules.md#servicesapiaxiosparamcreator) -- [ServicesApiFactory](modules.md#servicesapifactory) -- [ServicesApiFp](modules.md#servicesapifp) - -## Functions - -### ServicesApiAxiosParamCreator - -▸ **ServicesApiAxiosParamCreator**(`configuration?`): `Object` - -ServicesApi - axios parameter creator - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | [`Configuration`](classes/Configuration.md) | - -#### Returns - -`Object` - -| Name | Type | Description | -| :------ | :------ | :------ | -| `servicesGet` | (`options?`: `any`) => `Promise`\<`RequestArgs`\> | - | - -**`Export`** - -#### Defined in - -[api.ts:40](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/api.ts#L40) - -___ - -### ServicesApiFactory - -▸ **ServicesApiFactory**(`configuration?`, `basePath?`, `axios?`): `Object` - -ServicesApi - factory interface - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | [`Configuration`](classes/Configuration.md) | -| `basePath?` | `string` | -| `axios?` | `AxiosInstance` | - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `servicesGet` | (`options?`: `any`) => `AxiosPromise`\<\{ `[key: string]`: [`ServiceDetails`](interfaces/ServiceDetails.md); }\> | - -**`Export`** - -#### Defined in - -[api.ts:101](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/api.ts#L101) - -___ - -### ServicesApiFp - -▸ **ServicesApiFp**(`configuration?`): `Object` - -ServicesApi - functional programming interface - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `configuration?` | [`Configuration`](classes/Configuration.md) | - -#### Returns - -`Object` - -| Name | Type | -| :------ | :------ | -| `servicesGet` | (`options?`: `any`) => `Promise`\<(`axios?`: `AxiosInstance`, `basePath?`: `string`) => `AxiosPromise`\<\{ `[key: string]`: [`ServiceDetails`](interfaces/ServiceDetails.md); }\>\> | - -**`Export`** - -#### Defined in - -[api.ts:79](https://github.com/RedHatInsights/javascript-clients/blob/main/packages/entitlements/api.ts#L79) diff --git a/packages/entitlements/package.json b/packages/entitlements/package.json index 5d080586f..ec26dcdea 100644 --- a/packages/entitlements/package.json +++ b/packages/entitlements/package.json @@ -2,32 +2,32 @@ "name": "@redhat-cloud-services/entitlements-client", "version": "4.0.7", "description": "", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", + "main": "./index.js", + "typings": "./index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/esm/index.js", - "default": "./dist/index.js" + "types": "./index.d.ts", + "import": "./esm/index.js", + "default": "./index.js" }, "./api": { - "types": "./dist/api.d.ts", - "import": "./dist/esm/api.js", - "default": "./dist/api.js" + "types": "./api.d.ts", + "import": "./esm/api.js", + "default": "./api.js" }, "./*": { - "types": "./dist/*/index.d.ts", - "import": "./dist/esm/*/index.js", - "default": "./dist/*/index.js" + "types": "./*/index.d.ts", + "import": "./esm/*/index.js", + "default": "./*/index.js" } }, "typesVersions": { "*": { "api": [ - "./dist/api.d.ts" + "./api.d.ts" ], "*": [ - "./dist/*/index.d.ts" + "./*/index.d.ts" ] } }, diff --git a/packages/entitlements/project.json b/packages/entitlements/project.json index f42c7d4f9..2874118b6 100644 --- a/packages/entitlements/project.json +++ b/packages/entitlements/project.json @@ -4,20 +4,30 @@ "sourceRoot": "packages/entitlements", "projectType": "library", "targets": { + "clean-generate": { + "command": "rm -rf packages/entitlements/src" + }, "generate": { + "dependsOn": ["clean-generate"], "executor": "@redhat-cloud-services/build-utils:client-generator", "options": { + "outputPath": "packages/entitlements/src", "specs": { "default": "https://raw.githubusercontent.com/RedHatInsights/entitlements-api/master/swagger/api.spec.json" }, "clientName": "EntitlementsClient" } }, + "clean-build": { + "command": "rm -rf packages/entitlements/dist" + }, "build": { + "dependsOn": ["clean-build", "^build"], "executor": "@redhat-cloud-services/build-utils:builder", "options": { + "inputPath": "packages/entitlements/src", "outputPath": "packages/entitlements/dist", - "main": "packages/entitlements/index.ts", + "main": "packages/entitlements/src/index.ts", "esmTsConfig": "packages/entitlements/tsconfig.esm.json", "cjsTsConfig": "packages/entitlements/tsconfig.cjs.json" } diff --git a/packages/entitlements/src/.gitignore b/packages/entitlements/src/.gitignore new file mode 100644 index 000000000..149b57654 --- /dev/null +++ b/packages/entitlements/src/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/entitlements/src/.npmignore b/packages/entitlements/src/.npmignore new file mode 100644 index 000000000..6b112e4e7 --- /dev/null +++ b/packages/entitlements/src/.npmignore @@ -0,0 +1,6 @@ +.openapi-generator +node_modules +.openapi-generator-ignore +package-lock.json +*.ts +!*.d.ts diff --git a/packages/entitlements/src/.openapi-generator-ignore b/packages/entitlements/src/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/packages/entitlements/src/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/entitlements/.openapi-generator/FILES b/packages/entitlements/src/.openapi-generator/FILES similarity index 78% rename from packages/entitlements/.openapi-generator/FILES rename to packages/entitlements/src/.openapi-generator/FILES index 13498cde7..df9b5577d 100644 --- a/packages/entitlements/.openapi-generator/FILES +++ b/packages/entitlements/src/.openapi-generator/FILES @@ -1,5 +1,6 @@ .gitignore .npmignore +.openapi-generator-ignore ServicesGet/index.ts api.ts git_push.sh diff --git a/packages/entitlements/.openapi-generator/VERSION b/packages/entitlements/src/.openapi-generator/VERSION similarity index 100% rename from packages/entitlements/.openapi-generator/VERSION rename to packages/entitlements/src/.openapi-generator/VERSION diff --git a/packages/entitlements/ServicesGet/index.ts b/packages/entitlements/src/ServicesGet/index.ts similarity index 100% rename from packages/entitlements/ServicesGet/index.ts rename to packages/entitlements/src/ServicesGet/index.ts diff --git a/packages/entitlements/api.ts b/packages/entitlements/src/api.ts similarity index 100% rename from packages/entitlements/api.ts rename to packages/entitlements/src/api.ts diff --git a/packages/entitlements/index.ts b/packages/entitlements/src/index.ts similarity index 67% rename from packages/entitlements/index.ts rename to packages/entitlements/src/index.ts index 4b569a9ce..6f2a5468d 100644 --- a/packages/entitlements/index.ts +++ b/packages/entitlements/src/index.ts @@ -2,5 +2,3 @@ export { default as servicesGet, type ServicesGetReturnType } from './ServicesGe export * from './types' - -// Trigger release - updated to regenerate clients diff --git a/packages/entitlements/types/index.ts b/packages/entitlements/src/types/index.ts similarity index 100% rename from packages/entitlements/types/index.ts rename to packages/entitlements/src/types/index.ts diff --git a/packages/entitlements/tsconfig.cjs.json b/packages/entitlements/tsconfig.cjs.json index d29a1ef4a..34a67d692 100644 --- a/packages/entitlements/tsconfig.cjs.json +++ b/packages/entitlements/tsconfig.cjs.json @@ -1,6 +1,21 @@ { "extends": "./tsconfig.esm.json", "compilerOptions": { - "module": "CommonJS", + "declaration": true, + "target": "es5", + "module": "commonjs", + "noImplicitAny": true, + "outDir": ".", + "rootDir": ".", + "lib": [ + "es2017", + "dom" + ] }, + "exclude": [ + "dist", + "node_modules", + "*.d.ts", + "jest.config.ts" + ] } diff --git a/packages/entitlements/tsconfig.esm.json b/packages/entitlements/tsconfig.esm.json index 28ffe1d28..d3bf25a51 100644 --- a/packages/entitlements/tsconfig.esm.json +++ b/packages/entitlements/tsconfig.esm.json @@ -1,13 +1,24 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "target": "es2021", + "module": "esnext", + "moduleResolution": "node", "declaration": true, - "types": ["node"], - "module": "ES2015", - "target": "ES5", - "rootDir": "./", + "declarationMap": true, + "noImplicitAny": true, + "outDir": "esm", + "rootDir": ".", + "lib": [ + "es2017", + "dom" + ] }, - "include": ["*.ts", "**/*.ts"], - "exclude": ["jest.config.ts", "dist"] + "include": ["src/**/*.ts"], + "exclude": [ + "dist", + "node_modules", + "*.d.ts", + "jest.config.ts" + ] }