@strapi/strapi 4.13.0-beta.0 → 4.13.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.
Files changed (62) hide show
  1. package/README.md +13 -5
  2. package/lib/Strapi.js +11 -0
  3. package/lib/commands/actions/import/action.js +4 -4
  4. package/lib/commands/actions/import/command.js +1 -1
  5. package/lib/commands/actions/transfer/action.js +3 -6
  6. package/lib/commands/actions/transfer/command.js +1 -1
  7. package/lib/commands/actions/watch-admin/action.js +1 -1
  8. package/lib/commands/builders/admin.js +1 -1
  9. package/lib/commands/utils/data-transfer.js +39 -1
  10. package/lib/core/loaders/index.js +1 -0
  11. package/lib/core/loaders/plugins/get-enabled-plugins.js +40 -13
  12. package/lib/core/loaders/sanitizers.js +1 -1
  13. package/lib/core/loaders/validators.js +5 -0
  14. package/lib/core/registries/validators.js +26 -0
  15. package/lib/core-api/controller/collection-type.js +14 -8
  16. package/lib/core-api/controller/index.js +15 -3
  17. package/lib/core-api/controller/single-type.js +2 -0
  18. package/lib/factories.d.ts +10 -13
  19. package/lib/factories.js +12 -2
  20. package/lib/services/entity-service/index.d.ts +1 -100
  21. package/lib/services/entity-service/index.js +1 -0
  22. package/lib/services/entity-service/types/index.d.ts +228 -0
  23. package/lib/services/entity-service/types/params/attributes.d.ts +146 -0
  24. package/lib/services/entity-service/types/params/data.d.ts +4 -0
  25. package/lib/services/entity-service/types/params/fields.d.ts +74 -0
  26. package/lib/services/entity-service/types/params/filters/index.d.ts +75 -0
  27. package/lib/services/entity-service/types/params/filters/operators.d.ts +30 -0
  28. package/lib/services/entity-service/types/params/index.d.ts +79 -0
  29. package/lib/services/entity-service/types/params/pagination.d.ts +13 -0
  30. package/lib/services/entity-service/types/params/populate.d.ts +130 -0
  31. package/lib/services/entity-service/types/params/publication-state.d.ts +38 -0
  32. package/lib/services/entity-service/types/params/search.d.ts +1 -0
  33. package/lib/services/entity-service/types/params/sort.d.ts +106 -0
  34. package/lib/services/entity-service/types/plugin.d.ts +11 -0
  35. package/lib/services/entity-service/types/result.d.ts +205 -0
  36. package/lib/types/core/attributes/common.d.ts +13 -10
  37. package/lib/types/core/attributes/component.d.ts +3 -0
  38. package/lib/types/core/attributes/date-time.d.ts +2 -1
  39. package/lib/types/core/attributes/dynamic-zone.d.ts +10 -7
  40. package/lib/types/core/attributes/media.d.ts +8 -0
  41. package/lib/types/core/attributes/relation.d.ts +69 -28
  42. package/lib/types/core/attributes/time.d.ts +1 -1
  43. package/lib/types/core/attributes/timestamp.d.ts +1 -1
  44. package/lib/types/core/attributes/uid.d.ts +7 -17
  45. package/lib/types/core/attributes/utils.d.ts +61 -6
  46. package/lib/types/core/common/index.d.ts +12 -0
  47. package/lib/types/core/common/uid.d.ts +12 -16
  48. package/lib/types/core/index.d.ts +1 -0
  49. package/lib/types/core/plugins/index.d.ts +16 -0
  50. package/lib/types/core/schemas/index.d.ts +1 -0
  51. package/lib/types/core/strapi/index.d.ts +7 -2
  52. package/lib/types/core-api/controller.d.ts +12 -10
  53. package/lib/types/index.d.ts +2 -0
  54. package/lib/types/shared/entity-service.d.ts +1 -0
  55. package/lib/types/shared/index.d.ts +2 -0
  56. package/lib/types/shared/plugins.d.ts +3 -0
  57. package/lib/types/utils/expression.d.ts +29 -6
  58. package/lib/types/utils/guard.d.ts +14 -1
  59. package/lib/types/utils/index.d.ts +8 -0
  60. package/lib/types/utils/object.d.ts +35 -1
  61. package/lib/types/utils/string.d.ts +18 -0
  62. package/package.json +17 -16
@@ -1,3 +1,5 @@
1
+ import type { Utils } from '@strapi/strapi';
2
+
1
3
  /**
2
4
  * Alias for any literal type (useful for template string parameters)
3
5
  */
@@ -39,3 +41,19 @@ export type Prefix<TValue extends string, TPrefix extends Literal> = `${TPrefix}
39
41
  * Creates a record where every key is a string and every value is `T`
40
42
  */
41
43
  export type Dict<T> = Record<string, T>;
44
+
45
+ /**
46
+ * Checks if a given string ends with the given literal
47
+ */
48
+ export type EndsWith<TValue extends string, TSuffix extends Literal> = Utils.Expression.Extends<
49
+ TValue,
50
+ `${string}${TSuffix}`
51
+ >;
52
+
53
+ /**
54
+ * Checks if a given string starts with the given literal
55
+ */
56
+ export type StartsWith<TValue extends string, TPrefix extends Literal> = Utils.Expression.Extends<
57
+ TValue,
58
+ `${TPrefix}${string}`
59
+ >;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/strapi",
3
- "version": "4.13.0-beta.0",
3
+ "version": "4.13.0",
4
4
  "description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
5
5
  "keywords": [
6
6
  "strapi",
@@ -81,19 +81,19 @@
81
81
  "dependencies": {
82
82
  "@koa/cors": "3.4.3",
83
83
  "@koa/router": "10.1.1",
84
- "@strapi/admin": "4.13.0-beta.0",
85
- "@strapi/data-transfer": "4.13.0-beta.0",
86
- "@strapi/database": "4.13.0-beta.0",
87
- "@strapi/generate-new": "4.13.0-beta.0",
88
- "@strapi/generators": "4.13.0-beta.0",
89
- "@strapi/logger": "4.13.0-beta.0",
90
- "@strapi/permissions": "4.13.0-beta.0",
91
- "@strapi/plugin-content-manager": "4.13.0-beta.0",
92
- "@strapi/plugin-content-type-builder": "4.13.0-beta.0",
93
- "@strapi/plugin-email": "4.13.0-beta.0",
94
- "@strapi/plugin-upload": "4.13.0-beta.0",
95
- "@strapi/typescript-utils": "4.13.0-beta.0",
96
- "@strapi/utils": "4.13.0-beta.0",
84
+ "@strapi/admin": "4.13.0",
85
+ "@strapi/data-transfer": "4.13.0",
86
+ "@strapi/database": "4.13.0",
87
+ "@strapi/generate-new": "4.13.0",
88
+ "@strapi/generators": "4.13.0",
89
+ "@strapi/logger": "4.13.0",
90
+ "@strapi/permissions": "4.13.0",
91
+ "@strapi/plugin-content-manager": "4.13.0",
92
+ "@strapi/plugin-content-type-builder": "4.13.0",
93
+ "@strapi/plugin-email": "4.13.0",
94
+ "@strapi/plugin-upload": "4.13.0",
95
+ "@strapi/typescript-utils": "4.13.0",
96
+ "@strapi/utils": "4.13.0",
97
97
  "bcryptjs": "2.4.3",
98
98
  "boxen": "5.1.2",
99
99
  "chalk": "4.1.2",
@@ -123,7 +123,7 @@
123
123
  "koa-static": "5.0.0",
124
124
  "lodash": "4.17.21",
125
125
  "mime-types": "2.1.35",
126
- "node-fetch": "2.6.9",
126
+ "node-fetch": "2.7.0",
127
127
  "node-machine-id": "1.1.12",
128
128
  "node-schedule": "2.1.0",
129
129
  "open": "8.4.0",
@@ -136,11 +136,12 @@
136
136
  },
137
137
  "devDependencies": {
138
138
  "supertest": "6.3.3",
139
+ "ts-zen": "https://github.com/strapi/ts-zen#41af3f8c6422de048bf9976ae551566b2c2b590a",
139
140
  "typescript": "5.1.3"
140
141
  },
141
142
  "engines": {
142
143
  "node": ">=16.0.0 <=20.x.x",
143
144
  "npm": ">=6.0.0"
144
145
  },
145
- "gitHead": "f1b8431a6a0b7f9bd9a8444adb56217bba91ec07"
146
+ "gitHead": "cc7c99b8c74d829e98d6d4bc5a2ba364587a3be9"
146
147
  }