@stonecrop/nuxt 0.45.1 → 0.46.1
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/dist/module.json +1 -1
- package/dist/module.mjs +18 -13
- package/dist/runtime/app/components/DocBuilderActionsPanel.vue +0 -2
- package/dist/runtime/app/pages/DocBuilderDetail.vue +1 -0
- package/dist/runtime/app/pages/DocBuilderIndex.vue +1 -0
- package/dist/runtime/plugin.js +3 -0
- package/package.json +13 -13
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { realpathSync, existsSync } from 'node:fs';
|
|
2
2
|
import { readdir, readFile } from 'node:fs/promises';
|
|
3
|
-
import {
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { dirname, join, extname } from 'node:path';
|
|
4
5
|
import { createResolver, defineNuxtModule, useLogger, resolvePath, addLayout, extendPages, addServerHandler, addComponent, addPlugin, addImportsDir } from '@nuxt/kit';
|
|
5
6
|
|
|
6
7
|
function declaredRoutePages(doctypes, componentPath) {
|
|
@@ -109,6 +110,22 @@ const module$1 = defineNuxtModule({
|
|
|
109
110
|
logger.log(`Vite fs.allow updated with ${allowPaths.size} symlinked package path(s)`);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
113
|
+
const requireFromModule = createRequire(import.meta.url);
|
|
114
|
+
const monacoPackagePath = requireFromModule.resolve("monaco-editor/package.json");
|
|
115
|
+
const { version: monacoVersion } = requireFromModule(monacoPackagePath);
|
|
116
|
+
const monacoPath = `/stonecrop-monaco/${monacoVersion}`;
|
|
117
|
+
nuxt.options.runtimeConfig.public.stonecrop = {
|
|
118
|
+
...nuxt.options.runtimeConfig.public.stonecrop ?? {},
|
|
119
|
+
monacoPath
|
|
120
|
+
};
|
|
121
|
+
nuxt.hook("nitro:config", (nitroConfig) => {
|
|
122
|
+
nitroConfig.publicAssets = nitroConfig.publicAssets ?? [];
|
|
123
|
+
nitroConfig.publicAssets.push({
|
|
124
|
+
dir: join(dirname(monacoPackagePath), "min"),
|
|
125
|
+
baseURL: monacoPath,
|
|
126
|
+
maxAge: 60 * 60 * 24 * 365
|
|
127
|
+
});
|
|
128
|
+
});
|
|
112
129
|
const homepage = resolve("runtime/app/layouts/StonecropHome.vue");
|
|
113
130
|
if (!nuxtWithHomeLayout.has(nuxt)) {
|
|
114
131
|
addLayout(homepage, "home");
|
|
@@ -215,18 +232,6 @@ const module$1 = defineNuxtModule({
|
|
|
215
232
|
if (ctx.file.startsWith(doctypesDir)) return [];
|
|
216
233
|
}
|
|
217
234
|
});
|
|
218
|
-
const { createRequire } = await import('node:module');
|
|
219
|
-
const { resolve: nodeResolve } = await import('node:path');
|
|
220
|
-
const req = createRequire(import.meta.url);
|
|
221
|
-
const monacoMinPath = nodeResolve(req.resolve("monaco-editor/package.json"), "../min");
|
|
222
|
-
nuxt.hook("nitro:config", (nitroConfig) => {
|
|
223
|
-
nitroConfig.publicAssets = nitroConfig.publicAssets ?? [];
|
|
224
|
-
nitroConfig.publicAssets.push({
|
|
225
|
-
dir: monacoMinPath,
|
|
226
|
-
baseURL: "/stonecrop-monaco",
|
|
227
|
-
maxAge: 60 * 60 * 24 * 365
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
235
|
const docBuilderIndex = resolve("runtime/app/pages/DocBuilderIndex.vue");
|
|
231
236
|
const docBuilderDetail = resolve("runtime/app/pages/DocBuilderDetail.vue");
|
|
232
237
|
extendPages((pages) => {
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
:model-value="(row.__action ?? row.__trigger)?.clientHandler ?? ''"
|
|
60
60
|
:extra-libs="row.kind === 'trigger' ? TRIGGER_API_STUBS : INJECTED_API_STUBS"
|
|
61
61
|
:libs="EDITOR_LIBS"
|
|
62
|
-
:vs-path="VS_PATH"
|
|
63
62
|
:options="row.kind === 'trigger' ? TRIGGER_EDITOR_OPTIONS : EDITOR_OPTIONS"
|
|
64
63
|
language="javascript"
|
|
65
64
|
height="200px"
|
|
@@ -126,7 +125,6 @@ declare const record: Record<string, unknown>
|
|
|
126
125
|
declare const value: unknown
|
|
127
126
|
declare function setError(field: string, message: string): void
|
|
128
127
|
`;
|
|
129
|
-
const VS_PATH = "/stonecrop-monaco/vs";
|
|
130
128
|
const EDITOR_OPTIONS = {
|
|
131
129
|
placeholder: "e.g. await runAction('Submit'); router.push(`/issue/${record.id}`)"
|
|
132
130
|
};
|
|
@@ -68,6 +68,7 @@ import { useRoute, useRouter } from "nuxt/app";
|
|
|
68
68
|
import DocBuilderActionsPanel from "../components/DocBuilderActionsPanel.vue";
|
|
69
69
|
import DocBuilderFieldsPanel from "../components/DocBuilderFieldsPanel.vue";
|
|
70
70
|
import { renamedFields, savedNames, withFieldIds } from "../components/docbuilderFields";
|
|
71
|
+
import { useDocBuilderRouteAdapter } from "../composables/useDocBuilderRouteAdapter";
|
|
71
72
|
const route = useRoute();
|
|
72
73
|
const router = useRouter();
|
|
73
74
|
const doctypeName = computed(() => route.params.doctype);
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
import { Desktop } from "@stonecrop/desktop";
|
|
33
33
|
import { ref, computed, onMounted } from "vue";
|
|
34
34
|
import { useRouter } from "nuxt/app";
|
|
35
|
+
import { useDocBuilderRouteAdapter } from "../composables/useDocBuilderRouteAdapter";
|
|
35
36
|
const router = useRouter();
|
|
36
37
|
const routeAdapter = useDocBuilderRouteAdapter();
|
|
37
38
|
const doctypes = ref([]);
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { install as AForm } from "@stonecrop/aform";
|
|
2
|
+
import { install as CodeEditor } from "@stonecrop/code-editor";
|
|
2
3
|
import { install as NodeEditor } from "@stonecrop/node-editor";
|
|
3
4
|
import StonecropPlugin from "@stonecrop/stonecrop";
|
|
4
5
|
import { createPinia } from "pinia";
|
|
@@ -13,6 +14,8 @@ export default defineNuxtPlugin({
|
|
|
13
14
|
app.use(pinia);
|
|
14
15
|
}
|
|
15
16
|
app.use(AForm);
|
|
17
|
+
const { monacoPath } = nuxt.$config.public.stonecrop;
|
|
18
|
+
app.use(CodeEditor, { vsPath: `${nuxt.$config.app.baseURL.replace(/\/+$/, "")}${monacoPath}/vs` });
|
|
16
19
|
app.use(NodeEditor);
|
|
17
20
|
app.use(StonecropPlugin, { router });
|
|
18
21
|
const registry = app.config.globalProperties.$registry;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.1",
|
|
4
4
|
"description": "Nuxt module for Stonecrop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nuxt",
|
|
@@ -60,18 +60,18 @@
|
|
|
60
60
|
"pathe": "^2.0.3",
|
|
61
61
|
"pinia": "^3.0.4",
|
|
62
62
|
"prompts": "^2.4.2",
|
|
63
|
-
"@stonecrop/aform": "0.
|
|
64
|
-
"@stonecrop/atable": "0.
|
|
65
|
-
"@stonecrop/
|
|
66
|
-
"@stonecrop/
|
|
67
|
-
"@stonecrop/
|
|
68
|
-
"@stonecrop/graphql-
|
|
69
|
-
"@stonecrop/
|
|
70
|
-
"@stonecrop/node-editor": "0.
|
|
71
|
-
"@stonecrop/nuxt-grafserv": "0.
|
|
72
|
-
"@stonecrop/schema": "0.
|
|
73
|
-
"@stonecrop/stonecrop": "0.
|
|
74
|
-
"@stonecrop/themes": "0.
|
|
63
|
+
"@stonecrop/aform": "0.46.1",
|
|
64
|
+
"@stonecrop/atable": "0.46.1",
|
|
65
|
+
"@stonecrop/code-editor": "0.46.1",
|
|
66
|
+
"@stonecrop/casl-middleware": "0.46.1",
|
|
67
|
+
"@stonecrop/graphql-client": "0.46.1",
|
|
68
|
+
"@stonecrop/graphql-middleware": "0.46.1",
|
|
69
|
+
"@stonecrop/desktop": "0.46.1",
|
|
70
|
+
"@stonecrop/node-editor": "0.46.1",
|
|
71
|
+
"@stonecrop/nuxt-grafserv": "0.46.1",
|
|
72
|
+
"@stonecrop/schema": "0.46.1",
|
|
73
|
+
"@stonecrop/stonecrop": "0.46.1",
|
|
74
|
+
"@stonecrop/themes": "0.46.1"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@eslint/js": "^10.0.1",
|