cmssy-cli 0.7.0 → 0.9.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/README.md +382 -36
- package/dist/cli.js +29 -10
- package/dist/cli.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +147 -1
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +20 -16
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/package.d.ts +7 -0
- package/dist/commands/package.d.ts.map +1 -0
- package/dist/commands/package.js +161 -0
- package/dist/commands/package.js.map +1 -0
- package/dist/commands/publish.d.ts +12 -0
- package/dist/commands/publish.d.ts.map +1 -0
- package/dist/commands/publish.js +395 -0
- package/dist/commands/publish.js.map +1 -0
- package/dist/commands/push.d.ts +9 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +199 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/upload.d.ts +7 -0
- package/dist/commands/upload.d.ts.map +1 -0
- package/dist/commands/upload.js +126 -0
- package/dist/commands/upload.js.map +1 -0
- package/dist/dev-ui/app.js +163 -2
- package/dist/dev-ui/index.html +396 -2
- package/dist/utils/cmssy-config.d.ts +0 -3
- package/dist/utils/cmssy-config.d.ts.map +1 -1
- package/dist/utils/cmssy-config.js.map +1 -1
- package/dist/utils/config.d.ts +1 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +1 -0
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/graphql.d.ts +1 -0
- package/dist/utils/graphql.d.ts.map +1 -1
- package/dist/utils/graphql.js +28 -0
- package/dist/utils/graphql.js.map +1 -1
- package/package.json +5 -1
package/dist/dev-ui/index.html
CHANGED
|
@@ -84,6 +84,46 @@
|
|
|
84
84
|
opacity: 0.7;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
.block-item-header {
|
|
88
|
+
display: flex;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
align-items: center;
|
|
91
|
+
margin-bottom: 4px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.block-item-footer {
|
|
95
|
+
display: flex;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: 8px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.version-badge {
|
|
102
|
+
font-size: 11px;
|
|
103
|
+
padding: 2px 6px;
|
|
104
|
+
background: #e3f2fd;
|
|
105
|
+
color: #1976d2;
|
|
106
|
+
border-radius: 4px;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.status-badge {
|
|
111
|
+
font-size: 11px;
|
|
112
|
+
padding: 2px 8px;
|
|
113
|
+
border-radius: 10px;
|
|
114
|
+
font-weight: 500;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.status-badge.status-local {
|
|
118
|
+
background: #fff3e0;
|
|
119
|
+
color: #e65100;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.status-badge.status-published {
|
|
123
|
+
background: #e8f5e9;
|
|
124
|
+
color: #2e7d32;
|
|
125
|
+
}
|
|
126
|
+
|
|
87
127
|
/* Center Panel - Preview */
|
|
88
128
|
.preview-panel {
|
|
89
129
|
background: #fafafa;
|
|
@@ -101,12 +141,40 @@
|
|
|
101
141
|
align-items: center;
|
|
102
142
|
}
|
|
103
143
|
|
|
144
|
+
.preview-info {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: 12px;
|
|
148
|
+
}
|
|
149
|
+
|
|
104
150
|
.preview-title {
|
|
105
151
|
font-size: 16px;
|
|
106
152
|
font-weight: 600;
|
|
107
153
|
color: #1a1a1a;
|
|
108
154
|
}
|
|
109
155
|
|
|
156
|
+
.preview-actions {
|
|
157
|
+
display: flex;
|
|
158
|
+
gap: 8px;
|
|
159
|
+
align-items: center;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.btn-publish {
|
|
163
|
+
padding: 8px 16px;
|
|
164
|
+
background: #667eea;
|
|
165
|
+
color: white;
|
|
166
|
+
border: none;
|
|
167
|
+
border-radius: 6px;
|
|
168
|
+
font-size: 14px;
|
|
169
|
+
font-weight: 500;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
transition: background 0.2s;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.btn-publish:hover {
|
|
175
|
+
background: #5568d3;
|
|
176
|
+
}
|
|
177
|
+
|
|
110
178
|
.preview-badge {
|
|
111
179
|
font-size: 12px;
|
|
112
180
|
padding: 4px 12px;
|
|
@@ -392,6 +460,245 @@
|
|
|
392
460
|
.color-input {
|
|
393
461
|
flex: 1;
|
|
394
462
|
}
|
|
463
|
+
/* Publish Modal */
|
|
464
|
+
.modal {
|
|
465
|
+
position: fixed;
|
|
466
|
+
top: 0;
|
|
467
|
+
left: 0;
|
|
468
|
+
right: 0;
|
|
469
|
+
bottom: 0;
|
|
470
|
+
background: rgba(0, 0, 0, 0.5);
|
|
471
|
+
display: none;
|
|
472
|
+
align-items: center;
|
|
473
|
+
justify-content: center;
|
|
474
|
+
z-index: 9999;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.modal.active {
|
|
478
|
+
display: flex;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.modal-content {
|
|
482
|
+
background: white;
|
|
483
|
+
border-radius: 12px;
|
|
484
|
+
width: 90%;
|
|
485
|
+
max-width: 500px;
|
|
486
|
+
max-height: 80vh;
|
|
487
|
+
overflow: auto;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.modal-header {
|
|
491
|
+
padding: 20px 24px;
|
|
492
|
+
border-bottom: 1px solid #e0e0e0;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.modal-header h3 {
|
|
496
|
+
font-size: 20px;
|
|
497
|
+
font-weight: 600;
|
|
498
|
+
margin: 0 0 4px 0;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.modal-header p {
|
|
502
|
+
font-size: 14px;
|
|
503
|
+
color: #666;
|
|
504
|
+
margin: 0;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.modal-body {
|
|
508
|
+
padding: 24px;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.form-group {
|
|
512
|
+
margin-bottom: 20px;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.form-label {
|
|
516
|
+
display: block;
|
|
517
|
+
font-size: 14px;
|
|
518
|
+
font-weight: 500;
|
|
519
|
+
margin-bottom: 8px;
|
|
520
|
+
color: #333;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.radio-group {
|
|
524
|
+
display: flex;
|
|
525
|
+
flex-direction: column;
|
|
526
|
+
gap: 12px;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.radio-option {
|
|
530
|
+
display: flex;
|
|
531
|
+
align-items: flex-start;
|
|
532
|
+
padding: 12px;
|
|
533
|
+
border: 2px solid #e0e0e0;
|
|
534
|
+
border-radius: 8px;
|
|
535
|
+
cursor: pointer;
|
|
536
|
+
transition: all 0.2s;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.radio-option:hover {
|
|
540
|
+
border-color: #667eea;
|
|
541
|
+
background: #f5f7ff;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.radio-option input[type="radio"] {
|
|
545
|
+
margin-right: 12px;
|
|
546
|
+
margin-top: 2px;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.radio-option-content {
|
|
550
|
+
flex: 1;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.radio-option-title {
|
|
554
|
+
font-weight: 500;
|
|
555
|
+
margin-bottom: 2px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.radio-option-desc {
|
|
559
|
+
font-size: 13px;
|
|
560
|
+
color: #666;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.input-field {
|
|
564
|
+
width: 100%;
|
|
565
|
+
padding: 10px 12px;
|
|
566
|
+
border: 1px solid #e0e0e0;
|
|
567
|
+
border-radius: 6px;
|
|
568
|
+
font-size: 14px;
|
|
569
|
+
font-family: inherit;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.input-field:focus {
|
|
573
|
+
outline: none;
|
|
574
|
+
border-color: #667eea;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.select-field {
|
|
578
|
+
width: 100%;
|
|
579
|
+
padding: 10px 12px;
|
|
580
|
+
border: 1px solid #e0e0e0;
|
|
581
|
+
border-radius: 6px;
|
|
582
|
+
font-size: 14px;
|
|
583
|
+
font-family: inherit;
|
|
584
|
+
background: white;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.modal-footer {
|
|
588
|
+
padding: 16px 24px;
|
|
589
|
+
border-top: 1px solid #e0e0e0;
|
|
590
|
+
display: flex;
|
|
591
|
+
justify-content: flex-end;
|
|
592
|
+
gap: 12px;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.btn {
|
|
596
|
+
padding: 10px 20px;
|
|
597
|
+
border: none;
|
|
598
|
+
border-radius: 6px;
|
|
599
|
+
font-size: 14px;
|
|
600
|
+
font-weight: 500;
|
|
601
|
+
cursor: pointer;
|
|
602
|
+
transition: all 0.2s;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.btn-secondary {
|
|
606
|
+
background: #f5f5f5;
|
|
607
|
+
color: #333;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.btn-secondary:hover {
|
|
611
|
+
background: #e0e0e0;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.btn-primary {
|
|
615
|
+
background: #667eea;
|
|
616
|
+
color: white;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.btn-primary:hover {
|
|
620
|
+
background: #5568d3;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/* Publish Progress */
|
|
624
|
+
.publish-progress-container {
|
|
625
|
+
padding: 24px;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.progress-bar-container {
|
|
629
|
+
margin-bottom: 24px;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.progress-bar-bg {
|
|
633
|
+
height: 8px;
|
|
634
|
+
background: #e0e0e0;
|
|
635
|
+
border-radius: 4px;
|
|
636
|
+
overflow: hidden;
|
|
637
|
+
margin-bottom: 8px;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.progress-bar-fill {
|
|
641
|
+
height: 100%;
|
|
642
|
+
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
|
643
|
+
transition: width 0.3s;
|
|
644
|
+
border-radius: 4px;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.progress-text {
|
|
648
|
+
font-size: 13px;
|
|
649
|
+
color: #666;
|
|
650
|
+
text-align: center;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.progress-steps {
|
|
654
|
+
display: flex;
|
|
655
|
+
flex-direction: column;
|
|
656
|
+
gap: 12px;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.progress-step {
|
|
660
|
+
display: flex;
|
|
661
|
+
align-items: center;
|
|
662
|
+
gap: 12px;
|
|
663
|
+
padding: 12px;
|
|
664
|
+
background: #f5f5f5;
|
|
665
|
+
border-radius: 8px;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.progress-step.completed {
|
|
669
|
+
background: #e8f5e9;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.progress-step.failed {
|
|
673
|
+
background: #ffebee;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.step-icon {
|
|
677
|
+
font-size: 18px;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.step-message {
|
|
681
|
+
flex: 1;
|
|
682
|
+
font-size: 14px;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.publish-error {
|
|
686
|
+
text-align: center;
|
|
687
|
+
padding: 40px 24px;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.error-icon {
|
|
691
|
+
font-size: 48px;
|
|
692
|
+
margin-bottom: 16px;
|
|
693
|
+
color: #d32f2f;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.error-message {
|
|
697
|
+
font-size: 14px;
|
|
698
|
+
color: #666;
|
|
699
|
+
margin-bottom: 24px;
|
|
700
|
+
}
|
|
701
|
+
|
|
395
702
|
</style>
|
|
396
703
|
</head>
|
|
397
704
|
<body>
|
|
@@ -413,8 +720,15 @@
|
|
|
413
720
|
<!-- Center Panel: Preview -->
|
|
414
721
|
<div class="preview-panel">
|
|
415
722
|
<div class="preview-header">
|
|
416
|
-
<div class="preview-
|
|
417
|
-
|
|
723
|
+
<div class="preview-info">
|
|
724
|
+
<div class="preview-title" id="preview-title">Preview</div>
|
|
725
|
+
</div>
|
|
726
|
+
<div class="preview-actions">
|
|
727
|
+
<div class="preview-badge" id="preview-status">Ready</div>
|
|
728
|
+
<button class="btn-publish" onclick="openPublishModal()" style="display: none;" id="publish-btn">
|
|
729
|
+
📦 Publish
|
|
730
|
+
</button>
|
|
731
|
+
</div>
|
|
418
732
|
</div>
|
|
419
733
|
<div class="preview-content" id="preview-content">
|
|
420
734
|
<div class="preview-empty">
|
|
@@ -438,6 +752,86 @@
|
|
|
438
752
|
</div>
|
|
439
753
|
</div>
|
|
440
754
|
|
|
755
|
+
<!-- Publish Modal -->
|
|
756
|
+
<div class="modal" id="publish-modal">
|
|
757
|
+
<div class="modal-content">
|
|
758
|
+
<div class="modal-header">
|
|
759
|
+
<h3>Publish <span id="publish-block-name"></span></h3>
|
|
760
|
+
<p>Current version: <span id="publish-version"></span></p>
|
|
761
|
+
</div>
|
|
762
|
+
|
|
763
|
+
<!-- Publish Form -->
|
|
764
|
+
<div id="publish-form">
|
|
765
|
+
<div class="modal-body">
|
|
766
|
+
<!-- Target Selection -->
|
|
767
|
+
<div class="form-group">
|
|
768
|
+
<label class="form-label">Publish Target</label>
|
|
769
|
+
<div class="radio-group">
|
|
770
|
+
<label class="radio-option">
|
|
771
|
+
<input type="radio" name="publish-target" value="marketplace" id="publish-target-marketplace" onchange="toggleWorkspaceInput()" checked>
|
|
772
|
+
<div class="radio-option-content">
|
|
773
|
+
<div class="radio-option-title">📋 Marketplace (Public)</div>
|
|
774
|
+
<div class="radio-option-desc">Submit for review, available to everyone after approval</div>
|
|
775
|
+
</div>
|
|
776
|
+
</label>
|
|
777
|
+
<label class="radio-option">
|
|
778
|
+
<input type="radio" name="publish-target" value="workspace" id="publish-target-workspace" onchange="toggleWorkspaceInput()">
|
|
779
|
+
<div class="radio-option-content">
|
|
780
|
+
<div class="radio-option-title">🏢 Workspace (Private)</div>
|
|
781
|
+
<div class="radio-option-desc">Publish instantly to your workspace, no review needed</div>
|
|
782
|
+
</div>
|
|
783
|
+
</label>
|
|
784
|
+
</div>
|
|
785
|
+
</div>
|
|
786
|
+
|
|
787
|
+
<!-- Workspace ID (conditional) -->
|
|
788
|
+
<div class="form-group" id="workspace-id-group" style="display: none;">
|
|
789
|
+
<label class="form-label" for="publish-workspace-id">Workspace ID</label>
|
|
790
|
+
<input type="text" class="input-field" id="publish-workspace-id" placeholder="ws_abc123">
|
|
791
|
+
</div>
|
|
792
|
+
|
|
793
|
+
<!-- Version Bump -->
|
|
794
|
+
<div class="form-group">
|
|
795
|
+
<label class="form-label" for="publish-version-bump">Version Bump (Optional)</label>
|
|
796
|
+
<select class="select-field" id="publish-version-bump">
|
|
797
|
+
<option value="">No change</option>
|
|
798
|
+
<option value="patch">Patch (1.0.0 → 1.0.1)</option>
|
|
799
|
+
<option value="minor">Minor (1.0.0 → 1.1.0)</option>
|
|
800
|
+
<option value="major">Major (1.0.0 → 2.0.0)</option>
|
|
801
|
+
</select>
|
|
802
|
+
</div>
|
|
803
|
+
</div>
|
|
804
|
+
|
|
805
|
+
<div class="modal-footer">
|
|
806
|
+
<button class="btn btn-secondary" onclick="closePublishModal()">Cancel</button>
|
|
807
|
+
<button class="btn btn-primary" onclick="startPublish()">Publish</button>
|
|
808
|
+
</div>
|
|
809
|
+
</div>
|
|
810
|
+
|
|
811
|
+
<!-- Publish Progress -->
|
|
812
|
+
<div id="publish-progress" style="display: none;">
|
|
813
|
+
<div class="publish-progress-container">
|
|
814
|
+
<div class="progress-bar-container">
|
|
815
|
+
<div class="progress-bar-bg">
|
|
816
|
+
<div class="progress-bar-fill" id="publish-progress-bar" style="width: 0%"></div>
|
|
817
|
+
</div>
|
|
818
|
+
<div class="progress-text" id="publish-progress-text">0%</div>
|
|
819
|
+
</div>
|
|
820
|
+
|
|
821
|
+
<div class="progress-steps" id="publish-steps">
|
|
822
|
+
<!-- Steps will be dynamically added here -->
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
<div style="text-align: center; margin-top: 24px;">
|
|
826
|
+
<button class="btn btn-primary" onclick="closePublishModal()" id="publish-close-btn" style="display: none;">
|
|
827
|
+
Done
|
|
828
|
+
</button>
|
|
829
|
+
</div>
|
|
830
|
+
</div>
|
|
831
|
+
</div>
|
|
832
|
+
</div>
|
|
833
|
+
</div>
|
|
834
|
+
|
|
441
835
|
<script src="/dev-ui/app.js"></script>
|
|
442
836
|
</body>
|
|
443
837
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmssy-config.d.ts","sourceRoot":"","sources":["../../src/utils/cmssy-config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,
|
|
1
|
+
{"version":3,"file":"cmssy-config.d.ts","sourceRoot":"","sources":["../../src/utils/cmssy-config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,CAAC,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;CACH;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,CAYvD;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,OAMjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmssy-config.js","sourceRoot":"","sources":["../../src/utils/cmssy-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cmssy-config.js","sourceRoot":"","sources":["../../src/utils/cmssy-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAgBxB,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAE/D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IAED,yBAAyB;IACzB,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,UAAU,UAAU,EAAE,CAAC,CAAC;IAC1D,OAAO,YAAY,CAAC,OAAO,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,WAAmB;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IACvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/utils/config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,UAAU,IAAI,WAAW,CAaxC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAiC7D;AAED,wBAAgB,SAAS,IAAI,OAAO,CAGnC"}
|
package/dist/utils/config.js
CHANGED
|
@@ -10,6 +10,7 @@ export function loadConfig() {
|
|
|
10
10
|
return {
|
|
11
11
|
apiUrl: process.env.CMSSY_API_URL || "https://api.cmssy.io/graphql",
|
|
12
12
|
apiToken: process.env.CMSSY_API_TOKEN || null,
|
|
13
|
+
workspaceId: process.env.CMSSY_WORKSPACE_ID || null,
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
export function saveConfig(config) {
|
package/dist/utils/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,MAAM,UAAU,UAAU;IACxB,wBAAwB;IACxB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;IAEjD,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACnC,CAAC;IAED,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,8BAA8B;QACnE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,IAAI;QAC7C,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,IAAI;KACpD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAA4B;IACrD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;QACxC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC;QAClC,CAAC,CAAC,EAAE,CAAC;IAEP,IAAI,MAAM,GAAG,WAAW,CAAC;IAEzB,gCAAgC;IAChC,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAClC,IAAI,WAAW,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC7C,MAAM,GAAG,MAAM,CAAC,OAAO,CACrB,oBAAoB,EACpB,mBAAmB,MAAM,CAAC,QAAQ,EAAE,CACrC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,qBAAqB,MAAM,CAAC,QAAQ,IAAI,CAAC;QACrD,CAAC;IACH,CAAC;IAED,8BAA8B;IAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAChC,IAAI,WAAW,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC3C,MAAM,GAAG,MAAM,CAAC,OAAO,CACrB,kBAAkB,EAClB,iBAAiB,MAAM,CAAC,MAAM,EAAE,CACjC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,iBAAiB,MAAM,CAAC,MAAM,IAAI,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,OAAO,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC3B,CAAC"}
|
package/dist/utils/graphql.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GraphQLClient } from "graphql-request";
|
|
2
2
|
export declare function createClient(): GraphQLClient;
|
|
3
3
|
export declare const PUBLISH_PACKAGE_MUTATION = "\n mutation PublishPackage($token: String!, $input: PublishPackageInput!) {\n publishPackage(token: $token, input: $input) {\n success\n message\n packageId\n status\n }\n }\n";
|
|
4
|
+
export declare const IMPORT_BLOCK_MUTATION = "\n mutation ImportBlock($input: ImportBlockInput!) {\n importBlock(input: $input) {\n id\n blockType\n name\n description\n icon\n category\n sourceCode\n schemaFields {\n key\n type\n label\n defaultValue\n placeholder\n required\n helperText\n options\n minValue\n maxValue\n }\n defaultContent\n version\n createdAt\n }\n }\n";
|
|
4
5
|
//# sourceMappingURL=graphql.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/utils/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,wBAAgB,YAAY,IAAI,aAAa,CAe5C;AAGD,eAAO,MAAM,wBAAwB,gNASpC,CAAC"}
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/utils/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,wBAAgB,YAAY,IAAI,aAAa,CAe5C;AAGD,eAAO,MAAM,wBAAwB,gNASpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,udA2BjC,CAAC"}
|
package/dist/utils/graphql.js
CHANGED
|
@@ -23,4 +23,32 @@ export const PUBLISH_PACKAGE_MUTATION = `
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
|
+
export const IMPORT_BLOCK_MUTATION = `
|
|
27
|
+
mutation ImportBlock($input: ImportBlockInput!) {
|
|
28
|
+
importBlock(input: $input) {
|
|
29
|
+
id
|
|
30
|
+
blockType
|
|
31
|
+
name
|
|
32
|
+
description
|
|
33
|
+
icon
|
|
34
|
+
category
|
|
35
|
+
sourceCode
|
|
36
|
+
schemaFields {
|
|
37
|
+
key
|
|
38
|
+
type
|
|
39
|
+
label
|
|
40
|
+
defaultValue
|
|
41
|
+
placeholder
|
|
42
|
+
required
|
|
43
|
+
helperText
|
|
44
|
+
options
|
|
45
|
+
minValue
|
|
46
|
+
maxValue
|
|
47
|
+
}
|
|
48
|
+
defaultContent
|
|
49
|
+
version
|
|
50
|
+
createdAt
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
26
54
|
//# sourceMappingURL=graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/utils/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAE5B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,sDAAsD,CACvD,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE;QACtC,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,MAAM,CAAC,QAAQ,EAAE;SAC3C;KACF,CAAC,CAAC;AACL,CAAC;AAED,oBAAoB;AACpB,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;CASvC,CAAC"}
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/utils/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAE5B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,sDAAsD,CACvD,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE;QACtC,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,MAAM,CAAC,QAAQ,EAAE;SAC3C;KACF,CAAC,CAAC;AACL,CAAC;AAED,oBAAoB;AACpB,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;CASvC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmssy-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Unified CLI for building and publishing blocks to Cmssy marketplace",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"node": ">=18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"archiver": "^7.0.1",
|
|
44
45
|
"chalk": "^5.3.0",
|
|
45
46
|
"chokidar": "^4.0.1",
|
|
46
47
|
"commander": "^12.1.0",
|
|
@@ -56,15 +57,18 @@
|
|
|
56
57
|
"node-fetch": "^3.3.2",
|
|
57
58
|
"ora": "^8.0.1",
|
|
58
59
|
"postcss": "^8.4.49",
|
|
60
|
+
"semver": "^7.6.3",
|
|
59
61
|
"tsx": "^4.21.0"
|
|
60
62
|
},
|
|
61
63
|
"devDependencies": {
|
|
64
|
+
"@types/archiver": "^7.0.0",
|
|
62
65
|
"@types/express": "^5.0.0",
|
|
63
66
|
"@types/form-data": "^2.5.2",
|
|
64
67
|
"@types/fs-extra": "^11.0.4",
|
|
65
68
|
"@types/inquirer": "^9.0.7",
|
|
66
69
|
"@types/node": "^22.10.2",
|
|
67
70
|
"@types/node-fetch": "^2.6.13",
|
|
71
|
+
"@types/semver": "^7.7.1",
|
|
68
72
|
"typescript": "^5.7.2"
|
|
69
73
|
}
|
|
70
74
|
}
|