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

Feat/predefined configs #28

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
35e4900
chore: config fetcher
Keyrxng Nov 22, 2024
19778b9
chore: orgPicker > orgSelector
Keyrxng Nov 22, 2024
24cc9f3
chore: template handler
Keyrxng Nov 22, 2024
e9674ad
feat: template selector w/ minimal predefined
Keyrxng Nov 22, 2024
8fcb91a
feat: full default template
Keyrxng Nov 22, 2024
9ee2939
feat: plugin config param tooltips
Keyrxng Nov 26, 2024
3b810d2
Merge remote-tracking branch 'upstream/main' into feat/config-param-d…
Keyrxng Nov 29, 2024
6e86827
chore: fix type
Keyrxng Nov 29, 2024
ddbcb52
Merge remote-tracking branch 'upstream/main' into feat/predefined-con…
Keyrxng Nov 29, 2024
b6352f7
chore: NavSteps type
Keyrxng Nov 29, 2024
bda9f5b
chore(deps): bump ubiquity-os sdk
Keyrxng Jan 24, 2025
8a260cb
chore: minor changes - types, format
Keyrxng Feb 5, 2025
d0ef215
feat: typebox schema union handling
Keyrxng Feb 5, 2025
8e71dea
chore: new css and tweaks
Keyrxng Feb 5, 2025
1193d0b
chore: optimize fetching with new manifest, use homepage_url
Keyrxng Feb 5, 2025
26c9efa
chore: refactor input parsing for use with union toggles
Keyrxng Feb 5, 2025
3cdeff0
chore: update plugin-select with new manifest usage
Keyrxng Feb 5, 2025
2c76c9b
chore: update tooltips for union handling
Keyrxng Feb 5, 2025
6c45cf1
Merge remote-tracking branch 'upstream/main' into fix-merge-conflict
Keyrxng Feb 5, 2025
ba5d7a1
chore: md render descriptions, css fix
Keyrxng Feb 5, 2025
41c5760
Merge branch 'feat/config-param-descs' into feat/predefined-configs
Keyrxng Feb 5, 2025
eaf3827
chore: nav type fix, picker > selector rename
Keyrxng Feb 5, 2025
e2c3008
chore: use new default template url
Keyrxng Feb 5, 2025
f9f4201
chore: button.selected, commit title, textarea alignment
Keyrxng Feb 11, 2025
26fe204
chore: union handling button-group margin fix
Keyrxng Feb 12, 2025
f4f186d
chore: remove log
Keyrxng Feb 12, 2025
9f86707
chore: reword commit title
Keyrxng Feb 12, 2025
f4f3396
Update static/scripts/config-parser.ts
Keyrxng Feb 12, 2025
7cb8046
Merge branch 'feat/config-param-descs' into feat/predefined-configs
Keyrxng Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"dictionaries": ["typescript", "node", "software-terms"],
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"],
"ignoreRegExpList": ["[0-9a-fA-F]{6}"],
"ignoreWords": ["ubiquibot", "Supabase", "supabase", "SUPABASE", "sonarjs", "mischeck", "Typebox"]
"ignoreWords": ["ubiquibot", "Supabase", "supabase", "SUPABASE", "sonarjs", "mischeck", "Typebox", "tooltiptext"]
}
2 changes: 2 additions & 0 deletions build/esbuild-build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import esbuild, { BuildOptions } from "esbuild";
import * as dotenv from "dotenv";
dotenv.config();
import MINIMAL_PREDEFINED_CONFIG from "../static/minimal-predefined.json";

const ENTRY_POINTS = {
typescript: ["static/main.ts"],
Expand All @@ -17,6 +18,7 @@ export const esbuildOptions: BuildOptions = {
loader: Object.fromEntries(DATA_URL_LOADERS.map((ext) => [ext, "dataurl"])),
outdir: "static/dist",
define: createEnvDefines([], {
MINIMAL_PREDEFINED_CONFIG: JSON.stringify(MINIMAL_PREDEFINED_CONFIG),
SUPABASE_STORAGE_KEY: generateSupabaseStorageKey(),
NODE_ENV: process.env.NODE_ENV || "development",
SUPABASE_URL: process.env.SUPABASE_URL || "https://wfzpewmlyiozupulbuur.supabase.co",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"@octokit/rest": "^21.0.2",
"@supabase/supabase-js": "^2.46.1",
"@ubiquity-os/plugin-sdk": "^1.0.11",
"@ubiquity-os/plugin-sdk": "^2.0.3",
"@ubiquity-os/ubiquity-os-kernel": "^2.5.3",
"ajv": "^8.17.1",
"dotenv": "^16.4.4",
Expand Down
19 changes: 13 additions & 6 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
><svg id="uos-logo" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg">
<path
d="M90.2449 26.0946C90.2449 24.6236 89.4133 23.2165 88.134 22.449L50.2014 0.575616C49.5617 0.191872 48.8581 0 48.0905 0C47.3868 0 46.6192 0.191872 45.9795 0.575616L8.11092 22.449C6.83157 23.2165 6 24.5596 6 26.0946V69.9054C6 71.3764 6.83157 72.7835 8.11092 73.551L46.0435 95.4244C47.3229 96.1919 48.922 96.1919 50.2014 95.4244L88.134 73.551C89.4133 72.7835 90.2449 71.4404 90.2449 69.9054V26.0946ZM82.6328 66.068C82.6328 67.7948 81.7373 69.3937 80.266 70.2252L50.4573 87.8135C49.7536 88.2612 48.922 88.453 48.0905 88.453C47.2589 88.453 46.4913 88.2612 45.7237 87.8135L15.9149 70.2252C14.4437 69.3937 13.5481 67.7948 13.5481 66.068V34.4091C13.5481 33.6416 13.9319 32.8741 14.6356 32.4903C15.3392 32.1066 16.1068 32.1066 16.8105 32.4903L21.9279 35.4963C23.1432 36.1999 23.8469 37.6069 24.7424 39.2059C24.9343 39.5256 25.0622 39.8454 25.2541 40.1013C27.493 44.1306 28.5804 48.4157 29.6039 52.573C31.5229 60.1839 33.442 68.0506 43.229 70.6089C46.4273 71.4404 49.8815 71.4404 53.0799 70.6089C62.8029 68.0506 64.7859 60.1839 66.7049 52.573C67.7284 48.4157 68.8159 44.1306 71.0547 40.1013C71.2466 39.7815 71.3746 39.4617 71.5665 39.2059C72.398 37.6069 73.1656 36.2638 74.381 35.4963L79.4984 32.4903C80.1381 32.1066 80.9696 32.1066 81.6733 32.4903C82.3769 32.8741 82.7607 33.5776 82.7607 34.4091V66.068H82.6328ZM45.8516 8.57029C47.2589 7.73884 48.986 7.73884 50.3933 8.57029L76.1721 23.8561C76.8118 24.2398 77.1956 24.4957 77.1956 25.2632C77.1956 26.0306 76.8118 26.4783 76.1721 26.8621L71.2466 29.8041C69.0717 31.0833 67.9843 33.1299 67.0248 34.9847L66.9608 35.1126C66.8329 35.3684 66.7049 35.5603 66.577 35.8161C64.1462 40.1652 62.3552 44.7701 61.3317 48.8634C59.2847 56.7941 58.5171 62.0386 51.8645 63.7655C50.6492 64.0853 49.3698 64.2132 48.1544 64.2132C46.8751 64.2132 45.6597 64.0213 44.4443 63.7655C37.7917 62.0386 36.9602 56.7941 34.9772 48.7995C33.9537 44.7062 32.1626 40.1013 29.7319 35.7522C29.6039 35.5603 29.476 35.3045 29.3481 35.1126L29.2841 34.9207C28.3246 33.1299 27.1732 31.0193 25.0622 29.7402L20.1368 26.7981C19.4971 26.4144 19.1133 25.9667 19.1133 25.1992C19.1133 24.4317 19.4971 24.1759 20.1368 23.7921L45.8516 8.57029Z"
/></svg
></div>
/>
</svg>
</div>
<div><h1>UbiquityOS Plugin Installer</h1></div>
</header>
<nav id="controls"><button id="github-sign-in"></button></nav>
Expand All @@ -24,10 +25,16 @@
><tr><td></td><td id="manifest-gui-title"></td></tr
></thead>
<tbody id="manifest-gui-body"></tbody>
<tfoot
><tr
><td></td><td><button id="reset-to-default"></button><button id="remove"></button><button id="add"></button></td></tr
></tfoot>
<tfoot>
<tr>
<td></td>
<td id="buttons">
<button id="reset-to-default"></button>
<button id="remove"></button>
<button id="add"></button>
</td>
</tr>
</tfoot>
</table>
</section>
</section>
Expand Down
11 changes: 6 additions & 5 deletions static/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AuthService } from "./scripts/authentication";
import { ManifestFetcher } from "./scripts/fetch-manifest";
import { ManifestRenderer } from "./scripts/render-manifest";
import { renderOrgPicker } from "./scripts/rendering/org-select";
import { renderOrgSelector } from "./scripts/rendering/org-select";
import { toastNotification } from "./utils/toaster";

async function handleAuth() {
Expand All @@ -16,24 +16,25 @@ export async function mainModule() {
renderer.manifestGuiBody.dataset.loading = "false";

try {
// needs handled better
const ubiquityOrgsToFetchOfficialConfigFrom = ["ubiquity-os"];
const fetcher = new ManifestFetcher(ubiquityOrgsToFetchOfficialConfigFrom, auth.octokit);

if (auth.isActiveSession()) {
renderer.manifestGuiBody.dataset.loading = "true";
const killNotification = toastNotification("Fetching manifest data...", { type: "info", shouldAutoDismiss: true });

const userOrgs = await auth.getGitHubUserOrgs();

const userOrgRepos = await auth.getGitHubUserOrgRepos(userOrgs);
localStorage.setItem("orgRepos", JSON.stringify(userOrgRepos));
renderOrgPicker(renderer, userOrgs);
renderOrgSelector(renderer, userOrgs);

await fetcher.fetchOrgsUbiquityOsConfigs();
await fetcher.fetchMarketplaceManifests();
await fetcher.fetchOfficialPluginConfig();
renderer.manifestGuiBody.dataset.loading = "false";
killNotification();
} else {
renderOrgPicker(renderer, []);
renderOrgSelector(renderer, []);
}
} catch (error) {
if (error instanceof Error) {
Expand Down
Loading
Loading