mirror of
https://github.com/tauri-apps/tauri-search.git
synced 2026-02-04 02:41:20 +01:00
chore: remove unwanted cache files and make those which have merit binary files
This commit is contained in:
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
**/generated/**/*.json binary
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -9,4 +9,5 @@
|
||||
**/.idea/
|
||||
**/*.log
|
||||
**/.do-devops.json
|
||||
**/*.env
|
||||
**/*.env
|
||||
**/generated/ast/prose/**/docs/**
|
||||
438
packages/docs/src/auto-imports.d.ts
vendored
438
packages/docs/src/auto-imports.d.ts
vendored
@@ -1,223 +1,223 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
// We suggest you to commit this file into source control
|
||||
declare global {
|
||||
const afterAll: typeof import("vitest")["afterAll"];
|
||||
const afterEach: typeof import("vitest")["afterEach"];
|
||||
const assert: typeof import("vitest")["assert"];
|
||||
const asyncComputed: typeof import("@vueuse/core")["asyncComputed"];
|
||||
const autoResetRef: typeof import("@vueuse/core")["autoResetRef"];
|
||||
const beforeAll: typeof import("vitest")["beforeAll"];
|
||||
const beforeEach: typeof import("vitest")["beforeEach"];
|
||||
const biSyncRef: typeof import("@vueuse/core")["biSyncRef"];
|
||||
const chai: typeof import("vitest")["chai"];
|
||||
const computed: typeof import("vue")["computed"];
|
||||
const computedInject: typeof import("@vueuse/core")["computedInject"];
|
||||
const controlledComputed: typeof import("@vueuse/core")["controlledComputed"];
|
||||
const controlledRef: typeof import("@vueuse/core")["controlledRef"];
|
||||
const createApp: typeof import("vue")["createApp"];
|
||||
const createEventHook: typeof import("@vueuse/core")["createEventHook"];
|
||||
const createGlobalState: typeof import("@vueuse/core")["createGlobalState"];
|
||||
const createReactiveFn: typeof import("@vueuse/core")["createReactiveFn"];
|
||||
const createSharedComposable: typeof import("@vueuse/core")["createSharedComposable"];
|
||||
const createUnrefFn: typeof import("@vueuse/core")["createUnrefFn"];
|
||||
const customRef: typeof import("vue")["customRef"];
|
||||
const debouncedRef: typeof import("@vueuse/core")["debouncedRef"];
|
||||
const debouncedWatch: typeof import("@vueuse/core")["debouncedWatch"];
|
||||
const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"];
|
||||
const defineComponent: typeof import("vue")["defineComponent"];
|
||||
const describe: typeof import("vitest")["describe"];
|
||||
const eagerComputed: typeof import("@vueuse/core")["eagerComputed"];
|
||||
const effectScope: typeof import("vue")["effectScope"];
|
||||
const EffectScope: typeof import("vue")["EffectScope"];
|
||||
const expect: typeof import("vitest")["expect"];
|
||||
const extendRef: typeof import("@vueuse/core")["extendRef"];
|
||||
const getCurrentInstance: typeof import("vue")["getCurrentInstance"];
|
||||
const getCurrentScope: typeof import("vue")["getCurrentScope"];
|
||||
const h: typeof import("vue")["h"];
|
||||
const ignorableWatch: typeof import("@vueuse/core")["ignorableWatch"];
|
||||
const inject: typeof import("vue")["inject"];
|
||||
const isDefined: typeof import("@vueuse/core")["isDefined"];
|
||||
const isReadonly: typeof import("vue")["isReadonly"];
|
||||
const isRef: typeof import("vue")["isRef"];
|
||||
const it: typeof import("vitest")["it"];
|
||||
const makeDestructurable: typeof import("@vueuse/core")["makeDestructurable"];
|
||||
const markRaw: typeof import("vue")["markRaw"];
|
||||
const nextTick: typeof import("vue")["nextTick"];
|
||||
const onActivated: typeof import("vue")["onActivated"];
|
||||
const onBeforeMount: typeof import("vue")["onBeforeMount"];
|
||||
const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"];
|
||||
const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"];
|
||||
const onClickOutside: typeof import("@vueuse/core")["onClickOutside"];
|
||||
const onDeactivated: typeof import("vue")["onDeactivated"];
|
||||
const onErrorCaptured: typeof import("vue")["onErrorCaptured"];
|
||||
const onKeyStroke: typeof import("@vueuse/core")["onKeyStroke"];
|
||||
const onMounted: typeof import("vue")["onMounted"];
|
||||
const onRenderTracked: typeof import("vue")["onRenderTracked"];
|
||||
const onRenderTriggered: typeof import("vue")["onRenderTriggered"];
|
||||
const onScopeDispose: typeof import("vue")["onScopeDispose"];
|
||||
const onServerPrefetch: typeof import("vue")["onServerPrefetch"];
|
||||
const onStartTyping: typeof import("@vueuse/core")["onStartTyping"];
|
||||
const onUnmounted: typeof import("vue")["onUnmounted"];
|
||||
const onUpdated: typeof import("vue")["onUpdated"];
|
||||
const pausableWatch: typeof import("@vueuse/core")["pausableWatch"];
|
||||
const provide: typeof import("vue")["provide"];
|
||||
const reactify: typeof import("@vueuse/core")["reactify"];
|
||||
const reactifyObject: typeof import("@vueuse/core")["reactifyObject"];
|
||||
const reactive: typeof import("vue")["reactive"];
|
||||
const reactivePick: typeof import("@vueuse/core")["reactivePick"];
|
||||
const readonly: typeof import("vue")["readonly"];
|
||||
const ref: typeof import("vue")["ref"];
|
||||
const refDefault: typeof import("@vueuse/core")["refDefault"];
|
||||
const resolveComponent: typeof import("vue")["resolveComponent"];
|
||||
const shallowReactive: typeof import("vue")["shallowReactive"];
|
||||
const shallowReadonly: typeof import("vue")["shallowReadonly"];
|
||||
const shallowRef: typeof import("vue")["shallowRef"];
|
||||
const suite: typeof import("vitest")["suite"];
|
||||
const syncRef: typeof import("@vueuse/core")["syncRef"];
|
||||
const templateRef: typeof import("@vueuse/core")["templateRef"];
|
||||
const test: typeof import("vitest")["test"];
|
||||
const throttledRef: typeof import("@vueuse/core")["throttledRef"];
|
||||
const throttledWatch: typeof import("@vueuse/core")["throttledWatch"];
|
||||
const toRaw: typeof import("vue")["toRaw"];
|
||||
const toReactive: typeof import("@vueuse/core")["toReactive"];
|
||||
const toRef: typeof import("vue")["toRef"];
|
||||
const toRefs: typeof import("vue")["toRefs"];
|
||||
const triggerRef: typeof import("vue")["triggerRef"];
|
||||
const tryOnBeforeUnmount: typeof import("@vueuse/core")["tryOnBeforeUnmount"];
|
||||
const tryOnMounted: typeof import("@vueuse/core")["tryOnMounted"];
|
||||
const tryOnScopeDispose: typeof import("@vueuse/core")["tryOnScopeDispose"];
|
||||
const tryOnUnmounted: typeof import("@vueuse/core")["tryOnUnmounted"];
|
||||
const unref: typeof import("vue")["unref"];
|
||||
const unrefElement: typeof import("@vueuse/core")["unrefElement"];
|
||||
const until: typeof import("@vueuse/core")["until"];
|
||||
const useActiveElement: typeof import("@vueuse/core")["useActiveElement"];
|
||||
const useAsyncQueue: typeof import("@vueuse/core")["useAsyncQueue"];
|
||||
const useAsyncState: typeof import("@vueuse/core")["useAsyncState"];
|
||||
const useAttrs: typeof import("vue")["useAttrs"];
|
||||
const useBase64: typeof import("@vueuse/core")["useBase64"];
|
||||
const useBattery: typeof import("@vueuse/core")["useBattery"];
|
||||
const useBreakpoints: typeof import("@vueuse/core")["useBreakpoints"];
|
||||
const useBroadcastChannel: typeof import("@vueuse/core")["useBroadcastChannel"];
|
||||
const useBrowserLocation: typeof import("@vueuse/core")["useBrowserLocation"];
|
||||
const useClamp: typeof import("@vueuse/core")["useClamp"];
|
||||
const useClipboard: typeof import("@vueuse/core")["useClipboard"];
|
||||
const useColorMode: typeof import("@vueuse/core")["useColorMode"];
|
||||
const useConfirmDialog: typeof import("@vueuse/core")["useConfirmDialog"];
|
||||
const useCounter: typeof import("@vueuse/core")["useCounter"];
|
||||
const useCssModule: typeof import("vue")["useCssModule"];
|
||||
const useCssVar: typeof import("@vueuse/core")["useCssVar"];
|
||||
const useCssVars: typeof import("vue")["useCssVars"];
|
||||
const useCycleList: typeof import("@vueuse/core")["useCycleList"];
|
||||
const useDark: typeof import("@vueuse/core")["useDark"];
|
||||
const useDebounce: typeof import("@vueuse/core")["useDebounce"];
|
||||
const useDebouncedRefHistory: typeof import("@vueuse/core")["useDebouncedRefHistory"];
|
||||
const useDebounceFn: typeof import("@vueuse/core")["useDebounceFn"];
|
||||
const useDeviceMotion: typeof import("@vueuse/core")["useDeviceMotion"];
|
||||
const useDeviceOrientation: typeof import("@vueuse/core")["useDeviceOrientation"];
|
||||
const useDevicePixelRatio: typeof import("@vueuse/core")["useDevicePixelRatio"];
|
||||
const useDevicesList: typeof import("@vueuse/core")["useDevicesList"];
|
||||
const useDisplayMedia: typeof import("@vueuse/core")["useDisplayMedia"];
|
||||
const useDocumentVisibility: typeof import("@vueuse/core")["useDocumentVisibility"];
|
||||
const useDraggable: typeof import("@vueuse/core")["useDraggable"];
|
||||
const useElementBounding: typeof import("@vueuse/core")["useElementBounding"];
|
||||
const useElementByPoint: typeof import("@vueuse/core")["useElementByPoint"];
|
||||
const useElementHover: typeof import("@vueuse/core")["useElementHover"];
|
||||
const useElementSize: typeof import("@vueuse/core")["useElementSize"];
|
||||
const useElementVisibility: typeof import("@vueuse/core")["useElementVisibility"];
|
||||
const useEventBus: typeof import("@vueuse/core")["useEventBus"];
|
||||
const useEventListener: typeof import("@vueuse/core")["useEventListener"];
|
||||
const useEventSource: typeof import("@vueuse/core")["useEventSource"];
|
||||
const useEyeDropper: typeof import("@vueuse/core")["useEyeDropper"];
|
||||
const useFavicon: typeof import("@vueuse/core")["useFavicon"];
|
||||
const useFetch: typeof import("@vueuse/core")["useFetch"];
|
||||
const useFocus: typeof import("@vueuse/core")["useFocus"];
|
||||
const useFocusWithin: typeof import("@vueuse/core")["useFocusWithin"];
|
||||
const useFps: typeof import("@vueuse/core")["useFps"];
|
||||
const useFullscreen: typeof import("@vueuse/core")["useFullscreen"];
|
||||
const useGeolocation: typeof import("@vueuse/core")["useGeolocation"];
|
||||
const useHead: typeof import("@vueuse/head")["useHead"];
|
||||
const useI18n: typeof import("vue-i18n")["useI18n"];
|
||||
const useIdle: typeof import("@vueuse/core")["useIdle"];
|
||||
const useIntersectionObserver: typeof import("@vueuse/core")["useIntersectionObserver"];
|
||||
const useInterval: typeof import("@vueuse/core")["useInterval"];
|
||||
const useIntervalFn: typeof import("@vueuse/core")["useIntervalFn"];
|
||||
const useKeyModifier: typeof import("@vueuse/core")["useKeyModifier"];
|
||||
const useLastChanged: typeof import("@vueuse/core")["useLastChanged"];
|
||||
const useLocalStorage: typeof import("@vueuse/core")["useLocalStorage"];
|
||||
const useMagicKeys: typeof import("@vueuse/core")["useMagicKeys"];
|
||||
const useManualRefHistory: typeof import("@vueuse/core")["useManualRefHistory"];
|
||||
const useMediaControls: typeof import("@vueuse/core")["useMediaControls"];
|
||||
const useMediaQuery: typeof import("@vueuse/core")["useMediaQuery"];
|
||||
const useMemoize: typeof import("@vueuse/core")["useMemoize"];
|
||||
const useMemory: typeof import("@vueuse/core")["useMemory"];
|
||||
const useMounted: typeof import("@vueuse/core")["useMounted"];
|
||||
const useMouse: typeof import("@vueuse/core")["useMouse"];
|
||||
const useMouseInElement: typeof import("@vueuse/core")["useMouseInElement"];
|
||||
const useMousePressed: typeof import("@vueuse/core")["useMousePressed"];
|
||||
const useMutationObserver: typeof import("@vueuse/core")["useMutationObserver"];
|
||||
const useNavigatorLanguage: typeof import("@vueuse/core")["useNavigatorLanguage"];
|
||||
const useNetwork: typeof import("@vueuse/core")["useNetwork"];
|
||||
const useNow: typeof import("@vueuse/core")["useNow"];
|
||||
const useOnline: typeof import("@vueuse/core")["useOnline"];
|
||||
const usePageLeave: typeof import("@vueuse/core")["usePageLeave"];
|
||||
const useParallax: typeof import("@vueuse/core")["useParallax"];
|
||||
const usePermission: typeof import("@vueuse/core")["usePermission"];
|
||||
const usePointer: typeof import("@vueuse/core")["usePointer"];
|
||||
const usePointerSwipe: typeof import("@vueuse/core")["usePointerSwipe"];
|
||||
const usePreferredColorScheme: typeof import("@vueuse/core")["usePreferredColorScheme"];
|
||||
const usePreferredDark: typeof import("@vueuse/core")["usePreferredDark"];
|
||||
const usePreferredLanguages: typeof import("@vueuse/core")["usePreferredLanguages"];
|
||||
const useRafFn: typeof import("@vueuse/core")["useRafFn"];
|
||||
const useRefHistory: typeof import("@vueuse/core")["useRefHistory"];
|
||||
const useResizeObserver: typeof import("@vueuse/core")["useResizeObserver"];
|
||||
const useRoute: typeof import("vue-router")["useRoute"];
|
||||
const useRouter: typeof import("vue-router")["useRouter"];
|
||||
const useScreenSafeArea: typeof import("@vueuse/core")["useScreenSafeArea"];
|
||||
const useScriptTag: typeof import("@vueuse/core")["useScriptTag"];
|
||||
const useScroll: typeof import("@vueuse/core")["useScroll"];
|
||||
const useScrollLock: typeof import("@vueuse/core")["useScrollLock"];
|
||||
const useSessionStorage: typeof import("@vueuse/core")["useSessionStorage"];
|
||||
const useShare: typeof import("@vueuse/core")["useShare"];
|
||||
const useSlots: typeof import("vue")["useSlots"];
|
||||
const useSpeechRecognition: typeof import("@vueuse/core")["useSpeechRecognition"];
|
||||
const useSpeechSynthesis: typeof import("@vueuse/core")["useSpeechSynthesis"];
|
||||
const useStorage: typeof import("@vueuse/core")["useStorage"];
|
||||
const useStorageAsync: typeof import("@vueuse/core")["useStorageAsync"];
|
||||
const useStyleTag: typeof import("@vueuse/core")["useStyleTag"];
|
||||
const useSwipe: typeof import("@vueuse/core")["useSwipe"];
|
||||
const useTemplateRefsList: typeof import("@vueuse/core")["useTemplateRefsList"];
|
||||
const useTextSelection: typeof import("@vueuse/core")["useTextSelection"];
|
||||
const useThrottle: typeof import("@vueuse/core")["useThrottle"];
|
||||
const useThrottledRefHistory: typeof import("@vueuse/core")["useThrottledRefHistory"];
|
||||
const useThrottleFn: typeof import("@vueuse/core")["useThrottleFn"];
|
||||
const useTimeAgo: typeof import("@vueuse/core")["useTimeAgo"];
|
||||
const useTimeout: typeof import("@vueuse/core")["useTimeout"];
|
||||
const useTimeoutFn: typeof import("@vueuse/core")["useTimeoutFn"];
|
||||
const useTimestamp: typeof import("@vueuse/core")["useTimestamp"];
|
||||
const useTitle: typeof import("@vueuse/core")["useTitle"];
|
||||
const useToggle: typeof import("@vueuse/core")["useToggle"];
|
||||
const useTransition: typeof import("@vueuse/core")["useTransition"];
|
||||
const useUrlSearchParams: typeof import("@vueuse/core")["useUrlSearchParams"];
|
||||
const useUserMedia: typeof import("@vueuse/core")["useUserMedia"];
|
||||
const useVibrate: typeof import("@vueuse/core")["useVibrate"];
|
||||
const useVirtualList: typeof import("@vueuse/core")["useVirtualList"];
|
||||
const useVModel: typeof import("@vueuse/core")["useVModel"];
|
||||
const useVModels: typeof import("@vueuse/core")["useVModels"];
|
||||
const useWakeLock: typeof import("@vueuse/core")["useWakeLock"];
|
||||
const useWebNotification: typeof import("@vueuse/core")["useWebNotification"];
|
||||
const useWebSocket: typeof import("@vueuse/core")["useWebSocket"];
|
||||
const useWebWorker: typeof import("@vueuse/core")["useWebWorker"];
|
||||
const useWebWorkerFn: typeof import("@vueuse/core")["useWebWorkerFn"];
|
||||
const useWindowFocus: typeof import("@vueuse/core")["useWindowFocus"];
|
||||
const useWindowScroll: typeof import("@vueuse/core")["useWindowScroll"];
|
||||
const useWindowSize: typeof import("@vueuse/core")["useWindowSize"];
|
||||
const vi: typeof import("vitest")["vi"];
|
||||
const vitest: typeof import("vitest")["vitest"];
|
||||
const watch: typeof import("vue")["watch"];
|
||||
const watchAtMost: typeof import("@vueuse/core")["watchAtMost"];
|
||||
const watchEffect: typeof import("vue")["watchEffect"];
|
||||
const watchOnce: typeof import("@vueuse/core")["watchOnce"];
|
||||
const watchWithFilter: typeof import("@vueuse/core")["watchWithFilter"];
|
||||
const whenever: typeof import("@vueuse/core")["whenever"];
|
||||
const afterAll: typeof import('vitest')['afterAll']
|
||||
const afterEach: typeof import('vitest')['afterEach']
|
||||
const assert: typeof import('vitest')['assert']
|
||||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
||||
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
||||
const beforeAll: typeof import('vitest')['beforeAll']
|
||||
const beforeEach: typeof import('vitest')['beforeEach']
|
||||
const biSyncRef: typeof import('@vueuse/core')['biSyncRef']
|
||||
const chai: typeof import('vitest')['chai']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const computedInject: typeof import('@vueuse/core')['computedInject']
|
||||
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
|
||||
const controlledRef: typeof import('@vueuse/core')['controlledRef']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const createEventHook: typeof import('@vueuse/core')['createEventHook']
|
||||
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const describe: typeof import('vitest')['describe']
|
||||
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const expect: typeof import('vitest')['expect']
|
||||
const extendRef: typeof import('@vueuse/core')['extendRef']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isDefined: typeof import('@vueuse/core')['isDefined']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const it: typeof import('vitest')['it']
|
||||
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactify: typeof import('@vueuse/core')['reactify']
|
||||
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const reactivePick: typeof import('@vueuse/core')['reactivePick']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const refDefault: typeof import('@vueuse/core')['refDefault']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const suite: typeof import('vitest')['suite']
|
||||
const syncRef: typeof import('@vueuse/core')['syncRef']
|
||||
const templateRef: typeof import('@vueuse/core')['templateRef']
|
||||
const test: typeof import('vitest')['test']
|
||||
const throttledRef: typeof import('@vueuse/core')['throttledRef']
|
||||
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toReactive: typeof import('@vueuse/core')['toReactive']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
|
||||
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
|
||||
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
|
||||
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
||||
const until: typeof import('@vueuse/core')['until']
|
||||
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
||||
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
|
||||
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useBase64: typeof import('@vueuse/core')['useBase64']
|
||||
const useBattery: typeof import('@vueuse/core')['useBattery']
|
||||
const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
|
||||
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
|
||||
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||
const useClamp: typeof import('@vueuse/core')['useClamp']
|
||||
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||
const useCounter: typeof import('@vueuse/core')['useCounter']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVar: typeof import('@vueuse/core')['useCssVar']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useCycleList: typeof import('@vueuse/core')['useCycleList']
|
||||
const useDark: typeof import('@vueuse/core')['useDark']
|
||||
const useDebounce: typeof import('@vueuse/core')['useDebounce']
|
||||
const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
|
||||
const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
|
||||
const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
|
||||
const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
|
||||
const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
|
||||
const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
|
||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||
const useElementSize: typeof import('@vueuse/core')['useElementSize']
|
||||
const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
|
||||
const useEventBus: typeof import('@vueuse/core')['useEventBus']
|
||||
const useEventListener: typeof import('@vueuse/core')['useEventListener']
|
||||
const useEventSource: typeof import('@vueuse/core')['useEventSource']
|
||||
const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
|
||||
const useFavicon: typeof import('@vueuse/core')['useFavicon']
|
||||
const useFetch: typeof import('@vueuse/core')['useFetch']
|
||||
const useFocus: typeof import('@vueuse/core')['useFocus']
|
||||
const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
|
||||
const useFps: typeof import('@vueuse/core')['useFps']
|
||||
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
|
||||
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
|
||||
const useHead: typeof import('@vueuse/head')['useHead']
|
||||
const useI18n: typeof import('vue-i18n')['useI18n']
|
||||
const useIdle: typeof import('@vueuse/core')['useIdle']
|
||||
const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
|
||||
const useInterval: typeof import('@vueuse/core')['useInterval']
|
||||
const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
|
||||
const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
|
||||
const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
|
||||
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
|
||||
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
|
||||
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
|
||||
const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
|
||||
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
|
||||
const useMemoize: typeof import('@vueuse/core')['useMemoize']
|
||||
const useMemory: typeof import('@vueuse/core')['useMemory']
|
||||
const useMounted: typeof import('@vueuse/core')['useMounted']
|
||||
const useMouse: typeof import('@vueuse/core')['useMouse']
|
||||
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
|
||||
const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
|
||||
const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
|
||||
const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
|
||||
const useNetwork: typeof import('@vueuse/core')['useNetwork']
|
||||
const useNow: typeof import('@vueuse/core')['useNow']
|
||||
const useOnline: typeof import('@vueuse/core')['useOnline']
|
||||
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
||||
const useParallax: typeof import('@vueuse/core')['useParallax']
|
||||
const usePermission: typeof import('@vueuse/core')['usePermission']
|
||||
const usePointer: typeof import('@vueuse/core')['usePointer']
|
||||
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
|
||||
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
|
||||
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
|
||||
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
|
||||
const useRafFn: typeof import('@vueuse/core')['useRafFn']
|
||||
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
|
||||
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
|
||||
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
||||
const useScroll: typeof import('@vueuse/core')['useScroll']
|
||||
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
|
||||
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
|
||||
const useShare: typeof import('@vueuse/core')['useShare']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
|
||||
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
|
||||
const useStorage: typeof import('@vueuse/core')['useStorage']
|
||||
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
|
||||
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
|
||||
const useSwipe: typeof import('@vueuse/core')['useSwipe']
|
||||
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
|
||||
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
|
||||
const useThrottle: typeof import('@vueuse/core')['useThrottle']
|
||||
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
|
||||
const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
|
||||
const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
|
||||
const useTimeout: typeof import('@vueuse/core')['useTimeout']
|
||||
const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
|
||||
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
|
||||
const useTitle: typeof import('@vueuse/core')['useTitle']
|
||||
const useToggle: typeof import('@vueuse/core')['useToggle']
|
||||
const useTransition: typeof import('@vueuse/core')['useTransition']
|
||||
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
|
||||
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
|
||||
const useVibrate: typeof import('@vueuse/core')['useVibrate']
|
||||
const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
|
||||
const useVModel: typeof import('@vueuse/core')['useVModel']
|
||||
const useVModels: typeof import('@vueuse/core')['useVModels']
|
||||
const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
|
||||
const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
|
||||
const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
|
||||
const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
|
||||
const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
|
||||
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
|
||||
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
|
||||
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
|
||||
const vi: typeof import('vitest')['vi']
|
||||
const vitest: typeof import('vitest')['vitest']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
||||
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
|
||||
const whenever: typeof import('@vueuse/core')['whenever']
|
||||
}
|
||||
export {};
|
||||
export {}
|
||||
|
||||
1
packages/docs/src/components.d.ts
vendored
1
packages/docs/src/components.d.ts
vendored
@@ -20,6 +20,7 @@ declare module 'vue' {
|
||||
'Fluent:databaseSearch24Regular': typeof import('~icons/fluent/database-search24-regular')['default']
|
||||
Footer: typeof import('./components/Footer.vue')['default']
|
||||
'Iconoir:download': typeof import('~icons/iconoir/download')['default']
|
||||
LinkValidation: typeof import('./components/LinkValidation.vue')['default']
|
||||
'Mdi:folderHome': typeof import('~icons/mdi/folder-home')['default']
|
||||
'Mdi:github': typeof import('~icons/mdi/github')['default']
|
||||
'Mdi:languageRust': typeof import('~icons/mdi/language-rust')['default']
|
||||
|
||||
40
packages/docs/src/components/LinkValidation.vue
Normal file
40
packages/docs/src/components/LinkValidation.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<script setup lang="ts">
|
||||
import { useFetch } from "@vueuse/core";
|
||||
const props = defineProps({
|
||||
url: {type: String, required: true}
|
||||
});
|
||||
|
||||
const proxiedUrl = computed(() => props.url.replace("https://tauri.studio", "/tauri").replace("https://github.com", "/github") + "/");
|
||||
|
||||
const {execute, data, isFetching, statusCode, isFinished } = useFetch(proxiedUrl.value, {method: "HEAD"}, {refetch: false, immediate: false});
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
execute().catch(_err => {}); // wait up to 500ms before requesting to space give breathing room for render and other requests
|
||||
}, Math.floor(Math.random()*500));
|
||||
|
||||
const statusColor = computed(() => {
|
||||
return isFetching.value ? "bg-grey-500" : isFinished.value && statusCode.value && statusCode.value< 300 ? "bg-green-500" : isFinished.value ? "bg-red-500" : "bg-orange-500";
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-row px-1 hover:text-green-600 hover:font-bold relative">
|
||||
<v-tooltip>
|
||||
<a :href="(props.url as string)" target="_new" class="flex flex-row space-x-0.5">
|
||||
<ph:link-light class="flex mr-1" />
|
||||
</a>
|
||||
<template #popper>
|
||||
<span class="font-light italic">The URL for the search document is:</span><br>
|
||||
{{props.url}}
|
||||
</template>
|
||||
</v-tooltip>
|
||||
<div class="link-validation absolute top-0.25 opacity-75 right-0" :data-code="statusCode" :data-info="data" >
|
||||
<div class="rounded-full w-2 h-2 " :class="statusColor" ></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
@@ -38,23 +38,29 @@ const searchable =s.indexSettings[doc.value._idx as any].searchableAttributes as
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col border-1 rounded px-2 py-1 border-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-700/50 ">
|
||||
<div class="flex flex-row space-x-1 items-center place-content-center cursor-pointer" @click="details">
|
||||
<div class="flex flex-col border-1 rounded px-2 py-1 border-gray-500 ">
|
||||
<div class="flex flex-row space-x-1 -mx-2 -my-1 px-2 py-1 items-center place-content-center cursor-pointer hover:bg-gray-100/50 dark:hover:bg-gray-700/50" @click="details">
|
||||
<div v-if="doc._idx === 'repo'" class="flex flex-row flex-grow space-x-1 items-center place-items-center">
|
||||
<mdi:github class="flex flex-shrink-0" />
|
||||
<div class="name font-semibold flex-shrink-0 pr-2">{{doc.name}}</div>
|
||||
<div class="description flex flex-grow font-light text-sm truncate text-gray-500">{{doc.description}}</div>
|
||||
<link-validation :url="(doc.url as string)" />
|
||||
</div>
|
||||
|
||||
<div v-if="doc._idx === 'api'" class="flex flex-row flex-grow space-x-2 place-items-center items-center">
|
||||
<vscode-icons:file-type-typescript-official v-if="doc.language === 'typescript'" class="flex flex-shrink-0" />
|
||||
<vscode-icons:file-type-rust v-if="doc.language === 'rust'" class="flex" />
|
||||
<span class="flex">{{ doc.name }}</span>
|
||||
<span class="flex flex-grow">{{ doc.name }}</span>
|
||||
<div v-if="doc._idx === 'api'" class="flex text-xs font-medium px-1 py-0.5 bg-blue-500 dark:bg-blue-600 text-gray-50 rounded">
|
||||
{{apiKind}}
|
||||
</div>
|
||||
<link-validation :url="(doc.url as string)" />
|
||||
</div>
|
||||
|
||||
<div v-if="doc._idx === 'prose'" class="flex flex-row flex-grow space-x-2 place-items-center items-center">
|
||||
<ant-design:file-markdown-outlined class="flex" />
|
||||
<div class="name">{{doc.title}}</div>
|
||||
<div class="name flex flex-grow">{{doc.title}}</div>
|
||||
<link-validation :url="(doc.url as string)" />
|
||||
</div>
|
||||
|
||||
<div v-if="doc._idx === 'consolidated'" class="w-full">
|
||||
@@ -62,39 +68,36 @@ const searchable =s.indexSettings[doc.value._idx as any].searchableAttributes as
|
||||
<vscode-icons:file-type-rust v-if="doc.language === 'rust'" class="flex" />
|
||||
<vscode-icons:file-type-typescript-official v-else class="flex" />
|
||||
|
||||
<div class="symbolName font-semibold">{{doc.hierarchy_lvl0}}</div>
|
||||
<div class="text-sm font-light">{{doc.symbol}}</div>
|
||||
<div class="symbolName font-semibold">
|
||||
<span class="font-light">{{doc.hierarchy_lvl1 && doc.hierarchy_lvl1 !== doc.hierarchy_lvl0 ? `${doc.hierarchy_lvl1}::` : ""}}</span>
|
||||
{{doc.hierarchy_lvl0}}
|
||||
</div>
|
||||
<div class="text-sm font-light flex flex-grow">{{doc.symbol}}</div>
|
||||
|
||||
<link-validation :url="(doc.url as string)" />
|
||||
</div>
|
||||
|
||||
<!-- PROSE -->
|
||||
<div v-if="doc.from === 'prose'" class="flex flex-row flex-grow space-x-2 place-items-center items-center">
|
||||
<teenyicons:text-document-solid class="flex" />
|
||||
<div class="title font-semibold flex-shrink-0">{{doc.hierarchy_lvl0}}</div>
|
||||
<div class="title font-light truncate text-gray-500">{{doc.hierarchy_lvl1}}</div>
|
||||
<div class="title font-light truncate text-gray-500 flex flex-grow">{{doc.hierarchy_lvl1}}</div>
|
||||
<link-validation :url="(doc.url as string)" />
|
||||
</div>
|
||||
|
||||
<!-- REPOs -->
|
||||
<div v-if="doc.from === 'repo'" class="flex flex-row flex-grow space-x-2 place-items-center items-center">
|
||||
<mdi:github class="flex flex-shrink-0" />
|
||||
<div class="name font-semibold flex-shrink-0">{{doc.hierarchy_lvl0}}</div>
|
||||
<div class="description truncate flex-shrink text-gray-500 font-light">{{doc.hierarchy_lvl0}}</div>
|
||||
<div v-if="doc.from === 'repo'" class="flex flex-row space-x-2 place-items-start items-start">
|
||||
<mdi:github class="flex flex-shrink-0 flex-grow-0" />
|
||||
<div class="name font-semibold flex-shrink-0 flex-grow-0">{{doc.hierarchy_lvl0}}</div>
|
||||
<div class="description truncate flex-shrink text-gray-500 font-light flex-grow">{{doc.hierarchy_lvl1}}</div>
|
||||
<link-validation :url="(doc.url as string)" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="doc._idx === 'api'" class="flex text-xs font-medium px-1 py-0.5 bg-blue-500 dark:bg-blue-600 text-gray-50 rounded">
|
||||
{{apiKind}}
|
||||
</div>
|
||||
<div class="flex px-1 hover:text-green-600 hover:font-bold ">
|
||||
<a :href="(doc.url as string)" target="_new">
|
||||
<ph:link-light class="flex" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div v-if="showDetails" class="items-start mt-2">
|
||||
<div v-if="showDetails" class="items-start my-2">
|
||||
<div
|
||||
v-for="key in Object.keys(doc)" :key="key" class="flex items-start justify-start" :class="[
|
||||
searchable?.includes(key) || searchable[0] === '*' || false ? 'text-gray-800 dark:text-gray-200' : 'text-gray-500',
|
||||
@@ -105,6 +108,9 @@ v-for="key in Object.keys(doc)" :key="key" class="flex items-start justify-start
|
||||
{{doc[key]}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-sm italic mt-2">
|
||||
key/values in grey are not "searchable" values and do not contribute to ranking.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -58,7 +58,7 @@ const changeServer = (_server: {name: string; url: string}) => {
|
||||
type="text"
|
||||
autocomplete="false"
|
||||
spellcheck="false"
|
||||
class="px-auto px-4 py-4 w-350px text-center bg-transparent self-center"
|
||||
class="px-auto px-4 py-4 w-350px text-center bg-transparent self-center dark:focus:placeholder-gray-700 focus:placeholder-gray-300"
|
||||
border="~ rounded gray-200 dark:gray-700"
|
||||
outline="none active:none"
|
||||
>
|
||||
|
||||
@@ -2,13 +2,13 @@ import { mount } from "@vue/test-utils";
|
||||
import Counter from "../src/components/Counter.vue";
|
||||
|
||||
describe("Counter.vue", () => {
|
||||
it("should render", () => {
|
||||
it.skip("should render", () => {
|
||||
const wrapper = mount(Counter, { props: { initial: 10 } });
|
||||
expect(wrapper.text()).toContain("10");
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should be interactive", async() => {
|
||||
it.skip("should be interactive", async() => {
|
||||
const wrapper = mount(Counter, { props: { initial: 0 } });
|
||||
expect(wrapper.text()).toContain("0");
|
||||
|
||||
|
||||
@@ -19,6 +19,28 @@ import MdExpandable from "markdown-it-expandable";
|
||||
const markdownWrapperClasses = "prose prose-sm m-auto text-left";
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
"/tauri": {
|
||||
target: "https://tauri.studio",
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
rewrite: (path) => path.replace(/^\/tauri/, "/"),
|
||||
},
|
||||
"/github": {
|
||||
target: "https://github.com",
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
rewrite: (path) => path.replace(/^\/github/, "/"),
|
||||
},
|
||||
"/rust": {
|
||||
target: "https://docs.rs",
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
rewrite: (path) => path.replace(/^\/rust/, "/"),
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"~/": `${path.resolve(__dirname, "src")}/`,
|
||||
@@ -143,12 +165,6 @@ export default defineConfig({
|
||||
}),
|
||||
],
|
||||
|
||||
server: {
|
||||
fs: {
|
||||
strict: true,
|
||||
},
|
||||
},
|
||||
|
||||
// https://github.com/antfu/vite-ssg
|
||||
ssgOptions: {
|
||||
script: "async",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"build:cli": "tsup src/cli/*.ts --format=esm,cjs --clean --sourcemap -d bin",
|
||||
"build:npm": "tsup src/index.ts --dts --format=esm,cjs --sourcemap --clean -d dist ",
|
||||
"clean": "rimraf dist/* bin/*",
|
||||
"clear-caches": "node bin/clear-caches.js",
|
||||
"clear-caches": "rimraf src/generated/ast && node bin/clear-caches.js",
|
||||
"create-indexes": "node bin/create-indexes.js",
|
||||
"drop-indexes": "node bin/drop-indexes.js",
|
||||
"current-indexes": "node bin/current-indexes.js",
|
||||
@@ -27,6 +27,7 @@
|
||||
"push-typescript": "node bin/push-typescript.js",
|
||||
"rebuild-caches": "node bin/rebuild-caches.js",
|
||||
"refresh-prose": "node bin/refresh-prose.js",
|
||||
"refresh-sitemap": "node bin/refresh-sitemap.js",
|
||||
"refresh-repos": "node bin/refresh-repos.js",
|
||||
"refresh-typescript": "node bin/refresh-typescript.js",
|
||||
"restart": "docker compose restart",
|
||||
@@ -40,10 +41,12 @@
|
||||
"watch:npm": "tsup src/index.ts --dts --format=esm,cjs --sourcemap -d dist --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/html-to-text": "^8.0.1",
|
||||
"axios": "^0.25.0",
|
||||
"dotenv": "^14.3.2",
|
||||
"fast-glob": "^3.2.11",
|
||||
"gray-matter": "^4.0.3",
|
||||
"html-to-text": "^8.1.0",
|
||||
"inferred-types": "^0.18.4",
|
||||
"native-dash": "^1.21.5",
|
||||
"simple-markdown-2": "^0.7.5"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { readFile } from "fs/promises";
|
||||
// import xxhash from "xxhash-wasm";
|
||||
import matter from "gray-matter";
|
||||
import {convert} from "html-to-text";
|
||||
import smd from "simple-markdown-2";
|
||||
import { ITauriFrontmatter, MarkdownAst } from "~/types/markdown";
|
||||
|
||||
@@ -61,7 +62,7 @@ function parseContent(f: string, content: string) {
|
||||
filepath,
|
||||
hash,
|
||||
frontmatter: validateFrontmatter(f, frontmatter),
|
||||
text,
|
||||
text: convert(text),
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
|
||||
@@ -48,7 +48,7 @@ import { getEnv } from "~/utils/getEnv";
|
||||
`- all ${proseTasks.length} documents were pushed via API; monitoring task status ...`
|
||||
);
|
||||
|
||||
await communicateTaskStatus(ProseModel, proseTasks, { timeout: 30000 });
|
||||
await communicateTaskStatus(ProseModel, proseTasks, { timeout: 45000 });
|
||||
|
||||
console.log(`- Pushing Repo document cache into MeiliSearch`);
|
||||
|
||||
|
||||
@@ -17,5 +17,5 @@ import { ProseModel } from "..";
|
||||
`- all ${tasks.length} documents were pushed via API; monitoring task status ...`
|
||||
);
|
||||
|
||||
await communicateTaskStatus(ProseModel, tasks, { timeout: 30000 });
|
||||
await communicateTaskStatus(ProseModel, tasks, { timeout: 45000 });
|
||||
})();
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* eslint-disable no-console */
|
||||
import { refreshProse } from "~/pipelines/refreshProse";
|
||||
import { getEnv } from "~/utils/getEnv";
|
||||
|
||||
(async () => {
|
||||
const { repo, branch, force } = getEnv();
|
||||
console.log(`- refreshing all prose from ${repo}@${branch}`);
|
||||
|
||||
await refreshProse(repo, branch, { force });
|
||||
console.log(`- completed updates of prose [${repo}@${branch}] `);
|
||||
})();
|
||||
|
||||
65
packages/tauri-search/src/cli/refresh-sitemap.ts
Normal file
65
packages/tauri-search/src/cli/refresh-sitemap.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
|
||||
import { refreshSitemap } from "~/pipelines/refreshSitemap";
|
||||
import { flattenSitemap, sitemapDictionary } from "~/utils/convertSitemap";
|
||||
import { CacheKind, getCache } from "~/utils/getCache";
|
||||
import { getEnv } from "~/utils/getEnv";
|
||||
import { writeGeneratedFile } from "~/utils/writeGeneratedFile";
|
||||
|
||||
(async () => {
|
||||
const { repo, branch} = getEnv();
|
||||
const filename = `src/generated/sitemap-${repo}-${branch}.json`;
|
||||
const existingSitemap = sitemapDictionary(await getCache(CacheKind.sitemap));
|
||||
const existingFlatmap = flattenSitemap(await getCache(CacheKind.sitemap));
|
||||
|
||||
console.log(`- refreshing prose sitemap for ${repo}@${branch}${existingSitemap ? `; using existing sitemap for deltas [${existingFlatmap?.length} docs]` : ""}`);
|
||||
|
||||
const sitemap = await refreshSitemap({ ref: branch, repo });
|
||||
const contents = flattenSitemap( sitemap);
|
||||
const changed: string[] = [];
|
||||
const added: string[] = [];
|
||||
const removed: string[] = [];
|
||||
|
||||
if(existingSitemap) {
|
||||
for (const doc of contents) {
|
||||
|
||||
if(existingSitemap[doc.filepath as any].sha && existingSitemap[doc.filepath as any].sha !== doc.sha) {
|
||||
changed.push(doc.filepath);
|
||||
} else if (!existingSitemap[doc.filepath as any]?.filepath && doc.sha !== existingSitemap[doc.filepath as any]?.sha ) {
|
||||
added.push(doc.filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(existingFlatmap) {
|
||||
for (const doc of existingFlatmap) {
|
||||
if(!contents[doc.filepath as any]) {
|
||||
removed.push(doc.filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`- updated sitemap has ${contents.length} documents`);
|
||||
if(existingSitemap) {
|
||||
if(added.length > 0) {
|
||||
console.log(`- ${added.length} files added since last check: `);
|
||||
}
|
||||
if(changed.length > 0) {
|
||||
console.log(`- ${changed.length} files changed since last check: ${changed.join(", ")}`);
|
||||
}
|
||||
if(removed.length > 0) {
|
||||
console.log(`- ${removed.length} files added since last check: ${removed.join(", ")}`);
|
||||
}
|
||||
if([added, changed,removed].every(i => i.length === 0)) {
|
||||
console.log(`- no files changed since the last check`);
|
||||
}
|
||||
}
|
||||
|
||||
await writeGeneratedFile(
|
||||
filename,
|
||||
JSON.stringify(sitemap)
|
||||
);
|
||||
|
||||
console.log(`- files saved to: ${filename}`);
|
||||
|
||||
})();
|
||||
@@ -1,15 +0,0 @@
|
||||
import { writeFile } from "fs/promises";
|
||||
import { config } from "dotenv";
|
||||
import { refreshSitemap } from "~/pipelines/refreshSitemap";
|
||||
|
||||
(async () => {
|
||||
config();
|
||||
const repo = process.env.REPO || "tauri";
|
||||
const ref = process.env.BRANCH || "dev";
|
||||
const sitemap = await refreshSitemap({ ref, repo });
|
||||
await writeFile(
|
||||
`src/generated/sitemap-${repo}-${ref}.json`,
|
||||
JSON.stringify(sitemap),
|
||||
"utf-8"
|
||||
);
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
[]
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"cli.md","filepath":"docs/api","hash":42,"frontmatter":{"id":"cli","title":"CLI"},"text":"\nimport Command from '@theme/Command'\nimport Alert from '@theme/Alert'\n\n\nThe tauri.js cli is composed in TypeScript and published as JavaScript. \n\n## `info`\n\n<Command name=\"info\" />\n\n```\n Description\n Returns the known state of tauri dependencies and configuration\n```\n\nIt shows a concise list of information about the environment, Rust, Node.js and their versions as well as some relevant configurations.\n\n<Alert title=\"Note\" icon=\"info-alt\">\nThis command is pretty helpful when you need to have a quick overview of your application. When requesting some help, it can be useful that you share this report with us.\n</Alert>\n\n## `init`\n\n<Command name=\"init\" />\n\n```\n Description\n Inits the Tauri template. If Tauri cannot find the src-tauri/tauri.conf.json\n it will create one.\n Usage\n $ tauri init\n Options\n --help, -h Displays this message\n --force, -f Force init to overwrite [conf|template|all]\n --log, -l Logging [boolean]\n --directory, -d Set target directory for init\n --tauriPath, -t Path of the Tauri project to use (relative to the cwd)\n```\n\n## `dev`\n\n<Command name=\"dev\" />\n\n```\n Description\n Tauri dev.\n Usage\n $ tauri dev\n Options\n --help, -h Displays this message\n```\n\nThis command will open the WebView in development mode. It makes use of the `build.devPath` property from your `src-tauri/tauri.conf.json` file.\n\nIf you have entered a command to the `build.beforeDevCommand` property, this one will be executed before the `dev` command.\n\n<a href=\"/docs/api/config#build\">See more about the configuration.</a><br/><br/>\n\n<Alert title=\"Troubleshooting\" type=\"warning\" icon=\"alert\">\n\nIf you're not using `build.beforeDevCommand`, make sure your `build.devPath` is correct and, if using a development server, that it's started before using this command.\n</Alert>\n\n## `deps`\n\n<Command name=\"deps update\" />\n\n```sh\n Description\n Tauri dependency management script\n Usage\n $ tauri deps [install|update]\n```\n\n\n## `build`\n\n<Command name=\"build\" />\n\n```\n Description\n Tauri build.\n Usage\n $ tauri build\n Options\n --help, -h Displays this message\n --debug, -d Build a tauri app with debugging\n```\n\nThis command will bundle your application, either in production mode or debug mode if you used the `--debug` flag. It makes use of the `build.distDir` property from your `src-tauri/tauri.conf.json` file.\n\nIf you have entered a command to the `build.beforeBuildCommand` property, this one will be executed before the `build` command.\n\n<a href=\"/docs/api/config#build\">See more about the configuration.</a>\n\n## `icon`\n\n<Command name=\"icon\" />\n\n```\n Description\n Create all the icons you need for your Tauri app.\n\n Usage\n $ tauri icon\n\n Options\n --help, -h Displays this message\n --log, -l Logging [boolean]\n --icon, -i Source icon (png, 1240x1240 with transparency)\n --target, -t Target folder (default: 'src-tauri/icons')\n --compression, -c Compression type [pngquant|optipng|zopfli]\n```\n\nThis command will generate a set of icons, based on the source icon you've entered.\n\n## `version`\n\n<Command name=\"--version\" />\n\n```\n Description\n Returns the current version of tauri\n```\n\nThis command will show the current version of Tauri.\n\n## CLI usage\n\nSee more about the usage through this [complete guide](/docs/usage/development/integration).\n\n","h1":[],"h2":[{"content":"info","type":"inlineCode"},{"content":"init","type":"inlineCode"},{"content":"dev","type":"inlineCode"},{"content":"deps","type":"inlineCode"},{"content":"build","type":"inlineCode"},{"content":"icon","type":"inlineCode"},{"content":"version","type":"inlineCode"},{"content":"CLI usage","type":"text"}],"h3":[],"hasCodeBlock":true,"programmingLanguages":[null,"sh"],"otherSymbols":["text","inlineCode","link"]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"intro.md","filepath":"docs/getting-started","hash":42,"frontmatter":{"title":"Introduction"},"text":"\nimport OSList from '@theme/OSList'\n\nWelcome to Tauri!\n\nTauri is a polyglot and generic system that is very composable and allows engineers to make a wide variety of applications. It is used for building applications for Desktop Computers using a combination of [Rust](https://www.rust-lang.org/) tools and HTML rendered in a Webview. Apps built with Tauri can ship with any number of pieces of an optional JS API / Rust API so that webviews can control the system via message passing.\n\nAnything that can be displayed on a website, can be displayed in a Tauri webview app!\n\nDevelopers are free to build the web front-end displayed in a Webview through Tauri with any web frameworks of their choice!\n**Developers can even extend the default API** with their own functionality and bridge the Webview and Rust-based backend easily!\n\nThe Architecture is more fully described in [Architecture](https://github.com/tauri-apps/tauri/blob/dev/ARCHITECTURE.md).\n\nThis guide will help you create your first Tauri app. It should only take about 10 minutes, although it could take longer if you have a slower internet connection.\n\nIf you find an error or something unclear, or would like to propose an improvement, you have several options:\n\n1. Open an issue on our [Github Repo](https://github.com/tauri-apps/tauri-docs)\n2. Visit our [Discord server](https://discord.gg/tauri) and raise your concern\n3. Request to join the education working group on Discord to gain access to its discussion channel\n\n## Steps\n\n1. Install and configure system prerequisites\n2. Create a web app with your frontend framework of choice\n3. Use the Tauri CLI to setup Tauri in your app\n4. Write native Rust code to add functionality or improve performance (totally optional)\n5. Use `tauri dev` to develop your app with features like hot module reloading and webview devtools\n6. Use `tauri build` to package your app into a tiny installer\n\n### Setting up Your Environment\n\nBefore creating an app, you'll have to install and configure some developer tools. This guide assumes that you know what the command line is, how to install packages on your operating system, and generally know your way around the development side of computing.\n\nFollow the platform-specific guides to get started:\n\n<OSList content={{\n linux: { title: 'Linux Setup', link: '/docs/getting-started/setup-linux'},\n macos: { title: 'macOS Setup', link: '/docs/getting-started/setup-macos'},\n windows: { title: 'Windows Setup', link: '/docs/getting-started/setup-windows'}\n}} />\n\nAfter that, you'll be ready to [add Tauri to your project!](/docs/usage/development/integration)\n","h1":[],"h2":[{"content":"Steps","type":"text"}],"h3":[{"content":"Setting up Your Environment","type":"text"}],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","link","strong","list"]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"setup-macos.md","filepath":"docs/getting-started","hash":42,"frontmatter":{"title":"Setup for macOS"},"text":"\nimport Alert from '@theme/Alert'\nimport { Intro } from '@theme/SetupDocs'\nimport Icon from '@theme/Icon'\n\n<Intro />\n\n## 1. System Dependencies <Icon title=\"alert\" color=\"danger\"/>\n\n\nYou will need to have <a href=\"https://brew.sh/\" target=\"_blank\">Homebrew</a> installed to run the following command.\n\n```sh\n$ brew install gcc\n```\n\nYou will also need to make sure `xcode` is installed.\n\n```sh\n$ xcode-select --install\n```\n\n## 2. Node.js Runtime and Package Manager <Icon title=\"control-skip-forward\" color=\"warning\"/>\n\n### Node.js (npm included)\n\nWe recommend using nvm to manage your Node.js runtime. It allows you to easily switch versions and update Node.js.\n\n```sh\n$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash\n```\n\n<Alert title=\"Note\">\nWe have audited this bash script, and it does what it says it is supposed to do. Nevertheless, before blindly curl-bashing a script, it is always wise to look at it first. Here is the file as a mere <a href=\"https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh\" target=\"_blank\">download link</a>.\n</Alert>\n\nOnce nvm is installed, close and reopen your terminal, then install the latest version of Node.js and npm:\n\n```sh\n$ nvm install node --latest-npm\n$ nvm use node\n```\n\nIf you have any problems with nvm, please consult their <a href=\"https://github.com/nvm-sh/nvm\">project readme</a>.\n\n### Optional Node.js Package Manager\n\nYou may want to use an alternative to npm:\n\n- <a href=\"https://yarnpkg.com/getting-started\" target=\"_blank\">Yarn</a>, is preferred by Tauri's team\n- <a href=\"https://pnpm.js.org/en/installation\" target=\"_blank\">pnpm</a>\n\n## 3. Rustc and Cargo Package Manager <Icon title=\"control-skip-forward\" color=\"warning\"/>\n\nThe following command will install <a href=\"https://rustup.rs/\" target=\"_blank\">rustup</a>, the official installer for <a href=\"https://www.rust-lang.org/\" target=\"_blank\">Rust</a>.\n\n```\n$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\n<Alert title=\"Note\">\nWe have audited this bash script, and it does what it says it is supposed to do. Nevertheless, before blindly curl-bashing a script, it is always wise to look at it first. Here is the file as a mere <a href=\"https://sh.rustup.rs\" target=\"_blank\">download link</a>.\n</Alert>\n\nTo make sure that Rust has been installed successfully, run the following command:\n\n```sh\n$ rustc --version\nlatest update on 2019-12-19, rust version 1.40.0\n```\n\nYou may need to restart your terminal if the command does not work.\n\n## Continue\n\nNow that you have set up the macOS-specific dependencies for Tauri, learn how to [add Tauri to your project](/docs/usage/development/integration).\n","h1":[],"h2":[{"content":"1","type":"text"},{"content":"2","type":"text"},{"content":"3","type":"text"},{"content":"Continue","type":"text"}],"h3":[{"content":"Node","type":"text"},{"content":"Optional Node","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["sh",null],"otherSymbols":["text","link","inlineCode","list"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"setup-windows.md","filepath":"docs/getting-started","hash":42,"frontmatter":{"title":"Setup for Windows"},"text":"\nimport Alert from '@theme/Alert'\nimport Icon from '@theme/Icon'\nimport { Intro } from '@theme/SetupDocs'\n\n<Alert title=\"Note\">\n\nFor those using the Windows Subsystem for Linux (WSL) please refer to our [Linux specific instructions](/docs/getting-started/setup-linux) instead.\n</Alert>\n\n<Intro />\n\n## 1. System Dependencies <Icon title=\"alert\" color=\"danger\"/>\n\nYou'll need to install Microsoft Visual Studio C++ build tools. <a href=\"https://visualstudio.microsoft.com/visual-cpp-build-tools/\" target=\"_blank\">Download the installer here</a>, and then run it. When it asks you what packages you would like to install, select C++ Build Tools.\n\n<Alert title=\"Note\">\nThis is a big download (over 1GB) and takes the most time, so go grab a coffee.\n</Alert>\n\n<Alert type=\"warning\">\nYou may need to uninstall the 2017 version of the build tools if you have them. There are reports of Tauri not working with both the 2017 and 2019 versions installed.\n</Alert>\n\n## 2. Node.js Runtime and Package Manager <Icon title=\"control-skip-forward\" color=\"warning\"/>\n\n### Node.js (npm included)\n\nWe recommend using <a href=\"https://github.com/coreybutler/nvm-windows#installation--upgrades\" target=\"_blank\">nvm-windows</a> to manage your Node.js runtime. It allows you to easily switch versions and update Node.js.\n\nThen run the following from an Administrative PowerShell and press Y when prompted:\n\n```powershell\n# BE SURE YOU ARE IN AN ADMINISTRATIVE PowerShell!\nnvm install latest\nnvm use {{latest}} # Replace with your latest downloaded version\n```\n\nThis will install the most recent version of Node.js with npm.\n\n### Optional Node.js Package Manager\n\nYou may want to use an alternative to npm:\n\n- <a href=\"https://yarnpkg.com/getting-started\" target=\"_blank\">Yarn</a>, is preferred by Tauri's team\n- <a href=\"https://pnpm.js.org/en/installation\" target=\"_blank\">pnpm</a>\n\n## 3. Rustc and Cargo Package Manager <Icon title=\"control-skip-forward\" color=\"warning\"/>\n\nNow you will need to install <a href=\"https://www.rust-lang.org/\" target=\"_blank\">Rust</a>. The easiest way to do this is to use <a href=\"https://rustup.rs/\" target=\"_blank\">rustup</a>, the official installer.\n\n- <a href=\"https://win.rustup.rs/x86_64\" target=\"_blank\">64-bit download link</a>\n- <a href=\"https://win.rustup.rs/i686\" target=\"_blank\">32-bit download link</a>\n\nDownload and install the proper variant for your computer's architecture.\n\n## 4. Install WebView2\n\n<Alert title=\"Note\">\nWebView2 is pre-installed in Windows 11. \n</Alert>\n\nFinally, you will need to install WebView2. The best way to do this is to download and run the Evergreen Bootstrapper from [this page](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section).\n\n## Continue\n\nNow that you have set up the Windows-specific dependencies for Tauri, learn how to [add Tauri to your project](/docs/usage/development/integration).\n","h1":[],"h2":[{"content":"1","type":"text"},{"content":"2","type":"text"},{"content":"3","type":"text"},{"content":"4","type":"text"},{"content":"Continue","type":"text"}],"h3":[{"content":"Node","type":"text"},{"content":"Optional Node","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["powershell"],"otherSymbols":["text","link","list"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"cross-platform.md","filepath":"docs/usage/ci-cd","hash":42,"frontmatter":{"title":"Cross-Platform Compilation"},"text":"\nHow to use GH Action for Building: a glance at Tauri Action.","h1":[],"h2":[],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"signing-macos.md","filepath":"docs/usage/ci-cd","hash":42,"frontmatter":{"title":"Signing for macOS"},"text":"\nSigning for macOS","h1":[],"h2":[],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text"]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"contributor-guide.md","filepath":"docs/usage","hash":42,"frontmatter":{"title":"Contributor Guide"},"text":"\ntodo: make this friendlier and more complete\n\nTauri is a polyglot system that uses:\n\n- git\n- Node.js\n- Rust\n- GitHub actions\n\nIt can be developed on macOS, Linux and Windows.\n\n## Contribution Flow\n\n1. File an Issue\n2. Fork the Repository\n3. Make Your Changes\n4. Make a PR\n\n### A Note About Contributions to the Rust Libraries\n\nWhen contributing to the Rust libraries `tauri`, `tauri-api`, and `tauri-updater`; you will want to setup an environment for RLS (the Rust Language Server). In the Tauri root directory, there is a `.scripts` folder that contains a set of scripts to automate adding a couple temporary environment variables to your shell/terminal. These environment variables point to directories in the test fixture which will prevent RLS from crashing on compile-time. This is a necessary step for setting up a development environment for Tauri's Rust libraries.\n\n##### _Example Instructions_\n\n1. Navigate to the Tauri Root directory.\n2. Execute a script based on your Operating System from this folder: `.scripts/init_env.bat` for Windows Cmd, `.scripts/init_env.ps1` for Windows Powershell, `. .scripts/init_env.sh` for Linux/macOS bash (note the first `.` in this command).\n3. Open your text editor/IDE from this shell/terminal.\n\n## Hands On Example\n\nLet's make a new example. That's a great way to learn. We are going to assume you are on a nixy type of environment like Linux or macOS and have all of your development dependencies like rust and node already sorted out.\n\n```sh\ngit clone git@github.com:tauri-apps/tauri.git\ncd tauri/cli/tauri.js\nyarn\nmkdir ../../examples/vanillajs && cd \"$_\"\n```\n\n```json\n \"tauri:source\": \"node ../../../cli/tauri.js/bin/tauri\",\n```\n\n```ini\n [dependencies.tauri]\n path = \"../../../../core/tauri\"\n features = [ \"all-api\" ]\n```\n","h1":[],"h2":[{"content":"Contribution Flow","type":"text"},{"content":"Hands On Example","type":"text"}],"h3":[{"content":"A Note About Contributions to the Rust Libraries","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["sh","json","ini"],"otherSymbols":["text","list","inlineCode","h5"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"debugging.md","filepath":"docs/usage/development","hash":42,"frontmatter":{"title":"App Debugging","sidebar_label":"App Debugging (3/4)"},"text":"\nimport Alert from '@theme/Alert'\nimport Command from '@theme/Command'\n\nWith all the moving pieces in Tauri, you may run into a problem that requires debugging. There are a handful of locations where error details are printed, and Tauri includes some tools to make the debugging process easier.\n\n## Rust Console\n\nWhen you run a Tauri app in development mode you will have a Rust console available. This is in the terminal where you ran e.g. `tauri dev`. You can use the following code to print something to that console from within a Rust file:\n\n```rust\nprintln!(\"Message from Rust: {}\", msg);\n```\n\nSometimes you may have an error in your Rust code, and the Rust compiler can give you lots of information. If, for example, `tauri dev` crashes, you can rerun it like this on Linux and macOS:\n\n```sh\nRUST_DEBUG=1 tauri dev\n```\n\nor like this on MS Windows:\n\n```sh\nset RUST_DEBUG=1\ntauri dev\n```\n\nThis will give you a granular stack trace. Generally speaking, the Rust compiler will help you by\ngiving you detailed information about the issue, such as:\n\n```\nerror[E0425]: cannot find value `sun` in this scope\n --> src/main.rs:11:5\n |\n11 | sun += i.to_string().parse::<u64>().unwrap();\n | ^^^ help: a local variable with a similar name exists: `sum`\n\nerror: aborting due to previous error\n\nFor more information about this error, try `rustc --explain E0425`.\n```\n\n## WebView JS Console\n\nRight click in the WebView, and choose `Inspect Element`. This will open up a web-inspector similar to the Chrome or Firefox dev tools you are used to.\n\n## Create a Debug Build\n\nThere are cases where you might need to inspect the JS console in the final bundle, so Tauri provides a simple command to create a debugging bundle:\n\n<Command name=\"build --debug\" />\n\nLike the normal build and dev processes, the first time you run this it will take more time than subsequent runs. The final bundled app will be placed in `src-tauri/target/debug/bundle`. That app will ship with the development console enabled.\n\n## Run Your App From the Terminal\n\nYou can also run a built app from the terminal, which will also give you the Rust compiler notes (in case of errors) or your `println` messages. Just find the file `src-tauri/target/(release|debug)/[app name]` and either double click it (but be warned, the terminal will close on errors) or just run it in directly in your console.\n","h1":[],"h2":[{"content":"Rust Console","type":"text"},{"content":"WebView JS Console","type":"text"},{"content":"Create a Debug Build","type":"text"},{"content":"Run Your App From the Terminal","type":"text"}],"h3":[],"hasCodeBlock":true,"programmingLanguages":["rust","sh",null],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"development.md","filepath":"docs/usage/development","hash":42,"frontmatter":{"title":"App Development","sidebar_label":"App Development (2/4)"},"text":"\nimport Alert from '@theme/Alert'\nimport Command from '@theme/Command'\n\n### 1. Start Your Devserver\n\nNow that you have everything setup, you should start your application development server provided by your UI framework or bundler (assuming you're using one, of course).\n\n<Alert title=\"Note\">\nEvery framework has its own development tooling. It is outside of the scope of this document to treat them all or keep them up to date.\n</Alert>\n\n### 2. Start Tauri Development Window\n\n<Command name=\"dev\" />\n\nThe first time you run this command, it will take several minutes for the Rust package manager to download and build all the required packages. Since they are cached, subsequent builds will be much faster, as only your code will need rebuilding.\n\nOnce Rust has finished building, the webview will open and it should display your web app. You can make changes to your web app, and if your tooling enables it, the webview should update automatically just like a browser. When you make changes to your Rust files, they will be rebuilt automatically and your app will restart.\n\n<Alert title=\"A note about Cargo.toml and Source Control\" icon=\"info-alt\">\n In your project repository, you SHOULD commit the \"src-tauri/Cargo.toml\" to git because you want it to be deterministic. You SHOULD NOT commit the \"src-tauri/target\" folder or any of its contents.\n</Alert>\n","h1":[],"h2":[],"h3":[{"content":"1","type":"text"},{"content":"2","type":"text"}],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"integration.md","filepath":"docs/usage/development","hash":42,"frontmatter":{"title":"Tauri Integration","sidebar_label":"Tauri Integration (1/4)"},"text":"\nimport Alert from '@theme/Alert'\nimport Command from '@theme/Command'\nimport Link from '@docusaurus/Link'\n\n<Alert title=\"Please note\" type=\"warning\" icon=\"alert\">\n You must have completed all the steps required for setting up the development environment on your machine. If you haven't done this yet, please see the <a href=\"/docs/getting-started/intro#setting-up-your-environment\"> setup page for your operating system</a>.\n</Alert>\n\n### 1. Install Tauri CLI Package as a Dev Dependency:\n\n```bash\ncd project-folder\n\n# Not required if you already have a package.json:\n# yarn init\n# OR\n# npm init\n\nyarn add -D @tauri-apps/cli\n# OR\nnpm install -D @tauri-apps/cli\n```\n\n<Alert title=\"Note\">\n You can install Tauri as both a local and a global dependency, but we recommend installing it locally.\n</Alert>\n\nIf you decide to use Tauri as a local package with npm (not yarn), you will have to define a custom script to your package.json:\n\n```js title=package.json\n{\n // This content is just a sample\n \"scripts\": {\n \"tauri\": \"tauri\"\n }\n}\n```\n\n### 1. Install Tauri API Package as a Dependency (optional):\n\nThe `@tauri-apps/api` package is recommended for projects using ES modules or modern build tools such as Webpack or Vite. It is the most secure way to access the Tauri APIs.\n\n```bash\nyarn add @tauri-apps/api\n# OR\nnpm install @tauri-apps/api\n```\n\n### 2. Initialize Tauri in Your App\n\n<Command name=\"init\" />\n\nThis command will place a new folder in your current working directory, `src-tauri`.\n\n```sh\n└── src-tauri\n ├── .gitignore\n ├── Cargo.toml\n ├── rustfmt.toml\n ├── tauri.conf.json\n ├── icons\n │ ├── 128x128.png\n │ ├── 128x128@2x.png\n │ ├── 32x32.png\n │ ├── Square107x107Logo.png\n │ ├── Square142x142Logo.png\n │ ├── Square150x150Logo.png\n │ ├── Square284x284Logo.png\n │ ├── Square30x30Logo.png\n │ ├── Square310x310Logo.png\n │ ├── Square44x44Logo.png\n │ ├── Square71x71Logo.png\n │ ├── Square89x89Logo.png\n │ ├── StoreLogo.png\n │ ├── icon.icns\n │ ├── icon.ico\n │ └── icon.png\n └── src\n ├── build.rs\n ├── cmd.rs\n └── main.rs\n```\n\n### 3. Check `tauri info` to Make Sure Everything Is Set up Properly:\n\n<Command name=\"info\" />\n\nWhich should return something like:\n\n```\nOperating System - Darwin(16.7.0) - darwin/x64\n\nNode.js environment\n Node.js - 12.16.3\n @tauri-apps/cli - 1.0.0-beta.2\n @tauri-apps/api - 1.0.0-beta.1\n\nGlobal packages\n npm - 6.14.4\n yarn - 1.22.4\n\nRust environment\n rustc - 1.52.1\n cargo - 1.52.0\n\nApp directory structure\n/node_modules\n/src-tauri\n/src\n/public\n\nApp\n tauri.rs - 1.0.0-beta.1\n build-type - bundle\n CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'\n distDir - ../public\n devPath - ../public\n framework - Svelte\n bundler - Rollup\n```\n\nThis information can be very helpful when triaging problems.\n\n### Patterns\n\nWe've also defined prebuilt configurations called \"Patterns\". They may help you to customize Tauri to fit your needs.\n[See more about patterns](/docs/usage/patterns/about-patterns).\n\n## Vue CLI Plugin Tauri\n\nIf you are using Vue CLI, it is recommended to use the official [CLI plugin](https://github.com/tauri-apps/vue-cli-plugin-tauri).\n","h1":[],"h2":[{"content":"Vue CLI Plugin Tauri","type":"text"}],"h3":[{"content":"1","type":"text"},{"content":"1","type":"text"},{"content":"2","type":"text"},{"content":"3","type":"text"},{"content":"Patterns","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["bash","sh",null],"otherSymbols":["text","inlineCode","link"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"publishing.md","filepath":"docs/usage/development","hash":42,"frontmatter":{"title":"App Publishing","sidebar_label":"App Publishing (4/4)"},"text":"\nimport Alert from '@theme/Alert'\nimport Command from '@theme/Command'\n\n### 1. Build Your Web App\n\nNow that you are ready to package your project, you will need to run your framework's or bundler's build command (assuming you're using one, of course).\n\n<Alert title=\"Note\">\nEvery framework has its own publishing tooling. It is outside of the scope of this document to treat them all or keep them up to date.\n</Alert>\n\n### 2. Bundle your application with Tauri\n\n<Command name=\"build\" />\n\nThis command will embed your web assets into a single binary with your Rust code. The binary itself will be located in `src-tauri/target/release/[app name]`, and installers will be located in `src-tauri/target/release/bundle/`.\n\nLike the `tauri dev` command, the first time you run this, it will take some time to collect the Rust crates and build everything - but on subsequent runs it will only need to rebuild your code, which is much quicker.\n","h1":[],"h2":[],"h3":[{"content":"1","type":"text"},{"content":"2","type":"text"}],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"updating.md","filepath":"docs/usage/development","hash":42,"frontmatter":{"title":"Updating"},"text":"import Alert from '@theme/Alert'\n\n<Alert title=\"Please note\" type=\"warning\" icon=\"alert\">\n Especially during the alpha and beta phases, you are expected to keep all Tauri dependencies and toolchains up to date. There is no support for any versions other than latest.\n</Alert>\n\n## Automatic updates\n\nThe Tauri JS CLI has a command to install and update all needed dependencies, just run `tauri deps install` or `tauri deps update`.\n\n## Manual updates\n\n### Update NPM Packages\n\nIf you are using the `tauri` package:\n```bash\n$ yarn upgrade @tauri-apps/cli @tauri-apps/api --latest\n$ npm install @tauri-apps/cli@latest @tauri-apps/api@latest\n```\nYou can also detect what the latest version of Tauri is on the command line, using:\n- `npm outdated @tauri-apps/cli`\n- `yarn outdated @tauri-apps/cli`\n\nAlternatively, if you are using the `vue-cli-plugin-tauri` approach:\n```bash\n$ yarn upgrade vue-cli-plugin-tauri --latest\n$ npm install vue-cli-plugin-tauri@latest\n```\n\n### Update Cargo Packages\nGo to `src-tauri/Cargo.toml` and change `tauri` to\n`tauri = { version = \"%version%\" }` where `%version%` is the version number shown above. (You can just use the `MAJOR.MINOR`) version, like `0.9`.\n\nThen do the following:\n```bash\n$ cd src-tauri\n$ cargo update -p tauri\n```\nYou can also run `cargo outdated -r tauri` to get direct information about the core library's latest version.\n","h1":[],"h2":[{"content":"Automatic updates","type":"text"},{"content":"Manual updates","type":"text"}],"h3":[{"content":"Update NPM Packages","type":"text"}],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode"]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"debian.md","filepath":"docs/usage/guides/bundler","hash":42,"frontmatter":{"title":"Debian packages"},"text":"\nimport Alert from '@theme/Alert'\n\nTauri allows your app to be packaged as a `.deb` (Debian package) file.\n\n# Bootstrapper\n\nInstead of launching the app directly, you can configure the bundled app to run a script that tries to expose the environment variables to the app; without that you'll have trouble using system programs because the `PATH` environment variable isn't correct. Enable it with the <a href=\"/docs/api/config#tauri.bundle.deb.useBootstrapper\">`useBootstrapper`</a> config.\n\n# Custom files\n\nTo include custom files to the debian package, you can configure a mapping on `tauri.conf.json > tauri > bundle > deb > files` as follows:\n\n```json\n{\n \"tauri\": {\n \"bundle\": {\n \"deb\": {\n \"files\": {\n \"/usr/lib/README.md\": \"../README.md\", // copies the README.md file to /usr/lib/README.md\n \"usr/lib/assets\": \"../public/\" // copies the entire public directory to /usr/lib/assets\n }\n }\n }\n }\n}\n```\n\n<Alert title=\"Note\" icon=\"info-alt\">\nEach `files` object key is the path on the debian package, and the value is a path to a file or directory relative to the `tauri.conf.json` file.\n</Alert>\n","h1":[{"content":"Bootstrapper","type":"text"},{"content":"Custom files","type":"text"}],"h2":[],"h3":[],"hasCodeBlock":true,"programmingLanguages":["json"],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"introduction.md","filepath":"docs/usage/guides/bundler","hash":42,"frontmatter":{"title":"Introduction"},"text":"\nThe Tauri Bundler is a Rust harness for compiling your binary, packaging assets, and preparing a final bundle.\n\nIt will detect your operating system and build a bundle accordingly. It currently supports:\n\n- Linux: .deb, .appimage\n- macOS: .app, .dmg\n- Windows: .exe, .msi","h1":[],"h2":[],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","list"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"sidecar.md","filepath":"docs/usage/guides/bundler","hash":42,"frontmatter":{"title":"Sidecar (Embedding External Binaries)","sidebar_label":"Sidecar"},"text":"\nimport Alert from '@theme/Alert'\n\nYou may need to embed depending binaries in order to make your application work or to prevent users having to install additional dependencies (e.g. Node.js, Python, etc).\n\nTo bundle the binaries of your choice, you can add the `externalBin` property to the `tauri > bundle` object in your `tauri.conf.json`.\n\nSee more about tauri.conf.json configuration <a href=\"/docs/api/config#tauri.bundle\">here</a>.\n\n`externalBin` expects a list of strings targeting binaries either with absolute or relative paths.\n\nHere is a sample to illustrate the configuration, this is not a complete `tauri.conf.json` file:\n\n```json\n{\n \"tauri\": {\n \"bundle\": {\n \"externalBin\": [\"/absolute/path/to/app\", \"relative/path/to/binary\", \"bin/python\"]\n }\n }\n}\n```\n\nA binary with the same name and a `-$TARGET_TRIPLE` suffix must exist on the specified path. For instance, `\"externalBin\": [\"bin/python\"]` requires a `src-tauri/bin/python-x86_64-unknown-linux-gnu` executable on Linux. You can find the current platform's target triple running the following command:\n\n```bash\nRUSTC_BOOTSTRAP=1 rustc -Z unstable-options --print target-spec-json\n```\n\nHere's a Node.js script to append the target triple to a binary:\n\n```javascript\nconst execa = require('execa')\nconst fs = require('fs')\n\nlet extension = ''\nif (process.platform === 'win32') {\n extension = '.exe'\n}\n\nasync function main() {\n const rustInfo = (await execa('rustc', ['-vV'])).stdout\n const targetTriple = /host: (\\S+)/g.exec(rustInfo)[1]\n if (!targetTriple) {\n console.error('Failed to determine platform target triple')\n }\n fs.renameSync(\n `src-tauri/binaries/app${extension}`,\n `src-tauri/binaries/app-${targetTriple}${extension}`\n )\n}\n\nmain().catch((e) => {\n throw e\n})\n\n```\n\n## Running the sidecar binary on JavaScript\n\nOn the JavaScript code, import the `Command` class on the `shell` module and use the `sidecar` static method:\n\n```javascript\nimport { Command } from '@tauri-apps/api/shell'\n// alternatively, use `window.__TAURI__.shell.Command`\n// `my-sidecar` is the value specified on `tauri.conf.json > tauri > bundle > externalBin`\nconst command = Command.sidecar('my-sidecar')\nconst output = await command.execute()\n```\n\n## Running the sidecar binary on Rust\n\nOn the Rust code, import the `Command` struct from the `tauri::api::process` module:\n\n```rust\nlet (mut rx, mut child) = Command::new_sidecar(\"my-sidecar\")\n .expect(\"failed to create `my-sidecar` binary command\")\n .spawn()\n .expect(\"Failed to spawn sidecar\");\n\ntauri::async_runtime::spawn(async move {\n // read events such as stdout\n while let Some(event) = rx.recv().await {\n if let CommandEvent::Stdout(line) = event {\n window\n .emit(\"message\", Some(format!(\"'{}'\", line)))\n .expect(\"failed to emit event\");\n // write to stdin\n child.write(\"message from Rust\\n\".as_bytes()).unwrap();\n }\n }\n});\n```\n\n## Using Node.js on a sidecar\n\nThe Tauri [sidecar example](https://github.com/tauri-apps/tauri/tree/dev/examples/sidecar) demonstrates how to use the sidecar API to run a Node.js application on Tauri.\nIt compiles the Node.js code using [pkg](https://github.com/vercel/pkg) and uses the scripts above to run it.\n","h1":[],"h2":[{"content":"Running the sidecar binary on JavaScript","type":"text"},{"content":"Running the sidecar binary on Rust","type":"text"},{"content":"Using Node","type":"text"}],"h3":[],"hasCodeBlock":true,"programmingLanguages":["json","bash","javascript","rust"],"otherSymbols":["text","inlineCode","link"]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"plugin.md","filepath":"docs/usage/guides","hash":42,"frontmatter":{"title":"Write Tauri Plugins"},"text":"\nimport Alert from '@theme/Alert'\n\n<Alert title=\"Note\" icon=\"info-alt\">\nTauri will soon offer Plugin starter kits so the process of writing a Plugin crate will be simplified.\n\nFor now it's recommended to follow the [official Tauri plugins](#official-tauri-plugins).\n</Alert>\n\nPlugins allow you to hook into the Tauri application lifecycle and introduce new commands.\n\n## Writing a Plugin\n\nTo write a plugin you just need to implement the `tauri::plugin::Plugin` trait:\n\n```rust\nuse tauri::{plugin::{Plugin, Result as PluginResult}, Runtime, PageLoadPayload, Window, Invoke, AppHandle};\n\nstruct MyAwesomePlugin<R: Runtime> {\n invoke_handler: Box<dyn Fn(Invoke<R>) + Send + Sync>,\n // plugin state, configuration fields\n}\n\n// the plugin custom command handlers if you choose to extend the API.\n#[tauri::command]\n// this will be accessible with `invoke('plugin:awesome|initialize')`.\n// where `awesome` is the plugin name.\nfn initialize() {}\n\n#[tauri::command]\n// this will be accessible with `invoke('plugin:awesome|do_something')`.\nfn do_something() {}\n\nimpl<R: Runtime> MyAwesomePlugin<R> {\n // you can add configuration fields here,\n // see https://doc.rust-lang.org/1.0.0/style/ownership/builders.html\n pub fn new() -> Self {\n Self {\n invoke_handler: Box::new(tauri::generate_handler![initialize, do_something]),\n }\n }\n}\n\nimpl<R: Runtime> Plugin<R> for MyAwesomePlugin<R> {\n /// The plugin name. Must be defined and used on the `invoke` calls.\n fn name(&self) -> &'static str {\n \"awesome\"\n }\n\n /// The JS script to evaluate on initialization.\n /// Useful when your plugin is accessible through `window`\n /// or needs to perform a JS task on app initialization\n /// e.g. \"window.awesomePlugin = { ... the plugin interface }\"\n fn initialization_script(&self) -> Option<String> {\n None\n }\n\n /// initialize plugin with the config provided on `tauri.conf.json > plugins > $yourPluginName` or the default value.\n fn initialize(&mut self, app: &AppHandle<R>, config: serde_json::Value) -> PluginResult<()> {\n Ok(())\n }\n\n /// Callback invoked when the Window is created.\n fn created(&mut self, window: Window<R>) {}\n\n /// Callback invoked when the webview performs a navigation.\n fn on_page_load(&mut self, window: Window<R>, payload: PageLoadPayload) {}\n\n /// Extend the invoke handler.\n fn extend_api(&mut self, message: Invoke<R>) {\n (self.invoke_handler)(message)\n }\n}\n```\n\nNote that each function on the `Plugin` trait is optional, except the `name` function.\n\n## Using a plugin\n\nTo use a plugin, just pass an instance of the `MyAwesomePlugin` struct to the App's `plugin` method:\n\n```rust\nfn main() {\n let awesome_plugin = MyAwesomePlugin::new();\n tauri::Builder::default()\n .plugin(awesome_plugin)\n .run(tauri::generate_context!())\n .expect(\"failed to run app\");\n}\n```\n\n## Official Tauri Plugins\n\n- [Stronghold (WIP)](https://github.com/tauri-apps/tauri-plugin-stronghold)\n- [Authenticator (WIP)](https://github.com/tauri-apps/tauri-plugin-authenticator)\n- [Logging (WIP)](https://github.com/tauri-apps/tauri-plugin-log)\n- [SQL (WIP)](https://github.com/tauri-apps/tauri-plugin-sql)\n","h1":[],"h2":[{"content":"Writing a Plugin","type":"text"},{"content":"Using a plugin","type":"text"},{"content":"Official Tauri Plugins","type":"text"}],"h3":[],"hasCodeBlock":true,"programmingLanguages":["rust"],"otherSymbols":["text","link","inlineCode","list"]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"multiwindow.md","filepath":"docs/usage/guides/utils","hash":42,"frontmatter":{"title":"Multiwindow"},"text":"\nManage multiple windows on a single application.\n","h1":[],"h2":[],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"icons.md","filepath":"docs/usage/guides/visual","hash":42,"frontmatter":{"title":"Icons"},"text":"\nimport Command from '@theme/Command'\nimport Alert from '@theme/Alert'\n\nTauri ships with a default iconset based on its logo. This is probably NOT what you want when you ship your application. To remedy this common situation, Tauri provides the `icon` command that will take an input file and create all the icons needed for the various platforms:\n\n<Command name=\"icon\"/>\n\n```sh\nOptions\n --help, -h Displays this message\n --log, l Logging [boolean]\n --icon, i Source icon (png, 1240x1240 with transparency)\n --target, t Target folder (default: 'src-tauri/icons')\n --compression, c Compression type [pngquant|optipng|zopfli]\n```\n\nThese will be placed in your `src-tauri/icons` folder where they will automatically be included in your built app.\n\nIf you need to source your icons from some other location, you can edit this part of the `src-tauri/tauri.conf.json` file:\n\n```json\n{\n \"tauri\": {\n \"bundle\": {\n \"icon\": [\n \"icons/32x32.png\",\n \"icons/128x128.png\",\n \"icons/128x128@2x.png\",\n \"icons/icon.icns\",\n \"icons/icon.ico\"\n ]\n }\n }\n}\n```\n\n<Alert type=\"info\" icon=\"info-alt\" title=\"Note on filetypes\">\n\n - icon.icns = macOS\n - icon.ico = MS Windows\n - \\*.png = Linux\n\n</Alert>\n","h1":[],"h2":[],"h3":[],"hasCodeBlock":true,"programmingLanguages":["sh","json"],"otherSymbols":["text","inlineCode","list"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"menu.md","filepath":"docs/usage/guides/visual","hash":42,"frontmatter":{"title":"Window Menu"},"text":"\nNative application menus can be attached to a window.\n\n### Creating a menu\n\nTo create a native window menu, import the `Menu`, `Submenu`, `MenuItem` and `CustomMenuItem` types.\nThe `MenuItem` enum contains a collection of platform-specific items (currently not implemented on Windows).\nThe `CustomMenuItem` allows you to create your own menu items and add special functionality to them.\n\n```rust\nuse tauri::{CustomMenuItem, Menu, MenuItem, Submenu};\n```\n\nCreate a `Menu` instance:\n\n```rust\n// here `\"quit\".to_string()` defines the menu item id, and the second parameter is the menu item label.\nlet quit = CustomMenuItem::new(\"quit\".to_string(), \"Quit\");\nlet close = CustomMenuItem::new(\"close\".to_string(), \"Close\");\nlet submenu = Submenu::new(\"File\", Menu::new().add_item(quit).add_item(close));\nlet menu = Menu::new()\n .add_native_item(MenuItem::Copy)\n .add_item(CustomMenuItem::new(\"hide\", \"Hide\"))\n .add_submenu(submenu);\n```\n\n### Adding the menu to all windows\n\nThe defined menu can be set to all windows using the `menu` API on the `tauri::Builder` struct:\n\n```rust\nuse tauri::{CustomMenuItem, Menu, MenuItem, Submenu};\n\nfn main() {\n let menu = Menu::new(); // configure the menu\n tauri::Builder::default()\n .menu(menu)\n .run(tauri::generate_context!())\n .expect(\"error while running tauri application\");\n}\n```\n\n### Adding the menu to a specific window\n\nYou can create a window and set the menu to be used. This allows defining a specific menu set for each application window.\n\n```rust\nuse tauri::{CustomMenuItem, Menu, MenuItem, Submenu};\nuse tauri::WindowBuilder;\n\nfn main() {\n let menu = Menu::new(); // configure the menu\n tauri::Builder::default()\n .create_window(\n \"main-window\".to_string(),\n tauri::WindowUrl::App(\"index.html\".into()),\n move |window_builder, webview_attributes| {\n (window_builder.menu(menu), webview_attributes)\n },\n )\n .run(tauri::generate_context!())\n .expect(\"error while running tauri application\");\n}\n```\n\n### Listening to events on custom menu items\n\nEach `CustomMenuItem` triggers an event when clicked. Use the `on_menu_event` API to handle them, either on the global `tauri::Builder` or on an specific window.\n\n#### Listening to events on global menus\n\n```rust\nuse tauri::{CustomMenuItem, Menu, MenuItem};\n\nfn main() {\n let menu = vec![]; // insert the menu array here\n tauri::Builder::default()\n .menu(menu)\n .on_menu_event(|event| {\n match event.menu_item_id() {\n \"quit\" => {\n std::process::exit(0);\n }\n \"close\" => {\n event.window().close().unwrap();\n }\n _ => {}\n }\n })\n .run(tauri::generate_context!())\n .expect(\"error while running tauri application\");\n}\n```\n\n#### Listening to events on window menus\n\n```rust\nuse tauri::{CustomMenuItem, Menu, MenuItem};\nuse tauri::{Manager, WindowBuilder};\n\nfn main() {\n let menu = vec![]; // insert the menu array here\n tauri::Builder::default()\n .create_window(\n \"main-window\".to_string(),\n tauri::WindowUrl::App(\"index.html\".into()),\n move |window_builder, webview_attributes| {\n (window_builder.menu(menu), webview_attributes)\n },\n )\n .setup(|app| {\n let window = app.get_window(\"main-window\").unwrap();\n let window_ = window.clone();\n window.on_menu_event(move |event| {\n match event.menu_item_id().as_str() {\n \"quit\" => {\n std::process::exit(0);\n }\n \"close\" => {\n window_.close().unwrap();\n }\n _ => {}\n }\n });\n Ok(())\n })\n .run(tauri::generate_context!())\n .expect(\"error while running tauri application\");\n}\n```\n\n### Updating menu items\n\nThe `Window` struct has a `menu_handle` method, which allows updating menu items:\n\n```rust\nfn main() {\n tauri::Builder::default()\n .setup(|app| {\n let main_window = app.get_window(\"main\").unwrap();\n let menu_handle = main_window.menu_handle();\n std::thread::spawn(move || {\n // you can also `set_selected`, `set_enabled` and `set_native_image` (macOS only).\n menu_handle.get_item(\"item_id\").set_title(\"New title\");\n })\n Ok(())\n })\n}\n```\n","h1":[],"h2":[],"h3":[{"content":"Creating a menu","type":"text"},{"content":"Adding the menu to all windows","type":"text"},{"content":"Adding the menu to a specific window","type":"text"},{"content":"Listening to events on custom menu items","type":"text"},{"content":"Updating menu items","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["rust"],"otherSymbols":["text","inlineCode","h4"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"splashscreen.md","filepath":"docs/usage/guides/visual","hash":42,"frontmatter":{"title":"Splashscreen"},"text":"\nimport Link from '@docusaurus/Link'\n\nIf your webpage could take some time to load, or if you need to run an initialization procedure in Rust before displaying your main window, a splashscreen could improve the loading experience for the user.\n\n### Setup\n\nFirst, create a `splashscreen.html` in your `distDir` that contains the HTML code for a splashscreen. Then, update your `tauri.conf.json` like so:\n\n```diff\n\"windows\": [\n {\n \"title\": \"Tauri App\",\n \"width\": 800,\n \"height\": 600,\n \"resizable\": true,\n \"fullscreen\": false,\n+ \"visible\": false // Hide the main window by default\n },\n // Add the splashscreen window\n+ {\n+ \"width\": 400,\n+ \"height\": 200,\n+ \"decorations\": false,\n+ \"url\": \"splashscreen.html\",\n+ \"label\": \"splashscreen\"\n+ }\n]\n```\n\nNow, your main window will be hidden and the splashscreen window will show when your app is launched. Next, you'll need a way to close the splashscreen and show the main window when your app is ready. How you do this depends on what you are waiting for before closing the splashscreen.\n\n### Waiting for Webpage\n\nIf you are waiting for your web code, you'll want to create a `close_splashscreen` [command](../command.md).\n\n```rust title=src-tauri/main.rs\nuse tauri::Manager;\n// Create the command:\n#[tauri::command]\nfn close_splashscreen(window: tauri::Window) {\n // Close splashscreen\n if let Some(splashscreen) = window.get_window(\"splashscreen\") {\n splashscreen.close().unwrap();\n }\n // Show main window\n window.get_window(\"main\").unwrap().show().unwrap();\n}\n\n// Register the command:\nfn main() {\n tauri::Builder::default()\n // Add this line\n .invoke_handler(tauri::generate_handler![close_splashscreen])\n .run(tauri::generate_context!())\n .expect(\"failed to run app\");\n}\n\n```\n\nThen, you can call it from your JS:\n\n```js\n// With the Tauri API npm package:\nimport { invoke } from '@tauri-apps/api/tauri'\n// With the Tauri global script:\nconst invoke = window.__TAURI__.invoke\n\ndocument.addEventListener('DOMContentLoaded', () => {\n // This will wait for the window to load, but you could\n // run this function on whatever trigger you want\n invoke('close_splashscreen')\n})\n```\n\n### Waiting for Rust\n\nIf you are waiting for Rust code to run, put it in the `setup` function handler so you have access to the `App` instance:\n\n```rust title=src-tauri/main.rs\nuse tauri::Manager;\nfn main() {\n tauri::Builder::default()\n .setup(|app| {\n let splashscreen_window = app.get_window(\"splashscreen\").unwrap();\n let main_window = app.get_window(\"main\").unwrap();\n // we perform the initialization code on a new task so the app doesn't freeze\n tauri::async_runtime::spawn(async move {\n // initialize your app here instead of sleeping :)\n println!(\"Initializing...\");\n std::thread::sleep(std::time::Duration::from_secs(2));\n println!(\"Done initializing.\");\n\n // After it's done, close the splashscreen and display the main window\n splashscreen_window.close().unwrap();\n main_window.show().unwrap();\n });\n Ok(())\n })\n .run(tauri::generate_context!())\n .expect(\"failed to run app\");\n}\n```\n","h1":[],"h2":[],"h3":[{"content":"Setup","type":"text"},{"content":"Waiting for Webpage","type":"text"},{"content":"Waiting for Rust","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["diff",null],"otherSymbols":["text","inlineCode","link"]}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"window-customization.md","filepath":"docs/usage/guides/visual","hash":42,"frontmatter":{"title":"Window Customization"},"text":"\nTauri provides lots of options for customizing the look and feel of your app's window. You can create custom titlebars, have transparent windows, enforce size constraints, and more.\n\n## Configuration\n\nThere are three ways to change the window configuration:\n\n- [Through tauri.conf.json](https://tauri.studio/en/docs/api/config/#tauri.windows)\n- [Through the JS API](https://tauri.studio/en/docs/api/js/classes/window.windowmanager)\n- [Through the Window in Rust](https://tauri.studio/en/docs/api/rust/tauri/window/struct.window)\n\n## Creating a Custom Titlebar\n\nA common use of these window features is creating a custom titlebar. This short tutorial will guide you through that process.\n\n### CSS\n\nYou'll need to add some CSS for the titlebar to keep it at the top of the screen and style the buttons:\n\n```css\n.titlebar {\n height: 30px;\n background: #329ea3;\n user-select: none;\n display: flex;\n justify-content: flex-end;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n}\n.titlebar-button {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 30px;\n height: 30px;\n}\n.titlebar-button:hover {\n background: #5bbec3;\n}\n```\n\n### HTML\n\nNow, you'll need to add the HTML for the titlebar. Put this at the top of your `<body>` tag:\n\n```html\n<div data-tauri-drag-region class=\"titlebar\">\n <div class=\"titlebar-button\" id=\"titlebar-minimize\">\n <img\n src=\"https://api.iconify.design/mdi:window-minimize.svg\"\n alt=\"minimize\"\n />\n </div>\n <div class=\"titlebar-button\" id=\"titlebar-maximize\">\n <img\n src=\"https://api.iconify.design/mdi:window-maximize.svg\"\n alt=\"maximize\"\n />\n </div>\n <div class=\"titlebar-button\" id=\"titlebar-close\">\n <img src=\"https://api.iconify.design/mdi:close.svg\" alt=\"close\" />\n </div>\n</div>\n```\n\nNote that you may need to move the rest of your content down so that the titlebar doesn't cover it.\n\n### JS\n\nFinally, you'll need to make the buttons work:\n\n\n```js\nimport { appWindow } from '@tauri-apps/api/window'\ndocument\n .getElementById('titlebar-minimize')\n .addEventListener('click', () => appWindow.minimize())\ndocument\n .getElementById('titlebar-maximize')\n .addEventListener('click', () => appWindow.toggleMaximize())\ndocument\n .getElementById('titlebar-close')\n .addEventListener('click', () => appWindow.close())\n```\n","h1":[],"h2":[{"content":"Configuration","type":"text"},{"content":"Creating a Custom Titlebar","type":"text"}],"h3":[{"content":"CSS","type":"text"},{"content":"HTML","type":"text"},{"content":"JS","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["css","html","js"],"otherSymbols":["text","list","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"ci.md","filepath":"docs/usage/guides/webdriver","hash":42,"frontmatter":{"title":"Continuous Integration"},"text":"\nUtilizing Linux and some programs to create a fake display, it is possible to run [WebDriver] tests with\n[`tauri-driver`] on your CI. The following example will use the [WebdriverIO] example we [previously built together] and\nGitHub Actions.\n\nThis means the following assumptions:\n\n1. The Tauri application is in the repository root and the binary builds when running `cargo build --release`.\n2. The [WebDriverIO] test runner is in the `webdriver/webdriverio` directory and runs when `yarn test` is used in that\n directory.\n\nThe following is a commented GitHub Actions workflow file at `.github/workflows/webdriver.yml`\n\n```yaml\n# run this action when the repository is pushed to\non: [ push ]\n\n# the name of our workflow\nname: WebDriver\n\njobs:\n # a single job named test\n test:\n # the display name the test job\n name: WebDriverIO Test Runner\n\n # we want to run on the latest linux environment\n runs-on: ubuntu-latest\n\n # the steps our job runs **in order**\n steps:\n # checkout the code on the workflow runner\n - uses: actions/checkout@v2\n\n # install system dependencies that Tauri needs to compile on Linux.\n # note the extra dependencies for `tauri-driver` to run which are `webkit2gtk-driver` and `xvfb`\n - name: Tauri dependencies\n run: >-\n sudo apt-get update &&\n sudo apt-get install -y\n libgtk-3-dev\n libgtksourceview-3.0-dev\n webkit2gtk-4.0\n libappindicator3-dev\n webkit2gtk-driver\n xvfb\n\n # install the latest Rust stable\n - name: Rust stable\n uses: actions-rs/toolchain@v1\n with:\n toolchain: stable\n\n # we run our rust tests before the webdriver tests to avoid testing a broken application\n - name: Cargo test\n uses: actions-rs/cargo@v1\n with:\n command: test\n\n # build a release build of our application to be used during our WebdriverIO tests\n - name: Cargo build\n uses: actions-rs/cargo@v1\n with:\n command: build\n args: --release\n\n # install the latest stable node version at the time of writing\n - name: Node v16\n uses: actions/setup-node@v1\n with:\n node-version: 16.x\n\n # install our Node.js dependencies with Yarn\n - name: Yarn install\n run: yarn install\n working-directory: webdriver/webdriverio\n\n # install the latest version of `tauri-driver`.\n # note: the tauri-driver version is independent of any other Tauri versions\n - name: Install tauri-driver\n uses: actions-rs/cargo@v1\n with:\n command: install\n args: tauri-driver\n\n # run the WebdriverIO test suite.\n # we run it through `xvfb-run` (the dependency we installed earlier) to have a fake\n # display server which allows our application to run headless without any changes to the code\n - name: WebdriverIO\n run: xvfb-run yarn test\n working-directory: webdriver/webdriverio\n```\n\n[WebDriver]: https://www.w3.org/TR/webdriver/\n[`tauri-driver`]: https://crates.io/crates/tauri-driver\n[WebdriverIO]: https://webdriver.io/\n[previously built together]: example/webdriverio\n","h1":[],"h2":[],"h3":[],"hasCodeBlock":true,"programmingLanguages":["yaml"],"otherSymbols":["text","inlineCode","list","def"]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"filename":"introduction.md","filepath":"docs/usage/guides/webdriver","hash":42,"frontmatter":{"title":"Introduction"},"text":"import Alert from '@theme/Alert'\n\n<Alert title=\"Currently in pre-alpha\" type=\"info\" icon=\"info-alt\">\n\nWebdriver support for Tauri is still in pre-alpha. Tooling that is dedicated to it such as [tauri-driver] is still in\nactive development and may change as necessary over time. Additionally, only Windows and Linux are currently supported.\n</Alert>\n\n[WebDriver] is a standardized interface to interact with web documents that is primarily intended for automated testing.\nTauri supports the [WebDriver] interface by leveraging the native platform's [WebDriver] server underneath a\ncross-platform wrapper [`tauri-driver`].\n\n## System Dependencies\n\nInstall the latest [`tauri-driver`] or update an existing installation by running:\n\n```sh\ncargo install tauri-driver\n```\n\nBecause we currently utilize the platform's native [WebDriver] server, there are some requirements for running\n[`tauri-driver`] on supported platforms. Platform support is currently limited to Linux and Windows.\n\n### Linux\n\nWe use `WebKitWebDriver` on linux platforms. Check if this binary exists already (command `which WebKitWebDriver`) as\nsome distributions bundle it with the regular webkit package. Other platforms may have a separate package for them such\nas `webkit2gtk-driver` on Debian based distributions.\n\n### Windows\n\nMake sure to grab the version of [Microsoft Edge Driver] that matches your Windows' Edge version that the application is\nbeing built and tested on. On up-to-date Window installs, this should almost always be the latest stable version. If the\ntwo versions do not match, you may experience your WebDriver testing suite hanging while trying to connect.\n\nThe download contains a binary called `msedgedriver.exe`. [`tauri-driver`] looks for that binary in the `$PATH` so make\nsure it's either available on the path or use the `--native-driver` option on [`tauri-driver`]. On Windows CI machines,\nyou may want to download this automatically as part of the CI setup process to ensure the Edge and Edge Driver versions\nstay in sync. A guide on how to do this may be added at a later date.\n\n## Example Application\n\nThe [next section](example/setup) of the guide will show step-by-step how to create a minimal example application that\nis tested with WebDriver.\n\nIf you prefer to just see the result of the guide and look over a finished minimal codebase that utilizes it then you\ncan look at https://github.com/chippers/hello_tauri. That example also comes with a CI script to test with GitHub\nactions, but you may still be interested in the [WebDriver CI](ci) guide as it explains the concept a bit more.\n\n[WebDriver]: https://www.w3.org/TR/webdriver/\n[`tauri-driver`]: https://crates.io/crates/tauri-driver\n[tauri-driver]: https://crates.io/crates/tauri-driver\n[Microsoft Edge Driver]: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/\n","h1":[],"h2":[{"content":"System Dependencies","type":"text"},{"content":"Example Application","type":"text"}],"h3":[{"content":"Linux","type":"text"},{"content":"Windows","type":"text"}],"hasCodeBlock":true,"programmingLanguages":["sh"],"otherSymbols":["text","inlineCode","link","def"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"intro.md","filepath":"docs/usage","hash":42,"frontmatter":{"title":"Introduction"},"text":"\nThis part of the documentation is dedicated to learning how to use Tauri.\n\nTauri provides a [CLI](/docs/api/cli), a Rust API, and a [JavaScript API](/docs/api/js/index) that you can use in your project. Because raw docs can be quite scary to newcomers (especially people who have never played with Rust before), we've created this \"learn by example\" section.\n\nHere you will find guides and techniques to add to your own project in order to fulfill your goals.\n\n## A Step Further\n\n- [Understanding Tauri Patterns](/docs/usage/patterns/about-patterns)\n- [Add Tauri to my existing project](/docs/usage/development/integration)\n- [Tauri Development Cycle](/docs/usage/development/development)\n\n## Guides\n\n- [How to embed custom binaries](/docs/usage/guides/bundler/sidecar)\n- [How to customize app icons](/docs/usage/guides/visual/icons)\n","h1":[],"h2":[{"content":"A Step Further","type":"text"},{"content":"Guides","type":"text"}],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","link","list"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"about-patterns.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"id":"about-patterns","title":"A word on patterns","sidebar_label":"A word on patterns"},"text":"\nTauri patterns are descriptions of use-cases that are entirely configurable within the `src-tauri/tauri.conf.json` file. These are not the limits of what Tauri can do, and there are probably more out there. If you discover one, why not get in touch and help us update this collection!\n\nIf you haven't read about the general design of Tauri, then it would make the most sense for you to visit the [\"Getting started\"](/docs/getting-started/intro) and become familiar with the basic architecture and terminology used in these patterns. \n","h1":[],"h2":[],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode","link"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"bridge.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"title":"Bridge"},"text":"\nimport Rater from '@theme/Rater'\nimport useBaseUrl from '@docusaurus/useBaseUrl'\n\n<div className=\"row\">\n <div className=\"col col--4\">\n <table>\n <tr>\n <td>Ease of Use</td>\n <td><Rater value=\"3\"/></td>\n </tr>\n <tr>\n <td>Extensibility</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n <tr>\n <td>Performance</td>\n <td><Rater value=\"4\"/></td>\n </tr>\n <tr>\n <td>Security</td>\n <td><Rater value=\"4\"/></td>\n </tr>\n </table>\n </div>\n <div className=\"col col--4 pattern-logo\">\n <img src={useBaseUrl('img/patterns/Bridge.png')} alt=\"Bridge\" />\n </div>\n <div className=\"col col--4\">\n Pros:\n <ul>\n <li>Highly configurable</li>\n <li>No Rust skills required</li>\n </ul>\n Cons:\n <ul>\n <li>Some WebAPIs unavailable</li>\n <li>Challenge to implement</li>\n </ul>\n </div>\n</div>\n\n## Description\n\nThe Bridge recipe is a secure pattern where messages are passed between brokers via an implicit bridge using the API. It isolates functionality to scope and passes messages instead of functionality.\n\n## Diagram\n\nimport Mermaid, { colors } from '@theme/Mermaid'\n\n<Mermaid chart={`graph TD\n H==>F\n subgraph WEBVIEW\n F-.-E\n end\n D-->E\n E-->D\n B-->D\n D-->B\n subgraph RUST\n A==>H\n A-->B\n B-.-C\n B-.-G\n end\n A[Binary]\n B{Rust Broker}\n C[Subprocess 2]\n G[Subprocess 1]\n D(( API BRIDGE ))\n E{JS Broker}\n F[Window]\n H{Bootstrap}\n style D fill:#ccc,stroke:#333,stroke-width:4px,color:white\n style RUST fill:${colors.orange.light},stroke:${colors.orange.dark},stroke-width:4px\n style WEBVIEW fill:${colors.blue.light},stroke:${colors.blue.dark},stroke-width:4px`} />\n\n## Configuration\n\nHere's what you need to add to your tauri.conf.json file:\n```json\n\"tauri\": {\n \"allowlist\": { // all API values are default false\n \"all\": false, // use this flag to enable all API features\n \"shell\": {\n \"execute\": false, // enable application execution\n \"open\": false, // open link/path in the default app\n },\n \"fs\": {\n \"listFiles\": false, // list files in a directory\n \"readBinaryFile\": false, // read binary file from local filesystem\n \"readTextFile\": false, // read text file from local filesystem\n \"setTitle\": false, // set the window title\n \"writeFile\": false // write file to local filesystem\n }\n }\n}\n\n```\n","h1":[],"h2":[{"content":"Description","type":"text"},{"content":"Diagram","type":"text"},{"content":"Configuration","type":"text"}],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"cloudbridge.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"title":"Cloudbridge"},"text":"\nimport Rater from '@theme/Rater'\nimport useBaseUrl from '@docusaurus/useBaseUrl'\n\n<div className=\"row\">\n <div className=\"col col--4\">\n <table>\n <tr>\n <td>Ease of Use</td>\n <td><Rater value=\"1\"/></td>\n </tr>\n <tr>\n <td>Extensibility</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n <tr>\n <td>Performance</td>\n <td><Rater value=\"3\"/></td>\n </tr>\n <tr>\n <td>Security</td>\n <td><Rater value=\"2\"/></td>\n </tr>\n </table>\n </div>\n <div className=\"col col--4 pattern-logo\">\n <img src={useBaseUrl('img/patterns/Cloudbridge.png')} alt=\"Cloudbridge\" />\n </div>\n <div className=\"col col--4\">\n Pros:\n <ul>\n <li>All available features</li>\n <li>No Rust skills required</li>\n </ul>\n Cons:\n <ul>\n <li>Largest bundle size</li>\n <li>Hard to separate concerns</li>\n </ul>\n </div>\n</div>\n\n## Description\n\nThe Cloudbridge recipe combines the flexibility of a localhost and the security of the bridge. With so many features, it can be easy to get lost.\n\n## Diagram\n\nimport Mermaid, { colors } from '@theme/Mermaid'\n\n<Mermaid chart={`graph TD\n H==>F2\n H==>D2\n D2-->F2\n F2-->D2\n B-->D\n D-->B\n E2-->D\n D-->E2\n subgraph WEBVIEW\n F2\n E2\n end\n subgraph SERVER\n D2\n E-->D2\n end\n subgraph RUST\n A==>H\n A-->B\n B-.-C\n end\n A[Binary]\n B{Rust Broker}\n C[Subprocess]\n D(( API BRIDGE ))\n E{JS Broker}\n D2(( localhost ))\n E[bundled resources]\n E2{JS Broker}\n F2[Window]\n H{Bootstrap}\n style D fill:#ccc,stroke:#333,stroke-width:4px,color:white\n style RUST fill:${colors.orange.light},stroke:${colors.orange.dark},stroke-width:4px\n style WEBVIEW fill:${colors.blue.light},stroke:${colors.blue.dark},stroke-width:4px\n style SERVER fill:#49A24A,stroke:#2B6063,stroke-width:4px\n `} />\n\n\n## Configuration\n\nHere's what you need to add to your tauri.conf.json file:\n```json\n\"tauri\": {\n \"allowlist\": {\n \"all\": true // enable entire API\n }\n}\n```\n","h1":[],"h2":[{"content":"Description","type":"text"},{"content":"Diagram","type":"text"},{"content":"Configuration","type":"text"}],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"cloudish.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"title":"Cloudish"},"text":"\nimport Rater from '@theme/Rater'\nimport useBaseUrl from '@docusaurus/useBaseUrl'\n\n<div className=\"row\">\n <div className=\"col col--4\">\n <table>\n <tr>\n <td>Ease of Use</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n <tr>\n <td>Extensibility</td>\n <td><Rater value=\"3\"/></td>\n </tr>\n <tr>\n <td>Performance</td>\n <td><Rater value=\"3\"/></td>\n </tr>\n <tr>\n <td>Security</td>\n <td><Rater value=\"2\"/></td>\n </tr>\n </table>\n </div>\n <div className=\"col col--4 pattern-logo\">\n <img src={useBaseUrl('img/patterns/Cloudish.png')} alt=\"Cloudish\" />\n </div>\n <div className=\"col col--4\">\n Pros:\n <ul>\n <li>Similar to a SPA web-app</li>\n <li>No Rust skills required</li>\n </ul>\n Cons:\n <ul>\n <li>No access to Rust API</li>\n <li>Uses a localhost server</li>\n </ul>\n </div>\n</div>\n\n## Description\n\nThe Cloudish recipe is a pattern for maximum flexibility and app performance. It uses a localhost server, which means that your app will technically be available to other processes, like browsers and potentially other devices on the network. All of your assets are baked into the binary, but served as if they were distinct files.\n\n## Diagram\n\nimport Mermaid, { colors } from '@theme/Mermaid'\n\n<Mermaid chart={`graph TD\n H==>F\n H==>D\n D-->F\n F-->D\n subgraph RUST\n A==>H\n end\n subgraph WEBVIEW\n F\n end\n subgraph SERVER\n D\n E-->D\n end\n A[Binary]\n D(( localhost ))\n E[bundled resources]\n F[Window]\n H{Bootstrap}\n style RUST fill:${colors.orange.light},stroke:${colors.orange.dark},stroke-width:4px\n style WEBVIEW fill:${colors.blue.light},stroke:${colors.blue.dark},stroke-width:4px\n style SERVER fill:#49A24A,stroke:#2B6063,stroke-width:4px`} />\n\n\n## Configuration\n\nHere's what you need to add to your tauri.conf.json file:\n```json\n\"tauri\": {\n \"allowlist\": {\n \"all\": false // disable entire API\n }\n}\n\n```\n","h1":[],"h2":[{"content":"Description","type":"text"},{"content":"Diagram","type":"text"},{"content":"Configuration","type":"text"}],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"glui.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"title":"GLUI"},"text":"\nimport Alert from '@theme/Alert'\nimport useBaseUrl from '@docusaurus/useBaseUrl'\n\n<Alert type=\"warning\" icon=\"info-alt\" title=\"Please note\">\nThis pattern is not available for now.\n</Alert>\n\nimport Rater from '@theme/Rater'\n\n<div className=\"row\">\n <div className=\"col col--4\">\n <table>\n <tr>\n <td>Ease of Use</td>\n <td><Rater value=\"0\"/></td>\n </tr>\n <tr>\n <td>Extensibility</td>\n <td><Rater value=\"0\"/></td>\n </tr>\n <tr>\n <td>Performance</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n <tr>\n <td>Security</td>\n <td><Rater value=\"0\"/></td>\n </tr>\n </table>\n </div>\n <div className=\"col col--4 pattern-logo\">\n <img src={useBaseUrl('img/patterns/GLUI.png')} alt=\"GLUI\" />\n </div>\n <div className=\"col col--4\">\n Pros:\n <ul>\n <li>Framebuffer FTW</li>\n <li>Window events rigged</li>\n </ul>\n Cons:\n <ul>\n <li>Broken on your machine</li>\n </ul>\n </div>\n</div>\n\n## Description\n\nThe GLUI is a research pattern that we will use internally to test approaches using a GLUTIN window. We’re not sure yet if it will make the final cut as a bona fide alternative to WebView, although early tests with transparent and multiwindow are exciting.\n\n## Diagram\n\nimport Mermaid, { colors } from '@theme/Mermaid'\n\n<Mermaid chart={`graph TD\n A==>H\n H==>G\n A-->D\n D-->G\n subgraph GLUTIN\n G\n end\n subgraph RUST\n A\n end\n A[Binary]\n D(Framebuffer)\n G[GL Window]\n H{Bootstrap}\n style GLUTIN stroke:${colors.blue.dark},stroke-width:4px\n style RUST fill:${colors.orange.light},stroke:${colors.orange.dark},stroke-width:4px`} />\n\n\n## Configuration\n\nHere's what you need to add to your tauri.conf.json file:\n```json\n\"tauri\": {\n \"allowlist\": { // all API endpoints are default false\n \"all\": false, // disable the api\n },\n \"window\": { // not yet normative\n \"glutin\": true,\n \"webview\": false\n }\n}\n```\n","h1":[],"h2":[{"content":"Description","type":"text"},{"content":"Diagram","type":"text"},{"content":"Configuration","type":"text"}],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"hermit.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"title":"Hermit"},"text":"\nimport Rater from '@theme/Rater'\nimport useBaseUrl from '@docusaurus/useBaseUrl'\n\n<div className=\"row\">\n <div className=\"col col--4\">\n <table>\n <tr>\n <td>Ease of Use</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n <tr>\n <td>Extensibility</td>\n <td><Rater value=\"0\"/></td>\n </tr>\n <tr>\n <td>Performance</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n <tr>\n <td>Security</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n </table>\n </div>\n <div className=\"col col--4 pattern-logo\">\n <img src={useBaseUrl('img/patterns/Hermit.png')} alt=\"Hermit\" />\n </div>\n <div className=\"col col--4\">\n Pros:\n <ul>\n <li>Quick to make</li>\n <li>Smallest size</li>\n </ul>\n Cons:\n <ul>\n <li>No remote resources</li>\n <li>No access to API</li>\n </ul>\n </div>\n</div>\n\n## Description\n\nThe Hermit recipe is a pattern for ultimate application isolation where all logic is self-contained in the Window and the binary exists merely to bootstrap the Window. There is no communication back to Rust from the Window, there is no localhost server, and the Window has no access to any remote resources. The Hermit is great for interactive Kiosk Mode and standalone HTML based games.\n\n## Diagram\n\nimport Mermaid, { colors } from '@theme/Mermaid'\n\n<Mermaid chart={`graph LR\n A==>H\n H==>F\n subgraph WEBVIEW\n F\n end\n subgraph RUST\n A\n end\n A[fa:fa-cog Binary ]\n F[fa:fa-window-maximize Window]\n H{Bootstrap}\n style RUST fill:${colors.orange.light},stroke:${colors.orange.dark},stroke-width:4px\n style WEBVIEW fill:${colors.blue.light},stroke:${colors.blue.dark},stroke-width:4px`} />\n\n## Configuration\n\nHere's what you need to add to your tauri.conf.json file:\n\n```json\n\"tauri\": {\n \"allowlist\": {\n \"all\": false, // disable and tree-shake all api functions\n }\n}\n```\n","h1":[],"h2":[{"content":"Description","type":"text"},{"content":"Diagram","type":"text"},{"content":"Configuration","type":"text"}],"h3":[],"hasCodeBlock":true,"programmingLanguages":["json"],"otherSymbols":["text","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"lockdown.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"title":"Lockdown"},"text":"\nimport Rater from '@theme/Rater'\nimport useBaseUrl from '@docusaurus/useBaseUrl'\n\n<div className=\"row\">\n <div className=\"col col--4\">\n <table>\n <tr>\n <td>Ease of Use</td>\n <td><Rater value=\"2\"/></td>\n </tr>\n <tr>\n <td>Extensibility</td>\n <td><Rater value=\"4\"/></td>\n </tr>\n <tr>\n <td>Performance</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n <tr>\n <td>Security</td>\n <td><Rater value=\"5\" color=\"#fff04d\"/></td>\n </tr>\n </table>\n </div>\n <div className=\"col col--4 pattern-logo\">\n <img src={useBaseUrl('img/patterns/Lockdown.png')} alt=\"Lockdown\" />\n </div>\n <div className=\"col col--4\">\n Pros:\n <ul>\n <li>Highest security rating</li>\n <li>Elegant and powerful</li>\n </ul>\n Cons:\n <ul>\n <li>Rust skills required</li>\n <li>No remote resources</li>\n </ul>\n </div>\n</div>\n\n\n## Description\n\nThe Lockdown recipe is a minimal usage of the [Bridge pattern](/docs/usage/patterns/bridge), which only allows interaction between Rust and the Window via expiring JS Promise Closures that are injected into the Window by Rust and nulled as part of the callback.\n\n## Diagram\n\nimport Mermaid, { colors } from '@theme/Mermaid'\n\n<Mermaid chart={`graph TD\n H==>F\n G-.->B\n B-->G\n subgraph WEBVIEW\n G-->F\n end\n subgraph RUST\n A-->B\n A==>H\n end\n A[Binary]\n B[API:Event]\n F[Window]\n G((Promise Closure))\n H{Bootstrap}\n style RUST fill:${colors.orange.light},stroke:${colors.orange.dark},stroke-width:4px\n style WEBVIEW fill:${colors.blue.light},stroke:${colors.blue.dark},stroke-width:4px`} />\n\n\n## Configuration\n\nHere's what you need to add to your tauri.conf.json file:\n```json\n\"tauri\": {\n \"allowlist\": {} // all API endpoints are default false\n}\n```\n","h1":[],"h2":[{"content":"Description","type":"text"},{"content":"Diagram","type":"text"},{"content":"Configuration","type":"text"}],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","link","inlineCode"]}
|
||||
@@ -1 +0,0 @@
|
||||
{"filename":"multiwin.md","filepath":"docs/usage/patterns","hash":42,"frontmatter":{"title":"Multiwin"},"text":"\nimport Alert from '@theme/Alert'\nimport useBaseUrl from '@docusaurus/useBaseUrl'\n\nimport Rater from '@theme/Rater'\n\n<div className=\"row\">\n <div className=\"col col--4\">\n <table>\n <tr>\n <td>Ease of Use</td>\n <td><Rater value=\"4\"/></td>\n </tr>\n <tr>\n <td>Extensibility</td>\n <td><Rater value=\"4\"/></td>\n </tr>\n <tr>\n <td>Performance</td>\n <td><Rater value=\"3\"/></td>\n </tr>\n <tr>\n <td>Security</td>\n <td><Rater value=\"5\"/></td>\n </tr>\n </table>\n </div>\n <div className=\"col col--4 pattern-logo\">\n <img src={useBaseUrl('img/patterns/Multiwin.png')} alt=\"Multiwin\" />\n </div>\n <div className=\"col col--4\">\n Pros:\n <ul>\n <li>Windows can be spawned or destroyed at runtime</li>\n <li>Separation of concerns</li>\n </ul>\n Cons:\n <ul>\n <li>Somewhat complex</li>\n </ul>\n </div>\n</div>\n\n## Description\n\nThe Multiwin recipe will allow you to have multiple windows.\n\n## Diagram\n\nimport Mermaid, { colors } from '@theme/Mermaid'\n\n<Mermaid chart={`graph LR\n A==>H\n H==>F\n H==>G\n subgraph WEBVIEW\n F\n end\n subgraph WINIT\n G\n end\n subgraph RUST\n A\n end\n A[Binary]\n F[Window]\n G[Window]\n H{Bootstrap}\n style WINIT stroke:${colors.blue.dark},stroke-width:4px\n style RUST fill:${colors.orange.light},stroke:${colors.orange.dark},stroke-width:4px\n style WEBVIEW fill:${colors.blue.light},stroke:${colors.blue.dark},stroke-width:4px`} />\n\n\n## Configuration\n\nHere's what you need to add to your tauri.conf.json file:\n```json\n\"tauri\": {\n \"allowlist\": {}, // all API endpoints are default false\n \"windows\": [{\n \"title\": \"Window1\",\n \"label\": \"main\",\n }, {\n \"title\": \"Splash\",\n \"label\": \"splashscreen\"\n }]\n}\n\n```\n","h1":[],"h2":[{"content":"Description","type":"text"},{"content":"Diagram","type":"text"},{"content":"Configuration","type":"text"}],"h3":[],"hasCodeBlock":false,"programmingLanguages":[],"otherSymbols":["text","inlineCode"]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{}
|
||||
File diff suppressed because one or more lines are too long
@@ -38,7 +38,11 @@ export const ConsolidatedMapper: ModelMapper<
|
||||
: isApiDocument(i)
|
||||
? null
|
||||
: i.code?.join(" ") || null,
|
||||
hierarchy_lvl6: isRepoDocument(i) ? String(i.stars) || null : isApiDocument(i) ? null : null,
|
||||
hierarchy_lvl6: isRepoDocument(i)
|
||||
? String(i.stars) || null
|
||||
: isApiDocument(i)
|
||||
? null
|
||||
: null,
|
||||
from: isRepoDocument(i) ? "repo" : isApiDocument(i) ? "api" : "prose",
|
||||
symbol: isApiDocument(i) ? i.kind : null,
|
||||
language: isApiDocument(i)
|
||||
@@ -46,7 +50,7 @@ export const ConsolidatedMapper: ModelMapper<
|
||||
: isRepoDocument(i)
|
||||
? i.language
|
||||
: i.code?.pop() || null,
|
||||
|
||||
tags: isRepoDocument(i) ? i.topics || null : isApiDocument(i) ? null : i.tags || null,
|
||||
content: isRepoDocument(i) ? i.text : isApiDocument(i) ? i.comment || null : i.text,
|
||||
rank: isRepoDocument(i)
|
||||
? IndexRank.repo
|
||||
|
||||
@@ -6,6 +6,7 @@ export type IConsolidatedModel = IScrapeSelectorTargets & {
|
||||
from: "prose" | "api" | "repo";
|
||||
rank: number;
|
||||
symbol: string | null;
|
||||
tags: null | string[];
|
||||
language: string | null;
|
||||
};
|
||||
|
||||
@@ -20,6 +21,15 @@ export const ConsolidatedModel = createModel<IConsolidatedModel>("consolidated",
|
||||
javascript: ["ts", "typescript", "js"],
|
||||
})
|
||||
.filterable("from", "language", "symbol")
|
||||
.searchable("hierarchy_lvl0", "rank", "hierarchy_lvl3", "hierarchy_lvl2", "hierarchy_lvl1", "symbol", "content")
|
||||
.rankingRules((r) => r.words().typo().sort().attribute().proximity().exactness())
|
||||
.searchable(
|
||||
"hierarchy_lvl0",
|
||||
"symbol",
|
||||
"tags",
|
||||
"hierarchy_lvl3",
|
||||
"hierarchy_lvl2",
|
||||
"hierarchy_lvl1",
|
||||
"rank",
|
||||
"content"
|
||||
)
|
||||
.rankingRules((r) => r.words().typo().sort().attribute().proximity().ASC("rank").exactness())
|
||||
);
|
||||
|
||||
@@ -136,5 +136,5 @@ export async function refreshProse(
|
||||
await writeFile(sitemap, JSON.stringify(currentSitemap), "utf-8");
|
||||
console.log(`- wrote Repo Sitemap to: ${sitemap}`);
|
||||
|
||||
return { sitemap };
|
||||
return { };
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ function reduceClutter(
|
||||
|
||||
/**
|
||||
* Uses Github API to build a sitemap of markdown files for a given repo
|
||||
* and will also report on changes since last sitemap if a prior sitemap
|
||||
* existed
|
||||
*/
|
||||
export async function refreshSitemap(options: Partial<GithubContentsReq> = DEFAULT) {
|
||||
const o = { ...DEFAULT, ...options };
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable no-use-before-define */
|
||||
import { Keys, UnionToTuple } from "inferred-types";
|
||||
import { Keys } from "inferred-types";
|
||||
import { Type } from "~/enums";
|
||||
|
||||
export type PropertyRank<TDoc extends {}> = `${Keys<TDoc>}:${"asc" | "desc"}`;
|
||||
|
||||
/** represents valid choices for ranking rules */
|
||||
export type RankingRule =
|
||||
export type RankingRule<TDoc extends {}> =
|
||||
| "words"
|
||||
| "typo"
|
||||
| "proximity"
|
||||
| "attribute"
|
||||
| "sort"
|
||||
| "exactness";
|
||||
| "exactness"
|
||||
| PropertyRank<TDoc>;
|
||||
|
||||
|
||||
export type T = Record<Keys<UnionToTuple<RankingRule>>, any>;
|
||||
export type TT<E extends Keys<UnionToTuple<RankingRule>> = never> = Record<
|
||||
Keys<UnionToTuple<RankingRule>, E>,
|
||||
() => TT
|
||||
>;
|
||||
|
||||
/**
|
||||
* An API that allows consumers to set a ranking order for Meilisearch Index.
|
||||
@@ -24,19 +23,19 @@ export type TT<E extends Keys<UnionToTuple<RankingRule>> = never> = Record<
|
||||
* ordering.
|
||||
*
|
||||
* [Ranking Rules Documentation](https://docs.meilisearch.com/learn/core_concepts/relevancy.html#ranking-rules) */
|
||||
export type RankingRulesApi<E extends RankingRule = never> = Omit<
|
||||
export type RankingRulesApi<TDoc extends {}, E extends RankingRule<TDoc> = never> = Omit<
|
||||
{
|
||||
/**
|
||||
* Results are sorted by increasing number of typos. Returns documents that
|
||||
* match query terms with fewer typos first.
|
||||
*/
|
||||
typo: () => RankingRulesApi<E | "typo">;
|
||||
typo: () => RankingRulesApi<TDoc, E | "typo">;
|
||||
/**
|
||||
* Results are sorted by increasing distance between matched query terms. Returns
|
||||
* documents where query terms occur close together and in the same order as the
|
||||
* query string first.
|
||||
*/
|
||||
proximity: () => RankingRulesApi<E | "proximity">;
|
||||
proximity: () => RankingRulesApi<TDoc, E | "proximity">;
|
||||
/**
|
||||
* Results are sorted according to the
|
||||
* [attribute ranking order](https://docs.meilisearch.com/learn/core_concepts/relevancy.html#attribute-ranking-order).
|
||||
@@ -46,12 +45,12 @@ export type RankingRulesApi<E extends RankingRule = never> = Omit<
|
||||
* of the attribute list will be considered more relevant than documents containing the query
|
||||
* words at the end of the attributes.
|
||||
*/
|
||||
attribute: () => RankingRulesApi<E | "attribute">;
|
||||
attribute: () => RankingRulesApi<TDoc, E | "attribute">;
|
||||
/**
|
||||
* Results are sorted by the similarity of the matched words with the query words.
|
||||
* Returns documents that contain exactly the same terms as the ones queried first.
|
||||
*/
|
||||
exactness: () => RankingRulesApi<E | "exactness">;
|
||||
exactness: () => RankingRulesApi<TDoc, E | "exactness">;
|
||||
/**
|
||||
* Results are sorted according to parameters decided at query time. When the sort
|
||||
* ranking rule is in a higher position, sorting is exhaustive: results will be less
|
||||
@@ -59,12 +58,15 @@ export type RankingRulesApi<E extends RankingRule = never> = Omit<
|
||||
* lower position, sorting is relevant: results will be very relevant, but might not
|
||||
* always follow the order defined by the user.
|
||||
*/
|
||||
sort: () => RankingRulesApi<E | "sort">;
|
||||
sort: () => RankingRulesApi<TDoc, E | "sort">;
|
||||
/**
|
||||
* Results are sorted by decreasing number of matched query terms. Returns documents
|
||||
* that contain all query terms first.
|
||||
*/
|
||||
words: () => RankingRulesApi<E | "words">;
|
||||
words: () => RankingRulesApi<TDoc, E | "words">;
|
||||
|
||||
ASC: (prop: keyof TDoc) => RankingRulesApi<TDoc, E>;
|
||||
DESC: (prop: keyof TDoc) => RankingRulesApi<TDoc, E>;
|
||||
},
|
||||
E
|
||||
>;
|
||||
@@ -79,37 +81,6 @@ export type StopWords = Record<Language, string[]>;
|
||||
*/
|
||||
export type IndexSynonyms = Record<string, string[]>;
|
||||
|
||||
export type IndexDefnApi = {
|
||||
/**
|
||||
* Specify the order for the various _ranking rules_. The default ranking rules are:
|
||||
*
|
||||
* ```ts
|
||||
* ["words", "typo", "proximity", "attribute", "sort", "exactness"]
|
||||
* ```
|
||||
*
|
||||
* Refer to [Ranking Rules Documentation](https://docs.meilisearch.com/learn/core_concepts/relevancy.html#ranking-rules) for more info.
|
||||
*/
|
||||
rankingRules?: (r: RankingRulesApi) => void;
|
||||
/**
|
||||
* Allows multiple words with the same meaning to be paired together to improve search results.
|
||||
*
|
||||
* [Synonyms Documentation](https://docs.meilisearch.com/reference/features/synonyms.html#synonyms)
|
||||
*/
|
||||
synonyms?: IndexSynonyms;
|
||||
/**
|
||||
* Because your website might provide content with structured English sentences, we
|
||||
* recommend adding stop words. Indeed, the search-engine would not be "spoiled" by
|
||||
* linking words and would focus on the main words of the query, rendering more
|
||||
* accurate results.
|
||||
*
|
||||
* Here is the [dedicated page about stop-words](https://docs.meilisearch.com/reference/features/stop_words.html)
|
||||
* in the official documentation. You can find more complete lists of
|
||||
* English stop-words [like this one](https://gist.github.com/sebleier/554280).
|
||||
|
||||
*/
|
||||
stopWords?: string[];
|
||||
};
|
||||
|
||||
export type DocumentProperty = {
|
||||
type: Type;
|
||||
literals: string[] | number[];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AxiosRequestConfig } from "axios";
|
||||
import { AxiosRequestConfig } from 'axios';
|
||||
import { RankingRule, Wildcard } from '.';
|
||||
import { ApiOptions } from "~/utils/MeiliSearchApi";
|
||||
import { RankingRule, Wildcard } from ".";
|
||||
|
||||
export interface MsIndexStatusResponse {
|
||||
uid: string;
|
||||
@@ -42,18 +42,18 @@ export type IMeilisearchSearchHit<T extends {}> = {
|
||||
id: string;
|
||||
} & T;
|
||||
|
||||
export interface IMeilisearchSettingsResponse<T extends {}> {
|
||||
displayAttributes: (keyof T)[] | ["*"];
|
||||
searchableAttributes: (keyof T)[] | ["*"];
|
||||
filterAttributes: (keyof T)[] | ["*"];
|
||||
sortableAttributes: (keyof T)[] | ["*"];
|
||||
rankingRules: RankingRule[];
|
||||
export interface IMeilisearchSettingsResponse<TDoc extends {}> {
|
||||
displayAttributes: (keyof TDoc)[] | ["*"];
|
||||
searchableAttributes: (keyof TDoc)[] | ["*"];
|
||||
filterAttributes: (keyof TDoc)[] | ["*"];
|
||||
sortableAttributes: (keyof TDoc)[] | ["*"];
|
||||
rankingRules: RankingRule<TDoc>[];
|
||||
stopWords: string[];
|
||||
synonyms: Record<string, string[]>;
|
||||
distinctAttribute: null | (keyof T)[] | ["*"];
|
||||
distinctAttribute: null | (keyof TDoc)[] | ["*"];
|
||||
}
|
||||
|
||||
export interface IMeilisearchIndexSettings<T extends {}> {
|
||||
export interface IMeilisearchIndexSettings<TDoc extends {}> {
|
||||
/** List of associated words treated similarly. A word associated to an array of word as synonyms. */
|
||||
synonyms?: Record<string, string[]>;
|
||||
/** List of words ignored when present in search queries. */
|
||||
@@ -63,20 +63,20 @@ export interface IMeilisearchIndexSettings<T extends {}> {
|
||||
*
|
||||
* The default is: words, typo, proximity, attribute, sort, exactness
|
||||
*/
|
||||
rankingRules?: RankingRule[];
|
||||
rankingRules?: RankingRule<TDoc>[];
|
||||
/** Search returns documents with distinct (different) values of the given field. */
|
||||
distinctAttribute?: null | keyof T;
|
||||
distinctAttribute?: null | keyof TDoc;
|
||||
/** Fields in which to search for matching query words sorted by order of importance. */
|
||||
searchableAttributes?: Wildcard<T>;
|
||||
searchableAttributes?: Wildcard<TDoc>;
|
||||
/** Fields displayed in the returned documents. */
|
||||
displayedAttributes?: Wildcard<T>;
|
||||
displayedAttributes?: Wildcard<TDoc>;
|
||||
/**
|
||||
* Attributes to use for facetting and filtering. See
|
||||
* [Filtering and Faceted Search](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html).
|
||||
*/
|
||||
filterableAttributes?: Wildcard<T>;
|
||||
filterableAttributes?: Wildcard<TDoc>;
|
||||
/** List of attributes to sort on at search. */
|
||||
sortableAttributes?: Wildcard<T>;
|
||||
sortableAttributes?: Wildcard<TDoc>;
|
||||
}
|
||||
|
||||
export interface IMeiliSearchHealth {
|
||||
|
||||
@@ -43,7 +43,7 @@ export type IndexApi<TDoc, TExclude extends string = never> = Omit<
|
||||
* Refer to [Ranking Rules Documentation](https://docs.meilisearch.com/learn/core_concepts/relevancy.html#ranking-rules) for more info.
|
||||
*/
|
||||
rankingRules: (
|
||||
cb: (r: RankingRulesApi) => void
|
||||
cb: (r: RankingRulesApi<TDoc>) => void
|
||||
) => IndexApi<TDoc, TExclude | "rankingRules">;
|
||||
},
|
||||
TExclude
|
||||
@@ -57,7 +57,7 @@ export type ISearchModel<TDoc extends {}> = {
|
||||
type: TDoc;
|
||||
index: {
|
||||
pk: string;
|
||||
rules?: RankingRule[];
|
||||
rules?: RankingRule<TDoc>[];
|
||||
displayed?: Wildcard<TDoc>;
|
||||
searchable?: Wildcard<TDoc>;
|
||||
filterable?: Wildcard<TDoc>;
|
||||
|
||||
@@ -15,23 +15,29 @@ export type ISitemapDictionary = Record<string, Omit<IFlatSitemap, "filepath">>;
|
||||
/**
|
||||
* Flattens the hierarchical structure of a sitemap into an easily iterable array
|
||||
*/
|
||||
export function flattenSitemap(sm: IDocsSitemap): IFlatSitemap[] {
|
||||
export function flattenSitemap<S extends IDocsSitemap | undefined>(sm: S): S extends IDocsSitemap ? IFlatSitemap[] : undefined {
|
||||
let flat: IFlatSitemap[] = [];
|
||||
for (const f of sm.files) {
|
||||
const filepath = join(sm.dir, f.name);
|
||||
flat.push({ filepath, sha: f.sha, size: f.size, download_url: f.download_url });
|
||||
}
|
||||
if (sm.children && sm.children.length > 0) {
|
||||
for (const child of sm.children) {
|
||||
flat = flat.concat(...flattenSitemap(child));
|
||||
if(!sm) {
|
||||
return undefined as S extends IDocsSitemap ? IFlatSitemap[] : undefined;
|
||||
} else {
|
||||
|
||||
for (const f of sm.files) {
|
||||
const filepath = join(sm.dir, f.name);
|
||||
flat.push({ filepath, sha: f.sha, size: f.size, download_url: f.download_url });
|
||||
}
|
||||
if (sm.children && sm.children.length > 0) {
|
||||
for (const child of sm.children) {
|
||||
flat = flat.concat(...flattenSitemap(child));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return flat;
|
||||
return flat as S extends IDocsSitemap ? IFlatSitemap[] : undefined;
|
||||
}
|
||||
|
||||
export function sitemapDictionary(sm: IDocsSitemap) {
|
||||
return flattenSitemap(sm).reduce((acc, i) => {
|
||||
export function sitemapDictionary<S extends IDocsSitemap | undefined>(sm: S) {
|
||||
|
||||
return (sm ? flattenSitemap(sm as IDocsSitemap).reduce((acc, i) => {
|
||||
return { ...acc, [i.filepath]: { ...omit(i, "filepath") } };
|
||||
}, {} as ISitemapDictionary);
|
||||
}, {} as ISitemapDictionary) : undefined) as S extends IDocsSitemap ? IFlatSitemap[] : undefined;
|
||||
}
|
||||
|
||||
@@ -62,8 +62,8 @@ const modelConfigApi = <TDoc extends {}>(update: (s: PartialModel<TDoc>) => void
|
||||
return api<TExclude | "synonyms">();
|
||||
},
|
||||
|
||||
rankingRules(cb: (r: RankingRulesApi) => void) {
|
||||
const updateRules = (r: RankingRule[]) => {
|
||||
rankingRules(cb: (r: RankingRulesApi<TDoc>) => void) {
|
||||
const updateRules = (r: RankingRule<TDoc>[]) => {
|
||||
update({ index: { rules: r } });
|
||||
};
|
||||
const ruleApi = rankingRules(updateRules);
|
||||
|
||||
57
packages/tauri-search/src/utils/getCache.ts
Normal file
57
packages/tauri-search/src/utils/getCache.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import { readFile } from "fs/promises";
|
||||
import { IDocsSitemap } from "~/pipelines";
|
||||
import { IApiModel, IProseModel, IRepoModel } from "..";
|
||||
import { getEnv } from "./getEnv";
|
||||
|
||||
export enum CacheKind {
|
||||
sitemap = "Sitemap of Markdown files",
|
||||
proseDocs = "Prose/Markdown docs",
|
||||
repoDocs = "Repo docs",
|
||||
typescriptDocs = "Typescript API docs",
|
||||
rustDocs = "Rust API docs"
|
||||
}
|
||||
|
||||
export interface GetCacheOptions {
|
||||
repo?:string;
|
||||
branch?: string;
|
||||
}
|
||||
|
||||
export async function getCache<K extends CacheKind>(kind: K, options: GetCacheOptions = {}) {
|
||||
const {repo, branch} = {...getEnv(), ...options};
|
||||
let content;
|
||||
|
||||
try {
|
||||
switch(kind) {
|
||||
case CacheKind.sitemap:
|
||||
content = await readFile(`src/generated/sitemap-${repo}-${branch}.json`, "utf-8").then(c => JSON.parse(c) as IDocsSitemap);
|
||||
break;
|
||||
|
||||
case CacheKind.proseDocs:
|
||||
content = await readFile(`src/generated/prose/${repo}_${branch}/documents.json`, "utf-8").then(c => JSON.parse(c) as IProseModel[]);
|
||||
break;
|
||||
|
||||
case CacheKind.repoDocs:
|
||||
content = await readFile(`src/generated/repos/documents.json`, "utf-8").then(c => JSON.parse(c) as IRepoModel[]);
|
||||
break;
|
||||
|
||||
case CacheKind.typescriptDocs:
|
||||
content = await readFile(`src/generated/api/${repo}_${branch}/ts-documents.json`, "utf-8").then(c => JSON.parse(c) as IApiModel[]);
|
||||
break;
|
||||
|
||||
case CacheKind.rustDocs:
|
||||
content = await readFile(`src/generated/api/${repo}_${branch}/rs-documents.json`, "utf-8").then(c => JSON.parse(c) as IApiModel[]);
|
||||
break;
|
||||
|
||||
default:
|
||||
content = undefined;
|
||||
}
|
||||
|
||||
return content as K extends CacheKind.sitemap ? IDocsSitemap | undefined : K extends CacheKind.proseDocs | undefined? IProseModel[] : K extends CacheKind.repoDocs ? IRepoModel[]| undefined : K extends CacheKind.typescriptDocs | undefined ? IApiModel[] : undefined;
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
|
||||
// throw new Error(`Problem loading "${kind}" generated cache file: ${(e as Error).message}`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { config } from "dotenv";
|
||||
export function getEnv() {
|
||||
config();
|
||||
return {
|
||||
repo: process.env.REPO || "tauri",
|
||||
repo: process.env.REPO || "tauri-docs",
|
||||
branch: process.env.BRANCH || "dev",
|
||||
github_token: process.env.GH_TOKEN || process.env.GITHUB_TOKEN || undefined,
|
||||
github_user: process.env.GH_USER || undefined,
|
||||
|
||||
@@ -1,46 +1,60 @@
|
||||
import { RankingRule, RankingRulesApi } from "~/types/apis";
|
||||
|
||||
export const rankingRules = (update: (r: RankingRule[]) => void) => {
|
||||
const api = <E extends RankingRule = never>(
|
||||
rules: RankingRule[] = []
|
||||
): RankingRulesApi<E> => {
|
||||
export const rankingRules = <TDoc extends {}>(update: (r: RankingRule<TDoc>[]) => void) => {
|
||||
const api = <TDoc, E extends RankingRule = never>(
|
||||
rules: RankingRule<TDoc>[] = []
|
||||
): RankingRulesApi<TDoc, E> => {
|
||||
return {
|
||||
typo: () => {
|
||||
const updated = [...rules, "typo"] as RankingRule[];
|
||||
const updated = [...rules, "typo"] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
|
||||
return api<E | "typo">(updated);
|
||||
return api<TDoc, E | "typo">(updated);
|
||||
},
|
||||
|
||||
proximity: () => {
|
||||
const updated = [...rules, "proximity"] as RankingRule[];
|
||||
const updated = [...rules, "proximity"] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
return api<E | "proximity">(updated);
|
||||
return api<TDoc, E | "proximity">(updated);
|
||||
},
|
||||
|
||||
attribute: () => {
|
||||
const updated = [...rules, "attribute"] as RankingRule[];
|
||||
const updated = [...rules, "attribute"] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
return api<E | "attribute">(updated);
|
||||
return api<TDoc, E | "attribute">(updated);
|
||||
},
|
||||
|
||||
exactness: () => {
|
||||
const updated = [...rules, "exactness"] as RankingRule[];
|
||||
const updated = [...rules, "exactness"] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
return api<E | "exactness">(updated);
|
||||
return api<TDoc, E | "exactness">(updated);
|
||||
},
|
||||
|
||||
sort: () => {
|
||||
const updated = [...rules, "sort"] as RankingRule[];
|
||||
const updated = [...rules, "sort"] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
return api<E | "sort">(updated);
|
||||
return api<TDoc, E | "sort">(updated);
|
||||
},
|
||||
words: () => {
|
||||
const updated = [...rules, "words"] as RankingRule[];
|
||||
const updated = [...rules, "words"] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
return api<E | "words">(updated);
|
||||
return api<TDoc, E | "words">(updated);
|
||||
},
|
||||
} as unknown as RankingRulesApi<E>;
|
||||
/**
|
||||
* Make a property in the Model serve as a ranking rule, using
|
||||
* ascending order to rank.
|
||||
*/
|
||||
ASC: (prop: keyof TDoc) => {
|
||||
const updated = [...rules, `${prop}:asc`] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
return api<TDoc, E>(updated);
|
||||
},
|
||||
DESC: (prop: keyof TDoc) => {
|
||||
const updated = [...rules, `${prop}:desc`] as RankingRule<TDoc>[];
|
||||
update(updated);
|
||||
return api<TDoc, E>(updated);
|
||||
},
|
||||
} as unknown as RankingRulesApi<TDoc, E>;
|
||||
};
|
||||
|
||||
return api();
|
||||
|
||||
15
packages/tauri-search/src/utils/writeGeneratedFile.ts
Normal file
15
packages/tauri-search/src/utils/writeGeneratedFile.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { mkdir, writeFile } from "fs/promises";
|
||||
import { dirname } from "path";
|
||||
|
||||
export async function writeGeneratedFile(file: string, data: any) {
|
||||
const content = typeof data === "string" ? data : JSON.stringify(data);
|
||||
const dir = dirname(file);
|
||||
|
||||
try {
|
||||
await mkdir(dir, { recursive: true });
|
||||
} catch(err) {
|
||||
throw new Error(`Problem creating directory "${dir}" so that a generated file could be placed into this driectory: ${(err as Error).message}`);
|
||||
}
|
||||
|
||||
return writeFile(file, content, "utf-8");
|
||||
}
|
||||
94
pnpm-lock.yaml
generated
94
pnpm-lock.yaml
generated
@@ -111,6 +111,7 @@ importers:
|
||||
specifiers:
|
||||
'@octokit/types': ^6.34.0
|
||||
'@type-challenges/utils': ^0.1.1
|
||||
'@types/html-to-text': ^8.0.1
|
||||
'@types/markdown-it': ^12.2.3
|
||||
'@types/node': ^14.18.10
|
||||
'@typescript-eslint/eslint-plugin': ^5.10.2
|
||||
@@ -128,6 +129,7 @@ importers:
|
||||
fast-glob: ^3.2.11
|
||||
fx: ^20.0.2
|
||||
gray-matter: ^4.0.3
|
||||
html-to-text: ^8.1.0
|
||||
husky: ^7.0.4
|
||||
inferred-types: ^0.18.4
|
||||
native-dash: ^1.21.5
|
||||
@@ -143,10 +145,12 @@ importers:
|
||||
vite-plugin-inspect: ^0.3.13
|
||||
vitest: ^0.2.6
|
||||
dependencies:
|
||||
'@types/html-to-text': 8.0.1
|
||||
axios: 0.25.0
|
||||
dotenv: 14.3.2
|
||||
fast-glob: 3.2.11
|
||||
gray-matter: 4.0.3
|
||||
html-to-text: 8.1.0
|
||||
inferred-types: 0.18.4
|
||||
native-dash: 1.21.5
|
||||
simple-markdown-2: 0.7.5
|
||||
@@ -1752,6 +1756,13 @@ packages:
|
||||
picomatch: 2.3.1
|
||||
dev: true
|
||||
|
||||
/@selderee/plugin-htmlparser2/0.6.0:
|
||||
resolution: {integrity: sha512-J3jpy002TyBjd4N/p6s+s90eX42H2eRhK3SbsZuvTDv977/E8p2U3zikdiehyJja66do7FlxLomZLPlvl2/xaA==}
|
||||
dependencies:
|
||||
domhandler: 4.3.0
|
||||
selderee: 0.6.0
|
||||
dev: false
|
||||
|
||||
/@surma/rollup-plugin-off-main-thread/2.2.3:
|
||||
resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==}
|
||||
dependencies:
|
||||
@@ -1809,6 +1820,10 @@ packages:
|
||||
resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==}
|
||||
dev: true
|
||||
|
||||
/@types/html-to-text/8.0.1:
|
||||
resolution: {integrity: sha512-0B/OifmJYmk5r9z9+KJtGWOF0LEjbTN4D2QeCh+mAw81JkJwC83NvNWUZFEqRT5PpnjX7vX0ab1SMGcwCs3Lag==}
|
||||
dev: false
|
||||
|
||||
/@types/json-schema/7.0.9:
|
||||
resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==}
|
||||
dev: true
|
||||
@@ -2719,7 +2734,6 @@ packages:
|
||||
|
||||
/commander/2.20.3:
|
||||
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
|
||||
dev: true
|
||||
|
||||
/commander/4.1.1:
|
||||
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
|
||||
@@ -2970,7 +2984,6 @@ packages:
|
||||
/deepmerge/4.2.2:
|
||||
resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/define-properties/1.1.3:
|
||||
resolution: {integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==}
|
||||
@@ -3009,6 +3022,10 @@ packages:
|
||||
path-type: 4.0.0
|
||||
dev: true
|
||||
|
||||
/discontinuous-range/1.0.0:
|
||||
resolution: {integrity: sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=}
|
||||
dev: false
|
||||
|
||||
/doctrine/2.1.0:
|
||||
resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -3033,11 +3050,9 @@ packages:
|
||||
domelementtype: 2.2.0
|
||||
domhandler: 4.3.0
|
||||
entities: 2.2.0
|
||||
dev: true
|
||||
|
||||
/domelementtype/2.2.0:
|
||||
resolution: {integrity: sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==}
|
||||
dev: true
|
||||
|
||||
/domexception/4.0.0:
|
||||
resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==}
|
||||
@@ -3051,7 +3066,6 @@ packages:
|
||||
engines: {node: '>= 4'}
|
||||
dependencies:
|
||||
domelementtype: 2.2.0
|
||||
dev: true
|
||||
|
||||
/domutils/2.8.0:
|
||||
resolution: {integrity: sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==}
|
||||
@@ -3059,7 +3073,6 @@ packages:
|
||||
dom-serializer: 1.3.2
|
||||
domelementtype: 2.2.0
|
||||
domhandler: 4.3.0
|
||||
dev: true
|
||||
|
||||
/dotenv/14.3.2:
|
||||
resolution: {integrity: sha512-vwEppIphpFdvaMCaHfCEv9IgwcxMljMw2TnAQBB4VWPvzXQLTb82jwmdOKzlEVUL3gNFT4l4TPKO+Bn+sqcrVQ==}
|
||||
@@ -3104,7 +3117,6 @@ packages:
|
||||
|
||||
/entities/2.2.0:
|
||||
resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==}
|
||||
dev: true
|
||||
|
||||
/entities/3.0.1:
|
||||
resolution: {integrity: sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==}
|
||||
@@ -4337,7 +4349,6 @@ packages:
|
||||
/he/1.2.0:
|
||||
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/hosted-git-info/2.8.9:
|
||||
resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==}
|
||||
@@ -4373,12 +4384,34 @@ packages:
|
||||
uglify-js: 3.15.0
|
||||
dev: true
|
||||
|
||||
/html-to-text/8.1.0:
|
||||
resolution: {integrity: sha512-Z9iYAqYK2c18GswSbnxJSeMs7lyJgwR2oIkDOyOHGBbYsPsG4HvT379jj3Lcbfko8A5ceyyMHAfkmp/BiXA9/Q==}
|
||||
engines: {node: '>=10.23.2'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@selderee/plugin-htmlparser2': 0.6.0
|
||||
deepmerge: 4.2.2
|
||||
he: 1.2.0
|
||||
htmlparser2: 6.1.0
|
||||
minimist: 1.2.5
|
||||
selderee: 0.6.0
|
||||
dev: false
|
||||
|
||||
/html5parser/2.0.2:
|
||||
resolution: {integrity: sha512-L0y+IdTVxHsovmye8MBtFgBvWZnq1C9WnI/SmJszxoQjmUH1psX2uzDk21O5k5et6udxdGjwxkbmT9eVRoG05w==}
|
||||
dependencies:
|
||||
tslib: 2.3.1
|
||||
dev: true
|
||||
|
||||
/htmlparser2/6.1.0:
|
||||
resolution: {integrity: sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==}
|
||||
dependencies:
|
||||
domelementtype: 2.2.0
|
||||
domhandler: 4.3.0
|
||||
domutils: 2.8.0
|
||||
entities: 2.2.0
|
||||
dev: false
|
||||
|
||||
/htmlparser2/7.2.0:
|
||||
resolution: {integrity: sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==}
|
||||
dependencies:
|
||||
@@ -5174,7 +5207,6 @@ packages:
|
||||
|
||||
/minimist/1.2.5:
|
||||
resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==}
|
||||
dev: true
|
||||
|
||||
/mkdirp/1.0.4:
|
||||
resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==}
|
||||
@@ -5182,6 +5214,10 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/moo/0.5.1:
|
||||
resolution: {integrity: sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w==}
|
||||
dev: false
|
||||
|
||||
/mrmime/1.0.0:
|
||||
resolution: {integrity: sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -5222,6 +5258,16 @@ packages:
|
||||
resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=}
|
||||
dev: true
|
||||
|
||||
/nearley/2.20.1:
|
||||
resolution: {integrity: sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
commander: 2.20.3
|
||||
moo: 0.5.1
|
||||
railroad-diagrams: 1.0.0
|
||||
randexp: 0.4.6
|
||||
dev: false
|
||||
|
||||
/negotiator/0.6.3:
|
||||
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
@@ -5504,6 +5550,13 @@ packages:
|
||||
resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==}
|
||||
dev: true
|
||||
|
||||
/parseley/0.7.0:
|
||||
resolution: {integrity: sha512-xyOytsdDu077M3/46Am+2cGXEKM9U9QclBDv7fimY7e+BBlxh2JcBp2mgNsmkyA9uvgyTjVzDi7cP1v4hcFxbw==}
|
||||
dependencies:
|
||||
moo: 0.5.1
|
||||
nearley: 2.20.1
|
||||
dev: false
|
||||
|
||||
/parseurl/1.3.3:
|
||||
resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
@@ -5805,6 +5858,18 @@ packages:
|
||||
/queue-microtask/1.2.3:
|
||||
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
||||
|
||||
/railroad-diagrams/1.0.0:
|
||||
resolution: {integrity: sha1-635iZ1SN3t+4mcG5Dlc3RVnN234=}
|
||||
dev: false
|
||||
|
||||
/randexp/0.4.6:
|
||||
resolution: {integrity: sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==}
|
||||
engines: {node: '>=0.12'}
|
||||
dependencies:
|
||||
discontinuous-range: 1.0.0
|
||||
ret: 0.1.15
|
||||
dev: false
|
||||
|
||||
/randombytes/2.1.0:
|
||||
resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
|
||||
dependencies:
|
||||
@@ -5989,6 +6054,11 @@ packages:
|
||||
path-parse: 1.0.7
|
||||
dev: true
|
||||
|
||||
/ret/0.1.15:
|
||||
resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==}
|
||||
engines: {node: '>=0.12'}
|
||||
dev: false
|
||||
|
||||
/reusify/1.0.4:
|
||||
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
|
||||
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
|
||||
@@ -6059,6 +6129,12 @@ packages:
|
||||
extend-shallow: 2.0.1
|
||||
kind-of: 6.0.3
|
||||
|
||||
/selderee/0.6.0:
|
||||
resolution: {integrity: sha512-ibqWGV5aChDvfVdqNYuaJP/HnVBhlRGSRrlbttmlMpHcLuTqqbMH36QkSs9GEgj5M88JDYLI8eyP94JaQ8xRlg==}
|
||||
dependencies:
|
||||
parseley: 0.7.0
|
||||
dev: false
|
||||
|
||||
/select-hose/2.0.0:
|
||||
resolution: {integrity: sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=}
|
||||
dev: true
|
||||
|
||||
Reference in New Issue
Block a user