diff --git a/package-lock.json b/package-lock.json index d214dba..8f72fce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "skizzle", - "version": "1.2.0", + "version": "2.0.0-alpha", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1750,6 +1750,11 @@ } } }, + "cache-service-cache-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/cache-service-cache-module/-/cache-service-cache-module-2.0.1.tgz", + "integrity": "sha512-Woh8hheJs6m0Mm5kuqtji/8S/Lh5vyE9hh3E4nCp3ah85CJ4Y4/yegjcUe0kEzW14ZjAE46UJBp3FOsZNVmmGA==" + }, "cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -6239,6 +6244,14 @@ } } }, + "superagent-cache": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/superagent-cache/-/superagent-cache-3.1.1.tgz", + "integrity": "sha512-jNGCNfj6nSQhiSNNqmhOvwFzsizc1Wd4eioHKH4lmgJptkTKBcq5oaBEGQPWsHiF5RtvIbcOXN/wvur7O1xaug==", + "requires": { + "cache-service-cache-module": "2.x" + } + }, "superagent-proxy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-2.1.0.tgz", diff --git a/rollup.config.js b/rollup.config.js index f63c84b..f8b9cac 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -25,12 +25,14 @@ export default { nodePolyfills(), svelte({ compilerOptions: { - // enable run-time checks when not in production dev: !production, }, preprocess: createPreprocessors(!production), }), - css({ output: 'bundle.css' }), + css({ + output: 'bundle.css', + sourceMap: !production, + }), resolve({ browser: true, dedupe: ['svelte'], diff --git a/src/components/AzureDevOps/AzureDevOps.svelte b/src/components/AzureDevOps/AzureDevOps.svelte index 1162733..48c9d00 100644 --- a/src/components/AzureDevOps/AzureDevOps.svelte +++ b/src/components/AzureDevOps/AzureDevOps.svelte @@ -10,16 +10,18 @@ import SearchResults from 'components/SearchResults'; import FollowedRepositories from 'components/FollowedRepositories'; import Search from 'components/Search'; - import type { RepositoryType } from 'models/skizzle'; + import type { ProfileType, RepositoryType } from 'models/skizzle'; let search: string = ''; - const onSearchSubmit = (repositories: RepositoryType[]) => ( + const onSearchSubmit = (profile: ProfileType) => async ( query: string, - ): void => { + ) => { search = query; - fetchedAzureDevOpsRepositories = repositories.filter( + const result = await Service.getRepositories(ProviderEnum.AzureDevOps, { profile }); + + fetchedAzureDevOpsRepositories = result.filter( ({ projectName, name }) => name.toLocaleLowerCase().includes(search.toLocaleLowerCase()) || projectName.toLocaleLowerCase().includes(search.toLocaleLowerCase()), @@ -44,31 +46,29 @@
- {#await Service.getRepositories(ProviderEnum.AzureDevOps, { profile })} -

Chargement de la liste des repositories...

- {:then repositories} -
- Suivre un nouveau repository -

- Cherchez le nom de son projet et/ou repository associé. -

- +
+ Suivre un nouveau repository +

+ Cherchez le nom de son projet et/ou repository associé. +

+ - {#if search} + {#if search} + {#if $isFetchingData} +

Recherche en cours...

+ {:else} {/if} -
-
- -
- {:catch} -

Fetching profile failed.

- {/await} + {/if} +
+
+ +
{:catch}

Fetching profile failed.

diff --git a/src/components/FollowedRepositories/FollowedRepositories.svelte b/src/components/FollowedRepositories/FollowedRepositories.svelte index d4d8dc7..f34ea24 100644 --- a/src/components/FollowedRepositories/FollowedRepositories.svelte +++ b/src/components/FollowedRepositories/FollowedRepositories.svelte @@ -29,7 +29,6 @@ Vos repositories suivis @@ -53,7 +52,6 @@ repository.gitUrl, `L'url du repository est copiée dans le presse-papiers.`, )} - disabled={$isFetchingData} title="Copier l'url de ce repository" > @@ -74,7 +72,6 @@ {/if} diff --git a/src/components/ImportExport/ImportExport.svelte b/src/components/ImportExport/ImportExport.svelte index 8376d87..52df9d1 100644 --- a/src/components/ImportExport/ImportExport.svelte +++ b/src/components/ImportExport/ImportExport.svelte @@ -1,6 +1,6 @@