├── .changeset └── config.json ├── .github ├── ISSUE_TEMPLATE │ ├── 1-bug_report.yml │ ├── 2-feature_request.yml │ ├── 3-docs_change.yml │ └── config.yml └── workflows │ ├── ci.yml │ ├── pkg-pr-new.yml │ └── publish.yaml ├── .gitignore ├── LICENSE ├── README.md ├── examples ├── project │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ └── index.ts │ └── tsup.config.ts └── registry │ ├── README.md │ ├── blocks │ ├── angular │ │ └── button │ │ │ └── button.html │ ├── dynamic-imports │ │ ├── test.svelte │ │ └── test.ts │ ├── logging │ │ └── logger.ts │ ├── scripts │ │ └── test.js │ ├── styles │ │ └── test.scss │ └── svelte │ │ ├── component.svelte │ │ ├── test.js │ │ └── test.svelte.ts │ ├── jsrepo-build-config.json │ ├── jsrepo-manifest.json │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ ├── app.css │ ├── components │ │ └── button.svelte │ ├── types │ │ ├── index.ts │ │ └── point.ts │ └── utils │ │ ├── math-user │ │ └── use.ts │ │ ├── math │ │ ├── add.test.ts │ │ ├── add.ts │ │ ├── create-point.ts │ │ ├── format-answer.ts │ │ ├── index.ts │ │ ├── subtract.test.ts │ │ └── subtract.ts │ │ └── pretty-print │ │ ├── index.ts │ │ └── print.ts │ └── tsconfig.json ├── package.json ├── packages └── cli │ ├── .gitignore │ ├── CHANGELOG.md │ ├── README.md │ ├── biome.json │ ├── jsrepo.json │ ├── package.json │ ├── schemas │ ├── project-config.json │ └── registry-config.json │ ├── scripts │ └── generate-docs.ts │ ├── src │ ├── api │ │ └── index.ts │ ├── cli.ts │ ├── commands │ │ ├── add.ts │ │ ├── auth.ts │ │ ├── build.ts │ │ ├── exec.ts │ │ ├── index.ts │ │ ├── init.ts │ │ ├── test.ts │ │ └── update.ts │ ├── constants.ts │ ├── index.ts │ ├── types.ts │ └── utils │ │ ├── ai.ts │ │ ├── ascii.ts │ │ ├── blocks.ts │ │ ├── blocks │ │ ├── package-managers │ │ │ └── flags.ts │ │ └── ts │ │ │ ├── array.ts │ │ │ ├── lines.ts │ │ │ ├── pad.ts │ │ │ ├── result.ts │ │ │ ├── strings.ts │ │ │ ├── strip-ansi.ts │ │ │ └── url.ts │ │ ├── build │ │ ├── check.ts │ │ └── index.ts │ │ ├── config.ts │ │ ├── context.ts │ │ ├── dependencies.ts │ │ ├── diff.ts │ │ ├── files.ts │ │ ├── format.ts │ │ ├── get-latest-version.ts │ │ ├── get-watermark.ts │ │ ├── language-support.ts │ │ ├── manifest.ts │ │ ├── package.ts │ │ ├── parse-package-name.ts │ │ ├── persisted.ts │ │ ├── prompts.ts │ │ └── registry-providers │ │ ├── azure.ts │ │ ├── bitbucket.ts │ │ ├── github.ts │ │ ├── gitlab.ts │ │ ├── http.ts │ │ ├── index.ts │ │ ├── internal.ts │ │ └── types.ts │ ├── tests │ ├── add.test.ts │ ├── build.test.ts │ ├── language-support.test.ts │ ├── providers.test.ts │ ├── unwrap-code.test.ts │ └── utils.ts │ ├── tsconfig.json │ ├── tsup.config.ts │ └── vitest.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── sites └── docs ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── README.md ├── components.json ├── eslint.config.js ├── jsrepo.json ├── package.json ├── postcss.config.js ├── src ├── app.css ├── app.d.ts ├── app.html ├── hooks.server.ts ├── lib │ ├── actions │ │ ├── active.svelte.ts │ │ └── shortcut.svelte.ts │ ├── components │ │ ├── animations │ │ │ ├── animated-gradient-text.svelte │ │ │ └── flip │ │ │ │ ├── flip.svelte │ │ │ │ └── index.ts │ │ ├── icons │ │ │ ├── azure-devops.svelte │ │ │ ├── bitbucket.svelte │ │ │ ├── css.svelte │ │ │ ├── github.svelte │ │ │ ├── gitlab.svelte │ │ │ ├── html.svelte │ │ │ ├── index.ts │ │ │ ├── javascript.svelte │ │ │ ├── jsrepo.svelte │ │ │ ├── react.svelte │ │ │ ├── sass.svelte │ │ │ ├── svelte.svelte │ │ │ ├── svg.svelte │ │ │ ├── typescript.svelte │ │ │ ├── vue.svelte │ │ │ └── yaml.svelte │ │ ├── site │ │ │ ├── app-sidebar.svelte │ │ │ ├── command.svelte │ │ │ ├── docs │ │ │ │ ├── blockquote.svelte │ │ │ │ ├── code-span.svelte │ │ │ │ ├── doc-header.svelte │ │ │ │ ├── index.ts │ │ │ │ ├── jsrepo.svelte │ │ │ │ ├── link.svelte │ │ │ │ └── sub-heading.svelte │ │ │ ├── footer.svelte │ │ │ └── header.svelte │ │ └── ui │ │ │ ├── accordion │ │ │ ├── accordion-content.svelte │ │ │ ├── accordion-item.svelte │ │ │ ├── accordion-trigger.svelte │ │ │ └── index.ts │ │ │ ├── badge │ │ │ ├── badge.svelte │ │ │ └── index.ts │ │ │ ├── breadcrumb │ │ │ ├── breadcrumb-ellipsis.svelte │ │ │ ├── breadcrumb-item.svelte │ │ │ ├── breadcrumb-link.svelte │ │ │ ├── breadcrumb-list.svelte │ │ │ ├── breadcrumb-page.svelte │ │ │ ├── breadcrumb-separator.svelte │ │ │ ├── breadcrumb.svelte │ │ │ └── index.ts │ │ │ ├── button │ │ │ ├── button.svelte │ │ │ └── index.ts │ │ │ ├── card │ │ │ ├── card-content.svelte │ │ │ ├── card-description.svelte │ │ │ ├── card-footer.svelte │ │ │ ├── card-header.svelte │ │ │ ├── card-title.svelte │ │ │ ├── card.svelte │ │ │ └── index.ts │ │ │ ├── code │ │ │ ├── code.svelte │ │ │ ├── index.ts │ │ │ └── shiki.ts │ │ │ ├── collapsible │ │ │ └── index.ts │ │ │ ├── command │ │ │ ├── command-dialog.svelte │ │ │ ├── command-empty.svelte │ │ │ ├── command-group.svelte │ │ │ ├── command-input.svelte │ │ │ ├── command-item.svelte │ │ │ ├── command-link-item.svelte │ │ │ ├── command-list.svelte │ │ │ ├── command-separator.svelte │ │ │ ├── command-shortcut.svelte │ │ │ ├── command.svelte │ │ │ └── index.ts │ │ │ ├── copy-button │ │ │ ├── copy-button.svelte │ │ │ └── index.ts │ │ │ ├── dialog │ │ │ ├── dialog-content.svelte │ │ │ ├── dialog-description.svelte │ │ │ ├── dialog-footer.svelte │ │ │ ├── dialog-header.svelte │ │ │ ├── dialog-overlay.svelte │ │ │ ├── dialog-title.svelte │ │ │ └── index.ts │ │ │ ├── drawer │ │ │ ├── drawer-content.svelte │ │ │ ├── drawer-description.svelte │ │ │ ├── drawer-footer.svelte │ │ │ ├── drawer-header.svelte │ │ │ ├── drawer-nested.svelte │ │ │ ├── drawer-overlay.svelte │ │ │ ├── drawer-title.svelte │ │ │ ├── drawer.svelte │ │ │ └── index.ts │ │ │ ├── dropdown-menu │ │ │ ├── dropdown-menu-checkbox-item.svelte │ │ │ ├── dropdown-menu-content.svelte │ │ │ ├── dropdown-menu-group-heading.svelte │ │ │ ├── dropdown-menu-item.svelte │ │ │ ├── dropdown-menu-label.svelte │ │ │ ├── dropdown-menu-radio-item.svelte │ │ │ ├── dropdown-menu-separator.svelte │ │ │ ├── dropdown-menu-shortcut.svelte │ │ │ ├── dropdown-menu-sub-content.svelte │ │ │ ├── dropdown-menu-sub-trigger.svelte │ │ │ └── index.ts │ │ │ ├── file-icon │ │ │ ├── file-icon.svelte │ │ │ └── index.ts │ │ │ ├── github │ │ │ ├── index.ts │ │ │ └── star-button.svelte │ │ │ ├── input │ │ │ ├── index.ts │ │ │ └── input.svelte │ │ │ ├── kbd │ │ │ ├── index.ts │ │ │ └── kbd.svelte │ │ │ ├── light-switch │ │ │ ├── index.ts │ │ │ └── light-switch.svelte │ │ │ ├── modal │ │ │ ├── index.ts │ │ │ └── modal.svelte │ │ │ ├── pagination │ │ │ ├── index.ts │ │ │ ├── next.svelte │ │ │ └── previous.svelte │ │ │ ├── scroll-area │ │ │ ├── index.ts │ │ │ ├── scroll-area-scrollbar.svelte │ │ │ └── scroll-area.svelte │ │ │ ├── search │ │ │ ├── index.ts │ │ │ └── search.svelte │ │ │ ├── separator │ │ │ ├── index.ts │ │ │ └── separator.svelte │ │ │ ├── sheet │ │ │ ├── index.ts │ │ │ ├── sheet-content.svelte │ │ │ ├── sheet-description.svelte │ │ │ ├── sheet-footer.svelte │ │ │ ├── sheet-header.svelte │ │ │ ├── sheet-overlay.svelte │ │ │ └── sheet-title.svelte │ │ │ ├── sidebar │ │ │ ├── constants.ts │ │ │ ├── context.svelte.ts │ │ │ ├── index.ts │ │ │ ├── sidebar-content.svelte │ │ │ ├── sidebar-footer.svelte │ │ │ ├── sidebar-group-action.svelte │ │ │ ├── sidebar-group-content.svelte │ │ │ ├── sidebar-group-label.svelte │ │ │ ├── sidebar-group.svelte │ │ │ ├── sidebar-header.svelte │ │ │ ├── sidebar-input.svelte │ │ │ ├── sidebar-inset.svelte │ │ │ ├── sidebar-menu-action.svelte │ │ │ ├── sidebar-menu-badge.svelte │ │ │ ├── sidebar-menu-button.svelte │ │ │ ├── sidebar-menu-item.svelte │ │ │ ├── sidebar-menu-skeleton.svelte │ │ │ ├── sidebar-menu-sub-button.svelte │ │ │ ├── sidebar-menu-sub-item.svelte │ │ │ ├── sidebar-menu-sub.svelte │ │ │ ├── sidebar-menu.svelte │ │ │ ├── sidebar-provider.svelte │ │ │ ├── sidebar-rail.svelte │ │ │ ├── sidebar-separator.svelte │ │ │ ├── sidebar-trigger.svelte │ │ │ └── sidebar.svelte │ │ │ ├── skeleton │ │ │ ├── index.ts │ │ │ └── skeleton.svelte │ │ │ ├── snippet │ │ │ ├── index.ts │ │ │ ├── jsrepo-snippet.svelte │ │ │ ├── pm-copy-button.svelte │ │ │ └── snippet.svelte │ │ │ ├── table │ │ │ ├── index.ts │ │ │ ├── table-body.svelte │ │ │ ├── table-caption.svelte │ │ │ ├── table-cell.svelte │ │ │ ├── table-footer.svelte │ │ │ ├── table-head.svelte │ │ │ ├── table-header.svelte │ │ │ ├── table-row.svelte │ │ │ └── table.svelte │ │ │ ├── tabs │ │ │ ├── index.ts │ │ │ ├── tabs-content.svelte │ │ │ ├── tabs-list.svelte │ │ │ └── tabs-trigger.svelte │ │ │ ├── tooltip │ │ │ ├── index.ts │ │ │ └── tooltip-content.svelte │ │ │ └── video-player │ │ │ ├── index.ts │ │ │ └── video-player.svelte │ ├── hooks │ │ ├── is-mobile.svelte.ts │ │ └── use-clipboard.svelte.ts │ ├── map.ts │ ├── ts │ │ ├── array.ts │ │ ├── context.ts │ │ ├── markdown.ts │ │ ├── math │ │ │ ├── circle.ts │ │ │ ├── conversions.ts │ │ │ ├── fractions.ts │ │ │ ├── gcf.ts │ │ │ ├── index.ts │ │ │ ├── triangles.ts │ │ │ └── types.ts │ │ ├── on-this-page.ts │ │ ├── parse-package-name.ts │ │ ├── persisted-context-provider.ts │ │ ├── redis-client.ts │ │ ├── registry │ │ │ └── index.ts │ │ ├── server-actions │ │ │ └── search-registries │ │ │ │ ├── client.ts │ │ │ │ └── server.ts │ │ └── types │ │ │ └── result.ts │ ├── utils.ts │ └── utils │ │ ├── context-provider.ts │ │ └── utils.ts └── routes │ ├── +error.svelte │ ├── +layout.server.ts │ ├── +layout.svelte │ ├── +page.server.ts │ ├── +page.svelte │ ├── demos │ └── +page.svelte │ ├── docs │ ├── +layout.svelte │ ├── +page.svelte │ ├── about │ │ └── +page.svelte │ ├── badges │ │ └── +page.svelte │ ├── cli │ │ ├── +page.svelte │ │ ├── add │ │ │ └── +page.svelte │ │ ├── auth │ │ │ └── +page.svelte │ │ ├── build │ │ │ └── +page.svelte │ │ ├── exec │ │ │ └── +page.svelte │ │ ├── init │ │ │ └── +page.svelte │ │ ├── option-docs.svelte │ │ ├── test │ │ │ └── +page.svelte │ │ └── update │ │ │ └── +page.svelte │ ├── git-providers │ │ ├── +page.svelte │ │ ├── azure-devops │ │ │ └── +page.svelte │ │ ├── bitbucket │ │ │ └── +page.svelte │ │ ├── github │ │ │ └── +page.svelte │ │ ├── gitlab │ │ │ └── +page.svelte │ │ └── self-hosted │ │ │ └── +page.svelte │ ├── jsrepo-build-config-json │ │ └── +page.svelte │ ├── jsrepo-json │ │ └── +page.svelte │ ├── language-support │ │ └── +page.svelte │ ├── private-repositories │ │ └── +page.svelte │ └── setup │ │ ├── +page.svelte │ │ ├── project │ │ └── +page.svelte │ │ └── registry │ │ └── +page.svelte │ └── registry │ ├── +layout.server.ts │ ├── +layout.svelte │ ├── +page.server.ts │ ├── +page.svelte │ └── registry.svelte ├── static ├── badges │ ├── build │ │ ├── failing.svg │ │ └── passing.svg │ └── jsrepo.svg ├── demos │ └── update-w-ai.mp4 ├── docs │ └── cli │ │ └── llms.txt ├── favicon.png └── llms.txt ├── svelte.config.js ├── tailwind.config.ts ├── tsconfig.json └── vite.config.ts /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/2-feature_request.yml: -------------------------------------------------------------------------------- 1 | name: 🆕 Feature request 2 | description: Help us improve jsrepo. 3 | labels: ["feature"] 4 | title: "feat: " 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Thanks for helping us improve jsrepo! 10 | Before continuing make sure you have checked other issues to see if your feature was already requested / added. 11 | 12 | - type: textarea 13 | id: desc 14 | attributes: 15 | label: Describe the feature 16 | description: What doesn't jsrepo do now? What should it do? 17 | validations: 18 | required: true 19 | 20 | - type: checkboxes 21 | id: terms 22 | attributes: 23 | label: Validations 24 | description: Please make sure you have checked all of the following. 25 | options: 26 | - label: I have checked other issues to see if my feature was already requested or added 27 | required: true -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3-docs_change.yml: -------------------------------------------------------------------------------- 1 | name: 📜 Report Docs Issue 2 | description: Suggest an addition or modification to the documentation 3 | labels: ["documentation"] 4 | title: "docs: " 5 | body: 6 | - type: dropdown 7 | attributes: 8 | label: Change Type 9 | description: What type of change are you proposing? 10 | options: 11 | - Addition 12 | - Correction 13 | - Removal 14 | - Cleanup (formatting, typos, etc.) 15 | validations: 16 | required: true 17 | 18 | - type: textarea 19 | attributes: 20 | label: Proposed Changes 21 | description: Describe the proposed changes and why they are necessary 22 | validations: 23 | required: true 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Get Help 4 | url: https://github.com/ieedan/jsrepo/discussions/new?category=help 5 | about: If you can't get something to work the way you expect, open a question in our discussion forums. 6 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | CI: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: pnpm/action-setup@v4 13 | - uses: actions/setup-node@v4 14 | with: 15 | node-version: "20" 16 | cache: pnpm 17 | 18 | - name: Install dependencies 19 | run: pnpm install 20 | 21 | - name: Check Types 22 | run: pnpm lint 23 | 24 | - name: Test 25 | run: pnpm test 26 | 27 | - name: Build CLI 28 | run: pnpm build:cli 29 | -------------------------------------------------------------------------------- /.github/workflows/pkg-pr-new.yml: -------------------------------------------------------------------------------- 1 | name: CLI Preview 2 | on: 3 | pull_request: 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v4 11 | - uses: pnpm/action-setup@v4 12 | - uses: actions/setup-node@v4 13 | with: 14 | node-version: "20" 15 | cache: pnpm 16 | 17 | - name: Run changed-files 18 | id: changed-files 19 | uses: tj-actions/changed-files@v44 20 | with: 21 | separator: ' ' 22 | dir_names: 'true' 23 | dir_names_max_depth: '2' # truncates the path to packages/package-name 24 | files: | 25 | packages/** 26 | 27 | - name: Install dependencies 28 | run: pnpm install 29 | 30 | - name: Build 31 | run: pnpm build:cli 32 | 33 | - name: publish preview 34 | if: ${{ steps.changed-files.outputs.all_changed_files_count > 0 }} 35 | env: 36 | CHANGED_DIRS: ${{ steps.changed-files.outputs.all_changed_files }} 37 | # run: | 38 | run: pnpm dlx pkg-pr-new publish './packages/cli' --template './examples/*' -------------------------------------------------------------------------------- /.github/workflows/publish.yaml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | concurrency: ${{ github.workflow }}-${{ github.ref }} 9 | 10 | jobs: 11 | release: 12 | name: Build & Publish Release 13 | if: github.repository == 'ieedan/jsrepo' 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | - uses: pnpm/action-setup@v4 19 | - uses: actions/setup-node@v4 20 | with: 21 | node-version: "20" 22 | cache: pnpm 23 | 24 | - name: Install dependencies 25 | run: pnpm install 26 | 27 | - name: Create Release Pull Request or Publish 28 | id: changesets 29 | uses: changesets/action@v1 30 | with: 31 | commit: "chore(release): version package" 32 | title: "chore(release): version package" 33 | publish: pnpm ci:release 34 | env: 35 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 36 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 37 | NODE_ENV: production 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Aidan Bleser 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
5 |
jsrepo
7 |
8 |
11 |
12 |
13 |
14 |
2 |
3 |
28 |30 | {#if by} 31 |{@render children?.()}
29 |
- {by}
32 | {/if} 33 |20 | {description} 21 |
22 |15 | {@render children?.()} 16 |
17 | -------------------------------------------------------------------------------- /sites/docs/src/lib/components/ui/card/card-footer.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 |15 | Sorry we couldn't find what you were looking for! 16 |
17 | {:else} 18 |{@render description()}
24 |11 | Because the AzureDevops URL structure doesn't 12 | include enough information to fetch raw files we have to use a custom structure so copy pasting the 13 | URL from the homepage like you can for other providers won't just work. 14 |
15 |Instead you need to follow the following format:
16 |///(tags|heads)/`} />
17 |
24 | Using Tags for Versioning
25 |
26 | Tags can be a great solution to ensuring remote tests and blocks stay on a consistent version.
27 |
28 |
43 |
44 | Tags do not however work like npm packages. Tags are completely mutable meaning a malicious
45 | registry could publish over a tag with different code.
46 |
47 | This is why it's always important to make sure you trust the owner of the registry.
48 |
--------------------------------------------------------------------------------
/sites/docs/src/routes/docs/setup/+page.svelte:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 | Guides
20 |
21 | {#each guides as { name, href, description }}
22 |
26 |
27 | {name}
28 | {description}
29 |
30 |
31 | {/each}
32 |
33 |
34 |
43 |
44 |
--------------------------------------------------------------------------------
/sites/docs/src/routes/registry/+layout.server.ts:
--------------------------------------------------------------------------------
1 | import { schema } from '$lib/ts/server-actions/search-registries/client';
2 | import { superValidate } from 'sveltekit-superforms';
3 | import { valibot } from 'sveltekit-superforms/adapters';
4 |
5 | export const load = async () => {
6 | const form = await superValidate(valibot(schema));
7 |
8 | return {
9 | form
10 | };
11 | };
12 |
--------------------------------------------------------------------------------
/sites/docs/src/routes/registry/+layout.svelte:
--------------------------------------------------------------------------------
1 |
35 |
36 |
37 |
57 |
58 |
59 | {@render children()}
60 |
61 |
--------------------------------------------------------------------------------
/sites/docs/src/routes/registry/+page.server.ts:
--------------------------------------------------------------------------------
1 | import { error, redirect } from '@sveltejs/kit';
2 | import { selectProvider } from 'jsrepo';
3 | import { getProviderState, getRegistryData } from '$lib/ts/registry/index.js';
4 | import { redis, VIEW_SET_NAME } from '$lib/ts/redis-client.js';
5 | import { action } from '$lib/ts/server-actions/search-registries/server.js';
6 | import { dev } from '$app/environment';
7 |
8 | export const load = async ({ url }) => {
9 | const registryUrl = url.searchParams.get('url');
10 |
11 | if (registryUrl == null) throw redirect(303, '/registries');
12 |
13 | const provider = selectProvider(registryUrl);
14 |
15 | if (!provider) throw redirect(303, '/registries');
16 |
17 | const state = await getProviderState(registryUrl, provider, { cache: true });
18 |
19 | const pageData = await getRegistryData(state);
20 |
21 | if (!pageData) {
22 | throw error(404, { message: 'registry-search: Could not find the requested registry' });
23 | }
24 |
25 | if (!dev) {
26 | await redis.zincrby(VIEW_SET_NAME, 1, registryUrl);
27 | }
28 |
29 | return {
30 | ...pageData,
31 | registryUrl
32 | };
33 | };
34 |
35 | export const actions = {
36 | default: action
37 | };
38 |
--------------------------------------------------------------------------------
/sites/docs/src/routes/registry/+page.svelte:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/sites/docs/static/demos/update-w-ai.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darkhorse374/JavaScript/ea6d998d7a826d9a25201e029da2cd8c4ba42bbb/sites/docs/static/demos/update-w-ai.mp4
--------------------------------------------------------------------------------
/sites/docs/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darkhorse374/JavaScript/ea6d998d7a826d9a25201e029da2cd8c4ba42bbb/sites/docs/static/favicon.png
--------------------------------------------------------------------------------
/sites/docs/static/llms.txt:
--------------------------------------------------------------------------------
1 | # jsrepo Documentation for LLMs
2 |
3 | > jsrepo is a CLI that aims to make sharing your code easy and lightweight. It builds your code into a registry and allows you to download it from the CLI a lot like shadcn-ui.
4 |
5 | ## Package Documentation
6 |
7 | - [jsrepo CLI](https://jsrepo.dev/docs/cli/llms.txt)
8 |
9 | ## Provider Support
10 |
11 | jsrepo supports multiple ways of serving your registry, you can host your registry on GitHub, GitLab, BitBucket, Azure DevOps or on your own domain.
12 |
13 | ## Language Support
14 |
15 | - JavaScript (*.js)
16 | - TypeScript (*.ts)
17 | - JSX (*.jsx)
18 | - TSX (*.tsx)
19 | - Svelte (*.svelte)
20 | - Vue (*.vue)
21 | - YAML (*.(yaml|yml))
22 | - JSON (*.(json|jsonc))
23 | - CSS (*.css)
24 | - SVG (*.svg)
25 | - SASS (*.(sass|scss))
26 | - HTML (*.html)
27 |
--------------------------------------------------------------------------------
/sites/docs/svelte.config.js:
--------------------------------------------------------------------------------
1 | import adapter from '@sveltejs/adapter-vercel';
2 | import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3 |
4 | /** @type {import('@sveltejs/kit').Config} */
5 | const config = {
6 | preprocess: vitePreprocess(),
7 | kit: {
8 | // https://svelte.dev/docs/kit/adapter-vercel
9 | adapter: adapter()
10 | }
11 | };
12 |
13 | export default config;
14 |
--------------------------------------------------------------------------------
/sites/docs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./.svelte-kit/tsconfig.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "checkJs": true,
6 | "esModuleInterop": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "resolveJsonModule": true,
9 | "skipLibCheck": true,
10 | "sourceMap": true,
11 | "strict": true,
12 | "moduleResolution": "bundler"
13 | }
14 | // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
15 | // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
16 | //
17 | // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
18 | // from the referenced tsconfig.json - TypeScript does not merge them in
19 | }
20 |
--------------------------------------------------------------------------------
/sites/docs/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { sveltekit } from '@sveltejs/kit/vite';
2 | import { defineConfig } from 'vite';
3 |
4 | export default defineConfig({
5 | plugins: [sveltekit()]
6 | });
7 |
--------------------------------------------------------------------------------