create-strapi-app 5.63.0 → 5.64.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/create-strapi.d.ts.map +1 -1
- package/dist/create-strapi.js +0 -15
- package/dist/create-strapi.js.map +1 -1
- package/dist/create-strapi.mjs +0 -15
- package/dist/create-strapi.mjs.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -21
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +6 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/database.d.ts +1 -1
- package/dist/utils/database.d.ts.map +1 -1
- package/dist/utils/database.js +3 -2
- package/dist/utils/database.js.map +1 -1
- package/dist/utils/database.mjs +3 -2
- package/dist/utils/database.mjs.map +1 -1
- package/dist/utils/invocation.d.ts +23 -0
- package/dist/utils/invocation.d.ts.map +1 -1
- package/dist/utils/invocation.js +44 -2
- package/dist/utils/invocation.js.map +1 -1
- package/dist/utils/invocation.mjs +44 -3
- package/dist/utils/invocation.mjs.map +1 -1
- package/package.json +7 -8
- package/templates/example/scripts/seed.js +1 -1
- package/templates/example-js/scripts/seed.js +1 -1
- package/dist/cloud.d.ts +0 -2
- package/dist/cloud.d.ts.map +0 -1
- package/dist/cloud.js +0 -81
- package/dist/cloud.js.map +0 -1
- package/dist/cloud.mjs +0 -79
- package/dist/cloud.mjs.map +0 -1
- package/dist/utils/parse-to-chalk.d.ts +0 -2
- package/dist/utils/parse-to-chalk.d.ts.map +0 -1
- package/dist/utils/parse-to-chalk.js +0 -29
- package/dist/utils/parse-to-chalk.js.map +0 -1
- package/dist/utils/parse-to-chalk.mjs +0 -23
- package/dist/utils/parse-to-chalk.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-strapi-app",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.64.0",
|
|
4
4
|
"description": "Generate a new Strapi application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"create-strapi-app",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"main": "./dist/index.js",
|
|
35
35
|
"module": "./dist/index.mjs",
|
|
36
36
|
"source": "./src/index.ts",
|
|
37
|
-
"types": "./dist/
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
38
|
"bin": "./bin/index.js",
|
|
39
39
|
"files": [
|
|
40
40
|
"dist/",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"test:unit:vitest:watch": "vitest --watch"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@strapi/cloud-cli": "5.63.0",
|
|
57
56
|
"@vercel/detect-agent": "1.2.7",
|
|
58
57
|
"async-retry": "1.3.3",
|
|
59
58
|
"chalk": "4.1.2",
|
|
@@ -71,16 +70,16 @@
|
|
|
71
70
|
"tar": "7.5.22"
|
|
72
71
|
},
|
|
73
72
|
"devDependencies": {
|
|
74
|
-
"@strapi/database": "5.
|
|
75
|
-
"@strapi/utils": "5.
|
|
73
|
+
"@strapi/database": "5.64.0",
|
|
74
|
+
"@strapi/utils": "5.64.0",
|
|
76
75
|
"@types/async-retry": "^1",
|
|
77
76
|
"@types/fs-extra": "11.0.4",
|
|
78
77
|
"@types/inquirer": "9.0.9",
|
|
79
78
|
"@types/node": "22.20.0",
|
|
80
|
-
"eslint-config-custom": "5.
|
|
81
|
-
"tsconfig": "5.
|
|
79
|
+
"eslint-config-custom": "5.64.0",
|
|
80
|
+
"tsconfig": "5.64.0",
|
|
82
81
|
"vitest": "catalog:",
|
|
83
|
-
"vitest-config": "5.
|
|
82
|
+
"vitest-config": "5.64.0"
|
|
84
83
|
},
|
|
85
84
|
"engines": {
|
|
86
85
|
"node": ">=22.0.0 <=26.x.x",
|
package/dist/cloud.d.ts
DELETED
package/dist/cloud.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../src/cloud.ts"],"names":[],"mappings":"AAgBA,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAwEzD"}
|
package/dist/cloud.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var cloudCli = require('@strapi/cloud-cli');
|
|
4
|
-
var parseToChalk = require('./utils/parse-to-chalk.js');
|
|
5
|
-
|
|
6
|
-
function assertCloudError(e) {
|
|
7
|
-
if (e.response === undefined) {
|
|
8
|
-
throw Error('Expected CloudError');
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
async function handleCloudLogin() {
|
|
12
|
-
const logger = cloudCli.services.createLogger({
|
|
13
|
-
silent: false,
|
|
14
|
-
debug: process.argv.includes('--debug'),
|
|
15
|
-
timestamp: false
|
|
16
|
-
});
|
|
17
|
-
const cloudApiService = await cloudCli.services.cloudApiFactory({
|
|
18
|
-
logger
|
|
19
|
-
});
|
|
20
|
-
const defaultErrorMessage = 'An error occurred while trying to interact with Strapi servers. Use strapi deploy command once the project is generated.';
|
|
21
|
-
let cloudApiConfig;
|
|
22
|
-
try {
|
|
23
|
-
const { data: config } = await cloudApiService.config();
|
|
24
|
-
cloudApiConfig = config;
|
|
25
|
-
if (!config?.featureFlags?.cloudLoginPromptEnabled) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
logger.log(parseToChalk(config.projectCreation.introText));
|
|
29
|
-
} catch (e) {
|
|
30
|
-
logger.debug(e);
|
|
31
|
-
logger.error(defaultErrorMessage);
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
const { default: inquirer } = await import('inquirer');
|
|
35
|
-
const { userChoice } = await inquirer.prompt(cloudApiConfig.projectCreation?.userChoice || [
|
|
36
|
-
{
|
|
37
|
-
type: 'list',
|
|
38
|
-
name: 'userChoice',
|
|
39
|
-
message: `Please log in or sign up.`,
|
|
40
|
-
choices: [
|
|
41
|
-
'Login/Sign up',
|
|
42
|
-
'Skip'
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
]);
|
|
46
|
-
if (!userChoice.toLowerCase().includes('skip')) {
|
|
47
|
-
const cliContext = {
|
|
48
|
-
user: {
|
|
49
|
-
id: ''
|
|
50
|
-
},
|
|
51
|
-
logger,
|
|
52
|
-
cwd: process.cwd(),
|
|
53
|
-
...cloudApiConfig.projectCreation?.reference && {
|
|
54
|
-
promptExperiment: cloudApiConfig.projectCreation?.reference
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
try {
|
|
58
|
-
await cloudCli.cli.login.action(cliContext, {
|
|
59
|
-
showDashboardLink: false
|
|
60
|
-
});
|
|
61
|
-
} catch (e) {
|
|
62
|
-
logger.debug(e);
|
|
63
|
-
try {
|
|
64
|
-
assertCloudError(e);
|
|
65
|
-
if (e.response.status === 403) {
|
|
66
|
-
const message = typeof e.response.data === 'string' ? e.response.data : 'We are sorry, but we are not able to log you into Strapi servers at the moment.';
|
|
67
|
-
logger.warn(message);
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
} catch {
|
|
71
|
-
/* empty */ }
|
|
72
|
-
logger.error(defaultErrorMessage);
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
exports.handleCloudLogin = handleCloudLogin;
|
|
81
|
-
//# sourceMappingURL=cloud.js.map
|
package/dist/cloud.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sources":["../src/cloud.ts"],"sourcesContent":["import { cli as cloudCli, services as cloudServices } from '@strapi/cloud-cli';\nimport parseToChalk from './utils/parse-to-chalk';\n\ninterface CloudError {\n response: {\n status: number;\n data: string | object;\n };\n}\n\nfunction assertCloudError(e: unknown): asserts e is CloudError {\n if ((e as CloudError).response === undefined) {\n throw Error('Expected CloudError');\n }\n}\n\nexport async function handleCloudLogin(): Promise<boolean> {\n const logger = cloudServices.createLogger({\n silent: false,\n debug: process.argv.includes('--debug'),\n timestamp: false,\n });\n const cloudApiService = await cloudServices.cloudApiFactory({ logger });\n const defaultErrorMessage =\n 'An error occurred while trying to interact with Strapi servers. Use strapi deploy command once the project is generated.';\n\n let cloudApiConfig;\n try {\n const { data: config } = await cloudApiService.config();\n cloudApiConfig = config;\n\n if (!config?.featureFlags?.cloudLoginPromptEnabled) {\n return false;\n }\n\n logger.log(parseToChalk(config.projectCreation.introText));\n } catch (e: unknown) {\n logger.debug(e);\n logger.error(defaultErrorMessage);\n return false;\n }\n const { default: inquirer } = await import('inquirer');\n const { userChoice } = await inquirer.prompt<{ userChoice: string }>(\n cloudApiConfig.projectCreation?.userChoice || [\n {\n type: 'list',\n name: 'userChoice',\n message: `Please log in or sign up.`,\n choices: ['Login/Sign up', 'Skip'],\n },\n ]\n );\n\n if (!userChoice.toLowerCase().includes('skip')) {\n const cliContext = {\n user: { id: '' }, // This will be set later when the user logs in\n logger,\n cwd: process.cwd(),\n ...(cloudApiConfig.projectCreation?.reference && {\n promptExperiment: cloudApiConfig.projectCreation?.reference,\n }),\n };\n\n try {\n await cloudCli.login.action(cliContext, { showDashboardLink: false });\n } catch (e: Error | CloudError | unknown) {\n logger.debug(e);\n try {\n assertCloudError(e);\n if (e.response.status === 403) {\n const message =\n typeof e.response.data === 'string'\n ? e.response.data\n : 'We are sorry, but we are not able to log you into Strapi servers at the moment.';\n logger.warn(message);\n return false;\n }\n } catch {\n /* empty */\n }\n logger.error(defaultErrorMessage);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n"],"names":["assertCloudError","e","response","undefined","Error","handleCloudLogin","logger","cloudServices","createLogger","silent","debug","process","argv","includes","timestamp","cloudApiService","cloudApiFactory","defaultErrorMessage","cloudApiConfig","data","config","featureFlags","cloudLoginPromptEnabled","log","parseToChalk","projectCreation","introText","error","default","inquirer","userChoice","prompt","type","name","message","choices","toLowerCase","cliContext","user","id","cwd","reference","promptExperiment","cloudCli","login","action","showDashboardLink","status","warn"],"mappings":";;;;;AAUA,SAASA,iBAAiBC,CAAU,EAAA;AAClC,IAAA,IAAI,CAACA,CAAiBC,QAAQ,KAAKC,SAAAA,EAAW;AAC5C,QAAA,MAAMC,KAAAA,CAAM,qBAAA,CAAA;AACd,IAAA;AACF;AAEO,eAAeC,gBAAAA,GAAAA;IACpB,MAAMC,MAAAA,GAASC,iBAAAA,CAAcC,YAAY,CAAC;QACxCC,MAAAA,EAAQ,KAAA;AACRC,QAAAA,KAAAA,EAAOC,OAAAA,CAAQC,IAAI,CAACC,QAAQ,CAAC,SAAA,CAAA;QAC7BC,SAAAA,EAAW;AACb,KAAA,CAAA;AACA,IAAA,MAAMC,eAAAA,GAAkB,MAAMR,iBAAAA,CAAcS,eAAe,CAAC;AAAEV,QAAAA;AAAO,KAAA,CAAA;AACrE,IAAA,MAAMW,mBAAAA,GACJ,0HAAA;IAEF,IAAIC,cAAAA;IACJ,IAAI;AACF,QAAA,MAAM,EAAEC,IAAAA,EAAMC,MAAM,EAAE,GAAG,MAAML,gBAAgBK,MAAM,EAAA;QACrDF,cAAAA,GAAiBE,MAAAA;QAEjB,IAAI,CAACA,MAAAA,EAAQC,YAAAA,EAAcC,uBAAAA,EAAyB;YAClD,OAAO,KAAA;AACT,QAAA;AAEAhB,QAAAA,MAAAA,CAAOiB,GAAG,CAACC,YAAAA,CAAaJ,MAAAA,CAAOK,eAAe,CAACC,SAAS,CAAA,CAAA;AAC1D,IAAA,CAAA,CAAE,OAAOzB,CAAAA,EAAY;AACnBK,QAAAA,MAAAA,CAAOI,KAAK,CAACT,CAAAA,CAAAA;AACbK,QAAAA,MAAAA,CAAOqB,KAAK,CAACV,mBAAAA,CAAAA;QACb,OAAO,KAAA;AACT,IAAA;AACA,IAAA,MAAM,EAAEW,OAAAA,EAASC,QAAQ,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AAO0C,IAAI,CAACd,OAAAA,CAAAA;oBACZ,OAAO,KAAA;AACT,gBAAA;AACF,YAAA,CAAA,CAAE,OAAM;AACN,wBACF;AACA5B,YAAAA,MAAAA,CAAOqB,KAAK,CAACV,mBAAAA,CAAAA;YACb,OAAO,KAAA;AACT,QAAA;QAEA,OAAO,IAAA;AACT,IAAA;IAEA,OAAO,KAAA;AACT;;;;"}
|
package/dist/cloud.mjs
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { services, cli } from '@strapi/cloud-cli';
|
|
2
|
-
import parseToChalk from './utils/parse-to-chalk.mjs';
|
|
3
|
-
|
|
4
|
-
function assertCloudError(e) {
|
|
5
|
-
if (e.response === undefined) {
|
|
6
|
-
throw Error('Expected CloudError');
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
async function handleCloudLogin() {
|
|
10
|
-
const logger = services.createLogger({
|
|
11
|
-
silent: false,
|
|
12
|
-
debug: process.argv.includes('--debug'),
|
|
13
|
-
timestamp: false
|
|
14
|
-
});
|
|
15
|
-
const cloudApiService = await services.cloudApiFactory({
|
|
16
|
-
logger
|
|
17
|
-
});
|
|
18
|
-
const defaultErrorMessage = 'An error occurred while trying to interact with Strapi servers. Use strapi deploy command once the project is generated.';
|
|
19
|
-
let cloudApiConfig;
|
|
20
|
-
try {
|
|
21
|
-
const { data: config } = await cloudApiService.config();
|
|
22
|
-
cloudApiConfig = config;
|
|
23
|
-
if (!config?.featureFlags?.cloudLoginPromptEnabled) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
logger.log(parseToChalk(config.projectCreation.introText));
|
|
27
|
-
} catch (e) {
|
|
28
|
-
logger.debug(e);
|
|
29
|
-
logger.error(defaultErrorMessage);
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
const { default: inquirer } = await import('inquirer');
|
|
33
|
-
const { userChoice } = await inquirer.prompt(cloudApiConfig.projectCreation?.userChoice || [
|
|
34
|
-
{
|
|
35
|
-
type: 'list',
|
|
36
|
-
name: 'userChoice',
|
|
37
|
-
message: `Please log in or sign up.`,
|
|
38
|
-
choices: [
|
|
39
|
-
'Login/Sign up',
|
|
40
|
-
'Skip'
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
]);
|
|
44
|
-
if (!userChoice.toLowerCase().includes('skip')) {
|
|
45
|
-
const cliContext = {
|
|
46
|
-
user: {
|
|
47
|
-
id: ''
|
|
48
|
-
},
|
|
49
|
-
logger,
|
|
50
|
-
cwd: process.cwd(),
|
|
51
|
-
...cloudApiConfig.projectCreation?.reference && {
|
|
52
|
-
promptExperiment: cloudApiConfig.projectCreation?.reference
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
try {
|
|
56
|
-
await cli.login.action(cliContext, {
|
|
57
|
-
showDashboardLink: false
|
|
58
|
-
});
|
|
59
|
-
} catch (e) {
|
|
60
|
-
logger.debug(e);
|
|
61
|
-
try {
|
|
62
|
-
assertCloudError(e);
|
|
63
|
-
if (e.response.status === 403) {
|
|
64
|
-
const message = typeof e.response.data === 'string' ? e.response.data : 'We are sorry, but we are not able to log you into Strapi servers at the moment.';
|
|
65
|
-
logger.warn(message);
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
} catch {
|
|
69
|
-
/* empty */ }
|
|
70
|
-
logger.error(defaultErrorMessage);
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export { handleCloudLogin };
|
|
79
|
-
//# sourceMappingURL=cloud.mjs.map
|
package/dist/cloud.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.mjs","sources":["../src/cloud.ts"],"sourcesContent":["import { cli as cloudCli, services as cloudServices } from '@strapi/cloud-cli';\nimport parseToChalk from './utils/parse-to-chalk';\n\ninterface CloudError {\n response: {\n status: number;\n data: string | object;\n };\n}\n\nfunction assertCloudError(e: unknown): asserts e is CloudError {\n if ((e as CloudError).response === undefined) {\n throw Error('Expected CloudError');\n }\n}\n\nexport async function handleCloudLogin(): Promise<boolean> {\n const logger = cloudServices.createLogger({\n silent: false,\n debug: process.argv.includes('--debug'),\n timestamp: false,\n });\n const cloudApiService = await cloudServices.cloudApiFactory({ logger });\n const defaultErrorMessage =\n 'An error occurred while trying to interact with Strapi servers. Use strapi deploy command once the project is generated.';\n\n let cloudApiConfig;\n try {\n const { data: config } = await cloudApiService.config();\n cloudApiConfig = config;\n\n if (!config?.featureFlags?.cloudLoginPromptEnabled) {\n return false;\n }\n\n logger.log(parseToChalk(config.projectCreation.introText));\n } catch (e: unknown) {\n logger.debug(e);\n logger.error(defaultErrorMessage);\n return false;\n }\n const { default: inquirer } = await import('inquirer');\n const { userChoice } = await inquirer.prompt<{ userChoice: string }>(\n cloudApiConfig.projectCreation?.userChoice || [\n {\n type: 'list',\n name: 'userChoice',\n message: `Please log in or sign up.`,\n choices: ['Login/Sign up', 'Skip'],\n },\n ]\n );\n\n if (!userChoice.toLowerCase().includes('skip')) {\n const cliContext = {\n user: { id: '' }, // This will be set later when the user logs in\n logger,\n cwd: process.cwd(),\n ...(cloudApiConfig.projectCreation?.reference && {\n promptExperiment: cloudApiConfig.projectCreation?.reference,\n }),\n };\n\n try {\n await cloudCli.login.action(cliContext, { showDashboardLink: false });\n } catch (e: Error | CloudError | unknown) {\n logger.debug(e);\n try {\n assertCloudError(e);\n if (e.response.status === 403) {\n const message =\n typeof e.response.data === 'string'\n ? e.response.data\n : 'We are sorry, but we are not able to log you into Strapi servers at the moment.';\n logger.warn(message);\n return false;\n }\n } catch {\n /* empty */\n }\n logger.error(defaultErrorMessage);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n"],"names":["assertCloudError","e","response","undefined","Error","handleCloudLogin","logger","cloudServices","createLogger","silent","debug","process","argv","includes","timestamp","cloudApiService","cloudApiFactory","defaultErrorMessage","cloudApiConfig","data","config","featureFlags","cloudLoginPromptEnabled","log","parseToChalk","projectCreation","introText","error","default","inquirer","userChoice","prompt","type","name","message","choices","toLowerCase","cliContext","user","id","cwd","reference","promptExperiment","cloudCli","login","action","showDashboardLink","status","warn"],"mappings":";;;AAUA,SAASA,iBAAiBC,CAAU,EAAA;AAClC,IAAA,IAAI,CAACA,CAAiBC,QAAQ,KAAKC,SAAAA,EAAW;AAC5C,QAAA,MAAMC,KAAAA,CAAM,qBAAA,CAAA;AACd,IAAA;AACF;AAEO,eAAeC,gBAAAA,GAAAA;IACpB,MAAMC,MAAAA,GAASC,QAAAA,CAAcC,YAAY,CAAC;QACxCC,MAAAA,EAAQ,KAAA;AACRC,QAAAA,KAAAA,EAAOC,OAAAA,CAAQC,IAAI,CAACC,QAAQ,CAAC,SAAA,CAAA;QAC7BC,SAAAA,EAAW;AACb,KAAA,CAAA;AACA,IAAA,MAAMC,eAAAA,GAAkB,MAAMR,QAAAA,CAAcS,eAAe,CAAC;AAAEV,QAAAA;AAAO,KAAA,CAAA;AACrE,IAAA,MAAMW,mBAAAA,GACJ,0HAAA;IAEF,IAAIC,cAAAA;IACJ,IAAI;AACF,QAAA,MAAM,EAAEC,IAAAA,EAAMC,MAAM,EAAE,GAAG,MAAML,gBAAgBK,MAAM,EAAA;QACrDF,cAAAA,GAAiBE,MAAAA;QAEjB,IAAI,CAACA,MAAAA,EAAQC,YAAAA,EAAcC,uBAAAA,EAAyB;YAClD,OAAO,KAAA;AACT,QAAA;AAEAhB,QAAAA,MAAAA,CAAOiB,GAAG,CAACC,YAAAA,CAAaJ,MAAAA,CAAOK,eAAe,CAACC,SAAS,CAAA,CAAA;AAC1D,IAAA,CAAA,CAAE,OAAOzB,CAAAA,EAAY;AACnBK,QAAAA,MAAAA,CAAOI,KAAK,CAACT,CAAAA,CAAAA;AACbK,QAAAA,MAAAA,CAAOqB,KAAK,CAACV,mBAAAA,CAAAA;QACb,OAAO,KAAA;AACT,IAAA;AACA,IAAA,MAAM,EAAEW,OAAAA,EA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A,MAAAA,CAAO0C,IAAI,CAACd,OAAAA,CAAAA;oBACZ,OAAO,KAAA;AACT,gBAAA;AACF,YAAA,CAAA,CAAE,OAAM;AACN,wBACF;AACA5B,YAAAA,MAAAA,CAAOqB,KAAK,CAACV,mBAAAA,CAAAA;YACb,OAAO,KAAA;AACT,QAAA;QAEA,OAAO,IAAA;AACT,IAAA;IAEA,OAAO,KAAA;AACT;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-to-chalk.d.ts","sourceRoot":"","sources":["../../src/utils/parse-to-chalk.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,QAAQ,EAAE,MAAM,UASpD"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chalk = require('chalk');
|
|
4
|
-
|
|
5
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
|
-
|
|
7
|
-
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
8
|
-
|
|
9
|
-
// TODO: move styles to API
|
|
10
|
-
const supportedStyles = {
|
|
11
|
-
magentaBright: chalk__default.default.magentaBright,
|
|
12
|
-
blueBright: chalk__default.default.blueBright,
|
|
13
|
-
yellowBright: chalk__default.default.yellowBright,
|
|
14
|
-
green: chalk__default.default.green,
|
|
15
|
-
red: chalk__default.default.red,
|
|
16
|
-
bold: chalk__default.default.bold,
|
|
17
|
-
italic: chalk__default.default.italic
|
|
18
|
-
};
|
|
19
|
-
function parseToChalk(template) {
|
|
20
|
-
let result = template;
|
|
21
|
-
for (const [color, chalkFunction] of Object.entries(supportedStyles)){
|
|
22
|
-
const regex = new RegExp(`{${color}}(.*?){/${color}}`, 'g');
|
|
23
|
-
result = result.replace(regex, (_, p1)=>chalkFunction(p1.trim()));
|
|
24
|
-
}
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
module.exports = parseToChalk;
|
|
29
|
-
//# sourceMappingURL=parse-to-chalk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-to-chalk.js","sources":["../../src/utils/parse-to-chalk.ts"],"sourcesContent":["import chalk from 'chalk';\n\n// TODO: move styles to API\n\nconst supportedStyles = {\n magentaBright: chalk.magentaBright,\n blueBright: chalk.blueBright,\n yellowBright: chalk.yellowBright,\n green: chalk.green,\n red: chalk.red,\n bold: chalk.bold,\n italic: chalk.italic,\n};\n\nexport default function parseToChalk(template: string) {\n let result = template;\n\n for (const [color, chalkFunction] of Object.entries(supportedStyles)) {\n const regex = new RegExp(`{${color}}(.*?){/${color}}`, 'g');\n result = result.replace(regex, (_, p1) => chalkFunction(p1.trim()));\n }\n\n return result;\n}\n"],"names":["supportedStyles","magentaBright","chalk","blueBright","yellowBright","green","red","bold","italic","parseToChalk","template","result","color","chalkFunction","Object","entries","regex","RegExp","replace","_","p1","trim"],"mappings":";;;;;;;;AAEA;AAEA,MAAMA,eAAAA,GAAkB;AACtBC,IAAAA,aAAAA,EAAeC,uBAAMD,aAAa;AAClCE,IAAAA,UAAAA,EAAYD,uBAAMC,UAAU;AAC5BC,IAAAA,YAAAA,EAAcF,uBAAME,YAAY;AAChCC,IAAAA,KAAAA,EAAOH,uBAAMG,KAAK;AAClBC,IAAAA,GAAAA,EAAKJ,uBAAMI,GAAG;AACdC,IAAAA,IAAAA,EAAML,uBAAMK,IAAI;AAChBC,IAAAA,MAAAA,EAAQN,uBAAMM;AAChB,CAAA;AAEe,SAASC,aAAaC,QAAgB,EAAA;AACnD,IAAA,IAAIC,MAAAA,GAASD,QAAAA;IAEb,KAAK,MAAM,CAACE,KAAAA,EAAOC,aAAAA,CAAc,IAAIC,MAAAA,CAAOC,OAAO,CAACf,eAAAA,CAAAA,CAAkB;AACpE,QAAA,MAAMgB,KAAAA,GAAQ,IAAIC,MAAAA,CAAO,CAAC,CAAC,EAAEL,KAAAA,CAAM,QAAQ,EAAEA,KAAAA,CAAM,CAAC,CAAC,EAAE,GAAA,CAAA;QACvDD,MAAAA,GAASA,MAAAA,CAAOO,OAAO,CAACF,KAAAA,EAAO,CAACG,CAAAA,EAAGC,EAAAA,GAAOP,aAAAA,CAAcO,EAAAA,CAAGC,IAAI,EAAA,CAAA,CAAA;AACjE,IAAA;IAEA,OAAOV,MAAAA;AACT;;;;"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
|
|
3
|
-
// TODO: move styles to API
|
|
4
|
-
const supportedStyles = {
|
|
5
|
-
magentaBright: chalk.magentaBright,
|
|
6
|
-
blueBright: chalk.blueBright,
|
|
7
|
-
yellowBright: chalk.yellowBright,
|
|
8
|
-
green: chalk.green,
|
|
9
|
-
red: chalk.red,
|
|
10
|
-
bold: chalk.bold,
|
|
11
|
-
italic: chalk.italic
|
|
12
|
-
};
|
|
13
|
-
function parseToChalk(template) {
|
|
14
|
-
let result = template;
|
|
15
|
-
for (const [color, chalkFunction] of Object.entries(supportedStyles)){
|
|
16
|
-
const regex = new RegExp(`{${color}}(.*?){/${color}}`, 'g');
|
|
17
|
-
result = result.replace(regex, (_, p1)=>chalkFunction(p1.trim()));
|
|
18
|
-
}
|
|
19
|
-
return result;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { parseToChalk as default };
|
|
23
|
-
//# sourceMappingURL=parse-to-chalk.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-to-chalk.mjs","sources":["../../src/utils/parse-to-chalk.ts"],"sourcesContent":["import chalk from 'chalk';\n\n// TODO: move styles to API\n\nconst supportedStyles = {\n magentaBright: chalk.magentaBright,\n blueBright: chalk.blueBright,\n yellowBright: chalk.yellowBright,\n green: chalk.green,\n red: chalk.red,\n bold: chalk.bold,\n italic: chalk.italic,\n};\n\nexport default function parseToChalk(template: string) {\n let result = template;\n\n for (const [color, chalkFunction] of Object.entries(supportedStyles)) {\n const regex = new RegExp(`{${color}}(.*?){/${color}}`, 'g');\n result = result.replace(regex, (_, p1) => chalkFunction(p1.trim()));\n }\n\n return result;\n}\n"],"names":["supportedStyles","magentaBright","chalk","blueBright","yellowBright","green","red","bold","italic","parseToChalk","template","result","color","chalkFunction","Object","entries","regex","RegExp","replace","_","p1","trim"],"mappings":";;AAEA;AAEA,MAAMA,eAAAA,GAAkB;AACtBC,IAAAA,aAAAA,EAAeC,MAAMD,aAAa;AAClCE,IAAAA,UAAAA,EAAYD,MAAMC,UAAU;AAC5BC,IAAAA,YAAAA,EAAcF,MAAME,YAAY;AAChCC,IAAAA,KAAAA,EAAOH,MAAMG,KAAK;AAClBC,IAAAA,GAAAA,EAAKJ,MAAMI,GAAG;AACdC,IAAAA,IAAAA,EAAML,MAAMK,IAAI;AAChBC,IAAAA,MAAAA,EAAQN,MAAMM;AAChB,CAAA;AAEe,SAASC,aAAaC,QAAgB,EAAA;AACnD,IAAA,IAAIC,MAAAA,GAASD,QAAAA;IAEb,KAAK,MAAM,CAACE,KAAAA,EAAOC,aAAAA,CAAc,IAAIC,MAAAA,CAAOC,OAAO,CAACf,eAAAA,CAAAA,CAAkB;AACpE,QAAA,MAAMgB,KAAAA,GAAQ,IAAIC,MAAAA,CAAO,CAAC,CAAC,EAAEL,KAAAA,CAAM,QAAQ,EAAEA,KAAAA,CAAM,CAAC,CAAC,EAAE,GAAA,CAAA;QACvDD,MAAAA,GAASA,MAAAA,CAAOO,OAAO,CAACF,KAAAA,EAAO,CAACG,CAAAA,EAAGC,EAAAA,GAAOP,aAAAA,CAAcO,EAAAA,CAAGC,IAAI,EAAA,CAAA,CAAA;AACjE,IAAA;IAEA,OAAOV,MAAAA;AACT;;;;"}
|