@powersync/nuxt 0.0.0-dev-20260128023420
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README +374 -0
- package/dist/module.d.mts +39 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +160 -0
- package/dist/runtime/assets/powersync-icon.svg +14 -0
- package/dist/runtime/components/BucketsInspectorTab.d.vue.ts +3 -0
- package/dist/runtime/components/BucketsInspectorTab.vue +646 -0
- package/dist/runtime/components/BucketsInspectorTab.vue.d.ts +3 -0
- package/dist/runtime/components/ConfigInspectorTab.d.vue.ts +3 -0
- package/dist/runtime/components/ConfigInspectorTab.vue +121 -0
- package/dist/runtime/components/ConfigInspectorTab.vue.d.ts +3 -0
- package/dist/runtime/components/DataInspectorTab.d.vue.ts +3 -0
- package/dist/runtime/components/DataInspectorTab.vue +678 -0
- package/dist/runtime/components/DataInspectorTab.vue.d.ts +3 -0
- package/dist/runtime/components/LoadingSpinner.d.vue.ts +3 -0
- package/dist/runtime/components/LoadingSpinner.vue +12 -0
- package/dist/runtime/components/LoadingSpinner.vue.d.ts +3 -0
- package/dist/runtime/components/LogsTab.d.vue.ts +3 -0
- package/dist/runtime/components/LogsTab.vue +325 -0
- package/dist/runtime/components/LogsTab.vue.d.ts +3 -0
- package/dist/runtime/components/PowerSyncInstanceTab.d.vue.ts +3 -0
- package/dist/runtime/components/PowerSyncInstanceTab.vue +9 -0
- package/dist/runtime/components/PowerSyncInstanceTab.vue.d.ts +3 -0
- package/dist/runtime/components/SyncStatusTab.d.vue.ts +3 -0
- package/dist/runtime/components/SyncStatusTab.vue +272 -0
- package/dist/runtime/components/SyncStatusTab.vue.d.ts +3 -0
- package/dist/runtime/composables/useDiagnosticsLogger.d.ts +27 -0
- package/dist/runtime/composables/useDiagnosticsLogger.js +41 -0
- package/dist/runtime/composables/usePowerSyncInspector.d.ts +42 -0
- package/dist/runtime/composables/usePowerSyncInspector.js +19 -0
- package/dist/runtime/composables/usePowerSyncInspectorDiagnostics.d.ts +153 -0
- package/dist/runtime/composables/usePowerSyncInspectorDiagnostics.js +254 -0
- package/dist/runtime/composables/usePowerSyncKysely.d.ts +23 -0
- package/dist/runtime/composables/usePowerSyncKysely.js +7 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/layouts/powersync-inspector-layout.d.vue.ts +13 -0
- package/dist/runtime/layouts/powersync-inspector-layout.vue +90 -0
- package/dist/runtime/layouts/powersync-inspector-layout.vue.d.ts +13 -0
- package/dist/runtime/pages/__powersync-inspector.d.vue.ts +3 -0
- package/dist/runtime/pages/__powersync-inspector.vue +153 -0
- package/dist/runtime/pages/__powersync-inspector.vue.d.ts +3 -0
- package/dist/runtime/plugin.client.d.ts +2 -0
- package/dist/runtime/plugin.client.js +11 -0
- package/dist/runtime/utils/AppSchema.d.ts +27 -0
- package/dist/runtime/utils/AppSchema.js +23 -0
- package/dist/runtime/utils/DynamicSchemaManager.d.ts +15 -0
- package/dist/runtime/utils/DynamicSchemaManager.js +91 -0
- package/dist/runtime/utils/JsSchemaGenerator.d.ts +8 -0
- package/dist/runtime/utils/JsSchemaGenerator.js +28 -0
- package/dist/runtime/utils/NuxtPowerSyncDatabase.d.ts +40 -0
- package/dist/runtime/utils/NuxtPowerSyncDatabase.js +117 -0
- package/dist/runtime/utils/RecordingStorageAdapter.d.ts +13 -0
- package/dist/runtime/utils/RecordingStorageAdapter.js +76 -0
- package/dist/runtime/utils/RustClientInterceptor.d.ts +24 -0
- package/dist/runtime/utils/RustClientInterceptor.js +102 -0
- package/dist/runtime/utils/TokenConnector.d.ts +14 -0
- package/dist/runtime/utils/TokenConnector.js +62 -0
- package/dist/runtime/utils/addImportsFrom.d.ts +1 -0
- package/dist/runtime/utils/addImportsFrom.js +4 -0
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +1 -0
- package/dist/types.d.mts +9 -0
- package/package.json +90 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
border="t"
|
|
4
|
+
border-color="gray-100"
|
|
5
|
+
relative
|
|
6
|
+
n-bg="base"
|
|
7
|
+
flex="~ col"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
flex="~ col gap-2"
|
|
11
|
+
class="h-full"
|
|
12
|
+
>
|
|
13
|
+
<NSectionBlock
|
|
14
|
+
icon="carbon:connection-signal"
|
|
15
|
+
text="Connection Options"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="text-sm schema-code-block h-full overflow-auto"
|
|
19
|
+
v-html="connectionOptionsHtml"
|
|
20
|
+
/>
|
|
21
|
+
</NSectionBlock>
|
|
22
|
+
|
|
23
|
+
<span
|
|
24
|
+
border="b"
|
|
25
|
+
border-color="gray-100"
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
<NSectionBlock
|
|
29
|
+
icon="carbon:cics-db2-connection"
|
|
30
|
+
text="Database Options"
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
class="text-sm schema-code-block h-full overflow-auto"
|
|
34
|
+
v-html="dbOptionsHtml"
|
|
35
|
+
/>
|
|
36
|
+
</NSectionBlock>
|
|
37
|
+
|
|
38
|
+
<span
|
|
39
|
+
border="b"
|
|
40
|
+
border-color="gray-100"
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
<NSectionBlock
|
|
44
|
+
icon="carbon:prompt-template"
|
|
45
|
+
text="Schema"
|
|
46
|
+
class="flex-1 overflow-hidden"
|
|
47
|
+
>
|
|
48
|
+
<div
|
|
49
|
+
class="text-sm schema-code-block h-full overflow-auto"
|
|
50
|
+
v-html="schemaHtml"
|
|
51
|
+
/>
|
|
52
|
+
</NSectionBlock>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script setup>
|
|
58
|
+
import {
|
|
59
|
+
usePowerSyncInspectorDiagnostics,
|
|
60
|
+
usePowerSyncInspector
|
|
61
|
+
} from "#imports";
|
|
62
|
+
import { computed, onMounted } from "vue";
|
|
63
|
+
import { codeToHtml } from "shiki";
|
|
64
|
+
import { asyncComputed } from "@vueuse/core";
|
|
65
|
+
const { db, connectionOptions } = usePowerSyncInspectorDiagnostics();
|
|
66
|
+
const { getCurrentSchemaManager } = usePowerSyncInspector();
|
|
67
|
+
const schemaManager = getCurrentSchemaManager();
|
|
68
|
+
const currentConnectionOptions = computed(() => {
|
|
69
|
+
const { serializedSchema: _, ...options } = connectionOptions.value;
|
|
70
|
+
return options;
|
|
71
|
+
});
|
|
72
|
+
const dbOptions = computed(() => {
|
|
73
|
+
const { logger: _, schema: __, ...dbOptions2 } = db.value.dbOptions;
|
|
74
|
+
return dbOptions2;
|
|
75
|
+
});
|
|
76
|
+
const schema = computed(() => {
|
|
77
|
+
return `/**
|
|
78
|
+
* This is the inferred schema of the data received by the diagnostics app.
|
|
79
|
+
* Because this schema is generated on-the-fly based on the data received by the app, it can
|
|
80
|
+
* be incomplete and should NOT be relied upon as a source of truth for your app schema.
|
|
81
|
+
* If a table is empty, it will not be shown here.
|
|
82
|
+
* If a column contains only NULL values, the column will not be shown here.
|
|
83
|
+
* Tables and columns are only added here. Nothing is removed until the database is cleared.
|
|
84
|
+
*/
|
|
85
|
+
${schemaManager.schemaToString()}`;
|
|
86
|
+
});
|
|
87
|
+
const connectionOptionsHtml = asyncComputed(
|
|
88
|
+
async () => await codeToHtml(JSON.stringify(currentConnectionOptions.value, null, 2), {
|
|
89
|
+
lang: "json",
|
|
90
|
+
themes: {
|
|
91
|
+
light: "min-light",
|
|
92
|
+
dark: "min-dark"
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
const dbOptionsHtml = asyncComputed(
|
|
97
|
+
async () => await codeToHtml(JSON.stringify(dbOptions.value, null, 2), {
|
|
98
|
+
lang: "json",
|
|
99
|
+
themes: {
|
|
100
|
+
light: "min-light",
|
|
101
|
+
dark: "min-dark"
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
const schemaHtml = asyncComputed(
|
|
106
|
+
async () => await codeToHtml(schema.value, {
|
|
107
|
+
lang: "typescript",
|
|
108
|
+
themes: {
|
|
109
|
+
light: "min-light",
|
|
110
|
+
dark: "min-dark"
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
);
|
|
114
|
+
onMounted(async () => {
|
|
115
|
+
await db.value?.waitForFirstSync();
|
|
116
|
+
});
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<style>
|
|
120
|
+
.schema-code-block{font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4}.schema-code-block pre{background:transparent!important;height:100%;overflow:visible}.schema-code-block code,.schema-code-block pre{font-family:inherit;font-size:inherit;line-height:inherit;margin:0;padding:0}.schema-code-block code{counter-increment:step 0;counter-reset:step;display:block}.schema-code-block code .line:before{color:rgba(115,138,148,.4);content:counter(step);counter-increment:step;display:inline-block;margin-right:1.5rem;text-align:right;width:1rem}.dark .schema-code-block code .line:before{color:#858080}
|
|
121
|
+
</style>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|