kirbyup 3.0.0-beta.0 → 3.0.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 CHANGED
@@ -17,7 +17,7 @@ The fastest and leanest way to bundle your Kirby Panel plugins. No configuration
17
17
 
18
18
  ## Requirements
19
19
 
20
- - Node 16 or newer
20
+ - Latest Node.js LTS version (currently v18)
21
21
 
22
22
  ## Get Started Right Away
23
23
 
@@ -187,9 +187,11 @@ Create a `kirbyup.config.js` or `kirbyup.config.ts` configuration file the root-
187
187
  import { resolve } from 'node:path'
188
188
  import { defineConfig } from 'kirbyup/config'
189
189
 
190
+ const currentDir = new URL('.', import.meta.url).pathname
191
+
190
192
  export default defineConfig({
191
193
  alias: {
192
- '#deep/': `${resolve(__dirname, 'src/deep')}/`
194
+ '#deep/': `${resolve(currentDir, 'src/deep')}/`
193
195
  },
194
196
  extendViteConfig: {
195
197
  build: {
package/cli.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict'
3
- import('./dist/cli.mjs')
3
+ import('./dist/node/cli.mjs')
@@ -0,0 +1,6 @@
1
+ import { U as UserConfig } from '../shared/kirbyup.cf02d174.mjs';
2
+ import 'vite';
3
+
4
+ declare function defineConfig(config: UserConfig): UserConfig;
5
+
6
+ export { defineConfig };
@@ -1,4 +1,4 @@
1
- import { U as UserConfig } from './types-77db3ac4.js';
1
+ import { U as UserConfig } from '../shared/kirbyup.cf02d174.js';
2
2
  import 'vite';
3
3
 
4
4
  declare function defineConfig(config: UserConfig): UserConfig;
@@ -0,0 +1,12 @@
1
+ declare const kirbyup: Readonly<{
2
+ /**
3
+ * Auto-import Kirby Panel components, will be transformed by
4
+ * kirbyup's auto 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 };
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -1,10 +1,10 @@
1
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.ec83b6fd.mjs';
2
+ import { n as name, b as build, s as serve, v as version, h as handleError } from '../shared/kirbyup.40eb0c24.mjs';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'pathe';
6
6
  import 'consola';
7
- import 'picocolors';
7
+ import 'consola/utils';
8
8
  import 'perfect-debounce';
9
9
  import 'vite';
10
10
  import 'vue/compiler-sfc';
@@ -0,0 +1,7 @@
1
+ import * as vite from 'vite';
2
+ import { B as BuildOptions, S as ServeOptions } from '../shared/kirbyup.cf02d174.mjs';
3
+
4
+ declare function build(options: BuildOptions): Promise<void>;
5
+ declare function serve(options: ServeOptions): Promise<vite.ViteDevServer>;
6
+
7
+ export { build, serve };
@@ -1,5 +1,5 @@
1
1
  import * as vite from 'vite';
2
- import { B as BuildOptions, S as ServeOptions } from './types-77db3ac4.js';
2
+ import { B as BuildOptions, S as ServeOptions } from '../shared/kirbyup.cf02d174.js';
3
3
 
4
4
  declare function build(options: BuildOptions): Promise<void>;
5
5
  declare function serve(options: ServeOptions): Promise<vite.ViteDevServer>;
@@ -2,7 +2,7 @@ import 'node:fs';
2
2
  import 'node:fs/promises';
3
3
  import 'pathe';
4
4
  import 'consola';
5
- import 'picocolors';
5
+ import 'consola/utils';
6
6
  import 'perfect-debounce';
7
7
  import 'vite';
8
8
  import 'vue/compiler-sfc';
@@ -13,7 +13,7 @@ import 'rollup-plugin-external-globals';
13
13
  import 'postcss-load-config';
14
14
  import 'postcss-logical';
15
15
  import 'postcss-dir-pseudo-class';
16
- export { b as build, s as serve } from './shared/kirbyup.ec83b6fd.mjs';
16
+ export { b as build, s as serve } from '../shared/kirbyup.40eb0c24.mjs';
17
17
  import 'node:zlib';
18
18
  import 'node:util';
19
19
  import 'node:buffer';
@@ -1,8 +1,8 @@
1
1
  import { existsSync, statSync, unlinkSync } from 'node:fs';
2
2
  import { writeFile, readFile } from 'node:fs/promises';
3
3
  import { normalize, relative, resolve, dirname, basename } from 'pathe';
4
- import consola from 'consola';
5
- import colors from 'picocolors';
4
+ import { consola } from 'consola';
5
+ import { colors } from 'consola/utils';
6
6
  import { debounce } from 'perfect-debounce';
7
7
  import { createServer, mergeConfig, build as build$1 } from 'vite';
8
8
  import * as vueCompilerSfc from 'vue/compiler-sfc';
@@ -21,7 +21,7 @@ import MagicString from 'magic-string';
21
21
  import { detect } from 'detect-package-manager';
22
22
 
23
23
  const name = "kirbyup";
24
- const version = "3.0.0-beta.0";
24
+ const version = "3.0.1";
25
25
 
26
26
  class PrettyError extends Error {
27
27
  constructor(message) {
@@ -55,7 +55,7 @@ async function printFileInfo(root, outDir, filePath, content, type, maxLength) {
55
55
  const compressedSize = await getCompressedSize(content);
56
56
  const writeColor = type === "chunk" ? colors.cyan : colors.magenta;
57
57
  consola.log(
58
- colors.white(colors.dim(prettyOutDir)) + writeColor(filePath.padEnd(maxLength + 2)) + colors.dim(`${kibs.toFixed(2)} KiB${compressedSize}`)
58
+ colors.white(colors.dim(prettyOutDir)) + writeColor(filePath.padEnd(maxLength + 2)) + colors.dim(`${kibs.toFixed(2)} kB${compressedSize}`)
59
59
  );
60
60
  }
61
61
 
@@ -33,4 +33,4 @@ interface UserConfig {
33
33
  extendViteConfig?: InlineConfig;
34
34
  }
35
35
 
36
- export { BuildOptions as B, ServeOptions as S, UserConfig as U };
36
+ export type { BuildOptions as B, ServeOptions as S, UserConfig as U };
@@ -0,0 +1,36 @@
1
+ import { AliasOptions, InlineConfig } from 'vite';
2
+
3
+ interface BaseOptions {
4
+ cwd: string;
5
+ entry: string;
6
+ }
7
+ interface ServeOptions extends BaseOptions {
8
+ watch: false | string | string[];
9
+ port: number;
10
+ outDir?: string;
11
+ }
12
+ interface BuildOptions extends BaseOptions {
13
+ outDir: string;
14
+ watch: boolean | string | string[];
15
+ }
16
+ interface UserConfig {
17
+ /**
18
+ * Load from config files
19
+ * Set to `false` to disable
20
+ */
21
+ configFile?: string | false;
22
+ /**
23
+ * Specifies an `Object`, or an `Array` of `Object`,
24
+ * which defines aliases used to replace values in `import` statements.
25
+ * With either format, the order of the entries is important,
26
+ * in that the first defined rules are applied first.
27
+ */
28
+ alias?: AliasOptions;
29
+ /**
30
+ * Extends Vite's configuration. Will be merged with kirbyup's
31
+ * default configuration. Be careful what to extend.
32
+ */
33
+ extendViteConfig?: InlineConfig;
34
+ }
35
+
36
+ export type { BuildOptions as B, ServeOptions as S, UserConfig as U };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kirbyup",
3
- "version": "3.0.0-beta.0",
4
- "packageManager": "pnpm@8.6.3",
3
+ "version": "3.0.1",
4
+ "packageManager": "pnpm@8.7.4",
5
5
  "description": "Zero-config bundler for Kirby Panel plugins",
6
6
  "author": {
7
7
  "name": "Johann Schopplich",
@@ -25,27 +25,27 @@
25
25
  ],
26
26
  "exports": {
27
27
  ".": {
28
- "types": "./dist/index.d.ts",
29
- "import": "./dist/index.mjs"
28
+ "types": "./dist/node/index.d.ts",
29
+ "import": "./dist/node/index.mjs"
30
30
  },
31
31
  "./config": {
32
- "types": "./dist/config.d.ts",
33
- "import": "./dist/config.mjs"
32
+ "types": "./dist/client/config.d.ts",
33
+ "import": "./dist/client/config.mjs"
34
34
  },
35
35
  "./plugin": {
36
- "types": "./dist/plugin.d.ts",
37
- "import": "./dist/plugin.mjs"
36
+ "types": "./dist/client/plugin.d.ts",
37
+ "import": "./dist/client/plugin.mjs"
38
38
  }
39
39
  },
40
- "module": "./dist/index.mjs",
41
- "types": "./dist/index.d.ts",
40
+ "module": "./dist/node/index.mjs",
41
+ "types": "./dist/node/index.d.ts",
42
42
  "typesVersions": {
43
43
  "*": {
44
44
  "config": [
45
- "./dist/config.d.ts"
45
+ "./dist/client/config.d.ts"
46
46
  ],
47
47
  "plugin": [
48
- "./dist/plugin.d.ts"
48
+ "./dist/client/plugin.d.ts"
49
49
  ]
50
50
  }
51
51
  },
@@ -73,36 +73,35 @@
73
73
  "@vue/compiler-sfc": "^2.7.14",
74
74
  "cac": "^6.7.14",
75
75
  "chokidar": "^3.5.3",
76
- "consola": "^2.15.3",
77
- "detect-package-manager": "^2.0.1",
78
- "magic-string": "^0.30.0",
76
+ "consola": "^3.2.3",
77
+ "detect-package-manager": "^3.0.1",
78
+ "magic-string": "^0.30.3",
79
79
  "pathe": "^1.1.1",
80
- "perfect-debounce": "^0.1.3",
81
- "picocolors": "^1.0.0",
82
- "postcss": "^8.4.24",
83
- "postcss-dir-pseudo-class": "^7.0.2",
80
+ "perfect-debounce": "^1.0.0",
81
+ "postcss": "^8.4.29",
82
+ "postcss-dir-pseudo-class": "^8.0.0",
84
83
  "postcss-load-config": "^4.0.1",
85
- "postcss-logical": "^6.2.0",
84
+ "postcss-logical": "^7.0.0",
86
85
  "rollup-plugin-external-globals": "^0.8.0",
87
- "sass": "^1.63.4",
88
- "unconfig": "^0.3.9",
89
- "vite": "^4.3.9",
86
+ "sass": "^1.66.1",
87
+ "unconfig": "^0.3.10",
88
+ "vite": "^4.4.9",
90
89
  "vite-plugin-full-reload": "^1.0.5",
91
90
  "vue": "^2.7.14"
92
91
  },
93
92
  "devDependencies": {
94
- "@antfu/eslint-config": "^0.38.6",
93
+ "@antfu/eslint-config": "^0.41.0",
95
94
  "@types/fs-extra": "^11.0.1",
96
- "@types/node": "^18.16.18",
95
+ "@types/node": "^18.17.15",
97
96
  "@types/prompts": "^2.4.4",
98
- "bumpp": "^9.1.1",
99
- "eslint": "^8.43.0",
100
- "fast-glob": "^3.2.12",
97
+ "bumpp": "^9.2.0",
98
+ "eslint": "^8.49.0",
99
+ "fast-glob": "^3.3.1",
101
100
  "fs-extra": "^11.1.1",
102
- "simple-git-hooks": "^2.8.1",
103
- "typescript": "~5.0.4",
104
- "unbuild": "^1.2.1",
105
- "vitest": "^0.29.8"
101
+ "simple-git-hooks": "^2.9.0",
102
+ "typescript": "~5.2.2",
103
+ "unbuild": "^2.0.0",
104
+ "vitest": "^0.34.4"
106
105
  },
107
106
  "simple-git-hooks": {
108
107
  "commit-msg": "node scripts/verifyCommit.mjs $1"
package/dist/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
File without changes
File without changes
File without changes