kirbyup 3.3.0 → 3.4.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/README.md +1 -1
- package/bin/kirbyup.mjs +1 -1
- package/dist/client/config.d.ts +4 -4
- package/dist/client/config.js +7 -0
- package/dist/client/plugin.d.ts +7 -12
- package/dist/client/plugin.js +14 -0
- package/dist/node/cli-start.js +42 -0
- package/dist/node/cli.d.ts +1 -2
- package/dist/node/cli.js +8 -0
- package/dist/node/config.js +22 -0
- package/dist/node/errors.js +18 -0
- package/dist/node/index.d.ts +6 -5
- package/dist/node/index.js +175 -0
- package/dist/node/plugins/build-cleanup.js +21 -0
- package/dist/node/plugins/glob-import.js +35 -0
- package/dist/node/plugins/hmr.js +57 -0
- package/dist/node/plugins/utils.js +113 -0
- package/dist/node/types.d.ts +44 -0
- package/dist/node/utils.js +26 -0
- package/dist/package.js +6 -0
- package/package.json +30 -29
- package/dist/client/config.d.mts +0 -6
- package/dist/client/config.mjs +0 -5
- package/dist/client/plugin.d.mts +0 -12
- package/dist/client/plugin.mjs +0 -24
- package/dist/node/cli.d.mts +0 -2
- package/dist/node/cli.mjs +0 -58
- package/dist/node/index.d.mts +0 -7
- package/dist/node/index.mjs +0 -25
- package/dist/shared/kirbyup.BtejYnwg.mjs +0 -928
- package/dist/shared/kirbyup.DNMktHWN.d.mts +0 -43
- package/dist/shared/kirbyup.DNMktHWN.d.ts +0 -43
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kirbyup",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
4
|
+
"version": "3.4.1",
|
|
5
|
+
"packageManager": "pnpm@10.15.1",
|
|
6
6
|
"description": "Zero-config bundler for Kirby Panel plugins",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Johann Schopplich",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "https://johannschopplich.com"
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://kirbyup.getkirby.com",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git+https://github.com/johannschopplich/kirbyup.git"
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
],
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"types": "./dist/node/index.d.
|
|
30
|
-
"default": "./dist/node/index.
|
|
29
|
+
"types": "./dist/node/index.d.ts",
|
|
30
|
+
"default": "./dist/node/index.js"
|
|
31
31
|
},
|
|
32
32
|
"./config": {
|
|
33
|
-
"types": "./dist/client/config.d.
|
|
34
|
-
"default": "./dist/client/config.
|
|
33
|
+
"types": "./dist/client/config.d.ts",
|
|
34
|
+
"default": "./dist/client/config.js"
|
|
35
35
|
},
|
|
36
36
|
"./plugin": {
|
|
37
|
-
"types": "./dist/client/plugin.d.
|
|
38
|
-
"default": "./dist/client/plugin.
|
|
37
|
+
"types": "./dist/client/plugin.d.ts",
|
|
38
|
+
"default": "./dist/client/plugin.js"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
"types": "./dist/node/index.d.
|
|
41
|
+
"types": "./dist/node/index.d.ts",
|
|
42
42
|
"typesVersions": {
|
|
43
43
|
"*": {
|
|
44
44
|
"config": [
|
|
@@ -60,8 +60,7 @@
|
|
|
60
60
|
"node": ">=18"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
|
-
"build": "
|
|
64
|
-
"dev": "UNBUILD_STUB=true unbuild",
|
|
63
|
+
"build": "tsdown",
|
|
65
64
|
"docs:dev": "vitepress dev docs",
|
|
66
65
|
"docs:build": "vitepress build docs",
|
|
67
66
|
"docs:preview": "vitepress preview docs",
|
|
@@ -75,34 +74,36 @@
|
|
|
75
74
|
"@vitejs/plugin-vue2": "2.2.0",
|
|
76
75
|
"@vitejs/plugin-vue2-jsx": "1.1.0",
|
|
77
76
|
"@vue/compiler-sfc": "^2.7.16",
|
|
78
|
-
"c12": "
|
|
77
|
+
"c12": "~3.2.0",
|
|
79
78
|
"cac": "^6.7.14",
|
|
80
|
-
"chokidar": "
|
|
79
|
+
"chokidar": "^4.0.3",
|
|
81
80
|
"consola": "^3.4.2",
|
|
82
|
-
"magic-string": "^0.30.
|
|
81
|
+
"magic-string": "^0.30.19",
|
|
82
|
+
"nypm": "^0.6.1",
|
|
83
83
|
"pathe": "^2.0.3",
|
|
84
|
-
"perfect-debounce": "^
|
|
85
|
-
"postcss": "^8.5.
|
|
84
|
+
"perfect-debounce": "^2.0.0",
|
|
85
|
+
"postcss": "^8.5.6",
|
|
86
86
|
"postcss-load-config": "^6.0.1",
|
|
87
87
|
"rollup-plugin-external-globals": "^0.13.0",
|
|
88
|
-
"sass": "^1.
|
|
89
|
-
"vite": "
|
|
88
|
+
"sass": "^1.92.1",
|
|
89
|
+
"vite": "^6.3.6",
|
|
90
90
|
"vite-plugin-full-reload": "^1.2.0",
|
|
91
91
|
"vue": "^2.7.16"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@antfu/eslint-config": "^
|
|
95
|
-
"@types/node": "^
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"unbuild": "^3.5.0",
|
|
103
|
-
"vitest": "^3.1.1"
|
|
94
|
+
"@antfu/eslint-config": "^5.3.0",
|
|
95
|
+
"@types/node": "^24.3.1",
|
|
96
|
+
"bumpp": "^10.2.3",
|
|
97
|
+
"eslint": "^9.35.0",
|
|
98
|
+
"tinyglobby": "^0.2.15",
|
|
99
|
+
"tsdown": "^0.15.0",
|
|
100
|
+
"typescript": "^5.9.2",
|
|
101
|
+
"vitest": "^3.2.4"
|
|
104
102
|
},
|
|
105
103
|
"pnpm": {
|
|
104
|
+
"overrides": {
|
|
105
|
+
"vite": "^6.3.6"
|
|
106
|
+
},
|
|
106
107
|
"onlyBuiltDependencies": [
|
|
107
108
|
"@parcel/watcher",
|
|
108
109
|
"esbuild"
|
package/dist/client/config.d.mts
DELETED
package/dist/client/config.mjs
DELETED
package/dist/client/plugin.d.mts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const kirbyup: Readonly<{
|
|
2
|
-
/**
|
|
3
|
-
* Auto-import Kirby Panel components, transformed by
|
|
4
|
-
* kirbyup's glob-import plugin for Vite.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* kirbyup.import('./components/blocks/*.vue')
|
|
8
|
-
*/
|
|
9
|
-
import(glob: string): Record<string, any>;
|
|
10
|
-
}>;
|
|
11
|
-
|
|
12
|
-
export { kirbyup };
|
package/dist/client/plugin.mjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const kirbyup = Object.freeze({
|
|
2
|
-
/**
|
|
3
|
-
* Auto-import Kirby Panel components, transformed by
|
|
4
|
-
* kirbyup's glob-import plugin for Vite.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* kirbyup.import('./components/blocks/*.vue')
|
|
8
|
-
*/
|
|
9
|
-
import(glob) {
|
|
10
|
-
const modules = glob;
|
|
11
|
-
return Object.entries(modules).reduce(
|
|
12
|
-
(accumulator, [path, component]) => {
|
|
13
|
-
accumulator[getComponentName(path)] = component.default;
|
|
14
|
-
return accumulator;
|
|
15
|
-
},
|
|
16
|
-
{}
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
function getComponentName(path) {
|
|
21
|
-
return path.substring(path.lastIndexOf("/") + 1, path.lastIndexOf(".")).toLowerCase();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { kirbyup };
|
package/dist/node/cli.d.mts
DELETED
package/dist/node/cli.mjs
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { cac } from 'cac';
|
|
2
|
-
import { n as name, b as build, s as serve, v as version, h as handleError } from '../shared/kirbyup.BtejYnwg.mjs';
|
|
3
|
-
import 'node:fs';
|
|
4
|
-
import 'node:fs/promises';
|
|
5
|
-
import '@vitejs/plugin-vue2';
|
|
6
|
-
import '@vitejs/plugin-vue2-jsx';
|
|
7
|
-
import 'consola';
|
|
8
|
-
import 'consola/utils';
|
|
9
|
-
import 'pathe';
|
|
10
|
-
import 'perfect-debounce';
|
|
11
|
-
import 'rollup-plugin-external-globals';
|
|
12
|
-
import 'vite';
|
|
13
|
-
import 'vite-plugin-full-reload';
|
|
14
|
-
import 'vue/compiler-sfc';
|
|
15
|
-
import 'c12';
|
|
16
|
-
import 'postcss-load-config';
|
|
17
|
-
import 'magic-string';
|
|
18
|
-
import 'node:module';
|
|
19
|
-
import 'child_process';
|
|
20
|
-
import 'path';
|
|
21
|
-
import 'process';
|
|
22
|
-
import 'stream';
|
|
23
|
-
import 'readline';
|
|
24
|
-
import 'node:buffer';
|
|
25
|
-
import 'node:util';
|
|
26
|
-
import 'node:zlib';
|
|
27
|
-
|
|
28
|
-
async function startCli(cwd = process.cwd(), argv = process.argv) {
|
|
29
|
-
const cli = cac(name);
|
|
30
|
-
cli.command("<file>", "Compile the Kirby Panel plugin to index.js and index.css").option("-d, --out-dir <dir>", "Output directory", { default: cwd }).option(
|
|
31
|
-
"-w, --watch [path]",
|
|
32
|
-
"Watch for file changes. If no path is specified, the folder of the input file will be watched",
|
|
33
|
-
{ default: false }
|
|
34
|
-
).example("kirbyup src/index.js").example("kirbyup src/index.js --out-dir ~/kirby-site/site/plugins/demo").example("kirbyup src/index.js --watch src/**/*.{js,css} --watch assets/*\n").action(async (file, options) => {
|
|
35
|
-
process.env.NODE_ENV ||= options.watch ? "development" : "production";
|
|
36
|
-
await build({ cwd, entry: file, ...options });
|
|
37
|
-
});
|
|
38
|
-
cli.command("serve <file>", "Start development server with live reload").option("--no-watch", "Don't watch .php files for changes", { default: "\0" }).option("-w, --watch <path>", "Watch additional files", { default: "./**/*.php" }).option("-p, --port <number>", "Port for the development server", { default: 5177 }).option("-d, --out-dir <dir>", "Output directory").example("kirbyup serve src/index.js").example("kirbyup serve src/index.js --no-watch --port 3003").example("kirbyup serve src/index.js --watch snippets/*.php --watch templates/*.php\n").action(async (file, options) => {
|
|
39
|
-
process.env.NODE_ENV ||= "development";
|
|
40
|
-
const server = await serve({ cwd, entry: file, ...options });
|
|
41
|
-
const exitProcess = async () => {
|
|
42
|
-
try {
|
|
43
|
-
await server.close();
|
|
44
|
-
} finally {
|
|
45
|
-
process.exit();
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
process.once("SIGINT", exitProcess);
|
|
49
|
-
});
|
|
50
|
-
cli.help(
|
|
51
|
-
(s) => s.map((msg) => ({ ...msg, body: msg.body.replace(" (default: \0)", "") }))
|
|
52
|
-
);
|
|
53
|
-
cli.version(version);
|
|
54
|
-
cli.parse(argv, { run: false });
|
|
55
|
-
await cli.runMatchedCommand();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
startCli().catch(handleError);
|
package/dist/node/index.d.mts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as vite from 'vite';
|
|
2
|
-
import { B as BuildOptions, S as ServeOptions } from '../shared/kirbyup.DNMktHWN.mjs';
|
|
3
|
-
|
|
4
|
-
declare function build(options: BuildOptions): Promise<void>;
|
|
5
|
-
declare function serve(options: ServeOptions): Promise<vite.ViteDevServer>;
|
|
6
|
-
|
|
7
|
-
export { build, serve };
|
package/dist/node/index.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import 'node:fs';
|
|
2
|
-
import 'node:fs/promises';
|
|
3
|
-
import '@vitejs/plugin-vue2';
|
|
4
|
-
import '@vitejs/plugin-vue2-jsx';
|
|
5
|
-
import 'consola';
|
|
6
|
-
import 'consola/utils';
|
|
7
|
-
import 'pathe';
|
|
8
|
-
import 'perfect-debounce';
|
|
9
|
-
import 'rollup-plugin-external-globals';
|
|
10
|
-
import 'vite';
|
|
11
|
-
import 'vite-plugin-full-reload';
|
|
12
|
-
import 'vue/compiler-sfc';
|
|
13
|
-
export { b as build, s as serve } from '../shared/kirbyup.BtejYnwg.mjs';
|
|
14
|
-
import 'c12';
|
|
15
|
-
import 'postcss-load-config';
|
|
16
|
-
import 'magic-string';
|
|
17
|
-
import 'node:module';
|
|
18
|
-
import 'child_process';
|
|
19
|
-
import 'path';
|
|
20
|
-
import 'process';
|
|
21
|
-
import 'stream';
|
|
22
|
-
import 'readline';
|
|
23
|
-
import 'node:buffer';
|
|
24
|
-
import 'node:util';
|
|
25
|
-
import 'node:zlib';
|