8 Commits

Author SHA1 Message Date
Huakun
9fe51f6260
Feat: gitea mirror (#262)
* Update component props and add GitLab link

- Made `ref` prop optional in TauriLink component
- Added GitLab mirror URL to GitHubProvenanceCard
- Included a link to the GitLab mirror in the card layout
- Adjusted layout for StoreExtDetail component for better responsiveness
- Imported Tooltip component for potential future use

* chore: add parse-github-url dependency and update GitHub parsing logic

- Added `parse-github-url` package as a dependency in `package.json`.
- Updated `parseGitHubRepoFromUri` function to utilize `parse-github-url` for improved URI parsing.
- Introduced `getGitHubRepoMetadata` function to fetch repository metadata using Octokit.
- Updated validation data structure to include optional `repoId`.
- Enhanced tests to cover new functionality and error handling for invalid URIs.

* fix typo

* refactor: update validation data structure and improve function documentation

- Removed optional `repoId` from `ExtensionPublishValidationData` and adjusted related function to reflect this change.
- Added a note in the `validateJsrPackageAsKunkunExtension` function documentation to clarify frontend/backend verification logic.
- Updated `ExtPublishMetadata` to rename `repoId` to `repoNodeId` for clarity.

* refactor: remove GitLab mirror link from GitHubProvenanceCard

- Removed the GitLab mirror URL and its associated link from the GitHubProvenanceCard component.
- Commented out the layout for the GitLab mirror instead of deleting it, preserving the structure for potential future use.

* refactor: simplify GitHub repository URI parsing

- Removed dependency on `parse-github-url` and implemented a regex-based approach for parsing GitHub repository URIs in the `parseGitHubRepoFromUri` function.
- Enhanced error handling for invalid URIs while maintaining the function's output structure.

* feat: add Gitea mirror link to GitHubProvenanceCard

- Introduced a new link to the Gitea mirror repository in the GitHubProvenanceCard component.
- Updated the layout to reflect the new mirror link while removing the commented-out GitLab mirror section.

* refactor: enhance Globe component's location handling

- Updated the Globe component to conditionally render markers based on the provided locations prop.
- Simplified the destructuring of props for better readability.
- Retained default marker locations for cases where no locations are provided.

* pnpm lock
2025-03-26 01:08:16 -04:00
Huakun Shen
11226ee2ef
fix: jsr API for cloudflare worker env
Without this header will get html format instead of json in cf worker
2025-03-23 10:26:18 -04:00
Huakun Shen
490368428e
UI (#94)
* feat: add publisher link to extension detail

* fix: improve IconMultiplexer and StoreExtDetail component rendering

* feat: add published date to extension details view

* chore: add moment.js and clean up imports in StoreExtDetail

* fix: support cloudflare worker

Otherwise cloudflare worker gets html instead of json

* refactor: move AppsCmds component to desktop app

* bump: version to 0.1.1

* fix: package.json fetching cors error

* fix: improve files field validation in verify command
2025-02-07 01:26:56 -05:00
Huakun Shen
798cc773e5
Feature: upgrade kkrpc (#84)
* feat: upgrade kkrpc and tauri-api-adapter

* feat: update package.json exports for @kksh/api

* chore: bump @kksh/api package version to 0.0.56

* chore: bump @kksh/api version to 0.0.56
2025-01-31 05:07:04 -05:00
Huakun Shen
0cc744592f
Feature: add author, size, readme display for extension store page (#74)
* fix: update email field in KunkunExtManifest to be optional and nullable

* refactor: update Supabase type generation command and enhance database types structure

- Changed the Supabase type generation command to include a specific project reference and output path.
- Refactored the database types in `database.types.ts` for improved readability and added new fields, including `extension_state` and `package_json` in the `ext_publish` table.
- Ensured consistent formatting across type definitions for better maintainability.

* feat: add optional README path to ExtPackageJson and enhance tests for README retrieval

* feat: add optional readmeContent to ExtensionPublishValidationData and retrieve README in validateJsrPackageAsKunkunExtension

* feat: add optional readme field to database types for improved package metadata

* feat: enhance StoreExtDetail to display package metadata including author and contributors

- Added packageJson prop to StoreExtDetail for improved extension metadata display.
- Implemented rendering of author and contributors from packageJson.
- Integrated README content display in StoreExtDetail if available.
- Updated +page.svelte to parse and provide packageJson data using valibot for validation.

* feat: enhance TauriLink component to support conditional rendering based on Tauri environment

- Added detection for Tauri environment using the browser variable.
- Updated the TauriLink component to render a button when in Tauri, and an anchor tag for external links otherwise.
- Improved user experience by ensuring appropriate link behavior based on the application context.

* feat: add unpacked size to npm registry

* feat: replace size in ext_publish table to tarball_size, add unpacked_size (only applicable to npm)

* feat: add pretty-bytes dependency and update debug package version

- Added `pretty-bytes` package with version 6.1.1 to `package.json`.
- Updated `debug` package to use `supports-color@9.4.0` in `pnpm-lock.yaml` for improved compatibility.

* feat: add tarball_size field to database types for improved package metadata

* feat: add readme fetching for npm registry, readme from github

* fix: remove console.log from NPM API test to clean up output

* style: update extension store details

* style: update README section in StoreExtDetail component for improved styling

* fix: update command input placeholder text in English, Russian, and Chinese translations for clarity

* chore: bump version to 0.1.18 in package.json

* fix: lint
2025-01-23 07:07:29 -05:00
Huakun Shen
402208e95a
Feature: license check (#67)
* feat: add required license field to manifest

* chore: add license MIT to all templates

* feat: add license check to jsr and npm validation

* fix: supabase export

split every item into its own subexport for better debugability

* fix: supabase imports

* feat: hide app when escape is pressed

* fix: update package version in api test from 0.0.6 to 0.0.20

* fix: update test for kunkun extension with new version and commit details

* fix: update kunkun extension test to use version 0.0.4

* fix: update kunkun extension test to reflect new version 0.0.20 and updated commit details

* feat: display downloads in extension details

* feat: add downloads display to store
2025-01-18 22:55:43 -05:00
Huakun Shen
7a3b6f3983
fix: listview action menu (#64)
* refactor: add a valibot schema for package registry validation

* fix: list view action menu

* chore: bump version to 0.1.16 in package.json

* refactor: extract supabase package from api

* ci: remove NODE_OPTIONS from build step and improve error handling in getLatestNpmPkgVersion function
2025-01-18 02:26:23 -05:00
Huakun Shen
e4d1441d73
Feature: support npm extension publish (#62)
* feat: npm package registry API

* refactor: move package registry files

* refactor: move jsr and npm api to a new package

* ci: add verify-package-export

* test: implement tests for npm package validation as kunkun extension

* chore: add missing dep for package-registry pkg

* feat: make provenance an optional input for npm validation function

* ci: add verify-package-export as dev dep to 2 packages that uses it

* feat: add rekor log API, and return commit from jsr & npm package in validation function

* feat: return github repo info from validation function of jsr and npm

* feat: extend ExtPublishMetadata to include optional GitHub repository details

* fix: eslint for ui package

* refactor: format desktop

* fix: eslint errors in desktop

* format: all code

* ci: add lint to CI

* feat: add more info to validation function returned from package-registry npm jsr

* pnpm lock

* feat: add 2 more variables to supabase extension metadata model

* format

* feat: add provenance card

* feat: add workflow path to ExtPublishMetadata and jsr/npm validation

* update provenance

* feat: make store extension and provenance more responsive

* chore: add globals to ui package

* fix: remove unnecessary any to fix eslint

* fix: svg sanitize

* chore: add @typescript-eslint/eslint-plugin to ui package to fix eslint

* fix: update eslint dep to fix error

* fix: try fixing eslint

* fix: update eslint configuration for improved compatibility

* chore: add globals package and update README for Discord invite

* fix: update eslint rules and upgrade typescript-eslint dependency

- Disabled additional eslint rules to resolve errors:
  - @typescript-eslint/no-unused-expressions
  - svelte/no-inner-declarations
- Upgraded typescript-eslint from version 8.19.1 to 8.20.0 for improved compatibility.

* update pnpm lock

---------

Co-authored-by: Huakun Shen <huaukun.shen@huakunshen.com>
2025-01-16 06:00:07 -05:00