@slicemachine/manager 0.1.1-dev-plugins-m3.8 → 0.2.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/_node_modules/common-tags/es/stripIndent/stripIndent.cjs +1 -2
- package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs.map +1 -1
- package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js +1 -2
- package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js.map +1 -1
- package/dist/auth/PrismicAuthManager.d.ts +58 -58
- package/dist/auth/createPrismicAuthManager.d.ts +4 -4
- package/dist/auth/createPrismicAuthManagerMiddleware.d.ts +14 -14
- package/dist/client/index.d.ts +6 -6
- package/dist/constants/API_ENDPOINTS.d.ts +8 -8
- package/dist/constants/API_TOKENS.d.ts +5 -5
- package/dist/constants/APPLICATION_MODE.d.ts +5 -5
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.d.ts +5 -5
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.d.ts +1 -1
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.d.ts +1 -1
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.d.ts +1 -1
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.d.ts +1 -1
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.d.ts +1 -1
- package/dist/constants/SLICE_MACHINE_USER_AGENT.d.ts +1 -1
- package/dist/constants/TS_CONFIG_FILENAME.d.ts +1 -1
- package/dist/constants/VERSION_KIND.d.ts +6 -6
- package/dist/errors.d.ts +34 -34
- package/dist/index.d.ts +11 -11
- package/dist/lib/DecodeError.d.ts +12 -12
- package/dist/lib/addTrailingSlash.d.ts +1 -1
- package/dist/lib/assertPluginsInitialized.d.ts +2 -2
- package/dist/lib/bufferCodec.d.ts +4 -4
- package/dist/lib/buildPrismicRepositoryAPIEndpoint.d.ts +4 -4
- package/dist/lib/castArray.d.ts +1 -1
- package/dist/lib/checkIsURLAccessible.d.ts +1 -1
- package/dist/lib/createContentDigest.d.ts +9 -9
- package/dist/lib/decode.d.ts +10 -10
- package/dist/lib/decodeHookResult.d.ts +10 -10
- package/dist/lib/decodePackageJSON.d.ts +12 -12
- package/dist/lib/decodeSliceMachineConfig.d.ts +3 -3
- package/dist/lib/fetchGitHubReleaseBodyForRelease.d.ts +21 -21
- package/dist/lib/fetchNPMPackageVersions.d.ts +5 -5
- package/dist/lib/format.d.ts +12 -12
- package/dist/lib/functionCodec.d.ts +2 -2
- package/dist/lib/installDependencies.d.ts +13 -13
- package/dist/lib/locateFileUpward.d.ts +10 -10
- package/dist/lib/markdownToHTML.d.ts +1 -1
- package/dist/lib/mockSlice.d.ts +9 -9
- package/dist/lib/prismicrc.d.ts +10 -10
- package/dist/lib/serializeCookies.d.ts +6 -6
- package/dist/managers/BaseManager.d.ts +33 -33
- package/dist/managers/SliceMachineManager.d.ts +95 -95
- package/dist/managers/createSliceMachineManager.d.ts +5 -5
- package/dist/managers/createSliceMachineManagerClient.d.ts +8 -8
- package/dist/managers/createSliceMachineManagerMiddleware.d.ts +15 -15
- package/dist/managers/customTypes/CustomTypesManager.d.ts +56 -56
- package/dist/managers/plugins/PluginsManager.d.ts +13 -13
- package/dist/managers/prismicRepository/PrismicRepositoryManager.d.ts +30 -30
- package/dist/managers/prismicRepository/types.d.ts +123 -123
- package/dist/managers/project/ProjectManager.d.ts +49 -49
- package/dist/managers/screenshots/ScreenshotsManager.cjs +1 -1
- package/dist/managers/screenshots/ScreenshotsManager.cjs.map +1 -1
- package/dist/managers/screenshots/ScreenshotsManager.d.ts +34 -34
- package/dist/managers/screenshots/ScreenshotsManager.js +1 -1
- package/dist/managers/screenshots/ScreenshotsManager.js.map +1 -1
- package/dist/managers/simulator/SimulatorManager.d.ts +38 -38
- package/dist/managers/slices/SlicesManager.d.ts +128 -128
- package/dist/managers/snippets/SnippetsManager.d.ts +11 -11
- package/dist/managers/telemetry/TelemetryManager.d.ts +30 -30
- package/dist/managers/telemetry/types.d.ts +143 -143
- package/dist/managers/user/UserManager.d.ts +40 -40
- package/dist/managers/versions/VersionsManager.d.ts +19 -19
- package/dist/managers/versions/types.d.ts +5 -5
- package/dist/test/createSliceMachineManagerMSWHandler.d.ts +7 -7
- package/dist/test/index.d.ts +2 -2
- package/dist/types.d.ts +45 -45
- package/package.json +4 -4
- package/src/managers/screenshots/ScreenshotsManager.ts +1 -1
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
import type { LimitType } from "../prismicRepository/types";
|
|
2
|
-
export declare const SegmentEventType: {
|
|
3
|
-
readonly command_init_start: "command:init:start";
|
|
4
|
-
readonly command_init_identify: "command:init:identify";
|
|
5
|
-
readonly command_init_end: "command:init:end";
|
|
6
|
-
readonly review: "review";
|
|
7
|
-
readonly onboarding_start: "onboarding:start";
|
|
8
|
-
readonly onboarding_skip: "onboarding:skip";
|
|
9
|
-
readonly onboarding_continue_screenIntro: "onboarding:continue:screen-intro";
|
|
10
|
-
readonly onboarding_continue_screen1: "onboarding:continue:screen-1";
|
|
11
|
-
readonly onboarding_continue_screen2: "onboarding:continue:screen-2";
|
|
12
|
-
readonly onboarding_continue_screen3: "onboarding:continue:screen-3";
|
|
13
|
-
readonly sliceSimulator_setup: "slice-simulator:setup";
|
|
14
|
-
readonly sliceSimulator_open: "slice-simulator:open";
|
|
15
|
-
readonly sliceSimulator_isNotRunning: "slice-simulator:is-not-running";
|
|
16
|
-
readonly pageView: "page-view";
|
|
17
|
-
readonly openVideoTutorials: "open-video-tutorials";
|
|
18
|
-
readonly customType_created: "custom-type:created";
|
|
19
|
-
readonly customType_fieldAdded: "custom-type:field-added";
|
|
20
|
-
readonly customType_sliceZoneUpdated: "custom-type:slice-zone-updated";
|
|
21
|
-
readonly customType_saved: "custom-type:saved";
|
|
22
|
-
readonly slice_created: "slice:created";
|
|
23
|
-
readonly screenshotTaken: "screenshot-taken";
|
|
24
|
-
readonly changes_pushed: "changes:pushed";
|
|
25
|
-
readonly changes_limitReach: "changes:limit-reach";
|
|
26
|
-
readonly editor_widgetUsed: "editor:widget-used";
|
|
27
|
-
};
|
|
28
|
-
type SegmentEventTypes = (typeof SegmentEventType)[keyof typeof SegmentEventType];
|
|
29
|
-
export declare const HumanSegmentEventType: {
|
|
30
|
-
readonly "command:init:start": "SliceMachine Init Start";
|
|
31
|
-
readonly "command:init:identify": "SliceMachine Init Identify";
|
|
32
|
-
readonly "command:init:end": "SliceMachine Init End";
|
|
33
|
-
readonly review: "SliceMachine Review";
|
|
34
|
-
readonly "onboarding:start": "SliceMachine Onboarding Start";
|
|
35
|
-
readonly "onboarding:skip": "SliceMachine Onboarding Skip";
|
|
36
|
-
readonly "onboarding:continue:screen-intro": "SliceMachine Onboarding Continue Screen Intro";
|
|
37
|
-
readonly "onboarding:continue:screen-1": "SliceMachine Onboarding Continue Screen 1";
|
|
38
|
-
readonly "onboarding:continue:screen-2": "SliceMachine Onboarding Continue Screen 2";
|
|
39
|
-
readonly "onboarding:continue:screen-3": "SliceMachine Onboarding Continue Screen 3";
|
|
40
|
-
readonly "slice-simulator:setup": "SliceMachine Slice Simulator Setup";
|
|
41
|
-
readonly "slice-simulator:open": "SliceMachine Slice Simulator Open";
|
|
42
|
-
readonly "slice-simulator:is-not-running": "SliceMachine Slice Simulator is not running";
|
|
43
|
-
readonly "page-view": "SliceMachine Page View";
|
|
44
|
-
readonly "open-video-tutorials": "SliceMachine Open Video Tutorials";
|
|
45
|
-
readonly "custom-type:created": "SliceMachine Custom Type Created";
|
|
46
|
-
readonly "custom-type:field-added": "SliceMachine Custom Type Field Added";
|
|
47
|
-
readonly "custom-type:slice-zone-updated": "SliceMachine Slicezone Updated";
|
|
48
|
-
readonly "custom-type:saved": "SliceMachine Custom Type Saved";
|
|
49
|
-
readonly "slice:created": "SliceMachine Slice Created";
|
|
50
|
-
readonly "screenshot-taken": "SliceMachine Screenshot Taken";
|
|
51
|
-
readonly "changes:pushed": "SliceMachine Changes Pushed";
|
|
52
|
-
readonly "changes:limit-reach": "SliceMachine Changes Limit Reach";
|
|
53
|
-
readonly "editor:widget-used": "SliceMachine Editor Widget Used";
|
|
54
|
-
};
|
|
55
|
-
export type HumanSegmentEventTypes = (typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];
|
|
56
|
-
type SegmentEvent<TType extends SegmentEventTypes, TProperties extends Record<string, unknown> | void = void> = TProperties extends void ? {
|
|
57
|
-
event: TType;
|
|
58
|
-
repository?: string;
|
|
59
|
-
} : {
|
|
60
|
-
event: TType;
|
|
61
|
-
repository?: string;
|
|
62
|
-
} & TProperties;
|
|
63
|
-
type CommandInitStartSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_start>;
|
|
64
|
-
type CommandInitIdentifySegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_identify>;
|
|
65
|
-
type CommandInitEndSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_end, {
|
|
66
|
-
framework: string;
|
|
67
|
-
success: boolean;
|
|
68
|
-
error?: string;
|
|
69
|
-
}>;
|
|
70
|
-
type ReviewSegmentEvent = SegmentEvent<typeof SegmentEventType.review, {
|
|
71
|
-
rating: number;
|
|
72
|
-
comment: string;
|
|
73
|
-
}>;
|
|
74
|
-
type OnboardingStartSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_start>;
|
|
75
|
-
type OnboardingSkipSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_skip, {
|
|
76
|
-
screenSkipped: number;
|
|
77
|
-
}>;
|
|
78
|
-
type OnboardingContinueScreenIntroSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screenIntro>;
|
|
79
|
-
type OnboardingContinueScreen1SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen1>;
|
|
80
|
-
type OnboardingContinueScreen2SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen2>;
|
|
81
|
-
type OnboardingContinueScreen3SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen3>;
|
|
82
|
-
type SliceSimulatorSetupSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_setup>;
|
|
83
|
-
type SliceSimulatorOpenSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_open>;
|
|
84
|
-
type SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_isNotRunning>;
|
|
85
|
-
type PageViewSegmentEvent = SegmentEvent<typeof SegmentEventType.pageView, {
|
|
86
|
-
url: string;
|
|
87
|
-
path: string;
|
|
88
|
-
search: string;
|
|
89
|
-
title: string;
|
|
90
|
-
referrer: string;
|
|
91
|
-
adapter: string;
|
|
92
|
-
}>;
|
|
93
|
-
type OpenVideoTutorialsSegmentEvent = SegmentEvent<typeof SegmentEventType.openVideoTutorials, {
|
|
94
|
-
video: string;
|
|
95
|
-
}>;
|
|
96
|
-
type CustomTypeCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_created, {
|
|
97
|
-
id: string;
|
|
98
|
-
name: string;
|
|
99
|
-
type: "repeatable" | "single";
|
|
100
|
-
}>;
|
|
101
|
-
type CustomTypeFieldAddedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_fieldAdded, {
|
|
102
|
-
id: string;
|
|
103
|
-
name: string;
|
|
104
|
-
zone: "static" | "repeatable";
|
|
105
|
-
type: string;
|
|
106
|
-
}>;
|
|
107
|
-
type CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_sliceZoneUpdated, {
|
|
108
|
-
customTypeId: string;
|
|
109
|
-
}>;
|
|
110
|
-
type CustomTypeSavedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_saved, {
|
|
111
|
-
id: string;
|
|
112
|
-
name: string;
|
|
113
|
-
type: "repeatable" | "single";
|
|
114
|
-
}>;
|
|
115
|
-
type SliceCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.slice_created, {
|
|
116
|
-
id: string;
|
|
117
|
-
name: string;
|
|
118
|
-
library: string;
|
|
119
|
-
}>;
|
|
120
|
-
type ScreenshotTakenSegmentEvent = SegmentEvent<typeof SegmentEventType.screenshotTaken, {
|
|
121
|
-
type: "custom" | "automatic";
|
|
122
|
-
method: "fromSimulator" | "upload" | "dragAndDrop";
|
|
123
|
-
}>;
|
|
124
|
-
type ChangesPushedSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_pushed, {
|
|
125
|
-
customTypesCreated: number;
|
|
126
|
-
customTypesModified: number;
|
|
127
|
-
customTypesDeleted: number;
|
|
128
|
-
slicesCreated: number;
|
|
129
|
-
slicesModified: number;
|
|
130
|
-
slicesDeleted: number;
|
|
131
|
-
missingScreenshots: number;
|
|
132
|
-
total: number;
|
|
133
|
-
duration: number;
|
|
134
|
-
hasDeletedDocuments: boolean;
|
|
135
|
-
}>;
|
|
136
|
-
type ChangesLimitReachSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_limitReach, {
|
|
137
|
-
limitType: LimitType;
|
|
138
|
-
}>;
|
|
139
|
-
type EditorWidgetUsedSegmentEvent = SegmentEvent<typeof SegmentEventType.editor_widgetUsed, {
|
|
140
|
-
sliceId: string;
|
|
141
|
-
}>;
|
|
142
|
-
export type SegmentEvents = CommandInitStartSegmentEvent | CommandInitIdentifySegmentEvent | CommandInitEndSegmentEvent | ReviewSegmentEvent | OnboardingStartSegmentEvent | OnboardingSkipSegmentEvent | OnboardingContinueScreenIntroSegmentEvent | OnboardingContinueScreen1SegmentEvent | OnboardingContinueScreen2SegmentEvent | OnboardingContinueScreen3SegmentEvent | SliceSimulatorSetupSegmentEvent | SliceSimulatorOpenSegmentEvent | SliceSimulatorIsNotRunningSegmentEvent | PageViewSegmentEvent | OpenVideoTutorialsSegmentEvent | CustomTypeCreatedSegmentEvent | CustomTypeFieldAddedSegmentEvent | CustomTypeSliceZoneUpdatedSegmentEvent | CustomTypeSavedSegmentEvent | SliceCreatedSegmentEvent | ScreenshotTakenSegmentEvent | ChangesPushedSegmentEvent | ChangesLimitReachSegmentEvent | EditorWidgetUsedSegmentEvent;
|
|
143
|
-
export {};
|
|
1
|
+
import type { LimitType } from "../prismicRepository/types";
|
|
2
|
+
export declare const SegmentEventType: {
|
|
3
|
+
readonly command_init_start: "command:init:start";
|
|
4
|
+
readonly command_init_identify: "command:init:identify";
|
|
5
|
+
readonly command_init_end: "command:init:end";
|
|
6
|
+
readonly review: "review";
|
|
7
|
+
readonly onboarding_start: "onboarding:start";
|
|
8
|
+
readonly onboarding_skip: "onboarding:skip";
|
|
9
|
+
readonly onboarding_continue_screenIntro: "onboarding:continue:screen-intro";
|
|
10
|
+
readonly onboarding_continue_screen1: "onboarding:continue:screen-1";
|
|
11
|
+
readonly onboarding_continue_screen2: "onboarding:continue:screen-2";
|
|
12
|
+
readonly onboarding_continue_screen3: "onboarding:continue:screen-3";
|
|
13
|
+
readonly sliceSimulator_setup: "slice-simulator:setup";
|
|
14
|
+
readonly sliceSimulator_open: "slice-simulator:open";
|
|
15
|
+
readonly sliceSimulator_isNotRunning: "slice-simulator:is-not-running";
|
|
16
|
+
readonly pageView: "page-view";
|
|
17
|
+
readonly openVideoTutorials: "open-video-tutorials";
|
|
18
|
+
readonly customType_created: "custom-type:created";
|
|
19
|
+
readonly customType_fieldAdded: "custom-type:field-added";
|
|
20
|
+
readonly customType_sliceZoneUpdated: "custom-type:slice-zone-updated";
|
|
21
|
+
readonly customType_saved: "custom-type:saved";
|
|
22
|
+
readonly slice_created: "slice:created";
|
|
23
|
+
readonly screenshotTaken: "screenshot-taken";
|
|
24
|
+
readonly changes_pushed: "changes:pushed";
|
|
25
|
+
readonly changes_limitReach: "changes:limit-reach";
|
|
26
|
+
readonly editor_widgetUsed: "editor:widget-used";
|
|
27
|
+
};
|
|
28
|
+
type SegmentEventTypes = (typeof SegmentEventType)[keyof typeof SegmentEventType];
|
|
29
|
+
export declare const HumanSegmentEventType: {
|
|
30
|
+
readonly "command:init:start": "SliceMachine Init Start";
|
|
31
|
+
readonly "command:init:identify": "SliceMachine Init Identify";
|
|
32
|
+
readonly "command:init:end": "SliceMachine Init End";
|
|
33
|
+
readonly review: "SliceMachine Review";
|
|
34
|
+
readonly "onboarding:start": "SliceMachine Onboarding Start";
|
|
35
|
+
readonly "onboarding:skip": "SliceMachine Onboarding Skip";
|
|
36
|
+
readonly "onboarding:continue:screen-intro": "SliceMachine Onboarding Continue Screen Intro";
|
|
37
|
+
readonly "onboarding:continue:screen-1": "SliceMachine Onboarding Continue Screen 1";
|
|
38
|
+
readonly "onboarding:continue:screen-2": "SliceMachine Onboarding Continue Screen 2";
|
|
39
|
+
readonly "onboarding:continue:screen-3": "SliceMachine Onboarding Continue Screen 3";
|
|
40
|
+
readonly "slice-simulator:setup": "SliceMachine Slice Simulator Setup";
|
|
41
|
+
readonly "slice-simulator:open": "SliceMachine Slice Simulator Open";
|
|
42
|
+
readonly "slice-simulator:is-not-running": "SliceMachine Slice Simulator is not running";
|
|
43
|
+
readonly "page-view": "SliceMachine Page View";
|
|
44
|
+
readonly "open-video-tutorials": "SliceMachine Open Video Tutorials";
|
|
45
|
+
readonly "custom-type:created": "SliceMachine Custom Type Created";
|
|
46
|
+
readonly "custom-type:field-added": "SliceMachine Custom Type Field Added";
|
|
47
|
+
readonly "custom-type:slice-zone-updated": "SliceMachine Slicezone Updated";
|
|
48
|
+
readonly "custom-type:saved": "SliceMachine Custom Type Saved";
|
|
49
|
+
readonly "slice:created": "SliceMachine Slice Created";
|
|
50
|
+
readonly "screenshot-taken": "SliceMachine Screenshot Taken";
|
|
51
|
+
readonly "changes:pushed": "SliceMachine Changes Pushed";
|
|
52
|
+
readonly "changes:limit-reach": "SliceMachine Changes Limit Reach";
|
|
53
|
+
readonly "editor:widget-used": "SliceMachine Editor Widget Used";
|
|
54
|
+
};
|
|
55
|
+
export type HumanSegmentEventTypes = (typeof HumanSegmentEventType)[keyof typeof HumanSegmentEventType];
|
|
56
|
+
type SegmentEvent<TType extends SegmentEventTypes, TProperties extends Record<string, unknown> | void = void> = TProperties extends void ? {
|
|
57
|
+
event: TType;
|
|
58
|
+
repository?: string;
|
|
59
|
+
} : {
|
|
60
|
+
event: TType;
|
|
61
|
+
repository?: string;
|
|
62
|
+
} & TProperties;
|
|
63
|
+
type CommandInitStartSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_start>;
|
|
64
|
+
type CommandInitIdentifySegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_identify>;
|
|
65
|
+
type CommandInitEndSegmentEvent = SegmentEvent<typeof SegmentEventType.command_init_end, {
|
|
66
|
+
framework: string;
|
|
67
|
+
success: boolean;
|
|
68
|
+
error?: string;
|
|
69
|
+
}>;
|
|
70
|
+
type ReviewSegmentEvent = SegmentEvent<typeof SegmentEventType.review, {
|
|
71
|
+
rating: number;
|
|
72
|
+
comment: string;
|
|
73
|
+
}>;
|
|
74
|
+
type OnboardingStartSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_start>;
|
|
75
|
+
type OnboardingSkipSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_skip, {
|
|
76
|
+
screenSkipped: number;
|
|
77
|
+
}>;
|
|
78
|
+
type OnboardingContinueScreenIntroSegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screenIntro>;
|
|
79
|
+
type OnboardingContinueScreen1SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen1>;
|
|
80
|
+
type OnboardingContinueScreen2SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen2>;
|
|
81
|
+
type OnboardingContinueScreen3SegmentEvent = SegmentEvent<typeof SegmentEventType.onboarding_continue_screen3>;
|
|
82
|
+
type SliceSimulatorSetupSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_setup>;
|
|
83
|
+
type SliceSimulatorOpenSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_open>;
|
|
84
|
+
type SliceSimulatorIsNotRunningSegmentEvent = SegmentEvent<typeof SegmentEventType.sliceSimulator_isNotRunning>;
|
|
85
|
+
type PageViewSegmentEvent = SegmentEvent<typeof SegmentEventType.pageView, {
|
|
86
|
+
url: string;
|
|
87
|
+
path: string;
|
|
88
|
+
search: string;
|
|
89
|
+
title: string;
|
|
90
|
+
referrer: string;
|
|
91
|
+
adapter: string;
|
|
92
|
+
}>;
|
|
93
|
+
type OpenVideoTutorialsSegmentEvent = SegmentEvent<typeof SegmentEventType.openVideoTutorials, {
|
|
94
|
+
video: string;
|
|
95
|
+
}>;
|
|
96
|
+
type CustomTypeCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_created, {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
type: "repeatable" | "single";
|
|
100
|
+
}>;
|
|
101
|
+
type CustomTypeFieldAddedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_fieldAdded, {
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
zone: "static" | "repeatable";
|
|
105
|
+
type: string;
|
|
106
|
+
}>;
|
|
107
|
+
type CustomTypeSliceZoneUpdatedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_sliceZoneUpdated, {
|
|
108
|
+
customTypeId: string;
|
|
109
|
+
}>;
|
|
110
|
+
type CustomTypeSavedSegmentEvent = SegmentEvent<typeof SegmentEventType.customType_saved, {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
type: "repeatable" | "single";
|
|
114
|
+
}>;
|
|
115
|
+
type SliceCreatedSegmentEvent = SegmentEvent<typeof SegmentEventType.slice_created, {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
library: string;
|
|
119
|
+
}>;
|
|
120
|
+
type ScreenshotTakenSegmentEvent = SegmentEvent<typeof SegmentEventType.screenshotTaken, {
|
|
121
|
+
type: "custom" | "automatic";
|
|
122
|
+
method: "fromSimulator" | "upload" | "dragAndDrop";
|
|
123
|
+
}>;
|
|
124
|
+
type ChangesPushedSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_pushed, {
|
|
125
|
+
customTypesCreated: number;
|
|
126
|
+
customTypesModified: number;
|
|
127
|
+
customTypesDeleted: number;
|
|
128
|
+
slicesCreated: number;
|
|
129
|
+
slicesModified: number;
|
|
130
|
+
slicesDeleted: number;
|
|
131
|
+
missingScreenshots: number;
|
|
132
|
+
total: number;
|
|
133
|
+
duration: number;
|
|
134
|
+
hasDeletedDocuments: boolean;
|
|
135
|
+
}>;
|
|
136
|
+
type ChangesLimitReachSegmentEvent = SegmentEvent<typeof SegmentEventType.changes_limitReach, {
|
|
137
|
+
limitType: LimitType;
|
|
138
|
+
}>;
|
|
139
|
+
type EditorWidgetUsedSegmentEvent = SegmentEvent<typeof SegmentEventType.editor_widgetUsed, {
|
|
140
|
+
sliceId: string;
|
|
141
|
+
}>;
|
|
142
|
+
export type SegmentEvents = CommandInitStartSegmentEvent | CommandInitIdentifySegmentEvent | CommandInitEndSegmentEvent | ReviewSegmentEvent | OnboardingStartSegmentEvent | OnboardingSkipSegmentEvent | OnboardingContinueScreenIntroSegmentEvent | OnboardingContinueScreen1SegmentEvent | OnboardingContinueScreen2SegmentEvent | OnboardingContinueScreen3SegmentEvent | SliceSimulatorSetupSegmentEvent | SliceSimulatorOpenSegmentEvent | SliceSimulatorIsNotRunningSegmentEvent | PageViewSegmentEvent | OpenVideoTutorialsSegmentEvent | CustomTypeCreatedSegmentEvent | CustomTypeFieldAddedSegmentEvent | CustomTypeSliceZoneUpdatedSegmentEvent | CustomTypeSavedSegmentEvent | SliceCreatedSegmentEvent | ScreenshotTakenSegmentEvent | ChangesPushedSegmentEvent | ChangesLimitReachSegmentEvent | EditorWidgetUsedSegmentEvent;
|
|
143
|
+
export {};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { BaseManager } from "../BaseManager";
|
|
2
|
-
import { SliceMachineManager } from "../SliceMachineManager";
|
|
3
|
-
export declare class UserManager extends BaseManager {
|
|
4
|
-
constructor(sliceMachineManager: SliceMachineManager);
|
|
5
|
-
login: (args: {
|
|
6
|
-
email: string;
|
|
7
|
-
cookies: string[];
|
|
8
|
-
}) => Promise<void>;
|
|
9
|
-
getLoginSessionInfo: () => Promise<{
|
|
10
|
-
port: number;
|
|
11
|
-
url: string;
|
|
12
|
-
}>;
|
|
13
|
-
nodeLoginSession: (args: {
|
|
14
|
-
port: number;
|
|
15
|
-
onListenCallback?: (() => void) | undefined;
|
|
16
|
-
}) => Promise<void>;
|
|
17
|
-
logout: () => Promise<void>;
|
|
18
|
-
checkIsLoggedIn: () => Promise<boolean>;
|
|
19
|
-
refreshAuthenticationToken: () => Promise<void>;
|
|
20
|
-
getAuthenticationToken: () => Promise<string>;
|
|
21
|
-
getAuthenticationCookies: () => Promise<{
|
|
22
|
-
"prismic-auth"?: string | undefined;
|
|
23
|
-
SESSION?: string | undefined;
|
|
24
|
-
} & {
|
|
25
|
-
[x: string]: string;
|
|
26
|
-
} & Required<Pick<{
|
|
27
|
-
"prismic-auth"?: string | undefined;
|
|
28
|
-
SESSION?: string | undefined;
|
|
29
|
-
} & {
|
|
30
|
-
[x: string]: string;
|
|
31
|
-
}, "prismic-auth" | "SESSION">>>;
|
|
32
|
-
getProfile: () => Promise<{
|
|
33
|
-
userId: string;
|
|
34
|
-
shortId: string;
|
|
35
|
-
intercomHash: string;
|
|
36
|
-
email: string;
|
|
37
|
-
firstName: string;
|
|
38
|
-
lastName: string;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
1
|
+
import { BaseManager } from "../BaseManager";
|
|
2
|
+
import { SliceMachineManager } from "../SliceMachineManager";
|
|
3
|
+
export declare class UserManager extends BaseManager {
|
|
4
|
+
constructor(sliceMachineManager: SliceMachineManager);
|
|
5
|
+
login: (args: {
|
|
6
|
+
email: string;
|
|
7
|
+
cookies: string[];
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
getLoginSessionInfo: () => Promise<{
|
|
10
|
+
port: number;
|
|
11
|
+
url: string;
|
|
12
|
+
}>;
|
|
13
|
+
nodeLoginSession: (args: {
|
|
14
|
+
port: number;
|
|
15
|
+
onListenCallback?: (() => void) | undefined;
|
|
16
|
+
}) => Promise<void>;
|
|
17
|
+
logout: () => Promise<void>;
|
|
18
|
+
checkIsLoggedIn: () => Promise<boolean>;
|
|
19
|
+
refreshAuthenticationToken: () => Promise<void>;
|
|
20
|
+
getAuthenticationToken: () => Promise<string>;
|
|
21
|
+
getAuthenticationCookies: () => Promise<{
|
|
22
|
+
"prismic-auth"?: string | undefined;
|
|
23
|
+
SESSION?: string | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
[x: string]: string;
|
|
26
|
+
} & Required<Pick<{
|
|
27
|
+
"prismic-auth"?: string | undefined;
|
|
28
|
+
SESSION?: string | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
[x: string]: string;
|
|
31
|
+
}, "prismic-auth" | "SESSION">>>;
|
|
32
|
+
getProfile: () => Promise<{
|
|
33
|
+
userId: string;
|
|
34
|
+
shortId: string;
|
|
35
|
+
intercomHash: string;
|
|
36
|
+
email: string;
|
|
37
|
+
firstName: string;
|
|
38
|
+
lastName: string;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { GitHubReleaseMetadata } from "../../lib/fetchGitHubReleaseBodyForRelease";
|
|
2
|
-
import { BaseManager } from "../BaseManager";
|
|
3
|
-
import { Version } from "./types";
|
|
4
|
-
type SliceMachineManagerGetReleaseNotesForVersionArgs = {
|
|
5
|
-
version: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class VersionsManager extends BaseManager {
|
|
8
|
-
/**
|
|
9
|
-
* Record of version numbers mapped to their GitHub release metadata.
|
|
10
|
-
*/
|
|
11
|
-
gitHubSliceMachineReleaseMetadataCache: Record<string, GitHubReleaseMetadata | undefined>;
|
|
12
|
-
getRunningSliceMachineVersion(): Promise<string>;
|
|
13
|
-
getAllStableSliceMachineVersions(): Promise<string[]>;
|
|
14
|
-
getAllStableSliceMachineVersionsWithKind(): Promise<Version[]>;
|
|
15
|
-
getLatestNonBreakingSliceMachineVersion(): Promise<string | undefined>;
|
|
16
|
-
checkIsUpdateAvailable(): Promise<boolean>;
|
|
17
|
-
getSliceMachineReleaseNotesForVersion(args: SliceMachineManagerGetReleaseNotesForVersionArgs): Promise<string | undefined>;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
import { GitHubReleaseMetadata } from "../../lib/fetchGitHubReleaseBodyForRelease";
|
|
2
|
+
import { BaseManager } from "../BaseManager";
|
|
3
|
+
import { Version } from "./types";
|
|
4
|
+
type SliceMachineManagerGetReleaseNotesForVersionArgs = {
|
|
5
|
+
version: string;
|
|
6
|
+
};
|
|
7
|
+
export declare class VersionsManager extends BaseManager {
|
|
8
|
+
/**
|
|
9
|
+
* Record of version numbers mapped to their GitHub release metadata.
|
|
10
|
+
*/
|
|
11
|
+
gitHubSliceMachineReleaseMetadataCache: Record<string, GitHubReleaseMetadata | undefined>;
|
|
12
|
+
getRunningSliceMachineVersion(): Promise<string>;
|
|
13
|
+
getAllStableSliceMachineVersions(): Promise<string[]>;
|
|
14
|
+
getAllStableSliceMachineVersionsWithKind(): Promise<Version[]>;
|
|
15
|
+
getLatestNonBreakingSliceMachineVersion(): Promise<string | undefined>;
|
|
16
|
+
checkIsUpdateAvailable(): Promise<boolean>;
|
|
17
|
+
getSliceMachineReleaseNotesForVersion(args: SliceMachineManagerGetReleaseNotesForVersionArgs): Promise<string | undefined>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION_KIND } from "../../constants/VERSION_KIND";
|
|
2
|
-
export type Version = {
|
|
3
|
-
version: string;
|
|
4
|
-
kind: (typeof VERSION_KIND)[keyof typeof VERSION_KIND] | undefined;
|
|
5
|
-
};
|
|
1
|
+
import { VERSION_KIND } from "../../constants/VERSION_KIND";
|
|
2
|
+
export type Version = {
|
|
3
|
+
version: string;
|
|
4
|
+
kind: (typeof VERSION_KIND)[keyof typeof VERSION_KIND] | undefined;
|
|
5
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DefaultBodyType, MockedRequest, RestHandler } from "msw";
|
|
2
|
-
import { SliceMachineManager } from "../managers/SliceMachineManager";
|
|
3
|
-
export type CreateSliceMachineManagerMSWHandlerArgs = {
|
|
4
|
-
sliceMachineManager: SliceMachineManager;
|
|
5
|
-
url: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const createSliceMachineManagerMSWHandler: (args: CreateSliceMachineManagerMSWHandlerArgs) => RestHandler<MockedRequest<DefaultBodyType>>;
|
|
1
|
+
import { DefaultBodyType, MockedRequest, RestHandler } from "msw";
|
|
2
|
+
import { SliceMachineManager } from "../managers/SliceMachineManager";
|
|
3
|
+
export type CreateSliceMachineManagerMSWHandlerArgs = {
|
|
4
|
+
sliceMachineManager: SliceMachineManager;
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const createSliceMachineManagerMSWHandler: (args: CreateSliceMachineManagerMSWHandlerArgs) => RestHandler<MockedRequest<DefaultBodyType>>;
|
package/dist/test/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createSliceMachineManagerMSWHandler } from "./createSliceMachineManagerMSWHandler";
|
|
2
|
-
export type { CreateSliceMachineManagerMSWHandlerArgs } from "./createSliceMachineManagerMSWHandler";
|
|
1
|
+
export { createSliceMachineManagerMSWHandler } from "./createSliceMachineManagerMSWHandler";
|
|
2
|
+
export type { CreateSliceMachineManagerMSWHandlerArgs } from "./createSliceMachineManagerMSWHandler";
|
package/dist/types.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { HookError, SliceMachinePluginOptions } from "@slicemachine/plugin-kit";
|
|
2
|
-
import { detect as niDetect } from "@antfu/ni";
|
|
3
|
-
import { VERSION_KIND } from "./constants/VERSION_KIND";
|
|
4
|
-
export type PackageManager = NonNullable<Awaited<ReturnType<typeof niDetect>>>;
|
|
5
|
-
export type PackageChangelog = {
|
|
6
|
-
currentVersion: string;
|
|
7
|
-
updateAvailable: boolean;
|
|
8
|
-
latestNonBreakingVersion: string | null;
|
|
9
|
-
versions: PackageVersion[];
|
|
10
|
-
};
|
|
11
|
-
export type PackageVersion = {
|
|
12
|
-
versionNumber: string;
|
|
13
|
-
releaseNote: string | null;
|
|
14
|
-
kind: (typeof VERSION_KIND)[keyof typeof VERSION_KIND] | undefined;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* A string, object, or instance representing a registered plugin.
|
|
18
|
-
*
|
|
19
|
-
* @typeParam TSliceMachinePluginOptions - User-provided options for the plugin.
|
|
20
|
-
*/
|
|
21
|
-
export type SliceMachineConfigPluginRegistration<TSliceMachinePluginOptions extends SliceMachinePluginOptions = SliceMachinePluginOptions> = string | {
|
|
22
|
-
resolve: string;
|
|
23
|
-
options?: TSliceMachinePluginOptions;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Slice Machine configuration from `slicemachine.config.js`.
|
|
27
|
-
*/
|
|
28
|
-
export type SliceMachineConfig = {
|
|
29
|
-
apiEndpoint?: string;
|
|
30
|
-
repositoryName: string;
|
|
31
|
-
localSliceSimulatorURL?: string;
|
|
32
|
-
libraries?: string[];
|
|
33
|
-
adapter: SliceMachineConfigPluginRegistration;
|
|
34
|
-
plugins?: SliceMachineConfigPluginRegistration[];
|
|
35
|
-
};
|
|
36
|
-
export type OnlyHookErrors<THookResult extends {
|
|
37
|
-
errors: HookError[];
|
|
38
|
-
} | Promise<{
|
|
39
|
-
errors: HookError[];
|
|
40
|
-
}>> = Pick<Awaited<THookResult>, "errors">;
|
|
41
|
-
export type S3ACL = {
|
|
42
|
-
uploadEndpoint: string;
|
|
43
|
-
requiredFormDataFields: Record<string, string>;
|
|
44
|
-
imgixEndpoint: string;
|
|
45
|
-
};
|
|
1
|
+
import { HookError, SliceMachinePluginOptions } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { detect as niDetect } from "@antfu/ni";
|
|
3
|
+
import { VERSION_KIND } from "./constants/VERSION_KIND";
|
|
4
|
+
export type PackageManager = NonNullable<Awaited<ReturnType<typeof niDetect>>>;
|
|
5
|
+
export type PackageChangelog = {
|
|
6
|
+
currentVersion: string;
|
|
7
|
+
updateAvailable: boolean;
|
|
8
|
+
latestNonBreakingVersion: string | null;
|
|
9
|
+
versions: PackageVersion[];
|
|
10
|
+
};
|
|
11
|
+
export type PackageVersion = {
|
|
12
|
+
versionNumber: string;
|
|
13
|
+
releaseNote: string | null;
|
|
14
|
+
kind: (typeof VERSION_KIND)[keyof typeof VERSION_KIND] | undefined;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A string, object, or instance representing a registered plugin.
|
|
18
|
+
*
|
|
19
|
+
* @typeParam TSliceMachinePluginOptions - User-provided options for the plugin.
|
|
20
|
+
*/
|
|
21
|
+
export type SliceMachineConfigPluginRegistration<TSliceMachinePluginOptions extends SliceMachinePluginOptions = SliceMachinePluginOptions> = string | {
|
|
22
|
+
resolve: string;
|
|
23
|
+
options?: TSliceMachinePluginOptions;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Slice Machine configuration from `slicemachine.config.js`.
|
|
27
|
+
*/
|
|
28
|
+
export type SliceMachineConfig = {
|
|
29
|
+
apiEndpoint?: string;
|
|
30
|
+
repositoryName: string;
|
|
31
|
+
localSliceSimulatorURL?: string;
|
|
32
|
+
libraries?: string[];
|
|
33
|
+
adapter: SliceMachineConfigPluginRegistration;
|
|
34
|
+
plugins?: SliceMachineConfigPluginRegistration[];
|
|
35
|
+
};
|
|
36
|
+
export type OnlyHookErrors<THookResult extends {
|
|
37
|
+
errors: HookError[];
|
|
38
|
+
} | Promise<{
|
|
39
|
+
errors: HookError[];
|
|
40
|
+
}>> = Pick<Awaited<THookResult>, "errors">;
|
|
41
|
+
export type S3ACL = {
|
|
42
|
+
uploadEndpoint: string;
|
|
43
|
+
requiredFormDataFields: Record<string, string>;
|
|
44
|
+
imgixEndpoint: string;
|
|
45
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slicemachine/manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Manage all aspects of a Slice Machine project.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@prismicio/custom-types-client": "^1.1.0",
|
|
66
66
|
"@prismicio/mocks": "2.0.0-alpha.2",
|
|
67
67
|
"@prismicio/types-internal": "2.0.0-alpha.9",
|
|
68
|
-
"@slicemachine/plugin-kit": "0.
|
|
68
|
+
"@slicemachine/plugin-kit": "0.2.0",
|
|
69
69
|
"@wooorm/starry-night": "^1.6.0",
|
|
70
70
|
"analytics-node": "^6.2.0",
|
|
71
71
|
"cookie": "^0.5.0",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"msw": "^1.1.0",
|
|
114
114
|
"parse-multipart-data": "^1.5.0",
|
|
115
115
|
"prettier-plugin-jsdoc": "^0.4.2",
|
|
116
|
-
"puppeteer": "^19.
|
|
116
|
+
"puppeteer": "^19.11.0",
|
|
117
117
|
"size-limit": "^8.2.4",
|
|
118
118
|
"typescript": "^4.9.5",
|
|
119
119
|
"vite": "^4.1.4",
|
|
@@ -138,5 +138,5 @@
|
|
|
138
138
|
"publishConfig": {
|
|
139
139
|
"access": "public"
|
|
140
140
|
},
|
|
141
|
-
"gitHead": "
|
|
141
|
+
"gitHead": "94819b03033580880acc7a3475a3dc9b4d466a0c"
|
|
142
142
|
}
|
|
@@ -106,7 +106,7 @@ export class ScreenshotsManager extends BaseManager {
|
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
const browser = await puppeteer.launch();
|
|
109
|
+
const browser = await puppeteer.launch({ headless: "new" });
|
|
110
110
|
|
|
111
111
|
this._browserContext = await browser.createIncognitoBrowserContext();
|
|
112
112
|
}
|