@qumra/cli 2.4.15 → 2.4.18
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 +93 -34
- package/dist/cli.js +91 -57
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
<picture>
|
|
6
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://qumra.cloud/logo-white.svg">
|
|
7
|
+
<source media="(prefers-color-scheme: light)" srcset="https://qumra.cloud/logo.svg">
|
|
8
|
+
<img alt="Qumra Cloud" src="https://qumra.cloud/logo.svg" width="200">
|
|
9
|
+
</picture>
|
|
10
|
+
|
|
11
|
+
<br />
|
|
12
|
+
<br />
|
|
13
|
+
|
|
1
14
|
# @qumra/cli
|
|
2
15
|
|
|
3
|
-
|
|
16
|
+
**Build, develop, and deploy themes & apps for your Qumra Cloud store.**
|
|
17
|
+
|
|
18
|
+
[](https://www.npmjs.com/package/@qumra/cli)
|
|
19
|
+
[](https://nodejs.org)
|
|
20
|
+
[](LICENSE)
|
|
21
|
+
|
|
22
|
+
[Documentation](https://docs.qumra.cloud/docs/cli/intro) · [Qumra Cloud](https://qumra.cloud) · [Get Started](https://app.qumra.cloud)
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
---
|
|
4
27
|
|
|
5
28
|
## Installation
|
|
6
29
|
|
|
@@ -11,16 +34,16 @@ npm install -g @qumra/cli
|
|
|
11
34
|
## Quick Start
|
|
12
35
|
|
|
13
36
|
```bash
|
|
14
|
-
# Login to your
|
|
37
|
+
# 1. Login to your account
|
|
15
38
|
qumra login
|
|
16
39
|
|
|
17
|
-
# Initialize a
|
|
40
|
+
# 2. Initialize a theme
|
|
18
41
|
qumra theme init
|
|
19
42
|
|
|
20
|
-
# Start
|
|
43
|
+
# 3. Start developing with hot reload
|
|
21
44
|
qumra theme dev
|
|
22
45
|
|
|
23
|
-
# Publish
|
|
46
|
+
# 4. Publish when ready
|
|
24
47
|
qumra theme publish
|
|
25
48
|
```
|
|
26
49
|
|
|
@@ -28,54 +51,90 @@ qumra theme publish
|
|
|
28
51
|
|
|
29
52
|
### Authentication
|
|
30
53
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
```
|
|
55
|
+
qumra login Login to your Qumra Cloud account
|
|
56
|
+
qumra logout Logout from your account
|
|
57
|
+
qumra info Show current user info
|
|
58
|
+
```
|
|
36
59
|
|
|
37
60
|
### Themes
|
|
38
61
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
62
|
+
```
|
|
63
|
+
qumra theme init Initialize a new theme project
|
|
64
|
+
qumra theme dev Start dev server with hot reload
|
|
65
|
+
qumra theme publish Publish theme to Qumra Cloud
|
|
66
|
+
qumra theme bundle Bundle theme for distribution
|
|
67
|
+
qumra theme patch Bump patch version and publish
|
|
68
|
+
qumra theme minor Bump minor version and publish
|
|
69
|
+
qumra theme major Bump major version and publish
|
|
70
|
+
```
|
|
48
71
|
|
|
49
72
|
### Apps
|
|
50
73
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
74
|
+
```
|
|
75
|
+
qumra app init Initialize a new app project
|
|
76
|
+
qumra app dev Start dev server with HTTPS tunnel
|
|
77
|
+
qumra app deploy Deploy app to Qumra Cloud
|
|
78
|
+
```
|
|
56
79
|
|
|
57
80
|
### Generators
|
|
58
81
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
82
|
+
```
|
|
83
|
+
qumra generate widget Scaffold a new widget
|
|
84
|
+
```
|
|
62
85
|
|
|
63
86
|
## Theme Development
|
|
64
87
|
|
|
65
|
-
|
|
88
|
+
`qumra theme dev` spins up a full local development environment:
|
|
66
89
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
```
|
|
91
|
+
┌─────────────────────────────────────────────┐
|
|
92
|
+
│ Qumra Dev Server │
|
|
93
|
+
├─────────────────────────────────────────────┤
|
|
94
|
+
│ │
|
|
95
|
+
│ Local: http://localhost:3000 │
|
|
96
|
+
│ Store: https://mystore.qumra.cloud │
|
|
97
|
+
│ Editor: https://app.qumra.cloud/... │
|
|
98
|
+
│ │
|
|
99
|
+
│ ● Proxy server — local asset serving │
|
|
100
|
+
│ ● Hot reload — instant CSS updates │
|
|
101
|
+
│ ● File watcher — auto cloud sync │
|
|
102
|
+
│ │
|
|
103
|
+
├─────────────────────────────────────────────┤
|
|
104
|
+
│ q quit · o open browser · e editor │
|
|
105
|
+
└─────────────────────────────────────────────┘
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Theme Structure
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
my-theme/
|
|
112
|
+
├── assets/ Static files (images, fonts, scripts)
|
|
113
|
+
├── layouts/ Base layout templates (.njk)
|
|
114
|
+
├── templates/ Page templates (.njk)
|
|
115
|
+
├── ui/ UI components (.njk, .css)
|
|
116
|
+
├── widgets/ Widget schemas & templates
|
|
117
|
+
├── pages/ Page definitions (.json)
|
|
118
|
+
├── locales/ Translation files (.json)
|
|
119
|
+
└── settings/ Theme configuration
|
|
120
|
+
├── settings-schema.json
|
|
121
|
+
├── settings-data.json
|
|
122
|
+
├── header-schema.json
|
|
123
|
+
├── header-data.json
|
|
124
|
+
├── footer-schema.json
|
|
125
|
+
├── footer-data.json
|
|
126
|
+
└── templates-settings.json
|
|
127
|
+
```
|
|
70
128
|
|
|
71
129
|
## Requirements
|
|
72
130
|
|
|
73
|
-
- Node.js >= 18
|
|
131
|
+
- **Node.js** >= 18
|
|
132
|
+
- A [Qumra Cloud](https://qumra.cloud) account
|
|
74
133
|
|
|
75
134
|
## Documentation
|
|
76
135
|
|
|
77
|
-
Full
|
|
136
|
+
Full docs available at **[docs.qumra.cloud](https://docs.qumra.cloud/docs/cli/intro)**
|
|
78
137
|
|
|
79
138
|
## License
|
|
80
139
|
|
|
81
|
-
[MIT](LICENSE)
|
|
140
|
+
[MIT](LICENSE) — Made with care by [Qumra](https://qumra.cloud)
|
package/dist/cli.js
CHANGED
|
@@ -278807,59 +278807,65 @@ const ansiRegex$2 = ansiRegex$3;
|
|
|
278807
278807
|
|
|
278808
278808
|
var stripAnsi$4 = string => typeof string === 'string' ? string.replace(ansiRegex$2(), '') : string;
|
|
278809
278809
|
|
|
278810
|
-
var isFullwidthCodePoint$
|
|
278810
|
+
var isFullwidthCodePoint$1 = {exports: {}};
|
|
278811
278811
|
|
|
278812
278812
|
/* eslint-disable yoda */
|
|
278813
278813
|
|
|
278814
|
-
|
|
278815
|
-
if (Number.isNaN(codePoint)) {
|
|
278816
|
-
return false;
|
|
278817
|
-
}
|
|
278814
|
+
var hasRequiredIsFullwidthCodePoint;
|
|
278818
278815
|
|
|
278819
|
-
|
|
278820
|
-
|
|
278821
|
-
|
|
278822
|
-
codePoint >= 0x1100 && (
|
|
278823
|
-
codePoint <= 0x115F || // Hangul Jamo
|
|
278824
|
-
codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
|
|
278825
|
-
codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
|
|
278826
|
-
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
278827
|
-
(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
|
|
278828
|
-
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
278829
|
-
(0x3250 <= codePoint && codePoint <= 0x4DBF) ||
|
|
278830
|
-
// CJK Unified Ideographs .. Yi Radicals
|
|
278831
|
-
(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
|
|
278832
|
-
// Hangul Jamo Extended-A
|
|
278833
|
-
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
|
|
278834
|
-
// Hangul Syllables
|
|
278835
|
-
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
|
|
278836
|
-
// CJK Compatibility Ideographs
|
|
278837
|
-
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
|
|
278838
|
-
// Vertical Forms
|
|
278839
|
-
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
|
|
278840
|
-
// CJK Compatibility Forms .. Small Form Variants
|
|
278841
|
-
(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
|
|
278842
|
-
// Halfwidth and Fullwidth Forms
|
|
278843
|
-
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
|
|
278844
|
-
(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
|
|
278845
|
-
// Kana Supplement
|
|
278846
|
-
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
|
|
278847
|
-
// Enclosed Ideographic Supplement
|
|
278848
|
-
(0x1F200 <= codePoint && codePoint <= 0x1F251) ||
|
|
278849
|
-
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
278850
|
-
(0x20000 <= codePoint && codePoint <= 0x3FFFD)
|
|
278851
|
-
)
|
|
278852
|
-
) {
|
|
278853
|
-
return true;
|
|
278854
|
-
}
|
|
278816
|
+
function requireIsFullwidthCodePoint () {
|
|
278817
|
+
if (hasRequiredIsFullwidthCodePoint) return isFullwidthCodePoint$1.exports;
|
|
278818
|
+
hasRequiredIsFullwidthCodePoint = 1;
|
|
278855
278819
|
|
|
278856
|
-
|
|
278857
|
-
|
|
278820
|
+
const isFullwidthCodePoint = codePoint => {
|
|
278821
|
+
if (Number.isNaN(codePoint)) {
|
|
278822
|
+
return false;
|
|
278823
|
+
}
|
|
278824
|
+
|
|
278825
|
+
// Code points are derived from:
|
|
278826
|
+
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
278827
|
+
if (
|
|
278828
|
+
codePoint >= 0x1100 && (
|
|
278829
|
+
codePoint <= 0x115F || // Hangul Jamo
|
|
278830
|
+
codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
|
|
278831
|
+
codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
|
|
278832
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
278833
|
+
(0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
|
|
278834
|
+
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
278835
|
+
(0x3250 <= codePoint && codePoint <= 0x4DBF) ||
|
|
278836
|
+
// CJK Unified Ideographs .. Yi Radicals
|
|
278837
|
+
(0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
|
|
278838
|
+
// Hangul Jamo Extended-A
|
|
278839
|
+
(0xA960 <= codePoint && codePoint <= 0xA97C) ||
|
|
278840
|
+
// Hangul Syllables
|
|
278841
|
+
(0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
|
|
278842
|
+
// CJK Compatibility Ideographs
|
|
278843
|
+
(0xF900 <= codePoint && codePoint <= 0xFAFF) ||
|
|
278844
|
+
// Vertical Forms
|
|
278845
|
+
(0xFE10 <= codePoint && codePoint <= 0xFE19) ||
|
|
278846
|
+
// CJK Compatibility Forms .. Small Form Variants
|
|
278847
|
+
(0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
|
|
278848
|
+
// Halfwidth and Fullwidth Forms
|
|
278849
|
+
(0xFF01 <= codePoint && codePoint <= 0xFF60) ||
|
|
278850
|
+
(0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
|
|
278851
|
+
// Kana Supplement
|
|
278852
|
+
(0x1B000 <= codePoint && codePoint <= 0x1B001) ||
|
|
278853
|
+
// Enclosed Ideographic Supplement
|
|
278854
|
+
(0x1F200 <= codePoint && codePoint <= 0x1F251) ||
|
|
278855
|
+
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
278856
|
+
(0x20000 <= codePoint && codePoint <= 0x3FFFD)
|
|
278857
|
+
)
|
|
278858
|
+
) {
|
|
278859
|
+
return true;
|
|
278860
|
+
}
|
|
278858
278861
|
|
|
278859
|
-
|
|
278860
|
-
|
|
278862
|
+
return false;
|
|
278863
|
+
};
|
|
278861
278864
|
|
|
278862
|
-
|
|
278865
|
+
isFullwidthCodePoint$1.exports = isFullwidthCodePoint;
|
|
278866
|
+
isFullwidthCodePoint$1.exports.default = isFullwidthCodePoint;
|
|
278867
|
+
return isFullwidthCodePoint$1.exports;
|
|
278868
|
+
}
|
|
278863
278869
|
|
|
278864
278870
|
var emojiRegex$3 = function () {
|
|
278865
278871
|
// https://mths.be/emoji
|
|
@@ -278867,7 +278873,7 @@ var emojiRegex$3 = function () {
|
|
|
278867
278873
|
};
|
|
278868
278874
|
|
|
278869
278875
|
const stripAnsi$3 = stripAnsi$4;
|
|
278870
|
-
const isFullwidthCodePoint =
|
|
278876
|
+
const isFullwidthCodePoint = requireIsFullwidthCodePoint();
|
|
278871
278877
|
const emojiRegex$2 = emojiRegex$3;
|
|
278872
278878
|
|
|
278873
278879
|
const stringWidth$3 = string => {
|
|
@@ -279155,7 +279161,7 @@ function requireStringWidth () {
|
|
|
279155
279161
|
if (hasRequiredStringWidth) return stringWidth$1.exports;
|
|
279156
279162
|
hasRequiredStringWidth = 1;
|
|
279157
279163
|
const stripAnsi = requireStripAnsi();
|
|
279158
|
-
const isFullwidthCodePoint =
|
|
279164
|
+
const isFullwidthCodePoint = requireIsFullwidthCodePoint();
|
|
279159
279165
|
const emojiRegex = requireEmojiRegex();
|
|
279160
279166
|
|
|
279161
279167
|
const stringWidth = string => {
|
|
@@ -304360,7 +304366,7 @@ class SectionBuilder {
|
|
|
304360
304366
|
}
|
|
304361
304367
|
}
|
|
304362
304368
|
|
|
304363
|
-
var version$2 = "2.4.
|
|
304369
|
+
var version$2 = "2.4.18";
|
|
304364
304370
|
var pkg = {
|
|
304365
304371
|
version: version$2};
|
|
304366
304372
|
|
|
@@ -534468,6 +534474,7 @@ AppTunnelService = __decorate$5([
|
|
|
534468
534474
|
let AppDevServerService = class AppDevServerService {
|
|
534469
534475
|
constructor(logger) {
|
|
534470
534476
|
this.logger = logger;
|
|
534477
|
+
this.childProcess = null;
|
|
534471
534478
|
}
|
|
534472
534479
|
async start(options) {
|
|
534473
534480
|
const { env, cwd = process.cwd() } = options;
|
|
@@ -534478,7 +534485,9 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534478
534485
|
cwd,
|
|
534479
534486
|
env: { ...process.env, ...env },
|
|
534480
534487
|
shell: true,
|
|
534488
|
+
detached: true,
|
|
534481
534489
|
});
|
|
534490
|
+
this.childProcess = child;
|
|
534482
534491
|
(_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
534483
534492
|
const lines = data.toString().trim().split('\n');
|
|
534484
534493
|
for (const line of lines) {
|
|
@@ -534508,6 +534517,7 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534508
534517
|
setTimeout(resolve, 2000);
|
|
534509
534518
|
// Handle exit
|
|
534510
534519
|
child.on('exit', (code) => {
|
|
534520
|
+
this.childProcess = null;
|
|
534511
534521
|
if (code !== 0) {
|
|
534512
534522
|
this.logger.componentLog('React Router', `Server exited with code ${code}`, 'error');
|
|
534513
534523
|
}
|
|
@@ -534526,7 +534536,9 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534526
534536
|
cwd,
|
|
534527
534537
|
env: { ...process.env, ...env },
|
|
534528
534538
|
shell: true,
|
|
534539
|
+
detached: true,
|
|
534529
534540
|
});
|
|
534541
|
+
this.childProcess = child;
|
|
534530
534542
|
(_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
534531
534543
|
const lines = data.toString().trim().split('\n');
|
|
534532
534544
|
for (const line of lines) {
|
|
@@ -534556,12 +534568,31 @@ let AppDevServerService = class AppDevServerService {
|
|
|
534556
534568
|
setTimeout(resolve, 2000);
|
|
534557
534569
|
// Handle exit
|
|
534558
534570
|
child.on('exit', (code) => {
|
|
534571
|
+
this.childProcess = null;
|
|
534559
534572
|
if (code !== 0) {
|
|
534560
534573
|
devUI.log('React Router', `Server exited with code ${code}`, 'error');
|
|
534561
534574
|
}
|
|
534562
534575
|
});
|
|
534563
534576
|
});
|
|
534564
534577
|
}
|
|
534578
|
+
stop() {
|
|
534579
|
+
if (this.childProcess && !this.childProcess.killed) {
|
|
534580
|
+
// Kill the process tree (shell: true spawns a shell + child)
|
|
534581
|
+
if (this.childProcess.pid) {
|
|
534582
|
+
try {
|
|
534583
|
+
process.kill(-this.childProcess.pid, 'SIGTERM');
|
|
534584
|
+
}
|
|
534585
|
+
catch {
|
|
534586
|
+
// Fallback if process group kill fails
|
|
534587
|
+
this.childProcess.kill('SIGTERM');
|
|
534588
|
+
}
|
|
534589
|
+
}
|
|
534590
|
+
else {
|
|
534591
|
+
this.childProcess.kill('SIGTERM');
|
|
534592
|
+
}
|
|
534593
|
+
this.childProcess = null;
|
|
534594
|
+
}
|
|
534595
|
+
}
|
|
534565
534596
|
async getAvailablePort(startPort = 4000) {
|
|
534566
534597
|
let port = startPort;
|
|
534567
534598
|
while (true) {
|
|
@@ -534674,23 +534705,26 @@ let AppService = class AppService {
|
|
|
534674
534705
|
{ label: 'Install URL', url: installUrl },
|
|
534675
534706
|
],
|
|
534676
534707
|
shortcuts: [
|
|
534677
|
-
{
|
|
534708
|
+
{
|
|
534709
|
+
key: 'q', label: 'Quit', handler: () => {
|
|
534710
|
+
this.devServer.stop();
|
|
534678
534711
|
devUI.stop();
|
|
534679
534712
|
this.tunnel.stopTunnel();
|
|
534680
534713
|
process.exit(0);
|
|
534681
|
-
}
|
|
534714
|
+
}
|
|
534715
|
+
},
|
|
534682
534716
|
{ key: 'p', label: 'Preview', handler: () => open(developmentUrl) },
|
|
534683
534717
|
{ key: 'o', label: 'Open Store', handler: () => open(installUrl) },
|
|
534684
534718
|
],
|
|
534685
534719
|
logPanels: ['All', 'Server', 'Tunnel', 'Prisma'],
|
|
534686
534720
|
});
|
|
534687
534721
|
// Log initial steps
|
|
534688
|
-
devUI.log('prisma', 'Running migrations...');
|
|
534689
|
-
|
|
534690
|
-
|
|
534691
|
-
|
|
534692
|
-
});
|
|
534693
|
-
devUI.log('prisma', 'Migrations complete', 'success');
|
|
534722
|
+
// devUI.log('prisma', 'Running migrations...');
|
|
534723
|
+
// execSync('npx prisma db push && npx prisma generate', {
|
|
534724
|
+
// cwd: process.cwd(),
|
|
534725
|
+
// stdio: 'ignore',
|
|
534726
|
+
// });
|
|
534727
|
+
// devUI.log('prisma', 'Migrations complete', 'success');
|
|
534694
534728
|
devUI.log('tunnel', `Tunnel ready: ${developmentUrl}`, 'success');
|
|
534695
534729
|
devUI.log('app-preview', 'Dev preview ready', 'success');
|
|
534696
534730
|
// Open install URL in browser
|