milkio 1.0.0-alpha.36 → 1.0.0-alpha.37

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 southern-aurora
3
+ Copyright (c) 2023 akirarika
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/execute/index.ts CHANGED
@@ -36,7 +36,6 @@ export const __initExecuter = (generated: GeneratedInit, runtime: any) => {
36
36
  if (!("toJSON" in headers)) (headers as any).toJSON = () => headersToJSON(headers);
37
37
 
38
38
  let params: Record<any, unknown>;
39
- console.log("1112aqqq", options);
40
39
  if (options.paramsType === "raw") {
41
40
  params = options.params;
42
41
  if (typeof params === "undefined") params = {};
package/listener/index.ts CHANGED
@@ -50,6 +50,8 @@ export const __initListener = (generated: GeneratedInit, runtime: any, executer:
50
50
  const pathString = `/${pathArray.join("/")}`;
51
51
 
52
52
  const executeId = runtime?.executeId ? await runtime.executeId(options.request) : createId();
53
+ console.log("executeId", await runtime.executeId(options.request), createId());
54
+
53
55
  const logger = createLogger(runtime, pathString, executeId);
54
56
  runtime.runtime.request.set(executeId, { logger: logger });
55
57
  const response: MilkioHttpResponse = {
package/package.json CHANGED
@@ -2,17 +2,17 @@
2
2
  "name": "milkio",
3
3
  "type": "module",
4
4
  "module": "index.ts",
5
- "version": "1.0.0-alpha.36",
5
+ "version": "1.0.0-alpha.37",
6
6
  "peerDependencies": {
7
7
  "typescript": "^5.4.2"
8
8
  },
9
9
  "scripts": {},
10
10
  "dependencies": {
11
- "@paralleldrive/cuid2": "^2.2.2",
12
11
  "@poech/camel-hump-under": "^1.1.0",
13
12
  "@southern-aurora/tson": "*",
14
13
  "chalk": "^5.3.0",
15
14
  "date-fns": "^4.1.0",
15
+ "milkid": "2.0.6",
16
16
  "typia": "6.11.3"
17
17
  },
18
18
  "devDependencies": {
@@ -1,3 +1,9 @@
1
- import { createId as _createId } from "@paralleldrive/cuid2";
1
+ import { defineIdGenerator } from "milkid";
2
2
 
3
- export const createId = _createId;
3
+ const idGenerator = defineIdGenerator({
4
+ length: 24,
5
+ timestamp: true,
6
+ entropy: false,
7
+ });
8
+
9
+ export const createId = idGenerator.createId;