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

Monorepo setup #1

Merged
merged 19 commits into from
May 29, 2023
Merged

Monorepo setup #1

merged 19 commits into from
May 29, 2023

Conversation

konraddysput
Copy link
Collaborator

Why

This diff adds monorepo basic setup to the repository.

@konraddysput konraddysput added the enhancement New feature or request label May 26, 2023
@konraddysput konraddysput added this to the 1.0.0 milestone May 26, 2023
@konraddysput konraddysput requested a review from perf2711 May 26, 2023 12:58
@konraddysput konraddysput self-assigned this May 26, 2023
Comment on lines 5 to 51
export type BacktraceBasicSubmissionInformation = {
/**
* The server address (submission URL) is required to submit exceptions from your project to your Backtrace instance.
*
* The Server Address must be in the following format: https://submit.backtrace.io/{subdomain}/{submission-token}/json.
*/
url: string;
timeout?: number;
ignoreSslCertificate?: boolean;
};
export type BacktraceLegacySubmitInformation = BacktraceBasicSubmissionInformation & { token: string };
export type BacktraceSubmissionInformation = BacktraceBasicSubmissionInformation | BacktraceLegacySubmitInformation;

export type BacktraceMetricsSupport = {
metricsSubmissionUrl?: string;
enable: boolean;
ignoreSslCertificate?: boolean;
/**
* Indicates how often crash free metrics are sent to Backtrace.
* By default, session events are sent on application startup/finish, and every 30 minutes while the game is running.
*/
autoSendInterval?: number;
};

export type BasicBacktraceClientSettings = BacktraceBasicSubmissionInformation & {
/**
* Limits the number of reports the client will send per minute. If set to '0', there is no limit.
* If set to a value greater than '0' and the value is reached, the client will not send any reports until the next minute.
*/
rateLimit: number;
/**
* Attributes are additional metadata that can be attached to error and crash reports. You can use attributes to filter,
* aggregate, analyze, and debug errors in the Backtrace console.
*/
userAttributes?: Record<string, unknown>;
/**
* Attachments are additional files/data that can be send with error to Backtrace.
*/
attachments?: BacktraceAttachment[];

/**
* Metrics such as crash free users and crash free sessions
*/
metrics?: BacktraceMetricsSupport;
};

export type BacktraceConfiguration = BasicBacktraceClientSettings & BacktraceDatabaseConfiguration;
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we not using interface here in these options (not the union ones)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why should we? Do we want to inherit from them? Is there any better reason to use interface than type?

Copy link
Contributor

Choose a reason for hiding this comment

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

it seems more suitable to use an interface to define an object contract. I would use type to define a type alias, like type BacktraceConfiguration = BasicBacktraceClientSettings & BacktraceDatabaseConfiguration;, or type Key = string | number.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pushed adjusted code base on our conversation

@konraddysput konraddysput merged commit 68ef1d8 into dev May 29, 2023
konraddysput added a commit that referenced this pull request May 29, 2023
* Monorepo setup

* Package rename

* Code review adjustements

* Sdk core rename

* Use unknown instead of any

* Rename method

* Added missing commands

* Configuration changes

* database as an option of a client

* Merge client settings

* Basic Backtrace configuration settings union

* Optional token

* Remove legacy - use direct submission url instead

* Interface rename

* Optional rate limit

* Deduplication settings

* Retry interval in ms instead of sec

* Report getters

* Use fields as attachments/attributes in the report object
konraddysput added a commit that referenced this pull request May 30, 2023
commit 411e7f5
Merge: 68ef1d8 c366034
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 15:50:49 2023 +0200

    Merge branch 'feature/monorepo-setup' into dev

commit c366034
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 13:12:04 2023 +0200

    Test setup (#2)

commit 68ef1d8
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 13:11:27 2023 +0200

    Monorepo setup (#1)

    * Monorepo setup

    * Package rename

    * Code review adjustements

    * Sdk core rename

    * Use unknown instead of any

    * Rename method

    * Added missing commands

    * Configuration changes

    * database as an option of a client

    * Merge client settings

    * Basic Backtrace configuration settings union

    * Optional token

    * Remove legacy - use direct submission url instead

    * Interface rename

    * Optional rate limit

    * Deduplication settings

    * Retry interval in ms instead of sec

    * Report getters

    * Use fields as attachments/attributes in the report object

commit 13eb7aa
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 13:08:29 2023 +0200

    Use fields as attachments/attributes in the report object

commit 3825fba
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 13:01:35 2023 +0200

    Report getters

commit 0c7e62d
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 13:01:16 2023 +0200

    Retry interval in ms instead of sec

commit 8b34c72
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:57:49 2023 +0200

    Deduplication settings

commit 4328c3c
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:52:38 2023 +0200

    Optional rate limit

commit 889277c
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:47:55 2023 +0200

    Interface rename

commit 6abd107
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:47:24 2023 +0200

    Remove legacy - use direct submission url instead

commit d84df8a
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:45:12 2023 +0200

    Optional token

commit 3eca08e
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:38:03 2023 +0200

    Basic Backtrace configuration settings union

commit 7506c02
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:27:40 2023 +0200

    Merge client settings

commit 9309487
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 12:26:02 2023 +0200

    database as an option of a client

commit ce82a24
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 11:55:29 2023 +0200

    Configuration changes

commit 6674401
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 10:58:57 2023 +0200

    Added missing commands

commit 433f23b
Author: Konrad Dysput <[email protected]>
Date:   Mon May 29 10:45:50 2023 +0200

    Rename method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants