@hywax/cms 0.0.8 → 0.0.10
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 +17 -5
- package/package.json +7 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createResolver, addComponentsDir,
|
|
1
|
+
import { createResolver, addComponentsDir, addPlugin, addImports, addImportsDir, addServerImports, addServerImportsDir, hasNuxtModule, installModule, addServerHandler, addTypeTemplate, addTemplate, addServerTemplate, defineNuxtModule } from '@nuxt/kit';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { dirname, join } from 'pathe';
|
|
4
4
|
import { defu } from 'defu';
|
|
@@ -6,7 +6,7 @@ import { snakeCase, kebabCase } from 'scule';
|
|
|
6
6
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
7
7
|
|
|
8
8
|
const name = "@hywax/cms";
|
|
9
|
-
const version = "0.0.
|
|
9
|
+
const version = "0.0.10";
|
|
10
10
|
|
|
11
11
|
function createContext(options, nuxt) {
|
|
12
12
|
const { resolve } = createResolver(import.meta.url);
|
|
@@ -50,6 +50,12 @@ function transformHttpCodes(httpCodes) {
|
|
|
50
50
|
function prepareAutoImports({ resolve, options, nuxt }) {
|
|
51
51
|
const httpCodesPath = resolve(nuxt.options.buildDir, "cms/http-codes.ts");
|
|
52
52
|
const httpCodesImports = transformHttpCodes(options.httpCodes).map(({ code }) => ({ name: code, from: httpCodesPath }));
|
|
53
|
+
const sharedUtils = [
|
|
54
|
+
"avatar",
|
|
55
|
+
"dictionaries",
|
|
56
|
+
"image",
|
|
57
|
+
"slugify"
|
|
58
|
+
].map((name) => ({ name, from: resolve(`./runtime/utils/${name}`) }));
|
|
53
59
|
addComponentsDir({
|
|
54
60
|
path: resolve("./runtime/components"),
|
|
55
61
|
pathPrefix: false,
|
|
@@ -62,19 +68,25 @@ function prepareAutoImports({ resolve, options, nuxt }) {
|
|
|
62
68
|
pathPrefix: false,
|
|
63
69
|
global: true
|
|
64
70
|
});
|
|
65
|
-
|
|
66
|
-
addPlugin(resolve("./runtime/plugins/api.ts"));
|
|
71
|
+
addPlugin(resolve("./runtime/plugins/api"));
|
|
67
72
|
addImports([
|
|
68
73
|
...httpCodesImports,
|
|
74
|
+
...sharedUtils,
|
|
69
75
|
{ name: "docToMarkdown", from: resolve("./runtime/editor/markdown") },
|
|
70
76
|
{ name: "markdownToDoc", from: resolve("./runtime/editor/markdown") }
|
|
71
77
|
]);
|
|
78
|
+
addImportsDir([
|
|
79
|
+
resolve("./runtime/composables")
|
|
80
|
+
]);
|
|
72
81
|
addServerImports([
|
|
73
82
|
...httpCodesImports,
|
|
83
|
+
...sharedUtils,
|
|
74
84
|
{ name: "docToMarkdown", from: resolve("./runtime/editor/markdown") },
|
|
75
85
|
{ name: "markdownToDoc", from: resolve("./runtime/editor/markdown") }
|
|
76
86
|
]);
|
|
77
|
-
addServerImportsDir(
|
|
87
|
+
addServerImportsDir([
|
|
88
|
+
resolve("./runtime/server/utils")
|
|
89
|
+
]);
|
|
78
90
|
nuxt.options.nitro.alias ||= {};
|
|
79
91
|
nuxt.options.nitro.alias["#cms/http-codes"] = httpCodesPath;
|
|
80
92
|
nuxt.options.alias["#cms"] = resolve("./runtime");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hywax/cms",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"description": "Hywax CMS. ⚠️ This package is intended for internal use only.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -96,6 +96,12 @@
|
|
|
96
96
|
"resolutions": {
|
|
97
97
|
"@hywax/cms": "workspace:*"
|
|
98
98
|
},
|
|
99
|
+
"ignoredBuiltDependencies": [
|
|
100
|
+
"@parcel/watcher",
|
|
101
|
+
"@tailwindcss/oxide",
|
|
102
|
+
"esbuild",
|
|
103
|
+
"vue-demi"
|
|
104
|
+
],
|
|
99
105
|
"lint-staged": {
|
|
100
106
|
"*.ts": "pnpm run lint"
|
|
101
107
|
},
|