@atscript/moost-mongo 0.0.32 → 0.1.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/dist/index.cjs CHANGED
@@ -29,61 +29,31 @@ const __atscript_typescript_utils = __toESM(require("@atscript/typescript/utils"
29
29
  const __atscript_mongo = __toESM(require("@atscript/mongo"));
30
30
 
31
31
  //#region packages/moost-mongo/src/dto/controls.dto.as.js
32
- function _define_property$1(obj, key, value) {
33
- if (key in obj) Object.defineProperty(obj, key, {
34
- value,
35
- enumerable: true,
36
- configurable: true,
37
- writable: true
38
- });
39
- else obj[key] = value;
40
- return obj;
41
- }
42
32
  var QueryControlsDto = class {
43
33
  static toJsonSchema() {
44
34
  return this._jsonSchema ?? (this._jsonSchema = (0, __atscript_typescript_utils.buildJsonSchema)(this));
45
35
  }
46
36
  };
47
- _define_property$1(QueryControlsDto, "__is_atscript_annotated_type", true);
48
- _define_property$1(QueryControlsDto, "type", {});
49
- _define_property$1(QueryControlsDto, "metadata", new Map());
50
- _define_property$1(QueryControlsDto, "_jsonSchema", void 0);
51
37
  var PagesControlsDto = class {
52
38
  static toJsonSchema() {
53
39
  return this._jsonSchema ?? (this._jsonSchema = (0, __atscript_typescript_utils.buildJsonSchema)(this));
54
40
  }
55
41
  };
56
- _define_property$1(PagesControlsDto, "__is_atscript_annotated_type", true);
57
- _define_property$1(PagesControlsDto, "type", {});
58
- _define_property$1(PagesControlsDto, "metadata", new Map());
59
- _define_property$1(PagesControlsDto, "_jsonSchema", void 0);
60
42
  var GetOneControlsDto = class {
61
43
  static toJsonSchema() {
62
44
  return this._jsonSchema ?? (this._jsonSchema = (0, __atscript_typescript_utils.buildJsonSchema)(this));
63
45
  }
64
46
  };
65
- _define_property$1(GetOneControlsDto, "__is_atscript_annotated_type", true);
66
- _define_property$1(GetOneControlsDto, "type", {});
67
- _define_property$1(GetOneControlsDto, "metadata", new Map());
68
- _define_property$1(GetOneControlsDto, "_jsonSchema", void 0);
69
47
  let SortControlDto = class SortControlDto$1 {
70
48
  static toJsonSchema() {
71
49
  return this._jsonSchema ?? (this._jsonSchema = (0, __atscript_typescript_utils.buildJsonSchema)(this));
72
50
  }
73
51
  };
74
- _define_property$1(SortControlDto, "__is_atscript_annotated_type", true);
75
- _define_property$1(SortControlDto, "type", {});
76
- _define_property$1(SortControlDto, "metadata", new Map());
77
- _define_property$1(SortControlDto, "_jsonSchema", void 0);
78
52
  let SelectControlDto = class SelectControlDto$1 {
79
53
  static toJsonSchema() {
80
54
  return this._jsonSchema ?? (this._jsonSchema = (0, __atscript_typescript_utils.buildJsonSchema)(this));
81
55
  }
82
56
  };
83
- _define_property$1(SelectControlDto, "__is_atscript_annotated_type", true);
84
- _define_property$1(SelectControlDto, "type", {});
85
- _define_property$1(SelectControlDto, "metadata", new Map());
86
- _define_property$1(SelectControlDto, "_jsonSchema", void 0);
87
57
  (0, __atscript_typescript_utils.defineAnnotatedType)("object", QueryControlsDto).prop("$skip", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("number").tags("positive", "int", "number").annotate("expect.min", 0).annotate("expect.int", true).optional().$type).prop("$limit", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("number").tags("positive", "int", "number").annotate("expect.min", 0).annotate("expect.int", true).optional().$type).prop("$count", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("boolean").tags("boolean").optional().$type).prop("$sort", (0, __atscript_typescript_utils.defineAnnotatedType)().refTo(SortControlDto).optional().$type).prop("$select", (0, __atscript_typescript_utils.defineAnnotatedType)().refTo(SelectControlDto).optional().$type).prop("$search", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("string").tags("string").optional().$type).prop("$index", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("string").tags("string").optional().$type);
88
58
  (0, __atscript_typescript_utils.defineAnnotatedType)("object", PagesControlsDto).prop("$page", (0, __atscript_typescript_utils.defineAnnotatedType)().designType("string").tags("string").annotate("expect.pattern", {
89
59
  pattern: "^\\d+$",
package/dist/index.mjs CHANGED
@@ -5,61 +5,31 @@ import { ValidatorError, buildJsonSchema, defineAnnotatedType } from "@atscript/
5
5
  import { AsMongo } from "@atscript/mongo";
6
6
 
7
7
  //#region packages/moost-mongo/src/dto/controls.dto.as.js
8
- function _define_property$1(obj, key, value) {
9
- if (key in obj) Object.defineProperty(obj, key, {
10
- value,
11
- enumerable: true,
12
- configurable: true,
13
- writable: true
14
- });
15
- else obj[key] = value;
16
- return obj;
17
- }
18
8
  var QueryControlsDto = class {
19
9
  static toJsonSchema() {
20
10
  return this._jsonSchema ?? (this._jsonSchema = buildJsonSchema(this));
21
11
  }
22
12
  };
23
- _define_property$1(QueryControlsDto, "__is_atscript_annotated_type", true);
24
- _define_property$1(QueryControlsDto, "type", {});
25
- _define_property$1(QueryControlsDto, "metadata", new Map());
26
- _define_property$1(QueryControlsDto, "_jsonSchema", void 0);
27
13
  var PagesControlsDto = class {
28
14
  static toJsonSchema() {
29
15
  return this._jsonSchema ?? (this._jsonSchema = buildJsonSchema(this));
30
16
  }
31
17
  };
32
- _define_property$1(PagesControlsDto, "__is_atscript_annotated_type", true);
33
- _define_property$1(PagesControlsDto, "type", {});
34
- _define_property$1(PagesControlsDto, "metadata", new Map());
35
- _define_property$1(PagesControlsDto, "_jsonSchema", void 0);
36
18
  var GetOneControlsDto = class {
37
19
  static toJsonSchema() {
38
20
  return this._jsonSchema ?? (this._jsonSchema = buildJsonSchema(this));
39
21
  }
40
22
  };
41
- _define_property$1(GetOneControlsDto, "__is_atscript_annotated_type", true);
42
- _define_property$1(GetOneControlsDto, "type", {});
43
- _define_property$1(GetOneControlsDto, "metadata", new Map());
44
- _define_property$1(GetOneControlsDto, "_jsonSchema", void 0);
45
23
  let SortControlDto = class SortControlDto$1 {
46
24
  static toJsonSchema() {
47
25
  return this._jsonSchema ?? (this._jsonSchema = buildJsonSchema(this));
48
26
  }
49
27
  };
50
- _define_property$1(SortControlDto, "__is_atscript_annotated_type", true);
51
- _define_property$1(SortControlDto, "type", {});
52
- _define_property$1(SortControlDto, "metadata", new Map());
53
- _define_property$1(SortControlDto, "_jsonSchema", void 0);
54
28
  let SelectControlDto = class SelectControlDto$1 {
55
29
  static toJsonSchema() {
56
30
  return this._jsonSchema ?? (this._jsonSchema = buildJsonSchema(this));
57
31
  }
58
32
  };
59
- _define_property$1(SelectControlDto, "__is_atscript_annotated_type", true);
60
- _define_property$1(SelectControlDto, "type", {});
61
- _define_property$1(SelectControlDto, "metadata", new Map());
62
- _define_property$1(SelectControlDto, "_jsonSchema", void 0);
63
33
  defineAnnotatedType("object", QueryControlsDto).prop("$skip", defineAnnotatedType().designType("number").tags("positive", "int", "number").annotate("expect.min", 0).annotate("expect.int", true).optional().$type).prop("$limit", defineAnnotatedType().designType("number").tags("positive", "int", "number").annotate("expect.min", 0).annotate("expect.int", true).optional().$type).prop("$count", defineAnnotatedType().designType("boolean").tags("boolean").optional().$type).prop("$sort", defineAnnotatedType().refTo(SortControlDto).optional().$type).prop("$select", defineAnnotatedType().refTo(SelectControlDto).optional().$type).prop("$search", defineAnnotatedType().designType("string").tags("string").optional().$type).prop("$index", defineAnnotatedType().designType("string").tags("string").optional().$type);
64
34
  defineAnnotatedType("object", PagesControlsDto).prop("$page", defineAnnotatedType().designType("string").tags("string").annotate("expect.pattern", {
65
35
  pattern: "^\\d+$",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/moost-mongo",
3
- "version": "0.0.32",
3
+ "version": "0.1.0",
4
4
  "description": "Atscript Mongo for Moost.",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -38,14 +38,15 @@
38
38
  "urlql": "^0.0.5"
39
39
  },
40
40
  "devDependencies": {
41
- "vitest": "3.2.4"
41
+ "vitest": "3.2.4",
42
+ "@atscript/core": "^0.1.0"
42
43
  },
43
44
  "peerDependencies": {
44
45
  "@moostjs/event-http": "^0.5.32",
45
46
  "mongodb": "^6.17.0",
46
47
  "moost": "^0.5.32",
47
- "@atscript/mongo": "^0.0.32",
48
- "@atscript/typescript": "^0.0.32"
48
+ "@atscript/mongo": "^0.1.0",
49
+ "@atscript/typescript": "^0.1.0"
49
50
  },
50
51
  "scripts": {
51
52
  "pub": "pnpm publish --access public",