create-acmekit-app 2.13.24 → 2.13.26
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.13.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- changes
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @acmekit/telemetry@2.13.26
|
|
11
|
+
- @acmekit/deps@2.13.26
|
|
12
|
+
|
|
13
|
+
## 2.13.25
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies []:
|
|
20
|
+
- @acmekit/telemetry@2.13.25
|
|
21
|
+
- @acmekit/deps@2.13.25
|
|
22
|
+
|
|
3
23
|
## 2.13.24
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { track } from "@acmekit/telemetry";
|
|
2
|
+
import boxen from "boxen";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import { emojify } from "node-emoji";
|
|
5
|
+
import { EOL } from "os";
|
|
6
|
+
import { runCloneRepo } from "../clone-repo.js";
|
|
7
|
+
import { isAbortError } from "../create-abort-controller.js";
|
|
8
|
+
import { displayFactBox } from "../facts.js";
|
|
9
|
+
import logMessage from "../log-message.js";
|
|
10
|
+
import prepareProject from "../prepare-project.js";
|
|
11
|
+
import { BaseProjectCreator, } from "./creator.js";
|
|
12
|
+
import terminalLink from "terminal-link";
|
|
13
|
+
// Provider Project Creator
|
|
14
|
+
export class ProviderProjectCreator extends BaseProjectCreator {
|
|
15
|
+
constructor(projectName, options, args) {
|
|
16
|
+
super(projectName, options, args);
|
|
17
|
+
this.setupProcessManager();
|
|
18
|
+
}
|
|
19
|
+
async create() {
|
|
20
|
+
track("CREATE_CLI_CMP");
|
|
21
|
+
logMessage({
|
|
22
|
+
message: `${emojify(":rocket:")} Starting provider setup, this may take a few minutes.`,
|
|
23
|
+
});
|
|
24
|
+
this.spinner.start();
|
|
25
|
+
this.factBoxOptions.interval = displayFactBox({
|
|
26
|
+
...this.factBoxOptions,
|
|
27
|
+
title: "Setting up provider...",
|
|
28
|
+
});
|
|
29
|
+
try {
|
|
30
|
+
await this.cloneAndPrepareProvider();
|
|
31
|
+
this.spinner.succeed(chalk.green("Provider Prepared"));
|
|
32
|
+
this.showSuccessMessage();
|
|
33
|
+
}
|
|
34
|
+
catch (e) {
|
|
35
|
+
this.handleError(e);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async cloneAndPrepareProvider() {
|
|
39
|
+
await runCloneRepo({
|
|
40
|
+
projectName: this.projectPath,
|
|
41
|
+
repoUrl: this.options.repoUrl ?? "",
|
|
42
|
+
abortController: this.abortController,
|
|
43
|
+
spinner: this.spinner,
|
|
44
|
+
verbose: this.options.verbose,
|
|
45
|
+
isProvider: true,
|
|
46
|
+
});
|
|
47
|
+
this.factBoxOptions.interval = displayFactBox({
|
|
48
|
+
...this.factBoxOptions,
|
|
49
|
+
message: "Created provider directory",
|
|
50
|
+
});
|
|
51
|
+
await prepareProject({
|
|
52
|
+
isPlugin: true,
|
|
53
|
+
directory: this.projectPath,
|
|
54
|
+
projectName: this.projectName,
|
|
55
|
+
spinner: this.spinner,
|
|
56
|
+
processManager: this.processManager,
|
|
57
|
+
abortController: this.abortController,
|
|
58
|
+
verbose: this.options.verbose,
|
|
59
|
+
packageManager: this.packageManager,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
handleError(e) {
|
|
63
|
+
if (isAbortError(e)) {
|
|
64
|
+
process.exit();
|
|
65
|
+
}
|
|
66
|
+
this.spinner.stop();
|
|
67
|
+
logMessage({
|
|
68
|
+
message: `An error occurred while preparing provider: ${e}`,
|
|
69
|
+
type: "error",
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
showSuccessMessage() {
|
|
73
|
+
logMessage({
|
|
74
|
+
message: boxen(chalk.green(`Change to the \`${this.projectName}\` directory to explore your AcmeKit provider.${EOL}${EOL}Check out the ${terminalLink("AcmeKit provider documentation", "https://docs.acmekit.com/learn/fundamentals/providers")} to start your development.${EOL}${EOL}Star us on ${terminalLink("GitHub", "https://github.com/acmekit/acmekit/stargazers")} if you like what we're building.`), {
|
|
75
|
+
titleAlignment: "center",
|
|
76
|
+
textAlignment: "center",
|
|
77
|
+
padding: 1,
|
|
78
|
+
margin: 1,
|
|
79
|
+
float: "center",
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
setupProcessManager() {
|
|
84
|
+
this.processManager.onTerminated(async () => {
|
|
85
|
+
this.spinner.stop();
|
|
86
|
+
if (!this.printedMessage && this.isProjectCreated) {
|
|
87
|
+
this.printedMessage = true;
|
|
88
|
+
this.showSuccessMessage();
|
|
89
|
+
}
|
|
90
|
+
return;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-acmekit-app",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.26",
|
|
4
4
|
"description": "Create a AcmeKit project using a single command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"test": "../../../node_modules/.bin/jest --passWithNoTests src"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@acmekit/deps": "2.13.
|
|
18
|
-
"@acmekit/telemetry": "2.13.
|
|
17
|
+
"@acmekit/deps": "2.13.26",
|
|
18
|
+
"@acmekit/telemetry": "2.13.26",
|
|
19
19
|
"boxen": "^5.0.1",
|
|
20
20
|
"chalk": "^4.1.2",
|
|
21
21
|
"commander": "^11.0.0",
|