@zuplo/cli 6.72.8 → 6.72.9
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/node_modules/@posthog/core/dist/surveys/activation.d.ts +20 -0
- package/node_modules/@posthog/core/dist/surveys/activation.d.ts.map +1 -0
- package/node_modules/@posthog/core/dist/surveys/activation.js +45 -0
- package/node_modules/@posthog/core/dist/surveys/activation.mjs +8 -0
- package/node_modules/@posthog/core/dist/surveys/events.d.ts +1 -4
- package/node_modules/@posthog/core/dist/surveys/events.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/surveys/index.d.ts +2 -0
- package/node_modules/@posthog/core/dist/surveys/index.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/surveys/index.js +16 -2
- package/node_modules/@posthog/core/dist/surveys/index.mjs +3 -1
- package/node_modules/@posthog/core/dist/surveys/keys.d.ts +14 -0
- package/node_modules/@posthog/core/dist/surveys/keys.d.ts.map +1 -0
- package/node_modules/@posthog/core/dist/surveys/keys.js +45 -0
- package/node_modules/@posthog/core/dist/surveys/keys.mjs +8 -0
- package/node_modules/@posthog/core/dist/types.d.ts +87 -76
- package/node_modules/@posthog/core/dist/types.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/types.js +65 -76
- package/node_modules/@posthog/core/dist/types.mjs +66 -77
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/surveys/activation.spec.ts +61 -0
- package/node_modules/@posthog/core/src/surveys/activation.ts +28 -0
- package/node_modules/@posthog/core/src/surveys/events.ts +1 -5
- package/node_modules/@posthog/core/src/surveys/index.ts +2 -0
- package/node_modules/@posthog/core/src/surveys/keys.spec.ts +29 -0
- package/node_modules/@posthog/core/src/surveys/keys.ts +23 -0
- package/node_modules/@posthog/core/src/types.ts +88 -76
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/package.json +6 -6
|
@@ -633,43 +633,49 @@ export type SurveyAppearance = {
|
|
|
633
633
|
widgetColor?: string
|
|
634
634
|
}
|
|
635
635
|
|
|
636
|
-
export
|
|
637
|
-
TopLeft
|
|
638
|
-
TopCenter
|
|
639
|
-
TopRight
|
|
640
|
-
MiddleLeft
|
|
641
|
-
MiddleCenter
|
|
642
|
-
MiddleRight
|
|
643
|
-
Left
|
|
644
|
-
Right
|
|
645
|
-
Center
|
|
646
|
-
}
|
|
636
|
+
export const SurveyPosition = {
|
|
637
|
+
TopLeft: 'top_left',
|
|
638
|
+
TopCenter: 'top_center',
|
|
639
|
+
TopRight: 'top_right',
|
|
640
|
+
MiddleLeft: 'middle_left',
|
|
641
|
+
MiddleCenter: 'middle_center',
|
|
642
|
+
MiddleRight: 'middle_right',
|
|
643
|
+
Left: 'left',
|
|
644
|
+
Right: 'right',
|
|
645
|
+
Center: 'center',
|
|
646
|
+
} as const
|
|
647
|
+
export type SurveyPosition = (typeof SurveyPosition)[keyof typeof SurveyPosition]
|
|
647
648
|
|
|
648
|
-
export
|
|
649
|
-
Button
|
|
650
|
-
Tab
|
|
651
|
-
Selector
|
|
652
|
-
}
|
|
649
|
+
export const SurveyWidgetType = {
|
|
650
|
+
Button: 'button',
|
|
651
|
+
Tab: 'tab',
|
|
652
|
+
Selector: 'selector',
|
|
653
|
+
} as const
|
|
654
|
+
export type SurveyWidgetType = (typeof SurveyWidgetType)[keyof typeof SurveyWidgetType]
|
|
653
655
|
|
|
654
|
-
export
|
|
655
|
-
Popover
|
|
656
|
-
API
|
|
657
|
-
Widget
|
|
658
|
-
ExternalSurvey
|
|
659
|
-
}
|
|
656
|
+
export const SurveyType = {
|
|
657
|
+
Popover: 'popover',
|
|
658
|
+
API: 'api',
|
|
659
|
+
Widget: 'widget',
|
|
660
|
+
ExternalSurvey: 'external_survey',
|
|
661
|
+
} as const
|
|
662
|
+
export type SurveyType = (typeof SurveyType)[keyof typeof SurveyType]
|
|
660
663
|
|
|
661
664
|
export type SurveyQuestion = BasicSurveyQuestion | LinkSurveyQuestion | RatingSurveyQuestion | MultipleSurveyQuestion
|
|
662
665
|
|
|
663
|
-
export
|
|
664
|
-
Html
|
|
665
|
-
Text
|
|
666
|
-
}
|
|
666
|
+
export const SurveyQuestionDescriptionContentType = {
|
|
667
|
+
Html: 'html',
|
|
668
|
+
Text: 'text',
|
|
669
|
+
} as const
|
|
670
|
+
export type SurveyQuestionDescriptionContentType =
|
|
671
|
+
(typeof SurveyQuestionDescriptionContentType)[keyof typeof SurveyQuestionDescriptionContentType]
|
|
667
672
|
|
|
668
673
|
// Survey validation types
|
|
669
|
-
export
|
|
670
|
-
MinLength
|
|
671
|
-
MaxLength
|
|
672
|
-
}
|
|
674
|
+
export const SurveyValidationType = {
|
|
675
|
+
MinLength: 'min_length',
|
|
676
|
+
MaxLength: 'max_length',
|
|
677
|
+
} as const
|
|
678
|
+
export type SurveyValidationType = (typeof SurveyValidationType)[keyof typeof SurveyValidationType]
|
|
673
679
|
|
|
674
680
|
export interface SurveyValidationRule {
|
|
675
681
|
type: SurveyValidationType
|
|
@@ -710,16 +716,16 @@ type SurveyQuestionBase = {
|
|
|
710
716
|
}
|
|
711
717
|
|
|
712
718
|
export type BasicSurveyQuestion = SurveyQuestionBase & {
|
|
713
|
-
type: SurveyQuestionType.Open
|
|
719
|
+
type: typeof SurveyQuestionType.Open
|
|
714
720
|
}
|
|
715
721
|
|
|
716
722
|
export type LinkSurveyQuestion = SurveyQuestionBase & {
|
|
717
|
-
type: SurveyQuestionType.Link
|
|
723
|
+
type: typeof SurveyQuestionType.Link
|
|
718
724
|
link?: string | null
|
|
719
725
|
}
|
|
720
726
|
|
|
721
727
|
export type RatingSurveyQuestion = SurveyQuestionBase & {
|
|
722
|
-
type: SurveyQuestionType.Rating
|
|
728
|
+
type: typeof SurveyQuestionType.Rating
|
|
723
729
|
display: SurveyRatingDisplay
|
|
724
730
|
scale: 2 | 3 | 5 | 7 | 10
|
|
725
731
|
lowerBoundLabel: string
|
|
@@ -727,49 +733,52 @@ export type RatingSurveyQuestion = SurveyQuestionBase & {
|
|
|
727
733
|
skipSubmitButton?: boolean
|
|
728
734
|
}
|
|
729
735
|
|
|
730
|
-
export
|
|
731
|
-
Number
|
|
732
|
-
Emoji
|
|
733
|
-
}
|
|
736
|
+
export const SurveyRatingDisplay = {
|
|
737
|
+
Number: 'number',
|
|
738
|
+
Emoji: 'emoji',
|
|
739
|
+
} as const
|
|
740
|
+
export type SurveyRatingDisplay = (typeof SurveyRatingDisplay)[keyof typeof SurveyRatingDisplay]
|
|
734
741
|
|
|
735
742
|
export type MultipleSurveyQuestion = SurveyQuestionBase & {
|
|
736
|
-
type: SurveyQuestionType.SingleChoice | SurveyQuestionType.MultipleChoice
|
|
743
|
+
type: typeof SurveyQuestionType.SingleChoice | typeof SurveyQuestionType.MultipleChoice
|
|
737
744
|
choices: string[]
|
|
738
745
|
hasOpenChoice?: boolean
|
|
739
746
|
shuffleOptions?: boolean
|
|
740
747
|
skipSubmitButton?: boolean
|
|
741
748
|
}
|
|
742
749
|
|
|
743
|
-
export
|
|
744
|
-
Open
|
|
745
|
-
MultipleChoice
|
|
746
|
-
SingleChoice
|
|
747
|
-
Rating
|
|
748
|
-
Link
|
|
749
|
-
}
|
|
750
|
+
export const SurveyQuestionType = {
|
|
751
|
+
Open: 'open',
|
|
752
|
+
MultipleChoice: 'multiple_choice',
|
|
753
|
+
SingleChoice: 'single_choice',
|
|
754
|
+
Rating: 'rating',
|
|
755
|
+
Link: 'link',
|
|
756
|
+
} as const
|
|
757
|
+
export type SurveyQuestionType = (typeof SurveyQuestionType)[keyof typeof SurveyQuestionType]
|
|
750
758
|
|
|
751
|
-
export
|
|
752
|
-
NextQuestion
|
|
753
|
-
End
|
|
754
|
-
ResponseBased
|
|
755
|
-
SpecificQuestion
|
|
756
|
-
}
|
|
759
|
+
export const SurveyQuestionBranchingType = {
|
|
760
|
+
NextQuestion: 'next_question',
|
|
761
|
+
End: 'end',
|
|
762
|
+
ResponseBased: 'response_based',
|
|
763
|
+
SpecificQuestion: 'specific_question',
|
|
764
|
+
} as const
|
|
765
|
+
export type SurveyQuestionBranchingType = (typeof SurveyQuestionBranchingType)[keyof typeof SurveyQuestionBranchingType]
|
|
757
766
|
|
|
758
767
|
export type NextQuestionBranching = {
|
|
759
|
-
type: SurveyQuestionBranchingType.NextQuestion
|
|
768
|
+
type: typeof SurveyQuestionBranchingType.NextQuestion
|
|
760
769
|
}
|
|
761
770
|
|
|
762
771
|
export type EndBranching = {
|
|
763
|
-
type: SurveyQuestionBranchingType.End
|
|
772
|
+
type: typeof SurveyQuestionBranchingType.End
|
|
764
773
|
}
|
|
765
774
|
|
|
766
775
|
export type ResponseBasedBranching = {
|
|
767
|
-
type: SurveyQuestionBranchingType.ResponseBased
|
|
776
|
+
type: typeof SurveyQuestionBranchingType.ResponseBased
|
|
768
777
|
responseValues: Record<string, any>
|
|
769
778
|
}
|
|
770
779
|
|
|
771
780
|
export type SpecificQuestionBranching = {
|
|
772
|
-
type: SurveyQuestionBranchingType.SpecificQuestion
|
|
781
|
+
type: typeof SurveyQuestionBranchingType.SpecificQuestion
|
|
773
782
|
index: number
|
|
774
783
|
}
|
|
775
784
|
|
|
@@ -783,20 +792,22 @@ export type SurveyResponses = Record<string, SurveyResponseValue>
|
|
|
783
792
|
|
|
784
793
|
export type SurveyCallback = (surveys: Survey[]) => void
|
|
785
794
|
|
|
786
|
-
export
|
|
787
|
-
Regex
|
|
788
|
-
NotRegex
|
|
789
|
-
Exact
|
|
790
|
-
IsNot
|
|
791
|
-
Icontains
|
|
792
|
-
NotIcontains
|
|
793
|
-
}
|
|
795
|
+
export const SurveyMatchType = {
|
|
796
|
+
Regex: 'regex',
|
|
797
|
+
NotRegex: 'not_regex',
|
|
798
|
+
Exact: 'exact',
|
|
799
|
+
IsNot: 'is_not',
|
|
800
|
+
Icontains: 'icontains',
|
|
801
|
+
NotIcontains: 'not_icontains',
|
|
802
|
+
} as const
|
|
803
|
+
export type SurveyMatchType = (typeof SurveyMatchType)[keyof typeof SurveyMatchType]
|
|
794
804
|
|
|
795
|
-
export
|
|
796
|
-
Once
|
|
797
|
-
Recurring
|
|
798
|
-
Always
|
|
799
|
-
}
|
|
805
|
+
export const SurveySchedule = {
|
|
806
|
+
Once: 'once',
|
|
807
|
+
Recurring: 'recurring',
|
|
808
|
+
Always: 'always',
|
|
809
|
+
} as const
|
|
810
|
+
export type SurveySchedule = (typeof SurveySchedule)[keyof typeof SurveySchedule]
|
|
800
811
|
|
|
801
812
|
export type SurveyElement = {
|
|
802
813
|
text?: string
|
|
@@ -853,9 +864,9 @@ export type Survey = {
|
|
|
853
864
|
}
|
|
854
865
|
start_date?: string
|
|
855
866
|
end_date?: string
|
|
856
|
-
current_iteration?: number
|
|
857
|
-
current_iteration_start_date?: string
|
|
858
|
-
schedule?: SurveySchedule
|
|
867
|
+
current_iteration?: number | null
|
|
868
|
+
current_iteration_start_date?: string | null
|
|
869
|
+
schedule?: SurveySchedule | null
|
|
859
870
|
}
|
|
860
871
|
|
|
861
872
|
export type SurveyActionType = {
|
|
@@ -865,11 +876,12 @@ export type SurveyActionType = {
|
|
|
865
876
|
}
|
|
866
877
|
|
|
867
878
|
/** Sync with plugin-server/src/types.ts */
|
|
868
|
-
export
|
|
869
|
-
Contains
|
|
870
|
-
Exact
|
|
871
|
-
Regex
|
|
872
|
-
}
|
|
879
|
+
export const ActionStepStringMatching = {
|
|
880
|
+
Contains: 'contains',
|
|
881
|
+
Exact: 'exact',
|
|
882
|
+
Regex: 'regex',
|
|
883
|
+
} as const
|
|
884
|
+
export type ActionStepStringMatching = (typeof ActionStepStringMatching)[keyof typeof ActionStepStringMatching]
|
|
873
885
|
|
|
874
886
|
export type ActionStepType = {
|
|
875
887
|
event?: string
|
|
@@ -77,6 +77,7 @@ class Receiver extends Writable {
|
|
|
77
77
|
|
|
78
78
|
this._totalPayloadLength = 0;
|
|
79
79
|
this._messageLength = 0;
|
|
80
|
+
this._numFragments = 0;
|
|
80
81
|
this._fragments = [];
|
|
81
82
|
|
|
82
83
|
this._errored = false;
|
|
@@ -500,6 +501,19 @@ class Receiver extends Writable {
|
|
|
500
501
|
return;
|
|
501
502
|
}
|
|
502
503
|
|
|
504
|
+
if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
|
|
505
|
+
const error = this.createError(
|
|
506
|
+
RangeError,
|
|
507
|
+
'Too many message fragments',
|
|
508
|
+
false,
|
|
509
|
+
1008,
|
|
510
|
+
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
511
|
+
);
|
|
512
|
+
|
|
513
|
+
cb(error);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
|
|
503
517
|
if (this._compressed) {
|
|
504
518
|
this._state = INFLATING;
|
|
505
519
|
this.decompress(data, cb);
|
|
@@ -507,22 +521,6 @@ class Receiver extends Writable {
|
|
|
507
521
|
}
|
|
508
522
|
|
|
509
523
|
if (data.length) {
|
|
510
|
-
if (
|
|
511
|
-
this._maxFragments > 0 &&
|
|
512
|
-
this._fragments.length >= this._maxFragments
|
|
513
|
-
) {
|
|
514
|
-
const error = this.createError(
|
|
515
|
-
RangeError,
|
|
516
|
-
'Too many message fragments',
|
|
517
|
-
false,
|
|
518
|
-
1008,
|
|
519
|
-
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
520
|
-
);
|
|
521
|
-
|
|
522
|
-
cb(error);
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
524
|
//
|
|
527
525
|
// This message is not compressed so its length is the sum of the payload
|
|
528
526
|
// length of all fragments.
|
|
@@ -562,22 +560,6 @@ class Receiver extends Writable {
|
|
|
562
560
|
return;
|
|
563
561
|
}
|
|
564
562
|
|
|
565
|
-
if (
|
|
566
|
-
this._maxFragments > 0 &&
|
|
567
|
-
this._fragments.length >= this._maxFragments
|
|
568
|
-
) {
|
|
569
|
-
const error = this.createError(
|
|
570
|
-
RangeError,
|
|
571
|
-
'Too many message fragments',
|
|
572
|
-
false,
|
|
573
|
-
1008,
|
|
574
|
-
'WS_ERR_TOO_MANY_BUFFERED_PARTS'
|
|
575
|
-
);
|
|
576
|
-
|
|
577
|
-
cb(error);
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
563
|
this._fragments.push(buf);
|
|
582
564
|
}
|
|
583
565
|
|
|
@@ -604,6 +586,7 @@ class Receiver extends Writable {
|
|
|
604
586
|
this._totalPayloadLength = 0;
|
|
605
587
|
this._messageLength = 0;
|
|
606
588
|
this._fragmented = 0;
|
|
589
|
+
this._numFragments = 0;
|
|
607
590
|
this._fragments = [];
|
|
608
591
|
|
|
609
592
|
if (this._opcode === 2) {
|
|
@@ -43,9 +43,9 @@ class WebSocketServer extends EventEmitter {
|
|
|
43
43
|
* called
|
|
44
44
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
45
45
|
* @param {String} [options.host] The hostname where to bind the server
|
|
46
|
-
* @param {Number} [options.maxBufferedChunks=
|
|
46
|
+
* @param {Number} [options.maxBufferedChunks=262144] The maximum number of
|
|
47
47
|
* buffered data chunks
|
|
48
|
-
* @param {Number} [options.maxFragments=
|
|
48
|
+
* @param {Number} [options.maxFragments=16384] The maximum number of message
|
|
49
49
|
* fragments
|
|
50
50
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
51
51
|
* size
|
|
@@ -69,8 +69,8 @@ class WebSocketServer extends EventEmitter {
|
|
|
69
69
|
options = {
|
|
70
70
|
allowSynchronousEvents: true,
|
|
71
71
|
autoPong: true,
|
|
72
|
-
maxBufferedChunks:
|
|
73
|
-
maxFragments:
|
|
72
|
+
maxBufferedChunks: 256 * 1024,
|
|
73
|
+
maxFragments: 16 * 1024,
|
|
74
74
|
maxPayload: 100 * 1024 * 1024,
|
|
75
75
|
skipUTF8Validation: false,
|
|
76
76
|
perMessageDeflate: false,
|
|
@@ -646,9 +646,9 @@ module.exports = WebSocket;
|
|
|
646
646
|
* masking key
|
|
647
647
|
* @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
|
|
648
648
|
* handshake request
|
|
649
|
-
* @param {Number} [options.maxBufferedChunks=
|
|
649
|
+
* @param {Number} [options.maxBufferedChunks=262144] The maximum number of
|
|
650
650
|
* buffered data chunks
|
|
651
|
-
* @param {Number} [options.maxFragments=
|
|
651
|
+
* @param {Number} [options.maxFragments=16384] The maximum number of message
|
|
652
652
|
* fragments
|
|
653
653
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
654
654
|
* size
|
|
@@ -670,8 +670,8 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
670
670
|
autoPong: true,
|
|
671
671
|
closeTimeout: CLOSE_TIMEOUT,
|
|
672
672
|
protocolVersion: protocolVersions[1],
|
|
673
|
-
maxBufferedChunks:
|
|
674
|
-
maxFragments:
|
|
673
|
+
maxBufferedChunks: 256 * 1024,
|
|
674
|
+
maxFragments: 16 * 1024,
|
|
675
675
|
maxPayload: 100 * 1024 * 1024,
|
|
676
676
|
skipUTF8Validation: false,
|
|
677
677
|
perMessageDeflate: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ws",
|
|
3
|
-
"version": "8.21.
|
|
3
|
+
"version": "8.21.1",
|
|
4
4
|
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"HyBi",
|
|
@@ -66,5 +66,9 @@
|
|
|
66
66
|
"nyc": "^15.0.0",
|
|
67
67
|
"prettier": "^3.0.0",
|
|
68
68
|
"utf-8-validate": "^6.0.0"
|
|
69
|
+
},
|
|
70
|
+
"allowScripts": {
|
|
71
|
+
"bufferutil": true,
|
|
72
|
+
"utf-8-validate": true
|
|
69
73
|
}
|
|
70
74
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "6.72.
|
|
3
|
+
"version": "6.72.9",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@opentelemetry/api": "1.9.0",
|
|
28
28
|
"@opentelemetry/api-logs": "0.201.1",
|
|
29
29
|
"@swc/core": "1.10.18",
|
|
30
|
-
"@zuplo/core": "6.72.
|
|
30
|
+
"@zuplo/core": "6.72.9",
|
|
31
31
|
"@zuplo/editor": "1.0.20821740935",
|
|
32
|
-
"@zuplo/openapi-tools": "6.72.
|
|
33
|
-
"@zuplo/runtime": "6.72.
|
|
32
|
+
"@zuplo/openapi-tools": "6.72.9",
|
|
33
|
+
"@zuplo/runtime": "6.72.9",
|
|
34
34
|
"chalk": "5.4.1",
|
|
35
35
|
"chokidar": "3.5.3",
|
|
36
36
|
"cookie": "1.0.2",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"workerd": "1.20241230.0",
|
|
62
62
|
"yargs": "17.7.2",
|
|
63
63
|
"zod": "3.25.76",
|
|
64
|
-
"@zuplo/graphql": "6.72.
|
|
65
|
-
"@zuplo/otel": "6.72.
|
|
64
|
+
"@zuplo/graphql": "6.72.9",
|
|
65
|
+
"@zuplo/otel": "6.72.9"
|
|
66
66
|
},
|
|
67
67
|
"bundleDependencies": [
|
|
68
68
|
"@inquirer/prompts",
|