@dotcms/create-app 1.2.5-next.7 → 1.2.6-next.1
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/README.md +110 -174
- package/index.js +1522 -0
- package/package.json +21 -24
- package/src/api/index.d.ts +0 -26
- package/src/api/index.js +0 -75
- package/src/api/index.js.map +0 -1
- package/src/asks.d.ts +0 -47
- package/src/asks.js +0 -211
- package/src/asks.js.map +0 -1
- package/src/constants/index.d.ts +0 -22
- package/src/constants/index.js +0 -148
- package/src/constants/index.js.map +0 -1
- package/src/errors/index.d.ts +0 -18
- package/src/errors/index.js +0 -31
- package/src/errors/index.js.map +0 -1
- package/src/git/index.d.ts +0 -8
- package/src/git/index.js +0 -56
- package/src/git/index.js.map +0 -1
- package/src/index.d.ts +0 -2
- package/src/index.js +0 -415
- package/src/index.js.map +0 -1
- package/src/types/index.d.ts +0 -69
- package/src/types/index.js +0 -2
- package/src/types/index.js.map +0 -1
- package/src/utils/index.d.ts +0 -78
- package/src/utils/index.js +0 -444
- package/src/utils/index.js.map +0 -1
- package/src/utils/validation.d.ts +0 -47
- package/src/utils/validation.js +0 -286
- package/src/utils/validation.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"tslib": "^2.3.0",
|
|
24
|
-
"cfonts": "^3.3.1"
|
|
25
|
-
}
|
|
2
|
+
"name": "@dotcms/create-app",
|
|
3
|
+
"version": "1.2.6-next.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-dotcms-app": "./index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"*.js",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"axios": "^1.13.2",
|
|
15
|
+
"chalk": "^5.6.2",
|
|
16
|
+
"commander": "^14.0.2",
|
|
17
|
+
"execa": "^9.6.0",
|
|
18
|
+
"fs-extra": "^11.3.2",
|
|
19
|
+
"inquirer": "^13.0.1",
|
|
20
|
+
"ora": "^9.0.0",
|
|
21
|
+
"cfonts": "^3.3.1"
|
|
22
|
+
}
|
|
26
23
|
}
|
package/src/api/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type Result } from 'ts-results';
|
|
2
|
-
import { FailedToGetDemoSiteIdentifierError, FailedToSetUpUVEConfig } from '../errors';
|
|
3
|
-
import type { DemoSiteResponse, GetUserTokenRequest, UVEConfigRequest } from '../types';
|
|
4
|
-
export declare class DotCMSApi {
|
|
5
|
-
private static defaultTokenApi;
|
|
6
|
-
private static defaultDemoSiteApi;
|
|
7
|
-
private static defaultUveConfigApi;
|
|
8
|
-
/** Get authentication token */
|
|
9
|
-
static getAuthToken({ payload, url }: {
|
|
10
|
-
payload: GetUserTokenRequest;
|
|
11
|
-
url?: string;
|
|
12
|
-
}): Promise<Result<string, string>>;
|
|
13
|
-
/** Get demo site identifier */
|
|
14
|
-
static getDemoSiteIdentifier({ siteName, authenticationToken, url }: {
|
|
15
|
-
siteName: string;
|
|
16
|
-
authenticationToken: string;
|
|
17
|
-
url?: string;
|
|
18
|
-
}): Promise<Result<DemoSiteResponse, FailedToGetDemoSiteIdentifierError>>;
|
|
19
|
-
/** Setup UVE Config */
|
|
20
|
-
static setupUVEConfig({ payload, siteId, authenticationToken, url }: {
|
|
21
|
-
payload: UVEConfigRequest;
|
|
22
|
-
siteId: string;
|
|
23
|
-
authenticationToken: string;
|
|
24
|
-
url?: string;
|
|
25
|
-
}): Promise<Result<'Ok', FailedToSetUpUVEConfig>>;
|
|
26
|
-
}
|
package/src/api/index.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { Ok, Err } from 'ts-results';
|
|
4
|
-
import { DOTCMS_DEMO_SITE, DOTCMS_EMA_CONFIG_API, DOTCMS_TOKEN_API } from '../constants';
|
|
5
|
-
import { FailedToGetDemoSiteIdentifierError, FailedToSetUpUVEConfig } from '../errors';
|
|
6
|
-
export class DotCMSApi {
|
|
7
|
-
/** Get authentication token */
|
|
8
|
-
static async getAuthToken({ payload, url }) {
|
|
9
|
-
const endpoint = url || this.defaultTokenApi;
|
|
10
|
-
try {
|
|
11
|
-
const res = await axios.post(endpoint, payload);
|
|
12
|
-
return Ok(res.data.entity.token);
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
// Provide specific error messages based on error type
|
|
16
|
-
if (axios.isAxiosError(err)) {
|
|
17
|
-
if (err.response?.status === 401) {
|
|
18
|
-
return Err(chalk.red('\n❌ Authentication failed\n\n') +
|
|
19
|
-
chalk.white('Invalid username or password.\n\n') +
|
|
20
|
-
chalk.yellow('Please check your credentials and try again:\n') +
|
|
21
|
-
chalk.white(' • Verify your username is correct\n') +
|
|
22
|
-
chalk.white(' • Ensure your password is correct\n') +
|
|
23
|
-
chalk.white(' • Check if your account is active\n'));
|
|
24
|
-
}
|
|
25
|
-
else if (err.code === 'ECONNREFUSED') {
|
|
26
|
-
return Err(chalk.red('\n❌ Connection refused\n\n') +
|
|
27
|
-
chalk.white(`Could not connect to dotCMS at: ${endpoint}\n\n`) +
|
|
28
|
-
chalk.yellow('Please verify:\n') +
|
|
29
|
-
chalk.white(' • The URL is correct\n') +
|
|
30
|
-
chalk.white(' • The dotCMS instance is running\n') +
|
|
31
|
-
chalk.white(' • There are no firewall issues\n'));
|
|
32
|
-
}
|
|
33
|
-
else if (err.response) {
|
|
34
|
-
return Err(chalk.red(`\n❌ Server error (${err.response.status})\n\n`) +
|
|
35
|
-
chalk.white('The dotCMS server returned an error.\n') +
|
|
36
|
-
chalk.gray(`Details: ${err.response.statusText || 'Unknown error'}\n`));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return Err(chalk.red('\n❌ Failed to get authentication token\n\n') +
|
|
40
|
-
chalk.gray(err instanceof Error ? err.message : String(err)));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/** Get demo site identifier */
|
|
44
|
-
static async getDemoSiteIdentifier({ siteName, authenticationToken, url }) {
|
|
45
|
-
try {
|
|
46
|
-
const endpoint = (url || this.defaultDemoSiteApi) + siteName;
|
|
47
|
-
const res = await axios.get(endpoint, {
|
|
48
|
-
headers: { Authorization: `Bearer ${authenticationToken}` }
|
|
49
|
-
});
|
|
50
|
-
return Ok(res.data);
|
|
51
|
-
}
|
|
52
|
-
catch (err) {
|
|
53
|
-
console.error('failed to get demo site identifier : ' + JSON.stringify(err));
|
|
54
|
-
return Err(new FailedToGetDemoSiteIdentifierError());
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
/** Setup UVE Config */
|
|
58
|
-
static async setupUVEConfig({ payload, siteId, authenticationToken, url }) {
|
|
59
|
-
try {
|
|
60
|
-
const endpoint = (url || this.defaultUveConfigApi) + siteId;
|
|
61
|
-
const res = await axios.post(endpoint, payload, {
|
|
62
|
-
headers: { Authorization: `Bearer ${authenticationToken}` }
|
|
63
|
-
});
|
|
64
|
-
return Ok(res.data.entity);
|
|
65
|
-
}
|
|
66
|
-
catch (err) {
|
|
67
|
-
console.error('failed to setup UVE config' + JSON.stringify(err));
|
|
68
|
-
return Err(new FailedToSetUpUVEConfig());
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
DotCMSApi.defaultTokenApi = DOTCMS_TOKEN_API;
|
|
73
|
-
DotCMSApi.defaultDemoSiteApi = DOTCMS_DEMO_SITE;
|
|
74
|
-
DotCMSApi.defaultUveConfigApi = DOTCMS_EMA_CONFIG_API;
|
|
75
|
-
//# sourceMappingURL=index.js.map
|
package/src/api/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/sdk/create-app/src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAe,GAAG,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,kCAAkC,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AASvF,MAAM,OAAO,SAAS;IAKlB,+BAA+B;IAC/B,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,EACtB,OAAO,EACP,GAAG,EAIN;QACG,MAAM,QAAQ,GAAG,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC;QAE7C,IAAI,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAuB,QAAQ,EAAE,OAAO,CAAC,CAAC;YACtE,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,sDAAsD;YACtD,IAAI,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC1B,IAAI,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;oBAC/B,OAAO,GAAG,CACN,KAAK,CAAC,GAAG,CAAC,+BAA+B,CAAC;wBACtC,KAAK,CAAC,KAAK,CAAC,mCAAmC,CAAC;wBAChD,KAAK,CAAC,MAAM,CAAC,gDAAgD,CAAC;wBAC9D,KAAK,CAAC,KAAK,C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|
package/src/asks.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { SupportedFrontEndFrameworks } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Ask interactively if framework not specified
|
|
4
|
-
*/
|
|
5
|
-
export declare function askFramework(): Promise<SupportedFrontEndFrameworks>;
|
|
6
|
-
/**
|
|
7
|
-
* Ask user name of the project
|
|
8
|
-
*/
|
|
9
|
-
export declare function askProjectName(): Promise<any>;
|
|
10
|
-
/**
|
|
11
|
-
* Ask user where to create the project
|
|
12
|
-
*/
|
|
13
|
-
export declare function askDirectory(): Promise<any>;
|
|
14
|
-
/**
|
|
15
|
-
* Ask user the url of the dotCMS instance
|
|
16
|
-
*/
|
|
17
|
-
export declare function askDotcmsCloudUrl(): Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* Ask user the username of the dotCMS instance
|
|
20
|
-
*/
|
|
21
|
-
export declare function askUserNameForDotcmsCloud(): Promise<any>;
|
|
22
|
-
/**
|
|
23
|
-
* Ask user the password of the dotCMS instance
|
|
24
|
-
*/
|
|
25
|
-
export declare function askPasswordForDotcmsCloud(): Promise<any>;
|
|
26
|
-
/**
|
|
27
|
-
* Ask if the user wants to use cloud instance or local dotcms
|
|
28
|
-
* Example:
|
|
29
|
-
* user enters: "y/n"
|
|
30
|
-
*/
|
|
31
|
-
/**
|
|
32
|
-
* Ask if the user has cloud or want to set local
|
|
33
|
-
*/
|
|
34
|
-
export declare function askCloudOrLocalInstance(): Promise<boolean>;
|
|
35
|
-
/**
|
|
36
|
-
* Prepare final project directory
|
|
37
|
-
* Example:
|
|
38
|
-
* user enters: "."
|
|
39
|
-
* projectName: "my-app"
|
|
40
|
-
* final path becomes "./my-app"
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* - Prevents nested directories when basePath already ends with projectName
|
|
44
|
-
* - Example: basePath="/tmp/my-app" + projectName="my-app" → "/tmp/my-app" (not "/tmp/my-app/my-app")
|
|
45
|
-
* - Handles both absolute and relative paths correctly
|
|
46
|
-
*/
|
|
47
|
-
export declare function prepareDirectory(basePath: string, projectName: string): Promise<string>;
|
package/src/asks.js
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { FRAMEWORKS_CHOICES } from './constants';
|
|
5
|
-
import { validateProjectName, validateUrl } from './utils/validation';
|
|
6
|
-
/**
|
|
7
|
-
* Ask interactively if framework not specified
|
|
8
|
-
*/
|
|
9
|
-
export async function askFramework() {
|
|
10
|
-
const ans = await inquirer.prompt([
|
|
11
|
-
{
|
|
12
|
-
type: 'select',
|
|
13
|
-
name: 'frameworks',
|
|
14
|
-
message: 'Select your frontend framework:',
|
|
15
|
-
choices: FRAMEWORKS_CHOICES
|
|
16
|
-
}
|
|
17
|
-
]);
|
|
18
|
-
// Return the first selected framework (checkbox returns array)
|
|
19
|
-
return ans.frameworks;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Ask user name of the project
|
|
23
|
-
*/
|
|
24
|
-
export async function askProjectName() {
|
|
25
|
-
const ans = await inquirer.prompt([
|
|
26
|
-
{
|
|
27
|
-
type: 'input',
|
|
28
|
-
name: 'projectName',
|
|
29
|
-
message: 'What is your project name ?',
|
|
30
|
-
default: `my-dotcms-app`,
|
|
31
|
-
validate: (input) => {
|
|
32
|
-
try {
|
|
33
|
-
validateProjectName(input);
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
return error instanceof Error ? error.message : String(error);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]);
|
|
42
|
-
return ans.projectName;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Ask user where to create the project
|
|
46
|
-
*/
|
|
47
|
-
export async function askDirectory() {
|
|
48
|
-
const ans = await inquirer.prompt([
|
|
49
|
-
{
|
|
50
|
-
type: 'input',
|
|
51
|
-
name: 'directory',
|
|
52
|
-
message: 'Where should we create your project?',
|
|
53
|
-
default: `.`
|
|
54
|
-
}
|
|
55
|
-
]);
|
|
56
|
-
return ans.directory;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Ask user the url of the dotCMS instance
|
|
60
|
-
*/
|
|
61
|
-
export async function askDotcmsCloudUrl() {
|
|
62
|
-
const ans = await inquirer.prompt([
|
|
63
|
-
{
|
|
64
|
-
type: 'input',
|
|
65
|
-
name: 'url',
|
|
66
|
-
message: 'dotCMS instance URL:',
|
|
67
|
-
default: `https://demo.dotcms.com`,
|
|
68
|
-
validate: (input) => {
|
|
69
|
-
try {
|
|
70
|
-
validateUrl(input);
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
return error instanceof Error ? error.message : String(error);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
]);
|
|
79
|
-
return ans.url;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Ask user the username of the dotCMS instance
|
|
83
|
-
*/
|
|
84
|
-
export async function askUserNameForDotcmsCloud() {
|
|
85
|
-
const ans = await inquirer.prompt([
|
|
86
|
-
{
|
|
87
|
-
type: 'input',
|
|
88
|
-
name: 'username',
|
|
89
|
-
message: 'Username:',
|
|
90
|
-
default: `admin@dotcms.com`,
|
|
91
|
-
validate: (input) => {
|
|
92
|
-
if (!input || input.trim() === '') {
|
|
93
|
-
return 'Username cannot be empty';
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
]);
|
|
99
|
-
return ans.username;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Ask user the password of the dotCMS instance
|
|
103
|
-
*/
|
|
104
|
-
export async function askPasswordForDotcmsCloud() {
|
|
105
|
-
const ans = await inquirer.prompt([
|
|
106
|
-
{
|
|
107
|
-
type: 'password',
|
|
108
|
-
name: 'password',
|
|
109
|
-
mask: '•',
|
|
110
|
-
message: 'Password:',
|
|
111
|
-
default: `admin`,
|
|
112
|
-
validate: (input) => {
|
|
113
|
-
if (!input || input.trim() === '') {
|
|
114
|
-
return 'Password cannot be empty';
|
|
115
|
-
}
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
]);
|
|
120
|
-
return ans.password;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Ask if the user wants to use cloud instance or local dotcms
|
|
124
|
-
* Example:
|
|
125
|
-
* user enters: "y/n"
|
|
126
|
-
*/
|
|
127
|
-
// export async function askCloudOrLocalInstance(): Promise<boolean> {
|
|
128
|
-
// const ans = await inquirer.prompt([
|
|
129
|
-
// {
|
|
130
|
-
// type: 'confirm',
|
|
131
|
-
// name: 'confirm',
|
|
132
|
-
// message: `Running dotCMS in the cloud? If not, no worries — select No to spin up dotCMS using Docker.`,
|
|
133
|
-
// default: false
|
|
134
|
-
// }
|
|
135
|
-
// ]);
|
|
136
|
-
// return ans.confirm;
|
|
137
|
-
// }
|
|
138
|
-
//
|
|
139
|
-
/**
|
|
140
|
-
* Ask if the user has cloud or want to set local
|
|
141
|
-
*/
|
|
142
|
-
export async function askCloudOrLocalInstance() {
|
|
143
|
-
const ans = await inquirer.prompt([
|
|
144
|
-
{
|
|
145
|
-
type: 'select',
|
|
146
|
-
name: 'isCloud',
|
|
147
|
-
message: 'Do you have an existing dotCMS instance?',
|
|
148
|
-
choices: [
|
|
149
|
-
{ name: 'Yes - I have a dotCMS instance URL', value: true },
|
|
150
|
-
{ name: 'No - Spin up dotCMS locally with Docker', value: false }
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
]);
|
|
154
|
-
// Return the first selected framework (checkbox returns array)
|
|
155
|
-
return ans.isCloud;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Prepare final project directory
|
|
159
|
-
* Example:
|
|
160
|
-
* user enters: "."
|
|
161
|
-
* projectName: "my-app"
|
|
162
|
-
* final path becomes "./my-app"
|
|
163
|
-
*
|
|
164
|
-
* @remarks
|
|
165
|
-
* - Prevents nested directories when basePath already ends with projectName
|
|
166
|
-
* - Example: basePath="/tmp/my-app" + projectName="my-app" → "/tmp/my-app" (not "/tmp/my-app/my-app")
|
|
167
|
-
* - Handles both absolute and relative paths correctly
|
|
168
|
-
*/
|
|
169
|
-
export async function prepareDirectory(basePath, projectName) {
|
|
170
|
-
// Resolve basePath to absolute path for consistent comparison
|
|
171
|
-
const resolvedBasePath = path.resolve(basePath);
|
|
172
|
-
const basePathDirName = path.basename(resolvedBasePath);
|
|
173
|
-
// Check if basePath already ends with the project name
|
|
174
|
-
// This prevents nested directories like "/tmp/my-app/my-app"
|
|
175
|
-
let targetPath;
|
|
176
|
-
if (basePathDirName === projectName) {
|
|
177
|
-
// User specified full path including project name (e.g., "-d /tmp/my-app" with projectName="my-app")
|
|
178
|
-
targetPath = resolvedBasePath;
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
// User specified parent directory (e.g., "-d /tmp" with projectName="my-app")
|
|
182
|
-
targetPath = path.resolve(resolvedBasePath, projectName);
|
|
183
|
-
}
|
|
184
|
-
// If path doesn't exist → create
|
|
185
|
-
if (!fs.existsSync(targetPath)) {
|
|
186
|
-
fs.mkdirSync(targetPath, { recursive: true });
|
|
187
|
-
return targetPath;
|
|
188
|
-
}
|
|
189
|
-
// Directory exists → check if empty
|
|
190
|
-
const files = fs.readdirSync(targetPath);
|
|
191
|
-
if (files.length === 0) {
|
|
192
|
-
return targetPath; // empty → OK
|
|
193
|
-
}
|
|
194
|
-
// Directory not empty → warn user
|
|
195
|
-
const ans = await inquirer.prompt([
|
|
196
|
-
{
|
|
197
|
-
type: 'confirm',
|
|
198
|
-
name: 'confirm',
|
|
199
|
-
message: `⚠️ Directory "${targetPath}" is not empty. All files inside will be deleted. Continue?`,
|
|
200
|
-
default: false
|
|
201
|
-
}
|
|
202
|
-
]);
|
|
203
|
-
if (!ans.confirm) {
|
|
204
|
-
console.log('❌ Operation cancelled.');
|
|
205
|
-
process.exit(1);
|
|
206
|
-
}
|
|
207
|
-
// Empty directory
|
|
208
|
-
await fs.emptyDir(targetPath);
|
|
209
|
-
return targetPath;
|
|
210
|
-
}
|
|
211
|
-
//# sourceMappingURL=asks.js.map
|
package/src/asks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asks.js","sourceRoot":"","sources":["../../../../../libs/sdk/create-app/src/asks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAC9B,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,MAAM,CAA8C;QAC3E;YACI,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,iCAAiC;YAC1C,OAAO,EAAE,kBAAkB;SAC9B;KACJ,CAAC,CAAC;IAEH,+DAA+D;IAC/D,OAAO,GAAG,CAAC,UAAU,CAAC;AAC1B,CAAC;AACD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAChC,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QAC9B;YACI,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,6BAA6B;YACtC,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gBACxB,IAAI,CAAC;oBACD,mBAAmB,CAAC,KAAK,CAAC,CAAC;oBAC3B,OAAO,IAAI,CAAC;gBAChB,CAAC;gBAA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AI,EAAE,SAAS;YACf,OAAO,EAAE,kBAAkB,UAAU,6DAA6D;YAClG,OAAO,EAAE,KAAK;SACjB;KACJ,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,kBAAkB;IAClB,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAE9B,OAAO,UAAU,CAAC;AACtB,CAAC"}
|
package/src/constants/index.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { FrameworkChoices, SupportedFrontEndFrameworks } from '../types';
|
|
2
|
-
export declare const DOTCMS_HOST = "http://localhost:8082";
|
|
3
|
-
export declare const DOTCMS_USER: {
|
|
4
|
-
username: string;
|
|
5
|
-
password: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const DOTCMS_HEALTH_API = "http://localhost:8082/api/v1/appconfiguration";
|
|
8
|
-
export declare const DOTCMS_TOKEN_API = "http://localhost:8082/api/v1/authentication/api-token";
|
|
9
|
-
export declare const DOTCMS_EMA_CONFIG_API = "http://localhost:8082/api/v1/apps/dotema-config-v2/";
|
|
10
|
-
export declare const DOTCMS_DEMO_SITE = "http://localhost:8082/api/v1/site/";
|
|
11
|
-
export declare const CLOUD_HEALTH_CHECK_RETRIES = 5;
|
|
12
|
-
export declare const LOCAL_HEALTH_CHECK_RETRIES = 60;
|
|
13
|
-
export declare const FRAMEWORKS: SupportedFrontEndFrameworks[];
|
|
14
|
-
export declare const FRAMEWORKS_CHOICES: FrameworkChoices[];
|
|
15
|
-
export declare const NEXTJS_DEPENDENCIES: string[];
|
|
16
|
-
export declare const NEXTJS_DEPENDENCIES_DEV: string[];
|
|
17
|
-
export declare const ASTRO_DEPENDENCIES: string[];
|
|
18
|
-
export declare const ASTRO_DEPENDENCIES_DEV: string[];
|
|
19
|
-
export declare const ANGULAR_DEPENDENCIES: string[];
|
|
20
|
-
export declare const ANGULAR_DEPENDENCIES_DEV: string[];
|
|
21
|
-
export declare const ANGULAR_SSR_DEPENDENCIES: string[];
|
|
22
|
-
export declare const ANGULAR_SSR_DEPENDENCIES_DEV: string[];
|
package/src/constants/index.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
export const DOTCMS_HOST = 'http://localhost:8082';
|
|
2
|
-
export const DOTCMS_USER = {
|
|
3
|
-
username: 'admin@dotcms.com',
|
|
4
|
-
password: 'admin'
|
|
5
|
-
};
|
|
6
|
-
// USED APIS
|
|
7
|
-
// Note: Using /appconfiguration instead of /probes/alive because the probe endpoints
|
|
8
|
-
// have IP ACL restrictions that block requests from Docker host. See GitHub issue #34509
|
|
9
|
-
export const DOTCMS_HEALTH_API = `${DOTCMS_HOST}/api/v1/appconfiguration`;
|
|
10
|
-
export const DOTCMS_TOKEN_API = `${DOTCMS_HOST}/api/v1/authentication/api-token`;
|
|
11
|
-
export const DOTCMS_EMA_CONFIG_API = `${DOTCMS_HOST}/api/v1/apps/dotema-config-v2/`;
|
|
12
|
-
export const DOTCMS_DEMO_SITE = `${DOTCMS_HOST}/api/v1/site/`;
|
|
13
|
-
// Health check configuration
|
|
14
|
-
export const CLOUD_HEALTH_CHECK_RETRIES = 5; // Retries for cloud instances (faster expected startup)
|
|
15
|
-
export const LOCAL_HEALTH_CHECK_RETRIES = 60; // Retries for local Docker (slower startup)
|
|
16
|
-
// App constants
|
|
17
|
-
export const FRAMEWORKS = [
|
|
18
|
-
'nextjs',
|
|
19
|
-
'astro',
|
|
20
|
-
'angular',
|
|
21
|
-
'angular-ssr'
|
|
22
|
-
];
|
|
23
|
-
export const FRAMEWORKS_CHOICES = [
|
|
24
|
-
{ name: 'Next.js', value: 'nextjs' },
|
|
25
|
-
{ name: 'Astro', value: 'astro' },
|
|
26
|
-
{ name: 'Angular', value: 'angular' },
|
|
27
|
-
{ name: 'Angular (SSR)', value: 'angular-ssr' }
|
|
28
|
-
];
|
|
29
|
-
export const NEXTJS_DEPENDENCIES = [
|
|
30
|
-
'@dotcms/client',
|
|
31
|
-
'@dotcms/experiments',
|
|
32
|
-
'@dotcms/react',
|
|
33
|
-
'@dotcms/types',
|
|
34
|
-
'@dotcms/uve',
|
|
35
|
-
'@tinymce/tinymce-react',
|
|
36
|
-
'next',
|
|
37
|
-
'react',
|
|
38
|
-
'react-dom'
|
|
39
|
-
];
|
|
40
|
-
export const NEXTJS_DEPENDENCIES_DEV = [
|
|
41
|
-
'@tailwindcss/postcss',
|
|
42
|
-
'@tailwindcss/typography',
|
|
43
|
-
'eslint',
|
|
44
|
-
'eslint-config-next',
|
|
45
|
-
'postcss',
|
|
46
|
-
'prettier',
|
|
47
|
-
'tailwindcss'
|
|
48
|
-
];
|
|
49
|
-
export const ASTRO_DEPENDENCIES = [
|
|
50
|
-
'@astrojs/check',
|
|
51
|
-
'@astrojs/react',
|
|
52
|
-
'@astrojs/ts-plugin',
|
|
53
|
-
'@astrojs/vercel',
|
|
54
|
-
'@dotcms/client',
|
|
55
|
-
'@dotcms/react',
|
|
56
|
-
'@dotcms/types',
|
|
57
|
-
'@dotcms/uve',
|
|
58
|
-
'@tailwindcss/typography',
|
|
59
|
-
'@tailwindcss/vite',
|
|
60
|
-
'@tinymce/tinymce-react',
|
|
61
|
-
'@types/react',
|
|
62
|
-
'@types/react-dom',
|
|
63
|
-
'astro',
|
|
64
|
-
'dotenv',
|
|
65
|
-
'react',
|
|
66
|
-
'react-dom',
|
|
67
|
-
'tailwindcss',
|
|
68
|
-
'typescript'
|
|
69
|
-
];
|
|
70
|
-
export const ASTRO_DEPENDENCIES_DEV = [
|
|
71
|
-
'@types/node',
|
|
72
|
-
'prettier',
|
|
73
|
-
'prettier-plugin-astro'
|
|
74
|
-
];
|
|
75
|
-
export const ANGULAR_DEPENDENCIES = [
|
|
76
|
-
'@angular/animations',
|
|
77
|
-
'@angular/common',
|
|
78
|
-
'@angular/compiler',
|
|
79
|
-
'@angular/core',
|
|
80
|
-
'@angular/forms',
|
|
81
|
-
'@angular/platform-browser',
|
|
82
|
-
'@angular/platform-browser-dynamic',
|
|
83
|
-
'@angular/router',
|
|
84
|
-
'@dotcms/angular',
|
|
85
|
-
'@dotcms/client',
|
|
86
|
-
'@dotcms/types',
|
|
87
|
-
'@dotcms/uve',
|
|
88
|
-
'rxjs',
|
|
89
|
-
'tslib',
|
|
90
|
-
'zone.js'
|
|
91
|
-
];
|
|
92
|
-
export const ANGULAR_DEPENDENCIES_DEV = [
|
|
93
|
-
'@angular/build',
|
|
94
|
-
'@angular/cli',
|
|
95
|
-
'@angular/compiler-cli',
|
|
96
|
-
'@tailwindcss/typography',
|
|
97
|
-
'@types/jasmine',
|
|
98
|
-
'autoprefixer',
|
|
99
|
-
'jasmine-core',
|
|
100
|
-
'karma',
|
|
101
|
-
'karma-chrome-launcher',
|
|
102
|
-
'karma-coverage',
|
|
103
|
-
'karma-jasmine',
|
|
104
|
-
'karma-jasmine-html-reporter',
|
|
105
|
-
'postcss',
|
|
106
|
-
'tailwindcss',
|
|
107
|
-
'typescript'
|
|
108
|
-
];
|
|
109
|
-
export const ANGULAR_SSR_DEPENDENCIES = [
|
|
110
|
-
'@angular/common',
|
|
111
|
-
'@angular/compiler',
|
|
112
|
-
'@angular/core',
|
|
113
|
-
'@angular/forms',
|
|
114
|
-
'@angular/platform-browser',
|
|
115
|
-
'@angular/platform-server',
|
|
116
|
-
'@angular/router',
|
|
117
|
-
'@angular/ssr',
|
|
118
|
-
'@dotcms/angular',
|
|
119
|
-
'@dotcms/client',
|
|
120
|
-
'@dotcms/types',
|
|
121
|
-
'@dotcms/uve',
|
|
122
|
-
'@tailwindcss/postcss',
|
|
123
|
-
'@types/dotenv',
|
|
124
|
-
'dotenv',
|
|
125
|
-
'express',
|
|
126
|
-
'postcss',
|
|
127
|
-
'rxjs',
|
|
128
|
-
'tailwindcss',
|
|
129
|
-
'tslib',
|
|
130
|
-
'zone.js'
|
|
131
|
-
];
|
|
132
|
-
export const ANGULAR_SSR_DEPENDENCIES_DEV = [
|
|
133
|
-
'@angular/build',
|
|
134
|
-
'@angular/cli',
|
|
135
|
-
'@angular/compiler-cli',
|
|
136
|
-
'@tailwindcss/typography',
|
|
137
|
-
'@types/express',
|
|
138
|
-
'@types/jasmine',
|
|
139
|
-
'@types/node',
|
|
140
|
-
'jasmine-core',
|
|
141
|
-
'karma',
|
|
142
|
-
'karma-chrome-launcher',
|
|
143
|
-
'karma-coverage',
|
|
144
|
-
'karma-jasmine',
|
|
145
|
-
'karma-jasmine-html-reporter',
|
|
146
|
-
'typescript'
|
|
147
|
-
];
|
|
148
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/sdk/create-app/src/constants/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,uBAAuB,CAAC;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ,EAAE,OAAO;CACpB,CAAC;AAEF,YAAY;AACZ,qFAAqF;AACrF,yFAAyF;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,WAAW,0BAA0B,CAAC;AAC1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,WAAW,kCAAkC,CAAC;AACjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,WAAW,gCAAgC,CAAC;AACpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,WAAW,eAAe,CAAC;AAE9D,6BAA6B;AAC7B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,CAAC,wDAAwD;AACrG,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC,CAAC,4CAA4C;AAE1F,gBAAgB;AAChB,MAAM,CAAC,MAAM,UAAU,GAAkC;IACrD,QAAQ;IACR,OAA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O;IACP,SAAS;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAa;IAC9C,gBAAgB;IAChB,cAAc;IACd,uBAAuB;IACvB,yBAAyB;IACzB,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,OAAO;IACP,uBAAuB;IACvB,gBAAgB;IAChB,eAAe;IACf,6BAA6B;IAC7B,SAAS;IACT,aAAa;IACb,YAAY;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAa;IAC9C,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,2BAA2B;IAC3B,0BAA0B;IAC1B,iBAAiB;IACjB,cAAc;IACd,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,sBAAsB;IACtB,eAAe;IACf,QAAQ;IACR,SAAS;IACT,SAAS;IACT,MAAM;IACN,aAAa;IACb,OAAO;IACP,SAAS;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAa;IAClD,gBAAgB;IAChB,cAAc;IACd,uBAAuB;IACvB,yBAAyB;IACzB,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;IACb,cAAc;IACd,OAAO;IACP,uBAAuB;IACvB,gBAAgB;IAChB,eAAe;IACf,6BAA6B;IAC7B,YAAY;CACf,CAAC"}
|
package/src/errors/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare class FailedToCreateFrontendProjectError extends Error {
|
|
2
|
-
constructor(framework: string);
|
|
3
|
-
}
|
|
4
|
-
export declare class DockerCliNotInstalledError extends Error {
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
export declare class FailedToDownloadDockerComposeError extends Error {
|
|
8
|
-
constructor();
|
|
9
|
-
}
|
|
10
|
-
export declare class FailedToGetDotcmsTokenError extends Error {
|
|
11
|
-
constructor();
|
|
12
|
-
}
|
|
13
|
-
export declare class FailedToSetUpUVEConfig extends Error {
|
|
14
|
-
constructor();
|
|
15
|
-
}
|
|
16
|
-
export declare class FailedToGetDemoSiteIdentifierError extends Error {
|
|
17
|
-
constructor();
|
|
18
|
-
}
|
package/src/errors/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export class FailedToCreateFrontendProjectError extends Error {
|
|
2
|
-
constructor(framework) {
|
|
3
|
-
super(`Failed to create frontend project for framework: ${framework}. Please check if you have git installed and an active internet connection.`);
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
export class DockerCliNotInstalledError extends Error {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(`Please check if Docker CLI installed in you system!`);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export class FailedToDownloadDockerComposeError extends Error {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(`Failed to download the docker compose file`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export class FailedToGetDotcmsTokenError extends Error {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(`Failed to get dotCMS API token. Please make sure if dotCMS container is running.`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export class FailedToSetUpUVEConfig extends Error {
|
|
22
|
-
constructor() {
|
|
23
|
-
super(`Failed to set up UVE configuration in DotCMS.`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export class FailedToGetDemoSiteIdentifierError extends Error {
|
|
27
|
-
constructor() {
|
|
28
|
-
super(`Failed to get demo site identifier from DotCMS.`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
package/src/errors/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/sdk/create-app/src/errors/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IACzD,YAAY,SAAiB;QACzB,KAAK,CACD,oDAAoD,SAAS,6EAA6E,CAC7I,CAAC;IACN,CAAC;CACJ;AAED,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IACjD;QACI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACjE,CAAC;CACJ;AAED,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IACzD;QACI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IACxD,CAAC;CACJ;AAED,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAClD;QACI,KAAK,CAAC,kFAAkF,CAAC,CAAC;IAC9F,CAAC;CACJ;AAED,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC7C;QACI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAC3D,CAAC;CACJ;AAED,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IACzD;QACI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC7D,CAAC;CACJ"}
|