@kokimoki/kit 1.5.0 → 1.5.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/kokimoki-kit-plugin.d.ts +1 -1
- package/dist/kokimoki-kit-plugin.js +15 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
@@ -8,7 +8,7 @@ export interface KokimokiKitConfig {
|
|
8
8
|
description: string;
|
9
9
|
clientContext: any;
|
10
10
|
}[];
|
11
|
-
defaultProjectConfigPath
|
11
|
+
defaultProjectConfigPath: string;
|
12
12
|
defaultProjectStylePath?: string;
|
13
13
|
}
|
14
14
|
export declare function kokimokiKitPlugin(config: KokimokiKitConfig): Plugin;
|
@@ -106,11 +106,11 @@ function kokimokiKitPlugin(config) {
|
|
106
106
|
await promises_1.default.writeFile(".kokimoki/app-id", appId);
|
107
107
|
}
|
108
108
|
// Get default config
|
109
|
-
let defaultProjectConfig = config.schema.parse(undefined);
|
110
|
-
if (config.defaultProjectConfigPath) {
|
111
|
-
|
112
|
-
|
113
|
-
}
|
109
|
+
// let defaultProjectConfig = config.schema.parse(undefined);
|
110
|
+
// if (config.defaultProjectConfigPath) {
|
111
|
+
const defaultProjectConfigFile = await promises_1.default.readFile(config.defaultProjectConfigPath, "utf8");
|
112
|
+
const defaultProjectConfig = yaml.parse(defaultProjectConfigFile);
|
113
|
+
// }
|
114
114
|
// Inject the app id into the index.html
|
115
115
|
html = html.replace("<head>", `<head>
|
116
116
|
<script id="kokimoki-env" type="application/json">
|
@@ -144,12 +144,17 @@ function kokimokiKitPlugin(config) {
|
|
144
144
|
}, null, 2));
|
145
145
|
// write schema
|
146
146
|
const jsonSchema = (0, zod_to_json_schema_1.default)(config.schema);
|
147
|
-
const defaultJsonSchemaValue = config.schema.parse(undefined);
|
148
147
|
await promises_1.default.writeFile(".kokimoki/schema.json", JSON.stringify(jsonSchema, null, 2));
|
149
|
-
// write schema defaults as json
|
150
|
-
await
|
151
|
-
//
|
152
|
-
|
148
|
+
// // write schema defaults as json
|
149
|
+
// await fs.writeFile(
|
150
|
+
// ".kokimoki/schema-defaults.json",
|
151
|
+
// JSON.stringify(defaultJsonSchemaValue, null, 2)
|
152
|
+
// );
|
153
|
+
// // write schema defaults as yaml
|
154
|
+
// await fs.writeFile(
|
155
|
+
// ".kokimoki/schema-defaults.yaml",
|
156
|
+
// yaml.stringify(defaultJsonSchemaValue)
|
157
|
+
// );
|
153
158
|
},
|
154
159
|
configureServer(server) {
|
155
160
|
// reload when defaultProjectConfigPath or defaultProjectStylePath changes
|
package/dist/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const KOKIMOKI_KIT_VERSION = "1.5.
|
1
|
+
export declare const KOKIMOKI_KIT_VERSION = "1.5.1";
|
package/dist/version.js
CHANGED