Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fallback domain in case its not found which causing crash #4

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

dominikmicuta
Copy link
Contributor

Maybe we should even replace this logic and just pass domain from top:
target.entity.find(i => !is.empty(i.domain))?.domain;

@zoe-codez
Copy link
Member

zoe-codez commented Mar 21, 2024

Makes sense, I'm fine passing it in from the top.

I just added some Github workflows to publish if you can bump the version also. Got a few typescript errors that'll pop up in the build

❯ npm run build

> @digital-alchemy/type-writer@0.3.3 build
> rm -rf dist/; tsc

src/type-writer.extension.ts:137:61 - error TS7006: Parameter 'fallbackDomain' implicitly has an 'any' type.

137     function createTarget(target: ServiceListServiceTarget, fallbackDomain) {
                                                                ~~~~~~~~~~~~~~

src/type-writer.extension.ts:175:67 - error TS7006: Parameter 'fallbackDomain' implicitly has an 'any' type.

175     function generateEntityList(target: ServiceListServiceTarget, fallbackDomain) {
                                                                      ~~~~~~~~~~~~~~

function generateEntityList(target: ServiceListServiceTarget) {
function generateEntityList(
target: ServiceListServiceTarget,
fallbackDomain: string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking nit: ALL_DOMAINS or ALL_SERVICE_DOMAINS would be more accurate here

Would matter more for the libraries, fine here

@zoe-codez zoe-codez added the bug Something isn't working label Mar 22, 2024
@zoe-codez zoe-codez merged commit 4da5dfb into main Mar 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants