@strapi/strapi 4.25.2 → 4.25.3
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/load/load-files.js +2 -2
- package/dist/load/load-files.js.map +1 -1
- package/dist/load/load-files.mjs +2 -2
- package/dist/load/load-files.mjs.map +1 -1
- package/package.json +21 -21
- package/dist/load/glob.d.ts +0 -7
- package/dist/load/glob.d.ts.map +0 -1
- package/dist/load/glob.js +0 -15
- package/dist/load/glob.js.map +0 -1
- package/dist/load/glob.mjs +0 -14
- package/dist/load/glob.mjs.map +0 -1
package/dist/load/load-files.js
CHANGED
|
@@ -3,7 +3,7 @@ const path = require("path");
|
|
|
3
3
|
const _ = require("lodash");
|
|
4
4
|
const fse = require("fs-extra");
|
|
5
5
|
const strapiUtils = require("@strapi/utils");
|
|
6
|
-
const glob = require("
|
|
6
|
+
const glob = require("glob");
|
|
7
7
|
const filepathToPropPath = require("./filepath-to-prop-path.js");
|
|
8
8
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
9
9
|
const path__default = /* @__PURE__ */ _interopDefault(path);
|
|
@@ -11,7 +11,7 @@ const ___default = /* @__PURE__ */ _interopDefault(_);
|
|
|
11
11
|
const fse__default = /* @__PURE__ */ _interopDefault(fse);
|
|
12
12
|
async function loadFiles(dir, pattern, { requireFn = strapiUtils.importDefault, shouldUseFileNameAsKey = (_2) => true, globArgs = {} } = {}) {
|
|
13
13
|
const root = {};
|
|
14
|
-
const files = await glob(pattern, { cwd: dir, ...globArgs });
|
|
14
|
+
const files = await glob.glob(pattern, { cwd: dir, ...globArgs });
|
|
15
15
|
for (const file of files) {
|
|
16
16
|
const absolutePath = path__default.default.resolve(dir, file);
|
|
17
17
|
delete require.cache[absolutePath];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-files.js","sources":["../../src/load/load-files.ts"],"sourcesContent":["import path from 'path';\nimport _ from 'lodash';\nimport fse from 'fs-extra';\n\nimport { importDefault } from '@strapi/utils';\nimport glob from '
|
|
1
|
+
{"version":3,"file":"load-files.js","sources":["../../src/load/load-files.ts"],"sourcesContent":["import path from 'path';\nimport _ from 'lodash';\nimport fse from 'fs-extra';\n\nimport { importDefault } from '@strapi/utils';\nimport { glob } from 'glob';\nimport filePathToPath from './filepath-to-prop-path';\n\n/**\n * Returns an Object build from a list of files matching a glob pattern in a directory\n * It builds a tree structure resembling the folder structure in dir\n */\nexport default async function loadFiles<T extends object>(\n dir: string,\n pattern: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n { requireFn = importDefault, shouldUseFileNameAsKey = (_: any) => true, globArgs = {} } = {}\n): Promise<T> {\n const root = {};\n const files = await glob(pattern, { cwd: dir, ...globArgs });\n\n for (const file of files) {\n const absolutePath = path.resolve(dir, file);\n\n // load module\n delete require.cache[absolutePath];\n let mod;\n\n if (path.extname(absolutePath) === '.json') {\n mod = await fse.readJson(absolutePath);\n } else {\n mod = requireFn(absolutePath);\n }\n\n Object.defineProperty(mod, '__filename__', {\n enumerable: true,\n configurable: false,\n writable: false,\n value: path.basename(file),\n });\n\n const propPath = filePathToPath(file, shouldUseFileNameAsKey(file));\n\n if (propPath.length === 0) _.merge(root, mod);\n _.merge(root, _.setWith({}, propPath, mod, Object));\n }\n\n return root as T;\n}\n"],"names":["importDefault","_","glob","path","fse","filePathToPath"],"mappings":";;;;;;;;;;;AAYA,eAA8B,UAC5B,KACA,SAEA,EAAE,YAAYA,YAAAA,eAAe,yBAAyB,CAACC,OAAW,MAAM,WAAW,CAAG,EAAA,IAAI,CAAA,GAC9E;AACZ,QAAM,OAAO,CAAA;AACP,QAAA,QAAQ,MAAMC,KAAAA,KAAK,SAAS,EAAE,KAAK,KAAK,GAAG,SAAA,CAAU;AAE3D,aAAW,QAAQ,OAAO;AACxB,UAAM,eAAeC,cAAA,QAAK,QAAQ,KAAK,IAAI;AAGpC,WAAA,QAAQ,MAAM,YAAY;AAC7B,QAAA;AAEJ,QAAIA,sBAAK,QAAQ,YAAY,MAAM,SAAS;AACpC,YAAA,MAAMC,aAAAA,QAAI,SAAS,YAAY;AAAA,IAAA,OAChC;AACL,YAAM,UAAU,YAAY;AAAA,IAC9B;AAEO,WAAA,eAAe,KAAK,gBAAgB;AAAA,MACzC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,UAAU;AAAA,MACV,OAAOD,cAAAA,QAAK,SAAS,IAAI;AAAA,IAAA,CAC1B;AAED,UAAM,WAAWE,mBAAe,MAAM,uBAAuB,IAAI,CAAC;AAElE,QAAI,SAAS,WAAW;AAAKJ,iBAAAA,QAAA,MAAM,MAAM,GAAG;AAC1CA,uBAAA,MAAM,MAAMA,mBAAE,QAAQ,CAAI,GAAA,UAAU,KAAK,MAAM,CAAC;AAAA,EACpD;AAEO,SAAA;AACT;;"}
|
package/dist/load/load-files.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import path from "path";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import fse from "fs-extra";
|
|
4
4
|
import { importDefault } from "@strapi/utils";
|
|
5
|
-
import
|
|
5
|
+
import { glob } from "glob";
|
|
6
6
|
import filePathToPath from "./filepath-to-prop-path.mjs";
|
|
7
7
|
async function loadFiles(dir, pattern, { requireFn = importDefault, shouldUseFileNameAsKey = (_2) => true, globArgs = {} } = {}) {
|
|
8
8
|
const root = {};
|
|
9
|
-
const files = await
|
|
9
|
+
const files = await glob(pattern, { cwd: dir, ...globArgs });
|
|
10
10
|
for (const file of files) {
|
|
11
11
|
const absolutePath = path.resolve(dir, file);
|
|
12
12
|
delete require.cache[absolutePath];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-files.mjs","sources":["../../src/load/load-files.ts"],"sourcesContent":["import path from 'path';\nimport _ from 'lodash';\nimport fse from 'fs-extra';\n\nimport { importDefault } from '@strapi/utils';\nimport glob from '
|
|
1
|
+
{"version":3,"file":"load-files.mjs","sources":["../../src/load/load-files.ts"],"sourcesContent":["import path from 'path';\nimport _ from 'lodash';\nimport fse from 'fs-extra';\n\nimport { importDefault } from '@strapi/utils';\nimport { glob } from 'glob';\nimport filePathToPath from './filepath-to-prop-path';\n\n/**\n * Returns an Object build from a list of files matching a glob pattern in a directory\n * It builds a tree structure resembling the folder structure in dir\n */\nexport default async function loadFiles<T extends object>(\n dir: string,\n pattern: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n { requireFn = importDefault, shouldUseFileNameAsKey = (_: any) => true, globArgs = {} } = {}\n): Promise<T> {\n const root = {};\n const files = await glob(pattern, { cwd: dir, ...globArgs });\n\n for (const file of files) {\n const absolutePath = path.resolve(dir, file);\n\n // load module\n delete require.cache[absolutePath];\n let mod;\n\n if (path.extname(absolutePath) === '.json') {\n mod = await fse.readJson(absolutePath);\n } else {\n mod = requireFn(absolutePath);\n }\n\n Object.defineProperty(mod, '__filename__', {\n enumerable: true,\n configurable: false,\n writable: false,\n value: path.basename(file),\n });\n\n const propPath = filePathToPath(file, shouldUseFileNameAsKey(file));\n\n if (propPath.length === 0) _.merge(root, mod);\n _.merge(root, _.setWith({}, propPath, mod, Object));\n }\n\n return root as T;\n}\n"],"names":["_"],"mappings":";;;;;;AAYA,eAA8B,UAC5B,KACA,SAEA,EAAE,YAAY,eAAe,yBAAyB,CAACA,OAAW,MAAM,WAAW,CAAG,EAAA,IAAI,CAAA,GAC9E;AACZ,QAAM,OAAO,CAAA;AACP,QAAA,QAAQ,MAAM,KAAK,SAAS,EAAE,KAAK,KAAK,GAAG,SAAA,CAAU;AAE3D,aAAW,QAAQ,OAAO;AACxB,UAAM,eAAe,KAAK,QAAQ,KAAK,IAAI;AAGpC,WAAA,QAAQ,MAAM,YAAY;AAC7B,QAAA;AAEJ,QAAI,KAAK,QAAQ,YAAY,MAAM,SAAS;AACpC,YAAA,MAAM,IAAI,SAAS,YAAY;AAAA,IAAA,OAChC;AACL,YAAM,UAAU,YAAY;AAAA,IAC9B;AAEO,WAAA,eAAe,KAAK,gBAAgB;AAAA,MACzC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,UAAU;AAAA,MACV,OAAO,KAAK,SAAS,IAAI;AAAA,IAAA,CAC1B;AAED,UAAM,WAAW,eAAe,MAAM,uBAAuB,IAAI,CAAC;AAElE,QAAI,SAAS,WAAW;AAAK,QAAA,MAAM,MAAM,GAAG;AAC1C,MAAA,MAAM,MAAM,EAAE,QAAQ,CAAI,GAAA,UAAU,KAAK,MAAM,CAAC;AAAA,EACpD;AAEO,SAAA;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/strapi",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.3",
|
|
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",
|
|
@@ -113,23 +113,23 @@
|
|
|
113
113
|
"dependencies": {
|
|
114
114
|
"@koa/cors": "5.0.0",
|
|
115
115
|
"@koa/router": "10.1.1",
|
|
116
|
-
"@strapi/admin": "4.25.
|
|
117
|
-
"@strapi/cloud-cli": "4.25.
|
|
118
|
-
"@strapi/content-releases": "4.25.
|
|
119
|
-
"@strapi/data-transfer": "4.25.
|
|
120
|
-
"@strapi/database": "4.25.
|
|
121
|
-
"@strapi/generate-new": "4.25.
|
|
122
|
-
"@strapi/generators": "4.25.
|
|
123
|
-
"@strapi/logger": "4.25.
|
|
116
|
+
"@strapi/admin": "4.25.3",
|
|
117
|
+
"@strapi/cloud-cli": "4.25.3",
|
|
118
|
+
"@strapi/content-releases": "4.25.3",
|
|
119
|
+
"@strapi/data-transfer": "4.25.3",
|
|
120
|
+
"@strapi/database": "4.25.3",
|
|
121
|
+
"@strapi/generate-new": "4.25.3",
|
|
122
|
+
"@strapi/generators": "4.25.3",
|
|
123
|
+
"@strapi/logger": "4.25.3",
|
|
124
124
|
"@strapi/pack-up": "4.23.0",
|
|
125
|
-
"@strapi/permissions": "4.25.
|
|
126
|
-
"@strapi/plugin-content-manager": "4.25.
|
|
127
|
-
"@strapi/plugin-content-type-builder": "4.25.
|
|
128
|
-
"@strapi/plugin-email": "4.25.
|
|
129
|
-
"@strapi/plugin-upload": "4.25.
|
|
130
|
-
"@strapi/types": "4.25.
|
|
131
|
-
"@strapi/typescript-utils": "4.25.
|
|
132
|
-
"@strapi/utils": "4.25.
|
|
125
|
+
"@strapi/permissions": "4.25.3",
|
|
126
|
+
"@strapi/plugin-content-manager": "4.25.3",
|
|
127
|
+
"@strapi/plugin-content-type-builder": "4.25.3",
|
|
128
|
+
"@strapi/plugin-email": "4.25.3",
|
|
129
|
+
"@strapi/plugin-upload": "4.25.3",
|
|
130
|
+
"@strapi/types": "4.25.3",
|
|
131
|
+
"@strapi/typescript-utils": "4.25.3",
|
|
132
|
+
"@strapi/utils": "4.25.3",
|
|
133
133
|
"bcryptjs": "2.4.3",
|
|
134
134
|
"boxen": "5.1.2",
|
|
135
135
|
"chalk": "4.1.2",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"fs-extra": "10.0.0",
|
|
148
148
|
"get-latest-version": "5.1.0",
|
|
149
149
|
"git-url-parse": "13.1.0",
|
|
150
|
-
"glob": "
|
|
150
|
+
"glob": "10.4.2",
|
|
151
151
|
"http-errors": "1.8.1",
|
|
152
152
|
"https-proxy-agent": "5.0.1",
|
|
153
153
|
"inquirer": "8.2.5",
|
|
@@ -196,13 +196,13 @@
|
|
|
196
196
|
"@types/node-schedule": "2.1.0",
|
|
197
197
|
"@types/nodemon": "1.19.6",
|
|
198
198
|
"@types/statuses": "2.0.1",
|
|
199
|
-
"eslint-config-custom": "4.25.
|
|
199
|
+
"eslint-config-custom": "4.25.3",
|
|
200
200
|
"supertest": "6.3.3",
|
|
201
|
-
"tsconfig": "4.25.
|
|
201
|
+
"tsconfig": "4.25.3"
|
|
202
202
|
},
|
|
203
203
|
"engines": {
|
|
204
204
|
"node": ">=18.0.0 <=20.x.x",
|
|
205
205
|
"npm": ">=6.0.0"
|
|
206
206
|
},
|
|
207
|
-
"gitHead": "
|
|
207
|
+
"gitHead": "d9f66e5fa372f08402e26194e69c242766309a25"
|
|
208
208
|
}
|
package/dist/load/glob.d.ts
DELETED
package/dist/load/glob.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/load/glob.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEtC;;GAEG;AACH,iBAAS,WAAW,CAAC,GAAG,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAOnE;AAED,eAAe,WAAW,CAAC"}
|
package/dist/load/glob.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const glob = require("glob");
|
|
3
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
4
|
-
const glob__default = /* @__PURE__ */ _interopDefault(glob);
|
|
5
|
-
function promiseGlob(...args) {
|
|
6
|
-
return new Promise((resolve, reject) => {
|
|
7
|
-
glob__default.default(...args, (err, files) => {
|
|
8
|
-
if (err)
|
|
9
|
-
return reject(err);
|
|
10
|
-
resolve(files);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
module.exports = promiseGlob;
|
|
15
|
-
//# sourceMappingURL=glob.js.map
|
package/dist/load/glob.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glob.js","sources":["../../src/load/glob.ts"],"sourcesContent":["import glob, { IOptions } from 'glob';\n\n/**\n * Promise based glob\n */\nfunction promiseGlob(...args: [string, IOptions]): Promise<string[]> {\n return new Promise((resolve, reject) => {\n glob(...args, (err, files) => {\n if (err) return reject(err);\n resolve(files);\n });\n });\n}\n\nexport default promiseGlob;\n"],"names":["glob"],"mappings":";;;;AAKA,SAAS,eAAe,MAA6C;AACnE,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtCA,kBAAAA,QAAK,GAAG,MAAM,CAAC,KAAK,UAAU;AACxB,UAAA;AAAK,eAAO,OAAO,GAAG;AAC1B,cAAQ,KAAK;AAAA,IAAA,CACd;AAAA,EAAA,CACF;AACH;;"}
|
package/dist/load/glob.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import glob from "glob";
|
|
2
|
-
function promiseGlob(...args) {
|
|
3
|
-
return new Promise((resolve, reject) => {
|
|
4
|
-
glob(...args, (err, files) => {
|
|
5
|
-
if (err)
|
|
6
|
-
return reject(err);
|
|
7
|
-
resolve(files);
|
|
8
|
-
});
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
promiseGlob as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=glob.mjs.map
|
package/dist/load/glob.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glob.mjs","sources":["../../src/load/glob.ts"],"sourcesContent":["import glob, { IOptions } from 'glob';\n\n/**\n * Promise based glob\n */\nfunction promiseGlob(...args: [string, IOptions]): Promise<string[]> {\n return new Promise((resolve, reject) => {\n glob(...args, (err, files) => {\n if (err) return reject(err);\n resolve(files);\n });\n });\n}\n\nexport default promiseGlob;\n"],"names":[],"mappings":";AAKA,SAAS,eAAe,MAA6C;AACnE,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,SAAK,GAAG,MAAM,CAAC,KAAK,UAAU;AACxB,UAAA;AAAK,eAAO,OAAO,GAAG;AAC1B,cAAQ,KAAK;AAAA,IAAA,CACd;AAAA,EAAA,CACF;AACH;"}
|