@pulse-editor/cli 0.1.0-beta.3 → 0.1.0-beta.5
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.
|
@@ -46,9 +46,15 @@ export default function Create({ cli }) {
|
|
|
46
46
|
}, [cli]);
|
|
47
47
|
useEffect(() => {
|
|
48
48
|
if (framework) {
|
|
49
|
-
|
|
49
|
+
const name = cli.flags.name;
|
|
50
|
+
if (name) {
|
|
51
|
+
setProjectName(name);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
setIsShowProjectNameInput(true);
|
|
55
|
+
}
|
|
50
56
|
}
|
|
51
|
-
}, [framework]);
|
|
57
|
+
}, [framework, cli]);
|
|
52
58
|
useEffect(() => {
|
|
53
59
|
if (projectName) {
|
|
54
60
|
// Check if the project already exists
|
|
@@ -60,9 +66,15 @@ export default function Create({ cli }) {
|
|
|
60
66
|
}, 0);
|
|
61
67
|
return;
|
|
62
68
|
}
|
|
63
|
-
|
|
69
|
+
const visibility = cli.flags.visibility;
|
|
70
|
+
if (visibility) {
|
|
71
|
+
setVisibility(visibility);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
setIsShowVisibilitySelect(true);
|
|
75
|
+
}
|
|
64
76
|
}
|
|
65
|
-
}, [projectName]);
|
|
77
|
+
}, [projectName, cli]);
|
|
66
78
|
useEffect(() => {
|
|
67
79
|
if (visibility && projectName) {
|
|
68
80
|
createFromTemplate(projectName, visibility);
|
|
@@ -62,10 +62,9 @@ export default function Publish({ cli }) {
|
|
|
62
62
|
}
|
|
63
63
|
async function publishExtension() {
|
|
64
64
|
setIsPublishing(true);
|
|
65
|
-
// Read
|
|
66
|
-
const
|
|
67
|
-
const visibility =
|
|
68
|
-
.visibility;
|
|
65
|
+
// Read pulse.config.json for visibility
|
|
66
|
+
const config = JSON.parse(fs.readFileSync('./dist/client/pulse.config.json', 'utf-8'));
|
|
67
|
+
const visibility = config.visibility;
|
|
69
68
|
// Upload the zip file to the server
|
|
70
69
|
try {
|
|
71
70
|
const formData = new FormData();
|
package/dist/lib/cli-flags.d.ts
CHANGED
package/dist/lib/cli-flags.js
CHANGED
package/dist/lib/manual.js
CHANGED
|
@@ -33,6 +33,11 @@ const create = `\
|
|
|
33
33
|
The framework to use for the new app.
|
|
34
34
|
Currently available options: react.
|
|
35
35
|
Future options: vue, angular, etc.
|
|
36
|
+
--name, -n [project-name]
|
|
37
|
+
The name of the new project.
|
|
38
|
+
--visibility, -v [visibility]
|
|
39
|
+
The visibility of the new project. Options are private,
|
|
40
|
+
public, and unlisted.
|
|
36
41
|
`;
|
|
37
42
|
export const commandsManual = {
|
|
38
43
|
help,
|
package/package.json
CHANGED