create-strapi-app 5.59.0 → 5.60.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-strapi-app",
3
- "version": "5.59.0",
3
+ "version": "5.60.0",
4
4
  "description": "Generate a new Strapi application.",
5
5
  "keywords": [
6
6
  "create-strapi-app",
@@ -52,7 +52,7 @@
52
52
  "watch": "run -T rollup -c -w"
53
53
  },
54
54
  "dependencies": {
55
- "@strapi/cloud-cli": "5.59.0",
55
+ "@strapi/cloud-cli": "5.60.0",
56
56
  "async-retry": "1.3.3",
57
57
  "chalk": "4.1.2",
58
58
  "commander": "8.3.0",
@@ -68,14 +68,14 @@
68
68
  "tar": "7.5.22"
69
69
  },
70
70
  "devDependencies": {
71
- "@strapi/database": "5.59.0",
72
- "@strapi/utils": "5.59.0",
71
+ "@strapi/database": "5.60.0",
72
+ "@strapi/utils": "5.60.0",
73
73
  "@types/async-retry": "^1",
74
74
  "@types/fs-extra": "11.0.4",
75
75
  "@types/inquirer": "9.0.9",
76
76
  "@types/node": "20.19.41",
77
- "eslint-config-custom": "5.59.0",
78
- "tsconfig": "5.59.0"
77
+ "eslint-config-custom": "5.60.0",
78
+ "tsconfig": "5.60.0"
79
79
  },
80
80
  "engines": {
81
81
  "node": ">=20.0.0 <=26.x.x",
@@ -37,7 +37,7 @@ async function isFirstRun() {
37
37
 
38
38
  async function setPublicPermissions(newPermissions) {
39
39
  // Find the ID of the public role
40
- const publicRole = await strapi.query('plugin::users-permissions.role').findOne({
40
+ const publicRole = await strapi.db.query('plugin::users-permissions.role').findOne({
41
41
  where: {
42
42
  type: 'public',
43
43
  },
@@ -48,7 +48,7 @@ async function setPublicPermissions(newPermissions) {
48
48
  Object.keys(newPermissions).map((controller) => {
49
49
  const actions = newPermissions[controller];
50
50
  const permissionsToCreate = actions.map((action) => {
51
- return strapi.query('plugin::users-permissions.permission').create({
51
+ return strapi.db.query('plugin::users-permissions.permission').create({
52
52
  data: {
53
53
  action: `api::${controller}.${controller}.${action}`,
54
54
  role: publicRole.id,
@@ -116,7 +116,7 @@ async function checkFileExistsBeforeUpload(files) {
116
116
 
117
117
  for (const fileName of filesCopy) {
118
118
  // Check if the file already exists in Strapi
119
- const fileWhereName = await strapi.query('plugin::upload.file').findOne({
119
+ const fileWhereName = await strapi.db.query('plugin::upload.file').findOne({
120
120
  where: {
121
121
  name: fileName.replace(/\..*$/, ''),
122
122
  },
@@ -37,7 +37,7 @@ async function isFirstRun() {
37
37
 
38
38
  async function setPublicPermissions(newPermissions) {
39
39
  // Find the ID of the public role
40
- const publicRole = await strapi.query('plugin::users-permissions.role').findOne({
40
+ const publicRole = await strapi.db.query('plugin::users-permissions.role').findOne({
41
41
  where: {
42
42
  type: 'public',
43
43
  },
@@ -48,7 +48,7 @@ async function setPublicPermissions(newPermissions) {
48
48
  Object.keys(newPermissions).map((controller) => {
49
49
  const actions = newPermissions[controller];
50
50
  const permissionsToCreate = actions.map((action) => {
51
- return strapi.query('plugin::users-permissions.permission').create({
51
+ return strapi.db.query('plugin::users-permissions.permission').create({
52
52
  data: {
53
53
  action: `api::${controller}.${controller}.${action}`,
54
54
  role: publicRole.id,
@@ -116,7 +116,7 @@ async function checkFileExistsBeforeUpload(files) {
116
116
 
117
117
  for (const fileName of filesCopy) {
118
118
  // Check if the file already exists in Strapi
119
- const fileWhereName = await strapi.query('plugin::upload.file').findOne({
119
+ const fileWhereName = await strapi.db.query('plugin::upload.file').findOne({
120
120
  where: {
121
121
  name: fileName.replace(/\..*$/, ''),
122
122
  },