milkio 1.0.0-alpha.1 → 1.0.0-alpha.2

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.
Files changed (2) hide show
  1. package/execute/index.ts +1 -1
  2. package/package.json +1 -1
package/execute/index.ts CHANGED
@@ -38,7 +38,6 @@ export const __initExecuter = <MilkioRuntime extends MilkioRuntimeInit<MilkioRun
38
38
  headers = options.headers;
39
39
  }
40
40
  let params: Record<any, unknown>;
41
- if (runtime.port.develop === "disabled") throw reject("NOT_DEVELOP_MODE", "This feature must be in developer mode to use. Usually entering developer mode requires using a cookbook to start milkio and accessing it through localhost.");
42
41
  if (options.paramsType === "raw") {
43
42
  params = options.params;
44
43
  if (typeof params === "undefined") params = {};
@@ -55,6 +54,7 @@ export const __initExecuter = <MilkioRuntime extends MilkioRuntimeInit<MilkioRun
55
54
  }
56
55
  if (typeof params !== "object" || Array.isArray(params)) throw reject("PARAMS_TYPE_NOT_SUPPORTED", { expected: "json" });
57
56
  if ("$milkioGenerateParams" in params && params.$milkioGenerateParams === "enable") {
57
+ if (runtime.port.develop === "disabled") throw reject("NOT_DEVELOP_MODE", "This feature must be in developer mode to use. Usually entering developer mode requires using a cookbook to start milkio and accessing it through localhost.");
58
58
  delete params.$milkioGenerateParams;
59
59
  let paramsRand = routeSchema.randomParams();
60
60
  if (paramsRand === undefined || paramsRand === null) paramsRand = {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "milkio",
3
3
  "type": "module",
4
4
  "module": "index.ts",
5
- "version": "1.0.0-alpha.1",
5
+ "version": "1.0.0-alpha.2",
6
6
  "peerDependencies": {
7
7
  "typescript": "^5.4.2"
8
8
  },