@konomi-app/k2-vite 0.2.0
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 +146 -0
- package/dist/commands/build.d.ts +16 -0
- package/dist/commands/build.js +117 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/dev.d.ts +20 -0
- package/dist/commands/dev.js +206 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/plugin-build.d.ts +18 -0
- package/dist/commands/plugin-build.js +135 -0
- package/dist/commands/plugin-build.js.map +1 -0
- package/dist/commands/plugin-dev.d.ts +22 -0
- package/dist/commands/plugin-dev.js +223 -0
- package/dist/commands/plugin-dev.js.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +541 -0
- package/dist/index.js.map +1 -0
- package/package.json +70 -0
- package/types.d.ts +68 -0
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@konomi-app/k2-vite",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Minimal kintone development environment with Vite",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"bin": {
|
|
10
|
+
"k2-vite": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./build": {
|
|
18
|
+
"import": "./dist/commands/build.js",
|
|
19
|
+
"types": "./dist/commands/build.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./dev": {
|
|
22
|
+
"import": "./dist/commands/dev.js",
|
|
23
|
+
"types": "./dist/commands/dev.d.ts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"types.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"keywords": [
|
|
31
|
+
"kintone",
|
|
32
|
+
"vite",
|
|
33
|
+
"sdk"
|
|
34
|
+
],
|
|
35
|
+
"author": "",
|
|
36
|
+
"license": "ISC",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"chalk": "^5.0.0",
|
|
39
|
+
"commander": "^12.0.0 || ^13.0.0 || ^14.0.0",
|
|
40
|
+
"fs-extra": "^11.0.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"chokidar": "^3.0.0 || ^4.0.0",
|
|
44
|
+
"vite": "^5.0.0 || ^6.0.0",
|
|
45
|
+
"vite-tsconfig-paths": "^4.0.0 || ^5.0.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"chokidar": {
|
|
49
|
+
"optional": false
|
|
50
|
+
},
|
|
51
|
+
"vite-tsconfig-paths": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/fs-extra": "^11.0.4",
|
|
57
|
+
"@types/node": "^22.0.0",
|
|
58
|
+
"chokidar": "^4.0.3",
|
|
59
|
+
"rimraf": "^6.0.0",
|
|
60
|
+
"tsup": "^8.0.0",
|
|
61
|
+
"typescript": "^5.0.0",
|
|
62
|
+
"vite": "^6.0.0",
|
|
63
|
+
"vite-tsconfig-paths": "^5.0.0"
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"build": "tsup",
|
|
67
|
+
"dev": "tsup --watch",
|
|
68
|
+
"clean": "rimraf dist"
|
|
69
|
+
}
|
|
70
|
+
}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { InlineConfig } from 'vite';
|
|
2
|
+
|
|
3
|
+
export interface BuildOptions {
|
|
4
|
+
/** 入力ディレクトリ(デフォルト: src) */
|
|
5
|
+
input?: string;
|
|
6
|
+
/** 出力ディレクトリ(デフォルト: .k2/prod) */
|
|
7
|
+
outDir?: string;
|
|
8
|
+
/** 追加のVite設定 */
|
|
9
|
+
viteConfig?: Partial<InlineConfig>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface DevOptions {
|
|
13
|
+
/** 入力ディレクトリ(デフォルト: src) */
|
|
14
|
+
input?: string;
|
|
15
|
+
/** 出力ディレクトリ(デフォルト: .k2/dev) */
|
|
16
|
+
outDir?: string;
|
|
17
|
+
/** 証明書ディレクトリ(デフォルト: .k2) */
|
|
18
|
+
certDir?: string;
|
|
19
|
+
/** ポート番号(デフォルト: 32767) */
|
|
20
|
+
port?: number;
|
|
21
|
+
/** 追加のVite設定 */
|
|
22
|
+
viteConfig?: Partial<InlineConfig>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface PluginBuildOptions {
|
|
26
|
+
/** 設定画面のエントリーポイント(デフォルト: src/config/index.ts) */
|
|
27
|
+
configEntry?: string;
|
|
28
|
+
/** PC用画面のエントリーポイント(デフォルト: src/desktop/index.ts) */
|
|
29
|
+
desktopEntry?: string;
|
|
30
|
+
/** 出力ディレクトリ(デフォルト: .k2/plugin/prod) */
|
|
31
|
+
outDir?: string;
|
|
32
|
+
/** 追加のVite設定 */
|
|
33
|
+
viteConfig?: Partial<InlineConfig>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface PluginDevOptions {
|
|
37
|
+
/** 設定画面のエントリーポイント(デフォルト: src/config/index.ts) */
|
|
38
|
+
configEntry?: string;
|
|
39
|
+
/** PC用画面のエントリーポイント(デフォルト: src/desktop/index.ts) */
|
|
40
|
+
desktopEntry?: string;
|
|
41
|
+
/** 出力ディレクトリ(デフォルト: .k2/plugin/dev) */
|
|
42
|
+
outDir?: string;
|
|
43
|
+
/** 証明書ディレクトリ(デフォルト: .k2) */
|
|
44
|
+
certDir?: string;
|
|
45
|
+
/** ポート番号(デフォルト: 32767) */
|
|
46
|
+
port?: number;
|
|
47
|
+
/** 追加のVite設定 */
|
|
48
|
+
viteConfig?: Partial<InlineConfig>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export declare function build(options?: BuildOptions): Promise<void>;
|
|
52
|
+
export declare function dev(options?: DevOptions): Promise<void>;
|
|
53
|
+
export declare function pluginBuild(options?: PluginBuildOptions): Promise<void>;
|
|
54
|
+
export declare function pluginDev(options?: PluginDevOptions): Promise<void>;
|
|
55
|
+
export declare function createViteConfig(config?: Partial<InlineConfig>): InlineConfig;
|
|
56
|
+
export declare function generateCert(outDir: string): Promise<{ stdout: string }>;
|
|
57
|
+
export declare function hasCertificates(certDir: string): boolean;
|
|
58
|
+
export declare function loadCertificates(certDir: string): { key: Buffer; cert: Buffer };
|
|
59
|
+
|
|
60
|
+
export declare const WORKSPACE_DIRECTORY: string;
|
|
61
|
+
export declare const DEVELOPMENT_DIRECTORY: string;
|
|
62
|
+
export declare const PRODUCTION_DIRECTORY: string;
|
|
63
|
+
export declare const PLUGIN_WORKSPACE_DIRECTORY: string;
|
|
64
|
+
export declare const PLUGIN_DEVELOPMENT_DIRECTORY: string;
|
|
65
|
+
export declare const PLUGIN_PRODUCTION_DIRECTORY: string;
|
|
66
|
+
export declare const DEFAULT_PORT: number;
|
|
67
|
+
export declare const CERT_KEY_FILENAME: string;
|
|
68
|
+
export declare const CERT_FILENAME: string;
|