-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: migration to SDK #170
feat: migration to SDK #170
Conversation
Simplify code by replacing EnvConfigType with EnvConfig and refactor to use createPlugin.
Replace module-specific configurations with context plugin.
Simplify code by replacing EnvConfigType with EnvConfig and refactor to use createPlugin.
# Conflicts: # src/parser/permit-generation-module.ts # src/run.ts
Deleted github-comment-module-instance.ts, octokit.ts, and yarn.lock to clean up unused code.
Deleted config-reader and logger modules, simplifying configuration handling.
Reorganized imports to source BaseModule from module types instead of processor.
Reorganized imports to source BaseModule from module types instead of processor.
Swapped console.warn with logger.error for better logging, simplified issue payload.
Changed `dev` script to `bun --watch`, added new config to `issue.http`.
Add ContextPlugin type imports and instantiate testing modules.
Add ContextPlugin type imports and instantiate testing modules.
Updated error logging to use this.context.logger for consistency.
Enhanced the log message to provide better context about the issue.
Updated package.json dependency and fixed static test data in issue.http.
Add Bun package manager version to package.json for consistency.
Deleted validator.ts file. Updated package.json and removed related imports and test code.
Remove unnecessary blank line in CHANGELOG.md for better readability.
Add proper schema-based configs and remove redundant test case.
Update Octokit import style and replace jest.mock with jest.unstable_mockModule
Replaced manual mocks with jest.unstable_mockModule for consistency.
Refactored test context setup for shared usage and efficiency.
421ba43
to
02464f5
Compare
Refactor to use plugin-sdk in place of ubiquity-os-kernel.
@whilefoo to fix that whole mess I ended up creating a separate repo for the SDK to avoid circular references and allow this to compile I will update the kernel accordingly. Running plugin as SDK: https://github.com/Meniole/text-conversation-rewards/actions/runs/11723241994/job/32654486608#step:3:17 |
11d9092
into
ubiquity-os-marketplace:development
@gentlementlegen, this task has been idle for a while. Please provide an update. |
Interesting, I guess no message should have been posted. |
Resolves #102
Depends on ubiquity-os/ubiquity-os-kernel#169
I decided to split the local runs into two major parts:
Technically this PR already allows for local runs using the SDK and
bun
but doesn't fulfill the specs, because it would be too much of a huge pull-request to read (adding caching etc. is missing). The SDK greatly helps for subsequent steps. Changing tobun
will allow easier local runs as well.Changes
ESM
Our SDK mainly supports ESM packages so I migrated all the code and tests to be ESM compatible.
Bun
Why bun?
bun
is used in the Kernel and allows forbun link
(this command was not cross compatible with bun and yarn). It also supports running a server out of the box with hono, so no need to write code to start a local server.Cons:
bun
is still too immature and does not support properly network request mocking soyarn
andjest
are still needed for testing.