sitevision-cli 0.3.1-beta.1 → 0.4.0-beta.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/app.d.ts +1 -2
- package/dist/app.js +19 -14
- package/dist/cli.js +76 -24
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.js +8 -32
- package/dist/commands/deploy.js +19 -20
- package/dist/commands/dev.js +12 -32
- package/dist/commands/index.js +1 -1
- package/dist/commands/info.js +3 -53
- package/dist/commands/setup-signing.js +2 -2
- package/dist/commands/sign.d.ts +1 -1
- package/dist/commands/sign.js +14 -20
- package/dist/components/DevPropertiesForm.d.ts +1 -2
- package/dist/components/DevPropertiesForm.js +15 -30
- package/dist/components/InfoScreen.d.ts +1 -2
- package/dist/components/InfoScreen.js +2 -50
- package/dist/components/MainMenu.d.ts +1 -2
- package/dist/components/MainMenu.js +5 -70
- package/dist/components/PasswordInput.d.ts +1 -2
- package/dist/components/PasswordInput.js +7 -19
- package/dist/components/ProcessOutput.d.ts +1 -2
- package/dist/components/ProcessOutput.js +3 -5
- package/dist/components/SetupFlow.d.ts +1 -2
- package/dist/components/SetupFlow.js +12 -87
- package/dist/components/SigningPropertiesForm.d.ts +1 -2
- package/dist/components/SigningPropertiesForm.js +7 -18
- package/dist/components/StatusIndicator.d.ts +1 -2
- package/dist/components/StatusIndicator.js +6 -12
- package/dist/components/TextInput.d.ts +1 -2
- package/dist/components/TextInput.js +5 -13
- package/dist/components/WelcomeScreen.d.ts +14 -0
- package/dist/components/WelcomeScreen.js +53 -0
- package/dist/utils/branding.d.ts +12 -0
- package/dist/utils/branding.js +29 -0
- package/dist/utils/config.d.ts +17 -0
- package/dist/utils/config.js +57 -0
- package/dist/utils/password-prompt.js +2 -2
- package/dist/utils/process-runner.d.ts +6 -6
- package/dist/utils/process-runner.js +12 -42
- package/dist/utils/project-detection.d.ts +1 -1
- package/dist/utils/project-detection.js +7 -3
- package/dist/utils/sitevision-api.js +1 -1
- package/dist/utils/version-check.js +3 -3
- package/dist/utils/webpack-runner.d.ts +2 -2
- package/dist/utils/webpack-runner.js +15 -42
- package/dist/utils/zip.js +5 -7
- package/package.json +23 -30
- package/readme.md +11 -7
package/dist/commands/sign.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { render, Box, Text, useInput } from 'ink';
|
|
3
4
|
import { StatusIndicator } from '../components/StatusIndicator.js';
|
|
4
5
|
import { signApp } from '../utils/sitevision-api.js';
|
|
5
6
|
import { promptPassword, promptYesNo } from '../utils/password-prompt.js';
|
|
6
7
|
import { getSigningPassword, setSigningPassword } from '../utils/keychain.js';
|
|
7
|
-
import { getZipPath, getSignedZipPath
|
|
8
|
+
import { getZipPath, getSignedZipPath } from '../utils/project-detection.js';
|
|
8
9
|
import { formatFileSize, getZipSize, zipExists } from '../utils/zip.js';
|
|
9
|
-
export function SignScreen({ projectRoot, manifest, devProperties, password, onBack, onRetryCredentials }) {
|
|
10
|
+
export function SignScreen({ projectRoot, manifest, devProperties, password, onBack, onRetryCredentials, }) {
|
|
10
11
|
const [state, setState] = React.useState({
|
|
11
12
|
status: 'signing',
|
|
12
13
|
message: 'Signing app via developer.sitevision.se...',
|
|
@@ -64,21 +65,11 @@ export function SignScreen({ projectRoot, manifest, devProperties, password, onB
|
|
|
64
65
|
}
|
|
65
66
|
runSign();
|
|
66
67
|
}, [projectRoot, manifest, devProperties, password]);
|
|
67
|
-
return (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"Created: ",
|
|
73
|
-
state.signedPath),
|
|
74
|
-
state.signedSize !== undefined && (React.createElement(Text, { dimColor: true },
|
|
75
|
-
"Size: ",
|
|
76
|
-
formatFileSize(state.signedSize))))),
|
|
77
|
-
state.status === 'error' && state.error && (React.createElement(Box, { flexDirection: "column", marginTop: 1 },
|
|
78
|
-
React.createElement(Text, { color: "red" }, state.error))),
|
|
79
|
-
state.status !== 'signing' && (React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
80
|
-
state.status === 'error' && onRetryCredentials && (React.createElement(Text, { dimColor: true }, "Press r to retry with new credentials")),
|
|
81
|
-
onBack && (React.createElement(Text, { dimColor: true }, "Press q or Esc to return to menu"))))));
|
|
68
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(StatusIndicator, { status: state.status === 'signing' ? 'running' : state.status, label: state.status === 'signing'
|
|
69
|
+
? 'Signing'
|
|
70
|
+
: state.status === 'success'
|
|
71
|
+
? 'Signed'
|
|
72
|
+
: 'Failed', message: state.message }) }), state.status === 'success' && state.signedPath && (_jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Text, { color: "green", children: ["Created: ", state.signedPath] }), state.signedSize !== undefined && (_jsxs(Text, { dimColor: true, children: ["Size: ", formatFileSize(state.signedSize)] }))] })), state.status === 'error' && state.error && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(Text, { color: "red", children: state.error }) })), state.status !== 'signing' && (_jsxs(Box, { marginTop: 1, flexDirection: "column", children: [state.status === 'error' && onRetryCredentials && (_jsx(Text, { dimColor: true, children: "Press r to retry with new credentials" })), onBack && _jsx(Text, { dimColor: true, children: "Press q or Esc to return to menu" })] }))] }));
|
|
82
73
|
}
|
|
83
74
|
export const signCommand = {
|
|
84
75
|
name: 'sign',
|
|
@@ -86,14 +77,17 @@ export const signCommand = {
|
|
|
86
77
|
requiresProject: true,
|
|
87
78
|
async execute({ project }) {
|
|
88
79
|
// Check if signing credentials are configured
|
|
89
|
-
if (!project.hasSigningProperties ||
|
|
80
|
+
if (!project.hasSigningProperties ||
|
|
81
|
+
!project.devProperties?.signingUsername) {
|
|
90
82
|
console.log('\n\x1b[33mSigning credentials not configured.\x1b[0m');
|
|
91
83
|
console.log('Run \x1b[36msetup-signing\x1b[0m to configure credentials.\n');
|
|
92
84
|
return;
|
|
93
85
|
}
|
|
94
86
|
const signingUsername = project.devProperties.signingUsername;
|
|
95
87
|
// Try keychain first, then env var, then prompt
|
|
96
|
-
let password = getSigningPassword(signingUsername) ||
|
|
88
|
+
let password = getSigningPassword(signingUsername) ||
|
|
89
|
+
process.env['SITEVISION_SIGNING_PASSWORD'] ||
|
|
90
|
+
'';
|
|
97
91
|
let promptedManually = false;
|
|
98
92
|
if (!password) {
|
|
99
93
|
console.log('');
|
|
@@ -110,7 +104,7 @@ export const signCommand = {
|
|
|
110
104
|
setSigningPassword(signingUsername, password);
|
|
111
105
|
}
|
|
112
106
|
}
|
|
113
|
-
const { waitUntilExit } = render(
|
|
107
|
+
const { waitUntilExit } = render(_jsx(SignScreen, { projectRoot: project.root, manifest: project.manifest, devProperties: project.devProperties, password: password }));
|
|
114
108
|
await waitUntilExit();
|
|
115
109
|
},
|
|
116
110
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DevProperties, PackageJson } from '../types/index.js';
|
|
3
2
|
interface Props {
|
|
4
3
|
projectRoot: string;
|
|
@@ -7,5 +6,5 @@ interface Props {
|
|
|
7
6
|
onComplete: () => void;
|
|
8
7
|
onCancel: () => void;
|
|
9
8
|
}
|
|
10
|
-
export declare function DevPropertiesForm({ projectRoot, initialProperties, packageJson, onComplete, onCancel }: Props):
|
|
9
|
+
export declare function DevPropertiesForm({ projectRoot, initialProperties, packageJson, onComplete, onCancel, }: Props): import("react").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Box, Text, useInput } from 'ink';
|
|
3
4
|
import { TextInput } from './TextInput.js';
|
|
4
5
|
import { writeDevProperties } from '../utils/project-detection.js';
|
|
@@ -11,7 +12,7 @@ const STEPS = [
|
|
|
11
12
|
{ id: 'password', label: 'Password' },
|
|
12
13
|
{ id: 'useHTTP', label: 'Use HTTP' },
|
|
13
14
|
];
|
|
14
|
-
export function DevPropertiesForm({ projectRoot, initialProperties, packageJson, onComplete, onCancel }) {
|
|
15
|
+
export function DevPropertiesForm({ projectRoot, initialProperties, packageJson, onComplete, onCancel, }) {
|
|
15
16
|
const [stepIndex, setStepIndex] = useState(0);
|
|
16
17
|
const [properties, setProperties] = useState(() => {
|
|
17
18
|
const defaults = {
|
|
@@ -45,37 +46,25 @@ export function DevPropertiesForm({ projectRoot, initialProperties, packageJson,
|
|
|
45
46
|
const renderInput = () => {
|
|
46
47
|
switch (currentStep?.id) {
|
|
47
48
|
case 'domain':
|
|
48
|
-
return (
|
|
49
|
+
return (_jsx(TextInput, { label: "Development Domain (e.g. www.sitevision.se)", defaultValue: properties.domain, placeholder: "sitevision.se", onSubmit: (value) => handleNext('domain', value), onCancel: onCancel }, "domain"));
|
|
49
50
|
case 'siteName':
|
|
50
|
-
return (
|
|
51
|
+
return (_jsx(TextInput, { label: "Site Name (Root node name)", defaultValue: properties.siteName, onSubmit: (value) => handleNext('siteName', value), onCancel: onCancel }, "siteName"));
|
|
51
52
|
case 'addonName':
|
|
52
|
-
return (
|
|
53
|
+
return (_jsx(TextInput, { label: "Addon Name", defaultValue: properties.addonName, onSubmit: (value) => handleNext('addonName', value), onCancel: onCancel }, "addonName"));
|
|
53
54
|
case 'username':
|
|
54
|
-
return (
|
|
55
|
+
return (_jsx(TextInput, { label: "Username (usually your Sitevision Cloud email)", defaultValue: properties.username, onSubmit: (value) => handleNext('username', value), onCancel: onCancel }, "username"));
|
|
55
56
|
case 'password':
|
|
56
|
-
return (
|
|
57
|
+
return (_jsx(TextInput, { label: "Password (saved in OS keychain \u2014 leave empty to prompt on each run)", type: "password", defaultValue: properties.password, onSubmit: (value) => handleNext('password', value), onCancel: onCancel }, "password"));
|
|
57
58
|
case 'useHTTP':
|
|
58
|
-
return (
|
|
59
|
+
return (_jsx(BooleanInput, { label: "Use HTTP for deployment? (y/n)", defaultValue: properties.useHTTPForDevDeploy, onSubmit: (value) => handleNext('useHTTPForDevDeploy', value) }, "useHTTP"));
|
|
59
60
|
default:
|
|
60
61
|
return null;
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
|
-
return (
|
|
64
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
65
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Setup Development Properties"),
|
|
66
|
-
React.createElement(Text, null,
|
|
67
|
-
" Step ",
|
|
68
|
-
stepIndex + 1,
|
|
69
|
-
" of ",
|
|
70
|
-
STEPS.length,
|
|
71
|
-
": ",
|
|
72
|
-
currentStep?.label)),
|
|
73
|
-
React.createElement(Box, { marginBottom: 1 }, STEPS.map((s, i) => (React.createElement(Box, { key: s.id, marginRight: 1 },
|
|
74
|
-
React.createElement(Text, { color: i === stepIndex ? 'green' : i < stepIndex ? 'green' : 'gray' }, i < stepIndex ? '✓' : i === stepIndex ? '●' : '○'))))),
|
|
75
|
-
React.createElement(Box, { borderStyle: "single", borderColor: "gray", padding: 1 }, renderInput())));
|
|
64
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "Setup Development Properties" }), _jsxs(Text, { children: [' ', "Step ", stepIndex + 1, " of ", STEPS.length, ": ", currentStep?.label] })] }), _jsx(Box, { marginBottom: 1, children: STEPS.map((s, i) => (_jsx(Box, { marginRight: 1, children: _jsx(Text, { color: i === stepIndex ? 'green' : i < stepIndex ? 'green' : 'gray', children: i < stepIndex ? '✓' : i === stepIndex ? '●' : '○' }) }, s.id))) }), _jsx(Box, { borderStyle: "single", borderColor: "gray", padding: 1, children: renderInput() })] }));
|
|
76
65
|
}
|
|
77
|
-
function BooleanInput({ label, defaultValue, onSubmit }) {
|
|
78
|
-
useInput(
|
|
66
|
+
function BooleanInput({ label, defaultValue, onSubmit, }) {
|
|
67
|
+
useInput(input => {
|
|
79
68
|
if (input === 'y' || input === 'Y') {
|
|
80
69
|
onSubmit(true);
|
|
81
70
|
}
|
|
@@ -86,11 +75,7 @@ function BooleanInput({ label, defaultValue, onSubmit }) {
|
|
|
86
75
|
onSubmit(defaultValue);
|
|
87
76
|
}
|
|
88
77
|
});
|
|
89
|
-
return (
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
React.createElement(Box, null,
|
|
93
|
-
React.createElement(Text, { dimColor: true },
|
|
94
|
-
"Press Y for Yes, N for No",
|
|
95
|
-
defaultValue !== undefined ? ` (Default: ${defaultValue ? 'Yes' : 'No'})` : ''))));
|
|
78
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: label }) }), _jsx(Box, { children: _jsxs(Text, { dimColor: true, children: ["Press Y for Yes, N for No", defaultValue !== undefined
|
|
79
|
+
? ` (Default: ${defaultValue ? 'Yes' : 'No'})`
|
|
80
|
+
: ''] }) })] }));
|
|
96
81
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type ProjectInfo } from '../utils/project-detection.js';
|
|
3
2
|
interface Props {
|
|
4
3
|
project: ProjectInfo;
|
|
5
4
|
onBack: () => void;
|
|
6
5
|
}
|
|
7
|
-
export declare function InfoScreen({ project, onBack }: Props):
|
|
6
|
+
export declare function InfoScreen({ project, onBack }: Props): import("react").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Text, useInput } from 'ink';
|
|
3
3
|
import { getAppType } from '../utils/project-detection.js';
|
|
4
4
|
export function InfoScreen({ project, onBack }) {
|
|
@@ -8,53 +8,5 @@ export function InfoScreen({ project, onBack }) {
|
|
|
8
8
|
onBack();
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
return (
|
|
12
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
13
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Sitevision Project Information")),
|
|
14
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 2 },
|
|
15
|
-
React.createElement(Box, null,
|
|
16
|
-
React.createElement(Text, { bold: true }, "Name: "),
|
|
17
|
-
React.createElement(Text, null, project.manifest.name)),
|
|
18
|
-
React.createElement(Box, null,
|
|
19
|
-
React.createElement(Text, { bold: true }, "ID: "),
|
|
20
|
-
React.createElement(Text, null, project.manifest.id)),
|
|
21
|
-
React.createElement(Box, null,
|
|
22
|
-
React.createElement(Text, { bold: true }, "Version: "),
|
|
23
|
-
React.createElement(Text, null, project.manifest.version)),
|
|
24
|
-
React.createElement(Box, null,
|
|
25
|
-
React.createElement(Text, { bold: true }, "Type: "),
|
|
26
|
-
React.createElement(Text, { color: "green" }, project.manifest.type),
|
|
27
|
-
React.createElement(Text, { dimColor: true },
|
|
28
|
-
" (",
|
|
29
|
-
appType,
|
|
30
|
-
")")),
|
|
31
|
-
React.createElement(Box, null,
|
|
32
|
-
React.createElement(Text, { bold: true }, "Bundled: "),
|
|
33
|
-
React.createElement(Text, null, project.manifest.bundled ? 'Yes' : 'No'))),
|
|
34
|
-
project.hasDevProperties && project.devProperties && (React.createElement(React.Fragment, null,
|
|
35
|
-
React.createElement(Box, { marginTop: 1, marginBottom: 1 },
|
|
36
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Development Configuration")),
|
|
37
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 2 },
|
|
38
|
-
React.createElement(Box, null,
|
|
39
|
-
React.createElement(Text, { bold: true }, "Domain: "),
|
|
40
|
-
React.createElement(Text, null, project.devProperties.domain)),
|
|
41
|
-
React.createElement(Box, null,
|
|
42
|
-
React.createElement(Text, { bold: true }, "Site: "),
|
|
43
|
-
React.createElement(Text, null, project.devProperties.siteName)),
|
|
44
|
-
React.createElement(Box, null,
|
|
45
|
-
React.createElement(Text, { bold: true }, "Addon: "),
|
|
46
|
-
React.createElement(Text, null, project.devProperties.addonName)),
|
|
47
|
-
React.createElement(Box, null,
|
|
48
|
-
React.createElement(Text, { bold: true }, "Username: "),
|
|
49
|
-
React.createElement(Text, null, project.devProperties.username)),
|
|
50
|
-
React.createElement(Box, null,
|
|
51
|
-
React.createElement(Text, { bold: true }, "Use HTTP: "),
|
|
52
|
-
React.createElement(Text, null, project.devProperties.useHTTPForDevDeploy ? 'Yes' : 'No'))))),
|
|
53
|
-
!project.hasDevProperties && (React.createElement(Box, { marginTop: 1 },
|
|
54
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 No dev properties found. Run setup-dev-properties to configure."))),
|
|
55
|
-
React.createElement(Box, { marginTop: 1 },
|
|
56
|
-
React.createElement(Text, { bold: true }, "Project Root: "),
|
|
57
|
-
React.createElement(Text, { dimColor: true }, project.root)),
|
|
58
|
-
React.createElement(Box, { marginTop: 2 },
|
|
59
|
-
React.createElement(Text, { dimColor: true }, "Press Enter or ESC to return to menu"))));
|
|
11
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Sitevision Project Information" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Name: " }), _jsx(Text, { children: project.manifest.name })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "ID: " }), _jsx(Text, { children: project.manifest.id })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Version: " }), _jsx(Text, { children: project.manifest.version })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Type: " }), _jsx(Text, { color: "green", children: project.manifest.type }), _jsxs(Text, { dimColor: true, children: [" (", appType, ")"] })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Bundled: " }), _jsx(Text, { children: project.manifest.bundled ? 'Yes' : 'No' })] })] }), project.hasDevProperties && project.devProperties && (_jsxs(_Fragment, { children: [_jsx(Box, { marginTop: 1, marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Development Configuration" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Domain: " }), _jsx(Text, { children: project.devProperties.domain })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Site: " }), _jsx(Text, { children: project.devProperties.siteName })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Addon: " }), _jsx(Text, { children: project.devProperties.addonName })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Username: " }), _jsx(Text, { children: project.devProperties.username })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Use HTTP: " }), _jsx(Text, { children: project.devProperties.useHTTPForDevDeploy ? 'Yes' : 'No' })] })] })] })), !project.hasDevProperties && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellow", children: "\u26A0 No dev properties found. Run setup-dev-properties to configure." }) })), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { bold: true, children: "Project Root: " }), _jsx(Text, { dimColor: true, children: project.root })] }), _jsx(Box, { marginTop: 2, children: _jsx(Text, { dimColor: true, children: "Press Enter or ESC to return to menu" }) })] }));
|
|
60
12
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type ProjectInfo } from '../utils/project-detection.js';
|
|
3
2
|
interface Props {
|
|
4
3
|
project: ProjectInfo;
|
|
5
4
|
onSelect: (command: string) => void;
|
|
6
5
|
}
|
|
7
|
-
export declare function MainMenu({ project, onSelect }: Props):
|
|
6
|
+
export declare function MainMenu({ project, onSelect }: Props): import("react").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Box, Text, useInput } from 'ink';
|
|
3
4
|
import { getAppType } from '../utils/project-detection.js';
|
|
4
5
|
export function MainMenu({ project, onSelect }) {
|
|
@@ -53,10 +54,10 @@ export function MainMenu({ project, onSelect }) {
|
|
|
53
54
|
];
|
|
54
55
|
useInput((input, key) => {
|
|
55
56
|
if (key.upArrow) {
|
|
56
|
-
setSelectedIndex(
|
|
57
|
+
setSelectedIndex(prev => (prev > 0 ? prev - 1 : items.length - 1));
|
|
57
58
|
}
|
|
58
59
|
if (key.downArrow) {
|
|
59
|
-
setSelectedIndex(
|
|
60
|
+
setSelectedIndex(prev => (prev < items.length - 1 ? prev + 1 : 0));
|
|
60
61
|
}
|
|
61
62
|
if (key.return || input === '\r' || input === '\n') {
|
|
62
63
|
const selectedItem = items[selectedIndex];
|
|
@@ -68,71 +69,5 @@ export function MainMenu({ project, onSelect }) {
|
|
|
68
69
|
onSelect(selectedItem.value);
|
|
69
70
|
}
|
|
70
71
|
});
|
|
71
|
-
return (
|
|
72
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
73
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Sitevision Project Information")),
|
|
74
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1 },
|
|
75
|
-
React.createElement(Box, null,
|
|
76
|
-
React.createElement(Text, { bold: true }, "Name: "),
|
|
77
|
-
React.createElement(Text, null, project.manifest.name)),
|
|
78
|
-
React.createElement(Box, null,
|
|
79
|
-
React.createElement(Text, { bold: true }, "ID: "),
|
|
80
|
-
React.createElement(Text, null, project.manifest.id)),
|
|
81
|
-
React.createElement(Box, null,
|
|
82
|
-
React.createElement(Text, { bold: true }, "Version: "),
|
|
83
|
-
React.createElement(Text, null, project.manifest.version)),
|
|
84
|
-
React.createElement(Box, null,
|
|
85
|
-
React.createElement(Text, { bold: true }, "Type: "),
|
|
86
|
-
React.createElement(Text, { color: "green" }, project.manifest.type),
|
|
87
|
-
React.createElement(Text, { dimColor: true },
|
|
88
|
-
" (",
|
|
89
|
-
appType,
|
|
90
|
-
")")),
|
|
91
|
-
React.createElement(Box, null,
|
|
92
|
-
React.createElement(Text, { bold: true }, "Bundled: "),
|
|
93
|
-
React.createElement(Text, null, project.manifest.bundled ? 'Yes' : 'No'))),
|
|
94
|
-
project.hasDevProperties && project.devProperties && (React.createElement(React.Fragment, null,
|
|
95
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
96
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Development Configuration")),
|
|
97
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1 },
|
|
98
|
-
React.createElement(Box, null,
|
|
99
|
-
React.createElement(Text, { bold: true }, "Domain: "),
|
|
100
|
-
React.createElement(Text, null, project.devProperties.domain)),
|
|
101
|
-
React.createElement(Box, null,
|
|
102
|
-
React.createElement(Text, { bold: true }, "Site: "),
|
|
103
|
-
React.createElement(Text, null, project.devProperties.siteName)),
|
|
104
|
-
React.createElement(Box, null,
|
|
105
|
-
React.createElement(Text, { bold: true }, "Addon: "),
|
|
106
|
-
React.createElement(Text, null, project.devProperties.addonName)),
|
|
107
|
-
React.createElement(Box, null,
|
|
108
|
-
React.createElement(Text, { bold: true }, "Username: "),
|
|
109
|
-
React.createElement(Text, null, project.devProperties.username)),
|
|
110
|
-
React.createElement(Box, null,
|
|
111
|
-
React.createElement(Text, { bold: true }, "Use HTTP: "),
|
|
112
|
-
React.createElement(Text, null, project.devProperties.useHTTPForDevDeploy ? 'Yes' : 'No'))))),
|
|
113
|
-
project.hasSigningProperties && project.devProperties && (React.createElement(React.Fragment, null,
|
|
114
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
115
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Signing Configuration")),
|
|
116
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1 },
|
|
117
|
-
React.createElement(Box, null,
|
|
118
|
-
React.createElement(Text, { bold: true }, "Signing User: "),
|
|
119
|
-
React.createElement(Text, null, project.devProperties.signingUsername)),
|
|
120
|
-
project.devProperties.certificateName && (React.createElement(Box, null,
|
|
121
|
-
React.createElement(Text, { bold: true }, "Certificate: "),
|
|
122
|
-
React.createElement(Text, null, project.devProperties.certificateName)))))),
|
|
123
|
-
!project.hasDevProperties && (React.createElement(Box, { marginBottom: 1, paddingX: 1, borderStyle: "round", borderColor: "yellow" },
|
|
124
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 No dev properties found. Some commands may not work."))),
|
|
125
|
-
project.hasDevProperties && !project.hasSigningProperties && (React.createElement(Box, { marginBottom: 1, paddingX: 1, borderStyle: "round", borderColor: "yellow" },
|
|
126
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 No signing credentials configured. Run svc setup-signing to configure."))),
|
|
127
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
128
|
-
React.createElement(Text, { dimColor: true }, "Select a command:")),
|
|
129
|
-
React.createElement(Box, { flexDirection: "column" }, items.map((item, index) => (React.createElement(Box, { key: item.value, marginLeft: 1 },
|
|
130
|
-
React.createElement(Text, { color: index === selectedIndex ? 'cyan' : undefined, bold: index === selectedIndex },
|
|
131
|
-
index === selectedIndex ? '▶ ' : ' ',
|
|
132
|
-
item.label,
|
|
133
|
-
item.description && (React.createElement(Text, { dimColor: true },
|
|
134
|
-
" - ",
|
|
135
|
-
item.description))))))),
|
|
136
|
-
React.createElement(Box, { marginTop: 1 },
|
|
137
|
-
React.createElement(Text, { dimColor: true }, "Use \u2191\u2193 arrows to navigate, Enter to select"))));
|
|
72
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Sitevision Project Information" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Name: " }), _jsx(Text, { children: project.manifest.name })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "ID: " }), _jsx(Text, { children: project.manifest.id })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Version: " }), _jsx(Text, { children: project.manifest.version })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Type: " }), _jsx(Text, { color: "green", children: project.manifest.type }), _jsxs(Text, { dimColor: true, children: [" (", appType, ")"] })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Bundled: " }), _jsx(Text, { children: project.manifest.bundled ? 'Yes' : 'No' })] })] }), project.hasDevProperties && project.devProperties && (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Development Configuration" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Domain: " }), _jsx(Text, { children: project.devProperties.domain })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Site: " }), _jsx(Text, { children: project.devProperties.siteName })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Addon: " }), _jsx(Text, { children: project.devProperties.addonName })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Username: " }), _jsx(Text, { children: project.devProperties.username })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Use HTTP: " }), _jsx(Text, { children: project.devProperties.useHTTPForDevDeploy ? 'Yes' : 'No' })] })] })] })), project.hasSigningProperties && project.devProperties && (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Signing Configuration" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, marginBottom: 1, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Signing User: " }), _jsx(Text, { children: project.devProperties.signingUsername })] }), project.devProperties.certificateName && (_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Certificate: " }), _jsx(Text, { children: project.devProperties.certificateName })] }))] })] })), !project.hasDevProperties && (_jsx(Box, { marginBottom: 1, paddingX: 1, borderStyle: "round", borderColor: "yellow", children: _jsx(Text, { color: "yellow", children: "\u26A0 No dev properties found. Some commands may not work." }) })), project.hasDevProperties && !project.hasSigningProperties && (_jsx(Box, { marginBottom: 1, paddingX: 1, borderStyle: "round", borderColor: "yellow", children: _jsx(Text, { color: "yellow", children: "\u26A0 No signing credentials configured. Run svc setup-signing to configure." }) })), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { dimColor: true, children: "Select a command:" }) }), _jsx(Box, { flexDirection: "column", children: items.map((item, index) => (_jsx(Box, { marginLeft: 1, children: _jsxs(Text, { color: index === selectedIndex ? 'cyan' : undefined, bold: index === selectedIndex, children: [index === selectedIndex ? '▶ ' : ' ', item.label, item.description && _jsxs(Text, { dimColor: true, children: [" - ", item.description] })] }) }, item.value))) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Use \u2191\u2193 arrows to navigate, Enter to select" }) })] }));
|
|
138
73
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface Props {
|
|
3
2
|
label?: string;
|
|
4
3
|
showRememberOption?: boolean;
|
|
5
4
|
onSubmit: (password: string, remember: boolean) => void;
|
|
6
5
|
onCancel: () => void;
|
|
7
6
|
}
|
|
8
|
-
export declare function PasswordInput({ label, showRememberOption, onSubmit, onCancel }: Props):
|
|
7
|
+
export declare function PasswordInput({ label, showRememberOption, onSubmit, onCancel, }: Props): import("react").JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Box, Text, useInput } from 'ink';
|
|
3
|
-
export function PasswordInput({ label = 'Enter Signing Password', showRememberOption = false, onSubmit, onCancel }) {
|
|
4
|
+
export function PasswordInput({ label = 'Enter Signing Password', showRememberOption = false, onSubmit, onCancel, }) {
|
|
4
5
|
const [password, setPassword] = useState('');
|
|
5
6
|
const [remember, setRemember] = useState(false);
|
|
6
7
|
useInput((input, key) => {
|
|
@@ -13,30 +14,17 @@ export function PasswordInput({ label = 'Enter Signing Password', showRememberOp
|
|
|
13
14
|
return;
|
|
14
15
|
}
|
|
15
16
|
if (key.tab && showRememberOption) {
|
|
16
|
-
setRemember(
|
|
17
|
+
setRemember(prev => !prev);
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
20
|
if (key.delete || key.backspace) {
|
|
20
|
-
setPassword(
|
|
21
|
+
setPassword(prev => prev.slice(0, -1));
|
|
21
22
|
return;
|
|
22
23
|
}
|
|
23
24
|
// Handle regular characters (including paste)
|
|
24
25
|
if (!key.ctrl && !key.meta) {
|
|
25
|
-
setPassword(
|
|
26
|
+
setPassword(prev => prev + input);
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
|
-
return (
|
|
29
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
30
|
-
React.createElement(Text, { bold: true, color: "cyan" }, label)),
|
|
31
|
-
React.createElement(Box, { borderStyle: "round", borderColor: "cyan", paddingX: 1 },
|
|
32
|
-
React.createElement(Text, null, '*'.repeat(password.length))),
|
|
33
|
-
showRememberOption && (React.createElement(Box, { marginTop: 1 },
|
|
34
|
-
React.createElement(Text, { dimColor: true }, "Save to OS keychain: "),
|
|
35
|
-
React.createElement(Text, { color: remember ? 'green' : 'gray' },
|
|
36
|
-
"[",
|
|
37
|
-
remember ? 'x' : ' ',
|
|
38
|
-
"]"),
|
|
39
|
-
React.createElement(Text, { dimColor: true }, " (Tab to toggle)"))),
|
|
40
|
-
React.createElement(Box, { marginTop: 1 },
|
|
41
|
-
React.createElement(Text, { dimColor: true }, "Press Enter to submit, Esc to cancel"))));
|
|
29
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: label }) }), _jsx(Box, { borderStyle: "round", borderColor: "cyan", paddingX: 1, children: _jsx(Text, { children: '*'.repeat(password.length) }) }), showRememberOption && (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Save to OS keychain: " }), _jsxs(Text, { color: remember ? 'green' : 'gray', children: ["[", remember ? 'x' : ' ', "]"] }), _jsx(Text, { dimColor: true, children: " (Tab to toggle)" })] })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Press Enter to submit, Esc to cancel" }) })] }));
|
|
42
30
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ProcessRunner } from '../utils/process-runner.js';
|
|
3
2
|
interface Props {
|
|
4
3
|
runner: ProcessRunner;
|
|
5
4
|
}
|
|
6
|
-
export declare function ProcessOutputComponent({ runner }: Props):
|
|
5
|
+
export declare function ProcessOutputComponent({ runner }: Props): import("react").JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
2
3
|
import { Box, Text } from 'ink';
|
|
3
4
|
export function ProcessOutputComponent({ runner }) {
|
|
4
5
|
const [outputs, setOutputs] = useState([]);
|
|
@@ -25,8 +26,5 @@ export function ProcessOutputComponent({ runner }) {
|
|
|
25
26
|
runner.off('exit', handleExit);
|
|
26
27
|
};
|
|
27
28
|
}, [runner]);
|
|
28
|
-
return (
|
|
29
|
-
outputs.map((output, index) => (React.createElement(Text, { key: index, color: output.type === 'stderr' ? 'red' : undefined, dimColor: output.type === 'stderr' }, output.data))),
|
|
30
|
-
!isRunning && exitCode !== null && (React.createElement(Box, { marginTop: 1 },
|
|
31
|
-
React.createElement(Text, { color: exitCode === 0 ? 'green' : 'red' }, exitCode === 0 ? '✓ Success' : `✗ Failed with code ${exitCode}`)))));
|
|
29
|
+
return (_jsxs(Box, { flexDirection: "column", children: [outputs.map((output, index) => (_jsx(Text, { color: output.type === 'stderr' ? 'red' : undefined, dimColor: output.type === 'stderr', children: output.data }, index))), !isRunning && exitCode !== null && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: exitCode === 0 ? 'green' : 'red', children: exitCode === 0 ? '✓ Success' : `✗ Failed with code ${exitCode}` }) }))] }));
|
|
32
30
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type ProjectInfo } from '../utils/project-detection.js';
|
|
3
2
|
interface Props {
|
|
4
3
|
project: ProjectInfo;
|
|
5
4
|
onComplete: () => void;
|
|
6
5
|
}
|
|
7
|
-
export declare function SetupFlow({ project, onComplete }: Props):
|
|
6
|
+
export declare function SetupFlow({ project, onComplete }: Props): import("react").JSX.Element | null;
|
|
8
7
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
2
3
|
import { Box, Text, useInput } from 'ink';
|
|
3
|
-
import { getAppType, migrateLegacyPassword } from '../utils/project-detection.js';
|
|
4
|
+
import { getAppType, migrateLegacyPassword, } from '../utils/project-detection.js';
|
|
4
5
|
import { ProcessRunner } from '../utils/process-runner.js';
|
|
5
6
|
import { ProcessOutputComponent } from './ProcessOutput.js';
|
|
6
7
|
import { StatusIndicator } from './StatusIndicator.js';
|
|
@@ -47,7 +48,7 @@ export function SetupFlow({ project, onComplete }) {
|
|
|
47
48
|
onComplete();
|
|
48
49
|
}
|
|
49
50
|
}, [step, project, onComplete]); // Removed specific props from dependency array to allow re-check after updates
|
|
50
|
-
useInput(
|
|
51
|
+
useInput(input => {
|
|
51
52
|
if (step === 'confirm-npm-install') {
|
|
52
53
|
if (input === 'y' || input === 'Y') {
|
|
53
54
|
setStep('running-npm-install');
|
|
@@ -100,7 +101,7 @@ export function SetupFlow({ project, onComplete }) {
|
|
|
100
101
|
});
|
|
101
102
|
// Setup Dev Properties Form
|
|
102
103
|
if (step === 'setup-dev-properties') {
|
|
103
|
-
return (
|
|
104
|
+
return (_jsx(DevPropertiesForm, { projectRoot: project.root, initialProperties: project.devProperties, packageJson: project.packageJson, onComplete: () => {
|
|
104
105
|
// Manually update project state locally if possible, or just proceed
|
|
105
106
|
// Since we can't easily update 'project' prop from here without reloading,
|
|
106
107
|
// we just move to next step. The file is written.
|
|
@@ -110,110 +111,34 @@ export function SetupFlow({ project, onComplete }) {
|
|
|
110
111
|
}
|
|
111
112
|
// Setup Signing Properties Form
|
|
112
113
|
if (step === 'setup-signing-properties') {
|
|
113
|
-
return (
|
|
114
|
+
return (_jsx(SigningPropertiesForm, { projectRoot: project.root, onComplete: () => {
|
|
114
115
|
project.hasSigningProperties = true; // Optimization/Hack
|
|
115
116
|
setStep('show-info');
|
|
116
117
|
}, onCancel: () => setStep('show-info') }));
|
|
117
118
|
}
|
|
118
119
|
// Running npm install
|
|
119
120
|
if (step === 'running-npm-install') {
|
|
120
|
-
return (
|
|
121
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
122
|
-
React.createElement(StatusIndicator, { status: commandStatus, label: "Installing dependencies" })),
|
|
123
|
-
runner && React.createElement(ProcessOutputComponent, { runner: runner })));
|
|
121
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(StatusIndicator, { status: commandStatus, label: "Installing dependencies" }) }), runner && _jsx(ProcessOutputComponent, { runner: runner })] }));
|
|
124
122
|
}
|
|
125
123
|
// Confirm npm install
|
|
126
124
|
if (step === 'confirm-npm-install') {
|
|
127
|
-
return (
|
|
128
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
129
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Sitevision CLI")),
|
|
130
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
131
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 node_modules not found")),
|
|
132
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
133
|
-
React.createElement(Text, null, "Would you like to run npm install? (y/n)"))));
|
|
125
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Sitevision CLI" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "yellow", children: "\u26A0 node_modules not found" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: "Would you like to run npm install? (y/n)" }) })] }));
|
|
134
126
|
}
|
|
135
127
|
// Confirm dev setup
|
|
136
128
|
if (step === 'confirm-dev-setup') {
|
|
137
|
-
return (
|
|
138
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
139
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Sitevision CLI")),
|
|
140
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
141
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 dev properties not configured")),
|
|
142
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
143
|
-
React.createElement(Text, null, "Would you like to set up dev properties? (y/n)"))));
|
|
129
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Sitevision CLI" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "yellow", children: "\u26A0 dev properties not configured" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: "Would you like to set up dev properties? (y/n)" }) })] }));
|
|
144
130
|
}
|
|
145
131
|
// Confirm legacy password migration
|
|
146
132
|
if (step === 'confirm-password-migration') {
|
|
147
|
-
return (
|
|
148
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
149
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Sitevision CLI")),
|
|
150
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
151
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 Plaintext password found in .dev_properties.json")),
|
|
152
|
-
React.createElement(Box, { marginBottom: 1, flexDirection: "column" },
|
|
153
|
-
React.createElement(Text, null, "Move it to the OS keychain and remove it from the file? (y/n)"),
|
|
154
|
-
React.createElement(Text, { dimColor: true }, "Recommended \u2014 storing passwords in project files is insecure."))));
|
|
133
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Sitevision CLI" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "yellow", children: "\u26A0 Plaintext password found in .dev_properties.json" }) }), _jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [_jsx(Text, { children: "Move it to the OS keychain and remove it from the file? (y/n)" }), _jsx(Text, { dimColor: true, children: "Recommended \u2014 storing passwords in project files is insecure." })] })] }));
|
|
155
134
|
}
|
|
156
135
|
// Confirm signing setup
|
|
157
136
|
if (step === 'confirm-signing-setup') {
|
|
158
|
-
return (
|
|
159
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
160
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Sitevision CLI")),
|
|
161
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
162
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 signing credentials not configured")),
|
|
163
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
164
|
-
React.createElement(Text, null, "Signing credentials are required for signing apps on developer.sitevision.se")),
|
|
165
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
166
|
-
React.createElement(Text, null, "Would you like to set up signing credentials? (y/n)"))));
|
|
137
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Sitevision CLI" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "yellow", children: "\u26A0 signing credentials not configured" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: "Signing credentials are required for signing apps on developer.sitevision.se" }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: "Would you like to set up signing credentials? (y/n)" }) })] }));
|
|
167
138
|
}
|
|
168
139
|
// Show info
|
|
169
140
|
if (step === 'show-info') {
|
|
170
|
-
return (
|
|
171
|
-
React.createElement(Box, { marginBottom: 1 },
|
|
172
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Sitevision Project Information")),
|
|
173
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 2 },
|
|
174
|
-
React.createElement(Box, null,
|
|
175
|
-
React.createElement(Text, { bold: true }, "Name: "),
|
|
176
|
-
React.createElement(Text, null, project.manifest.name)),
|
|
177
|
-
React.createElement(Box, null,
|
|
178
|
-
React.createElement(Text, { bold: true }, "ID: "),
|
|
179
|
-
React.createElement(Text, null, project.manifest.id)),
|
|
180
|
-
React.createElement(Box, null,
|
|
181
|
-
React.createElement(Text, { bold: true }, "Version: "),
|
|
182
|
-
React.createElement(Text, null, project.manifest.version)),
|
|
183
|
-
React.createElement(Box, null,
|
|
184
|
-
React.createElement(Text, { bold: true }, "Type: "),
|
|
185
|
-
React.createElement(Text, { color: "green" }, project.manifest.type),
|
|
186
|
-
React.createElement(Text, { dimColor: true },
|
|
187
|
-
" (",
|
|
188
|
-
appType,
|
|
189
|
-
")")),
|
|
190
|
-
React.createElement(Box, null,
|
|
191
|
-
React.createElement(Text, { bold: true }, "Bundled: "),
|
|
192
|
-
React.createElement(Text, null, project.manifest.bundled ? 'Yes' : 'No'))),
|
|
193
|
-
project.hasDevProperties && project.devProperties && (React.createElement(React.Fragment, null,
|
|
194
|
-
React.createElement(Box, { marginTop: 1, marginBottom: 1 },
|
|
195
|
-
React.createElement(Text, { bold: true, color: "cyan" }, "Development Configuration")),
|
|
196
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 2 },
|
|
197
|
-
React.createElement(Box, null,
|
|
198
|
-
React.createElement(Text, { bold: true }, "Domain: "),
|
|
199
|
-
React.createElement(Text, null, project.devProperties.domain)),
|
|
200
|
-
React.createElement(Box, null,
|
|
201
|
-
React.createElement(Text, { bold: true }, "Site: "),
|
|
202
|
-
React.createElement(Text, null, project.devProperties.siteName)),
|
|
203
|
-
React.createElement(Box, null,
|
|
204
|
-
React.createElement(Text, { bold: true }, "Addon: "),
|
|
205
|
-
React.createElement(Text, null, project.devProperties.addonName)),
|
|
206
|
-
React.createElement(Box, null,
|
|
207
|
-
React.createElement(Text, { bold: true }, "Username: "),
|
|
208
|
-
React.createElement(Text, null, project.devProperties.username)),
|
|
209
|
-
React.createElement(Box, null,
|
|
210
|
-
React.createElement(Text, { bold: true }, "Use HTTP: "),
|
|
211
|
-
React.createElement(Text, null, project.devProperties.useHTTPForDevDeploy ? 'Yes' : 'No'))))),
|
|
212
|
-
!project.hasDevProperties && (React.createElement(Box, { marginTop: 1 },
|
|
213
|
-
React.createElement(Text, { color: "yellow" }, "\u26A0 No dev properties configured"))),
|
|
214
|
-
React.createElement(Box, { marginTop: 1 },
|
|
215
|
-
React.createElement(Text, { bold: true }, "Project Root: "),
|
|
216
|
-
React.createElement(Text, { dimColor: true }, project.root))));
|
|
141
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Sitevision Project Information" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Name: " }), _jsx(Text, { children: project.manifest.name })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "ID: " }), _jsx(Text, { children: project.manifest.id })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Version: " }), _jsx(Text, { children: project.manifest.version })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Type: " }), _jsx(Text, { color: "green", children: project.manifest.type }), _jsxs(Text, { dimColor: true, children: [" (", appType, ")"] })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Bundled: " }), _jsx(Text, { children: project.manifest.bundled ? 'Yes' : 'No' })] })] }), project.hasDevProperties && project.devProperties && (_jsxs(_Fragment, { children: [_jsx(Box, { marginTop: 1, marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "Development Configuration" }) }), _jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Domain: " }), _jsx(Text, { children: project.devProperties.domain })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Site: " }), _jsx(Text, { children: project.devProperties.siteName })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Addon: " }), _jsx(Text, { children: project.devProperties.addonName })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Username: " }), _jsx(Text, { children: project.devProperties.username })] }), _jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Use HTTP: " }), _jsx(Text, { children: project.devProperties.useHTTPForDevDeploy ? 'Yes' : 'No' })] })] })] })), !project.hasDevProperties && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellow", children: "\u26A0 No dev properties configured" }) })), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { bold: true, children: "Project Root: " }), _jsx(Text, { dimColor: true, children: project.root })] })] }));
|
|
217
142
|
}
|
|
218
143
|
return null;
|
|
219
144
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface Props {
|
|
3
2
|
projectRoot: string;
|
|
4
3
|
onComplete: () => void;
|
|
5
4
|
onCancel: () => void;
|
|
6
5
|
}
|
|
7
|
-
export declare function SigningPropertiesForm({ projectRoot, onComplete, onCancel }: Props):
|
|
6
|
+
export declare function SigningPropertiesForm({ projectRoot, onComplete, onCancel, }: Props): import("react").JSX.Element;
|
|
8
7
|
export {};
|