@strapi/typescript-utils 0.0.0-next.e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d → 0.0.0-next.ec9b1b708d4d319f2b8b39d9397bd752d250d541

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 (33) hide show
  1. package/LICENSE +18 -3
  2. package/lib/__tests__/generators/schemas/attributes.test.js +273 -123
  3. package/lib/__tests__/generators/schemas/imports.test.js +18 -16
  4. package/lib/__tests__/generators/schemas/utils.test.js +5 -57
  5. package/lib/compile.js +2 -6
  6. package/lib/compilers/basic.js +12 -4
  7. package/lib/compilers/index.js +0 -2
  8. package/lib/generators/common/imports.js +34 -0
  9. package/lib/generators/common/index.js +9 -0
  10. package/lib/generators/{schemas → common/models}/attributes.js +65 -41
  11. package/lib/generators/common/models/index.js +15 -0
  12. package/lib/generators/common/models/mappers.js +144 -0
  13. package/lib/generators/{schemas → common/models}/schema.js +15 -8
  14. package/lib/generators/{schemas → common/models}/utils.js +30 -11
  15. package/lib/generators/components/index.js +74 -0
  16. package/lib/generators/constants.js +6 -0
  17. package/lib/generators/content-types/index.js +74 -0
  18. package/lib/generators/index.js +118 -3
  19. package/lib/generators/utils.js +216 -0
  20. package/lib/index.js +0 -3
  21. package/lib/utils/index.js +2 -0
  22. package/lib/utils/resolve-outdir-sync.js +18 -0
  23. package/package.json +15 -7
  24. package/tsconfigs/admin.json +18 -19
  25. package/tsconfigs/server.json +18 -16
  26. package/lib/__tests__/generators/schemas/global.test.js +0 -108
  27. package/lib/admin/create-tsconfig-file.js +0 -37
  28. package/lib/admin/index.js +0 -5
  29. package/lib/compilers/watch.js +0 -37
  30. package/lib/generators/schemas/global.js +0 -67
  31. package/lib/generators/schemas/imports.js +0 -32
  32. package/lib/generators/schemas/index.js +0 -185
  33. package/lib/generators/schemas/mappers.js +0 -131
@@ -17,13 +17,10 @@ const {
17
17
  propEq,
18
18
  } = require('lodash/fp');
19
19
 
20
- /**
21
- * Get all components and content-types in a Strapi application
22
- *
23
- * @param {Strapi} strapi
24
- * @returns {object}
25
- */
26
- const getAllStrapiSchemas = (strapi) => ({ ...strapi.contentTypes, ...strapi.components });
20
+ const NAMESPACES = {
21
+ Struct: 'Struct',
22
+ Schema: 'Schema',
23
+ };
27
24
 
28
25
  /**
29
26
  * Extract a valid interface name from a schema uid
@@ -53,12 +50,16 @@ const getSchemaModelType = (schema) => {
53
50
  * Get the parent type name to extend based on the schema's nature
54
51
  *
55
52
  * @param {object} schema
56
- * @returns {string}
53
+ * @returns {string|null}
57
54
  */
58
55
  const getSchemaExtendsTypeName = (schema) => {
59
56
  const base = getSchemaModelType(schema);
60
57
 
61
- return `${upperFirst(base)}Schema`;
58
+ if (base === null) {
59
+ return null;
60
+ }
61
+
62
+ return `${NAMESPACES.Struct}.${upperFirst(base)}Schema`;
62
63
  };
63
64
 
64
65
  /**
@@ -110,7 +111,7 @@ const toTypeLiteral = (data) => {
110
111
  throw new Error(`Cannot convert to object literal. Unknown type "${typeof data}"`);
111
112
  }
112
113
 
113
- const entries = Object.entries(data);
114
+ const entries = Object.entries(data).sort((a, b) => a[0].localeCompare(b[0]));
114
115
 
115
116
  const props = entries.reduce((acc, [key, value]) => {
116
117
  // Handle keys such as content-type-builder & co.
@@ -143,8 +144,26 @@ const getDefinitionAttributesCount = (definition) => {
143
144
  return attributesNode.type.members.length;
144
145
  };
145
146
 
147
+ /**
148
+ * Add the Schema.Attribute namespace before the typename
149
+ *
150
+ * @param {string} typeName
151
+ * @returns {string}
152
+ */
153
+ const withAttributeNamespace = (typeName) => `${NAMESPACES.Schema}.Attribute.${typeName}`;
154
+
155
+ /**
156
+ * Add the schema namespace before the typename
157
+ *
158
+ * @param {string} typeName
159
+ * @returns {string}
160
+ */
161
+ const withSchemaNamespace = (typeName) => `${NAMESPACES.schema}.${typeName}`;
162
+
146
163
  module.exports = {
147
- getAllStrapiSchemas,
164
+ NAMESPACES,
165
+ withAttributeNamespace,
166
+ withSchemaNamespace,
148
167
  getSchemaInterfaceName,
149
168
  getSchemaExtendsTypeName,
150
169
  getSchemaModelType,
@@ -0,0 +1,74 @@
1
+ 'use strict';
2
+
3
+ const { factory } = require('typescript');
4
+ const { pipe, values, sortBy, map } = require('lodash/fp');
5
+
6
+ const { models } = require('../common');
7
+ const { emitDefinitions, format, generateSharedExtensionDefinition } = require('../utils');
8
+
9
+ const NO_COMPONENT_PLACEHOLDER_COMMENT = `/*
10
+ * The app doesn't have any components yet.
11
+ */
12
+ `;
13
+
14
+ /**
15
+ * Generate type definitions for Strapi Components
16
+ *
17
+ * @param {object} [options]
18
+ * @param {object} options.strapi
19
+ * @param {object} options.logger
20
+ * @param {string} options.pwd
21
+ */
22
+ const generateComponentsDefinitions = async (options = {}) => {
23
+ const { strapi } = options;
24
+
25
+ const { components } = strapi;
26
+
27
+ const componentsDefinitions = pipe(
28
+ values,
29
+ sortBy('uid'),
30
+ map((component) => ({
31
+ uid: component.uid,
32
+ definition: models.schema.generateSchemaDefinition(component),
33
+ }))
34
+ )(components);
35
+
36
+ options.logger.debug(`Found ${componentsDefinitions.length} components.`);
37
+
38
+ if (componentsDefinitions.length === 0) {
39
+ return { output: NO_COMPONENT_PLACEHOLDER_COMMENT, stats: {} };
40
+ }
41
+
42
+ const formattedSchemasDefinitions = componentsDefinitions.reduce((acc, def) => {
43
+ acc.push(
44
+ // Definition
45
+ def.definition,
46
+
47
+ // Add a newline between each interface declaration
48
+ factory.createIdentifier('\n')
49
+ );
50
+
51
+ return acc;
52
+ }, []);
53
+
54
+ const allDefinitions = [
55
+ // Imports
56
+ ...models.imports.generateImportDefinition(),
57
+
58
+ // Add a newline after the import statement
59
+ factory.createIdentifier('\n'),
60
+
61
+ // Schemas
62
+ ...formattedSchemasDefinitions,
63
+
64
+ // Global
65
+ generateSharedExtensionDefinition('ComponentSchemas', componentsDefinitions),
66
+ ];
67
+
68
+ const output = emitDefinitions(allDefinitions);
69
+ const formattedOutput = await format(output);
70
+
71
+ return { output: formattedOutput, stats: {} };
72
+ };
73
+
74
+ module.exports = generateComponentsDefinitions;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ const TYPES_ROOT_DIR = 'types';
4
+ const GENERATED_OUT_DIR = 'generated';
5
+
6
+ module.exports = { GENERATED_OUT_DIR, TYPES_ROOT_DIR };
@@ -0,0 +1,74 @@
1
+ 'use strict';
2
+
3
+ const { factory } = require('typescript');
4
+ const { values, pipe, map, sortBy } = require('lodash/fp');
5
+
6
+ const { models } = require('../common');
7
+ const { emitDefinitions, format, generateSharedExtensionDefinition } = require('../utils');
8
+
9
+ const NO_CONTENT_TYPE_PLACEHOLDER_COMMENT = `/*
10
+ * The app doesn't have any content-types yet.
11
+ */
12
+ `;
13
+
14
+ /**
15
+ * Generate type definitions for Strapi Content-Types
16
+ *
17
+ * @param {object} [options]
18
+ * @param {object} options.strapi
19
+ * @param {object} options.logger
20
+ * @param {string} options.pwd
21
+ */
22
+ const generateContentTypesDefinitions = async (options = {}) => {
23
+ const { strapi } = options;
24
+
25
+ const { contentTypes } = strapi;
26
+
27
+ const contentTypesDefinitions = pipe(
28
+ values,
29
+ sortBy('uid'),
30
+ map((contentType) => ({
31
+ uid: contentType.uid,
32
+ definition: models.schema.generateSchemaDefinition(contentType),
33
+ }))
34
+ )(contentTypes);
35
+
36
+ options.logger.debug(`Found ${contentTypesDefinitions.length} content-types.`);
37
+
38
+ if (contentTypesDefinitions.length === 0) {
39
+ return { output: NO_CONTENT_TYPE_PLACEHOLDER_COMMENT, stats: {} };
40
+ }
41
+
42
+ const formattedSchemasDefinitions = contentTypesDefinitions.reduce((acc, def) => {
43
+ acc.push(
44
+ // Definition
45
+ def.definition,
46
+
47
+ // Add a newline between each interface declaration
48
+ factory.createIdentifier('\n')
49
+ );
50
+
51
+ return acc;
52
+ }, []);
53
+
54
+ const allDefinitions = [
55
+ // Imports
56
+ ...models.imports.generateImportDefinition(),
57
+
58
+ // Add a newline after the import statement
59
+ factory.createIdentifier('\n'),
60
+
61
+ // Schemas
62
+ ...formattedSchemasDefinitions,
63
+
64
+ // Global
65
+ generateSharedExtensionDefinition('ContentTypeSchemas', contentTypesDefinitions),
66
+ ];
67
+
68
+ const output = emitDefinitions(allDefinitions);
69
+ const formattedOutput = await format(output);
70
+
71
+ return { output: formattedOutput, stats: {} };
72
+ };
73
+
74
+ module.exports = generateContentTypesDefinitions;
@@ -1,7 +1,122 @@
1
1
  'use strict';
2
2
 
3
- const generateSchemasDefinitions = require('./schemas');
3
+ const path = require('path');
4
+ const chalk = require('chalk');
4
5
 
5
- module.exports = {
6
- generateSchemasDefinitions,
6
+ const { TYPES_ROOT_DIR, GENERATED_OUT_DIR } = require('./constants');
7
+ const { saveDefinitionToFileSystem, createLogger, timer } = require('./utils');
8
+ const generateContentTypesDefinitions = require('./content-types');
9
+ const generateComponentsDefinitions = require('./components');
10
+
11
+ const GENERATORS = {
12
+ contentTypes: generateContentTypesDefinitions,
13
+ components: generateComponentsDefinitions,
7
14
  };
15
+
16
+ /**
17
+ * @typedef GenerateConfig
18
+ *
19
+ * @property {object} strapi
20
+ * @property {boolean} pwd
21
+ * @property {object} [artifacts]
22
+ * @property {boolean} [artifacts.contentTypes]
23
+ * @property {boolean} [artifacts.components]
24
+ * @property {boolean} [artifacts.services]
25
+ * @property {boolean} [artifacts.controllers]
26
+ * @property {boolean} [artifacts.policies]
27
+ * @property {boolean} [artifacts.middlewares]
28
+ * @property {object} [logger]
29
+ * @property {boolean} [logger.silent]
30
+ * @property {boolean} [logger.debug]
31
+ * @property {boolean} [logger.verbose]
32
+ */
33
+
34
+ /**
35
+ * Generate types definitions based on the given configuration
36
+ *
37
+ * @param {GenerateConfig} [config]
38
+ */
39
+ const generate = async (config = {}) => {
40
+ const { pwd, rootDir = TYPES_ROOT_DIR, strapi, artifacts = {}, logger: loggerConfig } = config;
41
+ const reports = {};
42
+ const logger = createLogger(loggerConfig);
43
+ const psTimer = timer().start();
44
+
45
+ const registryPwd = path.join(pwd, rootDir, GENERATED_OUT_DIR);
46
+ const generatorConfig = { strapi, pwd: registryPwd, logger };
47
+
48
+ const returnWithMessage = () => {
49
+ const nbWarnings = chalk.yellow(`${logger.warnings} warning(s)`);
50
+ const nbErrors = chalk.red(`${logger.errors} error(s)`);
51
+
52
+ const status = logger.errors > 0 ? chalk.red('errored') : chalk.green('completed successfully');
53
+
54
+ psTimer.end();
55
+
56
+ logger.info(`The task ${status} with ${nbWarnings} and ${nbErrors} in ${psTimer.duration}s.`);
57
+
58
+ return reports;
59
+ };
60
+
61
+ const enabledArtifacts = Object.keys(artifacts).filter((p) => artifacts[p] === true);
62
+
63
+ logger.info('Starting the type generation process');
64
+ logger.debug(`Enabled artifacts: ${enabledArtifacts.join(', ')}`);
65
+
66
+ for (const artifact of enabledArtifacts) {
67
+ const boldArtifact = chalk.bold(artifact); // used for log messages
68
+
69
+ logger.info(`Generating types for ${boldArtifact}`);
70
+
71
+ if (artifact in GENERATORS) {
72
+ const generator = GENERATORS[artifact];
73
+
74
+ try {
75
+ const artifactGenTimer = timer().start();
76
+
77
+ reports[artifact] = await generator(generatorConfig);
78
+
79
+ artifactGenTimer.end();
80
+
81
+ logger.debug(`Generated ${boldArtifact} in ${artifactGenTimer.duration}s`);
82
+ } catch (e) {
83
+ logger.error(
84
+ `Failed to generate types for ${boldArtifact}: ${e.message ?? e.toString()}. Exiting`
85
+ );
86
+ return returnWithMessage();
87
+ }
88
+ } else {
89
+ logger.warn(`The types generator for ${boldArtifact} is not implemented, skipping`);
90
+ }
91
+ }
92
+
93
+ for (const artifact of Object.keys(reports)) {
94
+ const boldArtifact = chalk.bold(artifact); // used for log messages
95
+
96
+ const artifactFsTimer = timer().start();
97
+
98
+ const report = reports[artifact];
99
+ const filename = `${artifact}.d.ts`;
100
+
101
+ try {
102
+ const outPath = await saveDefinitionToFileSystem(registryPwd, filename, report.output);
103
+ const relativeOutPath = path.relative(process.cwd(), outPath);
104
+
105
+ artifactFsTimer.end();
106
+
107
+ logger.info(`Saved ${boldArtifact} types in ${chalk.bold(relativeOutPath)}`);
108
+ logger.debug(`Saved ${boldArtifact} in ${artifactFsTimer.duration}s`);
109
+ } catch (e) {
110
+ logger.error(
111
+ `An error occurred while saving ${boldArtifact} types to the filesystem: ${
112
+ e.message ?? e.toString()
113
+ }. Exiting`
114
+ );
115
+ return returnWithMessage();
116
+ }
117
+ }
118
+
119
+ return returnWithMessage();
120
+ };
121
+
122
+ module.exports = { generate };
@@ -0,0 +1,216 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+ const assert = require('assert');
5
+ const ts = require('typescript');
6
+ const fse = require('fs-extra');
7
+ const chalk = require('chalk');
8
+
9
+ const { factory } = ts;
10
+
11
+ const MODULE_DECLARATION = '@strapi/strapi';
12
+ const PUBLIC_NAMESPACE = 'Public';
13
+
14
+ /**
15
+ * Aggregate the given TypeScript nodes into a single string
16
+ *
17
+ * @param {ts.Node[]} definitions
18
+ * @return {string}
19
+ */
20
+ const emitDefinitions = (definitions) => {
21
+ const nodeArray = factory.createNodeArray(definitions);
22
+
23
+ const sourceFile = ts.createSourceFile(
24
+ 'placeholder.ts',
25
+ '',
26
+ ts.ScriptTarget.ESNext,
27
+ true,
28
+ ts.ScriptKind.TS
29
+ );
30
+
31
+ const printer = ts.createPrinter({ omitTrailingSemicolon: true });
32
+
33
+ return printer.printList(ts.ListFormat.MultiLine, nodeArray, sourceFile);
34
+ };
35
+
36
+ /**
37
+ * Save the given string representation of TS nodes in a file
38
+ * If the given directory doesn't exist, it'll be created automatically
39
+ *
40
+ * @param {string} dir
41
+ * @param {string} file
42
+ * @param {string} content
43
+ *
44
+ * @return {Promise<string>} The path of the created file
45
+ */
46
+ const saveDefinitionToFileSystem = async (dir, file, content) => {
47
+ const filepath = path.join(dir, file);
48
+
49
+ fse.ensureDirSync(dir);
50
+ await fse.writeFile(filepath, content);
51
+
52
+ return filepath;
53
+ };
54
+
55
+ /**
56
+ * Format the given definitions.
57
+ * Uses the existing config if one is defined in the project.
58
+ *
59
+ * @param {string} content
60
+ * @returns {Promise<string>}
61
+ */
62
+ const format = async (content) => {
63
+ // eslint-disable-next-line node/no-unsupported-features/es-syntax
64
+ const prettier = await import('prettier'); // ESM-only
65
+
66
+ const configFile = await prettier.resolveConfigFile();
67
+ const config = configFile
68
+ ? await prettier.resolveConfig(configFile)
69
+ : // Default config
70
+ {
71
+ singleQuote: true,
72
+ useTabs: false,
73
+ tabWidth: 2,
74
+ };
75
+
76
+ Object.assign(config, { parser: 'typescript' });
77
+
78
+ return prettier.format(content, config);
79
+ };
80
+
81
+ /**
82
+ * Generate the extension block for a shared component from strapi/strapi
83
+ *
84
+ * @param {string} registry The registry to extend
85
+ * @param {Array<{ uid: string; definition: ts.TypeNode }>} definitions
86
+ * @returns {ts.ModuleDeclaration}
87
+ */
88
+ const generateSharedExtensionDefinition = (registry, definitions) => {
89
+ const properties = definitions.map(({ uid, definition }) =>
90
+ factory.createPropertySignature(
91
+ undefined,
92
+ factory.createStringLiteral(uid, true),
93
+ undefined,
94
+ factory.createTypeReferenceNode(factory.createIdentifier(definition.name.escapedText))
95
+ )
96
+ );
97
+
98
+ return factory.createModuleDeclaration(
99
+ [factory.createModifier(ts.SyntaxKind.DeclareKeyword)],
100
+ factory.createStringLiteral(MODULE_DECLARATION, true),
101
+ factory.createModuleBlock([
102
+ factory.createModuleDeclaration(
103
+ [factory.createModifier(ts.SyntaxKind.ExportKeyword)],
104
+ factory.createIdentifier(PUBLIC_NAMESPACE),
105
+ factory.createModuleBlock(
106
+ properties.length > 0
107
+ ? [
108
+ factory.createInterfaceDeclaration(
109
+ [factory.createModifier(ts.SyntaxKind.ExportKeyword)],
110
+ factory.createIdentifier(registry),
111
+ undefined,
112
+ undefined,
113
+ properties
114
+ ),
115
+ ]
116
+ : []
117
+ )
118
+ ),
119
+ ]),
120
+ ts.NodeFlags.ExportContext
121
+ );
122
+ };
123
+
124
+ const createLogger = (options = {}) => {
125
+ const { silent = false, debug = false } = options;
126
+
127
+ const state = { errors: 0, warning: 0 };
128
+
129
+ return {
130
+ get warnings() {
131
+ return state.warning;
132
+ },
133
+
134
+ get errors() {
135
+ return state.errors;
136
+ },
137
+
138
+ debug(...args) {
139
+ if (silent || !debug) {
140
+ return;
141
+ }
142
+
143
+ console.log(chalk.cyan(`[DEBUG]\t[${new Date().toISOString()}] (Typegen)`), ...args);
144
+ },
145
+
146
+ info(...args) {
147
+ if (silent) {
148
+ return;
149
+ }
150
+
151
+ console.info(chalk.blue(`[INFO]\t[${new Date().toISOString()}] (Typegen)`), ...args);
152
+ },
153
+
154
+ warn(...args) {
155
+ state.warning += 1;
156
+
157
+ if (silent) {
158
+ return;
159
+ }
160
+
161
+ console.warn(chalk.yellow(`[WARN]\t[${new Date().toISOString()}] (Typegen)`), ...args);
162
+ },
163
+
164
+ error(...args) {
165
+ state.errors += 1;
166
+
167
+ if (silent) {
168
+ return;
169
+ }
170
+
171
+ console.error(chalk.red(`[ERROR]\t[${new Date().toISOString()}] (Typegen)`), ...args);
172
+ },
173
+ };
174
+ };
175
+
176
+ const timer = () => {
177
+ const state = {
178
+ start: null,
179
+ end: null,
180
+ };
181
+
182
+ return {
183
+ start() {
184
+ assert(state.start === null, 'The timer has already been started');
185
+ assert(state.end === null, 'The timer has already been ended');
186
+
187
+ state.start = Date.now();
188
+
189
+ return this;
190
+ },
191
+
192
+ end() {
193
+ assert(state.start !== null, 'The timer needs to be started before ending it');
194
+ assert(state.end === null, 'The timer has already been ended');
195
+
196
+ state.end = Date.now();
197
+
198
+ return this;
199
+ },
200
+
201
+ get duration() {
202
+ assert(state.start !== null, 'The timer has not been started');
203
+
204
+ return ((state.end ?? Date.now) - state.start) / 1000;
205
+ },
206
+ };
207
+ };
208
+
209
+ module.exports = {
210
+ emitDefinitions,
211
+ saveDefinitionToFileSystem,
212
+ format,
213
+ generateSharedExtensionDefinition,
214
+ createLogger,
215
+ timer,
216
+ };
package/lib/index.js CHANGED
@@ -2,15 +2,12 @@
2
2
 
3
3
  const compile = require('./compile');
4
4
  const compilers = require('./compilers');
5
- const admin = require('./admin');
6
5
  const utils = require('./utils');
7
6
  const generators = require('./generators');
8
7
 
9
8
  module.exports = {
10
9
  compile,
11
10
  compilers,
12
- admin,
13
11
  generators,
14
-
15
12
  ...utils,
16
13
  };
@@ -7,6 +7,7 @@ const reportDiagnostics = require('./report-diagnostics');
7
7
  const resolveConfigOptions = require('./resolve-config-options');
8
8
  const formatHost = require('./format-host');
9
9
  const resolveOutDir = require('./resolve-outdir');
10
+ const resolveOutDirSync = require('./resolve-outdir-sync');
10
11
 
11
12
  module.exports = {
12
13
  isUsingTypeScript,
@@ -16,4 +17,5 @@ module.exports = {
16
17
  resolveConfigOptions,
17
18
  formatHost,
18
19
  resolveOutDir,
20
+ resolveOutDirSync,
19
21
  };
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+ const resolveConfigOptions = require('./resolve-config-options');
5
+ const isUsingTypescriptSync = require('./is-using-typescript-sync');
6
+
7
+ const DEFAULT_TS_CONFIG_FILENAME = 'tsconfig.json';
8
+ /**
9
+ * Gets the outDir value from config file (tsconfig)
10
+ * @param {string} dir
11
+ * @param {string | undefined} configFilename
12
+ * @returns {string | undefined}
13
+ */
14
+ module.exports = (dir, configFilename = DEFAULT_TS_CONFIG_FILENAME) => {
15
+ return isUsingTypescriptSync(dir)
16
+ ? resolveConfigOptions(path.join(dir, configFilename)).options.outDir
17
+ : undefined;
18
+ };
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "@strapi/typescript-utils",
3
- "version": "0.0.0-next.e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d",
3
+ "version": "0.0.0-next.ec9b1b708d4d319f2b8b39d9397bd752d250d541",
4
4
  "description": "Typescript support for Strapi",
5
5
  "keywords": [
6
6
  "strapi",
7
7
  "generators"
8
8
  ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git://github.com/strapi/strapi.git",
12
+ "directory": "packages/utils/typescript"
13
+ },
9
14
  "license": "SEE LICENSE IN LICENSE",
10
15
  "author": {
11
16
  "name": "Strapi Solutions SAS",
@@ -31,15 +36,18 @@
31
36
  },
32
37
  "dependencies": {
33
38
  "chalk": "4.1.2",
34
- "cli-table3": "0.6.2",
35
- "fs-extra": "10.0.1",
39
+ "cli-table3": "0.6.5",
40
+ "fs-extra": "11.2.0",
36
41
  "lodash": "4.17.21",
37
- "prettier": "2.8.4",
38
- "typescript": "5.0.4"
42
+ "prettier": "3.3.3",
43
+ "typescript": "5.3.2"
44
+ },
45
+ "devDependencies": {
46
+ "@types/fs-extra": "11.0.4"
39
47
  },
40
48
  "engines": {
41
- "node": ">=14.19.1 <=18.x.x",
49
+ "node": ">=18.0.0 <=22.x.x",
42
50
  "npm": ">=6.0.0"
43
51
  },
44
- "gitHead": "e9bb5ccdc459f4c6b6717a2d5d86359b7a47d47d"
52
+ "gitHead": "ec9b1b708d4d319f2b8b39d9397bd752d250d541"
45
53
  }