@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.
@@ -8,7 +8,7 @@ export interface KokimokiKitConfig {
8
8
  description: string;
9
9
  clientContext: any;
10
10
  }[];
11
- defaultProjectConfigPath?: string;
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
- const defaultProjectConfigFile = await promises_1.default.readFile(config.defaultProjectConfigPath, "utf8");
112
- defaultProjectConfig = yaml.parse(defaultProjectConfigFile);
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 promises_1.default.writeFile(".kokimoki/schema-defaults.json", JSON.stringify(defaultJsonSchemaValue, null, 2));
151
- // write schema defaults as yaml
152
- await promises_1.default.writeFile(".kokimoki/schema-defaults.yaml", yaml.stringify(defaultJsonSchemaValue));
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.0";
1
+ export declare const KOKIMOKI_KIT_VERSION = "1.5.1";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KOKIMOKI_KIT_VERSION = void 0;
4
- exports.KOKIMOKI_KIT_VERSION = "1.5.0";
4
+ exports.KOKIMOKI_KIT_VERSION = "1.5.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokimoki/kit",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",