@slicemachine/manager 0.1.1-dev-plugins.14 → 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.d.ts +34 -34
- 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 +3 -3
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { BaseManager } from "../BaseManager";
|
|
2
|
-
import { PrismicRepository, TransactionalMergeArgs, TransactionalMergeReturnType } from "./types";
|
|
3
|
-
type PrismicRepositoryManagerCheckExistsArgs = {
|
|
4
|
-
domain: string;
|
|
5
|
-
};
|
|
6
|
-
type PrismicRepositoryManagerCreateArgs = {
|
|
7
|
-
domain: string;
|
|
8
|
-
framework: string;
|
|
9
|
-
};
|
|
10
|
-
type PrismicRepositoryManagerDeleteArgs = {
|
|
11
|
-
domain: string;
|
|
12
|
-
password: string;
|
|
13
|
-
};
|
|
14
|
-
type PrismicRepositoryManagerPushDocumentsArgs = {
|
|
15
|
-
domain: string;
|
|
16
|
-
signature: string;
|
|
17
|
-
documents: Record<string, unknown>;
|
|
18
|
-
};
|
|
19
|
-
export declare class PrismicRepositoryManager extends BaseManager {
|
|
20
|
-
readAll(): Promise<PrismicRepository[]>;
|
|
21
|
-
hasWriteAccess(repository: PrismicRepository): boolean;
|
|
22
|
-
checkExists(args: PrismicRepositoryManagerCheckExistsArgs): Promise<boolean>;
|
|
23
|
-
create(args: PrismicRepositoryManagerCreateArgs): Promise<void>;
|
|
24
|
-
delete(args: PrismicRepositoryManagerDeleteArgs): Promise<void>;
|
|
25
|
-
pushDocuments(args: PrismicRepositoryManagerPushDocumentsArgs): Promise<void>;
|
|
26
|
-
pushChanges(args: TransactionalMergeArgs): Promise<TransactionalMergeReturnType>;
|
|
27
|
-
private _decodeLimitOrThrow;
|
|
28
|
-
private _fetch;
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
1
|
+
import { BaseManager } from "../BaseManager";
|
|
2
|
+
import { PrismicRepository, TransactionalMergeArgs, TransactionalMergeReturnType } from "./types";
|
|
3
|
+
type PrismicRepositoryManagerCheckExistsArgs = {
|
|
4
|
+
domain: string;
|
|
5
|
+
};
|
|
6
|
+
type PrismicRepositoryManagerCreateArgs = {
|
|
7
|
+
domain: string;
|
|
8
|
+
framework: string;
|
|
9
|
+
};
|
|
10
|
+
type PrismicRepositoryManagerDeleteArgs = {
|
|
11
|
+
domain: string;
|
|
12
|
+
password: string;
|
|
13
|
+
};
|
|
14
|
+
type PrismicRepositoryManagerPushDocumentsArgs = {
|
|
15
|
+
domain: string;
|
|
16
|
+
signature: string;
|
|
17
|
+
documents: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
export declare class PrismicRepositoryManager extends BaseManager {
|
|
20
|
+
readAll(): Promise<PrismicRepository[]>;
|
|
21
|
+
hasWriteAccess(repository: PrismicRepository): boolean;
|
|
22
|
+
checkExists(args: PrismicRepositoryManagerCheckExistsArgs): Promise<boolean>;
|
|
23
|
+
create(args: PrismicRepositoryManagerCreateArgs): Promise<void>;
|
|
24
|
+
delete(args: PrismicRepositoryManagerDeleteArgs): Promise<void>;
|
|
25
|
+
pushDocuments(args: PrismicRepositoryManagerPushDocumentsArgs): Promise<void>;
|
|
26
|
+
pushChanges(args: TransactionalMergeArgs): Promise<TransactionalMergeReturnType>;
|
|
27
|
+
private _decodeLimitOrThrow;
|
|
28
|
+
private _fetch;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
import { CustomType, SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
-
import * as t from "io-ts";
|
|
3
|
-
export declare const PrismicRepositoryUserAgent: {
|
|
4
|
-
readonly SliceMachine: "prismic-cli/sm";
|
|
5
|
-
readonly LegacyZero: "prismic-cli/0";
|
|
6
|
-
};
|
|
7
|
-
export type PrismicRepositoryUserAgents = (typeof PrismicRepositoryUserAgent)[keyof typeof PrismicRepositoryUserAgent];
|
|
8
|
-
export declare const PrismicRepositoryRole: {
|
|
9
|
-
readonly SuperUser: "SuperUser";
|
|
10
|
-
readonly Administrator: "Administrator";
|
|
11
|
-
readonly Owner: "Owner";
|
|
12
|
-
readonly Manager: "Manager";
|
|
13
|
-
readonly Publisher: "Publisher";
|
|
14
|
-
readonly Writer: "Writer";
|
|
15
|
-
readonly Readonly: "Readonly";
|
|
16
|
-
};
|
|
17
|
-
export type PrismicRepositoryRoles = (typeof PrismicRepositoryRole)[keyof typeof PrismicRepositoryRole];
|
|
18
|
-
export declare const PrismicRepository: t.TypeC<{
|
|
19
|
-
domain: t.StringC;
|
|
20
|
-
name: t.StringC;
|
|
21
|
-
role: t.UnionC<[t.KeyofC<{
|
|
22
|
-
readonly SuperUser: "SuperUser";
|
|
23
|
-
readonly Administrator: "Administrator";
|
|
24
|
-
readonly Owner: "Owner";
|
|
25
|
-
readonly Manager: "Manager";
|
|
26
|
-
readonly Publisher: "Publisher";
|
|
27
|
-
readonly Writer: "Writer";
|
|
28
|
-
readonly Readonly: "Readonly";
|
|
29
|
-
}>, t.RecordC<t.StringC, t.KeyofC<{
|
|
30
|
-
readonly SuperUser: "SuperUser";
|
|
31
|
-
readonly Administrator: "Administrator";
|
|
32
|
-
readonly Owner: "Owner";
|
|
33
|
-
readonly Manager: "Manager";
|
|
34
|
-
readonly Publisher: "Publisher";
|
|
35
|
-
readonly Writer: "Writer";
|
|
36
|
-
readonly Readonly: "Readonly";
|
|
37
|
-
}>>]>;
|
|
38
|
-
}>;
|
|
39
|
-
export type PrismicRepository = t.TypeOf<typeof PrismicRepository>;
|
|
40
|
-
export declare enum ChangeTypes {
|
|
41
|
-
SLICE_INSERT = "SLICE_INSERT",
|
|
42
|
-
SLICE_UPDATE = "SLICE_UPDATE",
|
|
43
|
-
SLICE_DELETE = "SLICE_DELETE",
|
|
44
|
-
CUSTOM_TYPE_INSERT = "CUSTOM_TYPE_INSERT",
|
|
45
|
-
CUSTOM_TYPE_UPDATE = "CUSTOM_TYPE_UPDATE",
|
|
46
|
-
CUSTOM_TYPE_DELETE = "CUSTOM_TYPE_DELETE"
|
|
47
|
-
}
|
|
48
|
-
interface Change {
|
|
49
|
-
type: ChangeTypes;
|
|
50
|
-
id: string;
|
|
51
|
-
payload: Record<string, unknown>;
|
|
52
|
-
}
|
|
53
|
-
interface DeleteChange extends Change {
|
|
54
|
-
payload: {
|
|
55
|
-
id: Change["id"];
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export interface SliceInsertChange extends Change {
|
|
59
|
-
type: ChangeTypes.SLICE_INSERT;
|
|
60
|
-
payload: SharedSlice;
|
|
61
|
-
}
|
|
62
|
-
export interface SliceUpdateChange extends Change {
|
|
63
|
-
type: ChangeTypes.SLICE_UPDATE;
|
|
64
|
-
payload: SharedSlice;
|
|
65
|
-
}
|
|
66
|
-
export interface SliceDeleteChange extends DeleteChange {
|
|
67
|
-
type: ChangeTypes.SLICE_DELETE;
|
|
68
|
-
}
|
|
69
|
-
export interface CustomTypeInsertChange extends Change {
|
|
70
|
-
type: ChangeTypes.CUSTOM_TYPE_INSERT;
|
|
71
|
-
payload: CustomType;
|
|
72
|
-
}
|
|
73
|
-
export interface CustomTypeUpdateChange extends Change {
|
|
74
|
-
type: ChangeTypes.CUSTOM_TYPE_UPDATE;
|
|
75
|
-
payload: CustomType;
|
|
76
|
-
}
|
|
77
|
-
export interface CustomTypeDeleteChange extends DeleteChange {
|
|
78
|
-
type: ChangeTypes.CUSTOM_TYPE_DELETE;
|
|
79
|
-
}
|
|
80
|
-
export type AllChangeTypes = SliceInsertChange | SliceUpdateChange | SliceDeleteChange | CustomTypeInsertChange | CustomTypeUpdateChange | CustomTypeDeleteChange;
|
|
81
|
-
export interface BulkBody extends Record<string, unknown> {
|
|
82
|
-
confirmDeleteDocuments: boolean;
|
|
83
|
-
changes: AllChangeTypes[];
|
|
84
|
-
}
|
|
85
|
-
export declare const RawLimit: t.TypeC<{
|
|
86
|
-
details: t.TypeC<{
|
|
87
|
-
customTypes: t.ArrayC<t.TypeC<{
|
|
88
|
-
id: t.StringC;
|
|
89
|
-
numberOfDocuments: t.NumberC;
|
|
90
|
-
url: t.StringC;
|
|
91
|
-
}>>;
|
|
92
|
-
}>;
|
|
93
|
-
}>;
|
|
94
|
-
export type RawLimit = t.TypeOf<typeof RawLimit>;
|
|
95
|
-
export declare enum LimitType {
|
|
96
|
-
SOFT = "SOFT",
|
|
97
|
-
HARD = "HARD"
|
|
98
|
-
}
|
|
99
|
-
export type Limit = RawLimit & {
|
|
100
|
-
type: LimitType;
|
|
101
|
-
};
|
|
102
|
-
export interface ClientError {
|
|
103
|
-
status: number;
|
|
104
|
-
message: string;
|
|
105
|
-
}
|
|
106
|
-
type ChangeStatus = "NEW" | "MODIFIED" | "DELETED";
|
|
107
|
-
type CustomTypeChange = {
|
|
108
|
-
id: string;
|
|
109
|
-
type: "CustomType";
|
|
110
|
-
status: ChangeStatus;
|
|
111
|
-
};
|
|
112
|
-
type SliceChange = {
|
|
113
|
-
id: string;
|
|
114
|
-
type: "Slice";
|
|
115
|
-
status: ChangeStatus;
|
|
116
|
-
libraryID: string;
|
|
117
|
-
};
|
|
118
|
-
export type TransactionalMergeArgs = {
|
|
119
|
-
confirmDeleteDocuments: boolean;
|
|
120
|
-
changes: (CustomTypeChange | SliceChange)[];
|
|
121
|
-
};
|
|
122
|
-
export type TransactionalMergeReturnType = Limit | null;
|
|
123
|
-
export {};
|
|
1
|
+
import { CustomType, SharedSlice } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
+
import * as t from "io-ts";
|
|
3
|
+
export declare const PrismicRepositoryUserAgent: {
|
|
4
|
+
readonly SliceMachine: "prismic-cli/sm";
|
|
5
|
+
readonly LegacyZero: "prismic-cli/0";
|
|
6
|
+
};
|
|
7
|
+
export type PrismicRepositoryUserAgents = (typeof PrismicRepositoryUserAgent)[keyof typeof PrismicRepositoryUserAgent];
|
|
8
|
+
export declare const PrismicRepositoryRole: {
|
|
9
|
+
readonly SuperUser: "SuperUser";
|
|
10
|
+
readonly Administrator: "Administrator";
|
|
11
|
+
readonly Owner: "Owner";
|
|
12
|
+
readonly Manager: "Manager";
|
|
13
|
+
readonly Publisher: "Publisher";
|
|
14
|
+
readonly Writer: "Writer";
|
|
15
|
+
readonly Readonly: "Readonly";
|
|
16
|
+
};
|
|
17
|
+
export type PrismicRepositoryRoles = (typeof PrismicRepositoryRole)[keyof typeof PrismicRepositoryRole];
|
|
18
|
+
export declare const PrismicRepository: t.TypeC<{
|
|
19
|
+
domain: t.StringC;
|
|
20
|
+
name: t.StringC;
|
|
21
|
+
role: t.UnionC<[t.KeyofC<{
|
|
22
|
+
readonly SuperUser: "SuperUser";
|
|
23
|
+
readonly Administrator: "Administrator";
|
|
24
|
+
readonly Owner: "Owner";
|
|
25
|
+
readonly Manager: "Manager";
|
|
26
|
+
readonly Publisher: "Publisher";
|
|
27
|
+
readonly Writer: "Writer";
|
|
28
|
+
readonly Readonly: "Readonly";
|
|
29
|
+
}>, t.RecordC<t.StringC, t.KeyofC<{
|
|
30
|
+
readonly SuperUser: "SuperUser";
|
|
31
|
+
readonly Administrator: "Administrator";
|
|
32
|
+
readonly Owner: "Owner";
|
|
33
|
+
readonly Manager: "Manager";
|
|
34
|
+
readonly Publisher: "Publisher";
|
|
35
|
+
readonly Writer: "Writer";
|
|
36
|
+
readonly Readonly: "Readonly";
|
|
37
|
+
}>>]>;
|
|
38
|
+
}>;
|
|
39
|
+
export type PrismicRepository = t.TypeOf<typeof PrismicRepository>;
|
|
40
|
+
export declare enum ChangeTypes {
|
|
41
|
+
SLICE_INSERT = "SLICE_INSERT",
|
|
42
|
+
SLICE_UPDATE = "SLICE_UPDATE",
|
|
43
|
+
SLICE_DELETE = "SLICE_DELETE",
|
|
44
|
+
CUSTOM_TYPE_INSERT = "CUSTOM_TYPE_INSERT",
|
|
45
|
+
CUSTOM_TYPE_UPDATE = "CUSTOM_TYPE_UPDATE",
|
|
46
|
+
CUSTOM_TYPE_DELETE = "CUSTOM_TYPE_DELETE"
|
|
47
|
+
}
|
|
48
|
+
interface Change {
|
|
49
|
+
type: ChangeTypes;
|
|
50
|
+
id: string;
|
|
51
|
+
payload: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
interface DeleteChange extends Change {
|
|
54
|
+
payload: {
|
|
55
|
+
id: Change["id"];
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface SliceInsertChange extends Change {
|
|
59
|
+
type: ChangeTypes.SLICE_INSERT;
|
|
60
|
+
payload: SharedSlice;
|
|
61
|
+
}
|
|
62
|
+
export interface SliceUpdateChange extends Change {
|
|
63
|
+
type: ChangeTypes.SLICE_UPDATE;
|
|
64
|
+
payload: SharedSlice;
|
|
65
|
+
}
|
|
66
|
+
export interface SliceDeleteChange extends DeleteChange {
|
|
67
|
+
type: ChangeTypes.SLICE_DELETE;
|
|
68
|
+
}
|
|
69
|
+
export interface CustomTypeInsertChange extends Change {
|
|
70
|
+
type: ChangeTypes.CUSTOM_TYPE_INSERT;
|
|
71
|
+
payload: CustomType;
|
|
72
|
+
}
|
|
73
|
+
export interface CustomTypeUpdateChange extends Change {
|
|
74
|
+
type: ChangeTypes.CUSTOM_TYPE_UPDATE;
|
|
75
|
+
payload: CustomType;
|
|
76
|
+
}
|
|
77
|
+
export interface CustomTypeDeleteChange extends DeleteChange {
|
|
78
|
+
type: ChangeTypes.CUSTOM_TYPE_DELETE;
|
|
79
|
+
}
|
|
80
|
+
export type AllChangeTypes = SliceInsertChange | SliceUpdateChange | SliceDeleteChange | CustomTypeInsertChange | CustomTypeUpdateChange | CustomTypeDeleteChange;
|
|
81
|
+
export interface BulkBody extends Record<string, unknown> {
|
|
82
|
+
confirmDeleteDocuments: boolean;
|
|
83
|
+
changes: AllChangeTypes[];
|
|
84
|
+
}
|
|
85
|
+
export declare const RawLimit: t.TypeC<{
|
|
86
|
+
details: t.TypeC<{
|
|
87
|
+
customTypes: t.ArrayC<t.TypeC<{
|
|
88
|
+
id: t.StringC;
|
|
89
|
+
numberOfDocuments: t.NumberC;
|
|
90
|
+
url: t.StringC;
|
|
91
|
+
}>>;
|
|
92
|
+
}>;
|
|
93
|
+
}>;
|
|
94
|
+
export type RawLimit = t.TypeOf<typeof RawLimit>;
|
|
95
|
+
export declare enum LimitType {
|
|
96
|
+
SOFT = "SOFT",
|
|
97
|
+
HARD = "HARD"
|
|
98
|
+
}
|
|
99
|
+
export type Limit = RawLimit & {
|
|
100
|
+
type: LimitType;
|
|
101
|
+
};
|
|
102
|
+
export interface ClientError {
|
|
103
|
+
status: number;
|
|
104
|
+
message: string;
|
|
105
|
+
}
|
|
106
|
+
type ChangeStatus = "NEW" | "MODIFIED" | "DELETED";
|
|
107
|
+
type CustomTypeChange = {
|
|
108
|
+
id: string;
|
|
109
|
+
type: "CustomType";
|
|
110
|
+
status: ChangeStatus;
|
|
111
|
+
};
|
|
112
|
+
type SliceChange = {
|
|
113
|
+
id: string;
|
|
114
|
+
type: "Slice";
|
|
115
|
+
status: ChangeStatus;
|
|
116
|
+
libraryID: string;
|
|
117
|
+
};
|
|
118
|
+
export type TransactionalMergeArgs = {
|
|
119
|
+
confirmDeleteDocuments: boolean;
|
|
120
|
+
changes: (CustomTypeChange | SliceChange)[];
|
|
121
|
+
};
|
|
122
|
+
export type TransactionalMergeReturnType = Limit | null;
|
|
123
|
+
export {};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { ExecaChildProcess } from "execa";
|
|
2
|
-
import { PackageManager, SliceMachineConfig } from "../../types";
|
|
3
|
-
import { BaseManager } from "../BaseManager";
|
|
4
|
-
type ProjectManagerGetSliceMachineConfigPathArgs = {
|
|
5
|
-
ignoreCache?: boolean;
|
|
6
|
-
};
|
|
7
|
-
type ProjectManagerGetRootArgs = {
|
|
8
|
-
ignoreCache?: boolean;
|
|
9
|
-
};
|
|
10
|
-
type ProjectManagerCheckIsTypeScriptArgs = {
|
|
11
|
-
rootOverride?: string;
|
|
12
|
-
};
|
|
13
|
-
type ProjectManagerWriteSliceMachineConfigArgs = {
|
|
14
|
-
config: SliceMachineConfig;
|
|
15
|
-
path?: string;
|
|
16
|
-
};
|
|
17
|
-
type ProjectManagerInitProjectArgs = {
|
|
18
|
-
log?: (message: string) => void;
|
|
19
|
-
};
|
|
20
|
-
type ProjectManagerDetectPackageManager = {
|
|
21
|
-
root?: string;
|
|
22
|
-
};
|
|
23
|
-
type ProjectManagerInstallDependenciesArgs = {
|
|
24
|
-
dependencies: Record<string, string>;
|
|
25
|
-
dev?: boolean;
|
|
26
|
-
packageManager?: PackageManager;
|
|
27
|
-
log?: (message: string) => void;
|
|
28
|
-
};
|
|
29
|
-
type ProjectManagerInstallDependenciesReturnType = {
|
|
30
|
-
execaProcess: ExecaChildProcess;
|
|
31
|
-
};
|
|
32
|
-
export declare class ProjectManager extends BaseManager {
|
|
33
|
-
private _cachedRoot;
|
|
34
|
-
private _cachedSliceMachineConfigPath;
|
|
35
|
-
private _cachedSliceMachineConfig;
|
|
36
|
-
getSliceMachineConfigPath(args?: ProjectManagerGetSliceMachineConfigPathArgs): Promise<string>;
|
|
37
|
-
getRoot(args?: ProjectManagerGetRootArgs): Promise<string>;
|
|
38
|
-
suggestRoot(): Promise<string>;
|
|
39
|
-
suggestSliceMachineConfigPath(): Promise<string>;
|
|
40
|
-
checkIsTypeScript(args?: ProjectManagerCheckIsTypeScriptArgs): Promise<boolean>;
|
|
41
|
-
getSliceMachineConfig(): Promise<SliceMachineConfig>;
|
|
42
|
-
writeSliceMachineConfig(args: ProjectManagerWriteSliceMachineConfigArgs): Promise<void>;
|
|
43
|
-
loadSliceMachineConfig(): Promise<SliceMachineConfig>;
|
|
44
|
-
locateSliceMachineUIDir(): Promise<string>;
|
|
45
|
-
initProject(args?: ProjectManagerInitProjectArgs): Promise<void>;
|
|
46
|
-
detectPackageManager(args?: ProjectManagerDetectPackageManager): Promise<PackageManager>;
|
|
47
|
-
installDependencies(args: ProjectManagerInstallDependenciesArgs): Promise<ProjectManagerInstallDependenciesReturnType>;
|
|
48
|
-
}
|
|
49
|
-
export {};
|
|
1
|
+
import { ExecaChildProcess } from "execa";
|
|
2
|
+
import { PackageManager, SliceMachineConfig } from "../../types";
|
|
3
|
+
import { BaseManager } from "../BaseManager";
|
|
4
|
+
type ProjectManagerGetSliceMachineConfigPathArgs = {
|
|
5
|
+
ignoreCache?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type ProjectManagerGetRootArgs = {
|
|
8
|
+
ignoreCache?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type ProjectManagerCheckIsTypeScriptArgs = {
|
|
11
|
+
rootOverride?: string;
|
|
12
|
+
};
|
|
13
|
+
type ProjectManagerWriteSliceMachineConfigArgs = {
|
|
14
|
+
config: SliceMachineConfig;
|
|
15
|
+
path?: string;
|
|
16
|
+
};
|
|
17
|
+
type ProjectManagerInitProjectArgs = {
|
|
18
|
+
log?: (message: string) => void;
|
|
19
|
+
};
|
|
20
|
+
type ProjectManagerDetectPackageManager = {
|
|
21
|
+
root?: string;
|
|
22
|
+
};
|
|
23
|
+
type ProjectManagerInstallDependenciesArgs = {
|
|
24
|
+
dependencies: Record<string, string>;
|
|
25
|
+
dev?: boolean;
|
|
26
|
+
packageManager?: PackageManager;
|
|
27
|
+
log?: (message: string) => void;
|
|
28
|
+
};
|
|
29
|
+
type ProjectManagerInstallDependenciesReturnType = {
|
|
30
|
+
execaProcess: ExecaChildProcess;
|
|
31
|
+
};
|
|
32
|
+
export declare class ProjectManager extends BaseManager {
|
|
33
|
+
private _cachedRoot;
|
|
34
|
+
private _cachedSliceMachineConfigPath;
|
|
35
|
+
private _cachedSliceMachineConfig;
|
|
36
|
+
getSliceMachineConfigPath(args?: ProjectManagerGetSliceMachineConfigPathArgs): Promise<string>;
|
|
37
|
+
getRoot(args?: ProjectManagerGetRootArgs): Promise<string>;
|
|
38
|
+
suggestRoot(): Promise<string>;
|
|
39
|
+
suggestSliceMachineConfigPath(): Promise<string>;
|
|
40
|
+
checkIsTypeScript(args?: ProjectManagerCheckIsTypeScriptArgs): Promise<boolean>;
|
|
41
|
+
getSliceMachineConfig(): Promise<SliceMachineConfig>;
|
|
42
|
+
writeSliceMachineConfig(args: ProjectManagerWriteSliceMachineConfigArgs): Promise<void>;
|
|
43
|
+
loadSliceMachineConfig(): Promise<SliceMachineConfig>;
|
|
44
|
+
locateSliceMachineUIDir(): Promise<string>;
|
|
45
|
+
initProject(args?: ProjectManagerInitProjectArgs): Promise<void>;
|
|
46
|
+
detectPackageManager(args?: ProjectManagerDetectPackageManager): Promise<PackageManager>;
|
|
47
|
+
installDependencies(args: ProjectManagerInstallDependenciesArgs): Promise<ProjectManagerInstallDependenciesReturnType>;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { Viewport } from "puppeteer";
|
|
3
|
-
import { BaseManager } from "../BaseManager";
|
|
4
|
-
type ScreenshotsManagerCaptureSliceSimulatorScreenshotArgs = {
|
|
5
|
-
sliceMachineUIOrigin: string;
|
|
6
|
-
libraryID: string;
|
|
7
|
-
sliceID: string;
|
|
8
|
-
variationID: string;
|
|
9
|
-
viewport?: Viewport;
|
|
10
|
-
};
|
|
11
|
-
type ScreenshotsManagerCaptureSliceSimulatorScreenshotReturnType = {
|
|
12
|
-
data: Buffer;
|
|
13
|
-
};
|
|
14
|
-
type ScreenshotsManagerUploadScreenshotArgs = {
|
|
15
|
-
data: Buffer;
|
|
16
|
-
keyPrefix?: string;
|
|
17
|
-
};
|
|
18
|
-
type ScreenshotsManagerUploadScreenshotReturnType = {
|
|
19
|
-
url: string;
|
|
20
|
-
};
|
|
21
|
-
type ScreenshotsManagerDeleteScreenshotFolderArgs = {
|
|
22
|
-
sliceID: string;
|
|
23
|
-
};
|
|
24
|
-
export declare class ScreenshotsManager extends BaseManager {
|
|
25
|
-
private _browserContext;
|
|
26
|
-
private _s3ACL;
|
|
27
|
-
initBrowserContext(): Promise<void>;
|
|
28
|
-
initS3ACL(): Promise<void>;
|
|
29
|
-
captureSliceSimulatorScreenshot(args: ScreenshotsManagerCaptureSliceSimulatorScreenshotArgs): Promise<ScreenshotsManagerCaptureSliceSimulatorScreenshotReturnType>;
|
|
30
|
-
uploadScreenshot(args: ScreenshotsManagerUploadScreenshotArgs): Promise<ScreenshotsManagerUploadScreenshotReturnType>;
|
|
31
|
-
deleteScreenshotFolder(args: ScreenshotsManagerDeleteScreenshotFolderArgs): Promise<void>;
|
|
32
|
-
private _fetch;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Viewport } from "puppeteer";
|
|
3
|
+
import { BaseManager } from "../BaseManager";
|
|
4
|
+
type ScreenshotsManagerCaptureSliceSimulatorScreenshotArgs = {
|
|
5
|
+
sliceMachineUIOrigin: string;
|
|
6
|
+
libraryID: string;
|
|
7
|
+
sliceID: string;
|
|
8
|
+
variationID: string;
|
|
9
|
+
viewport?: Viewport;
|
|
10
|
+
};
|
|
11
|
+
type ScreenshotsManagerCaptureSliceSimulatorScreenshotReturnType = {
|
|
12
|
+
data: Buffer;
|
|
13
|
+
};
|
|
14
|
+
type ScreenshotsManagerUploadScreenshotArgs = {
|
|
15
|
+
data: Buffer;
|
|
16
|
+
keyPrefix?: string;
|
|
17
|
+
};
|
|
18
|
+
type ScreenshotsManagerUploadScreenshotReturnType = {
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
21
|
+
type ScreenshotsManagerDeleteScreenshotFolderArgs = {
|
|
22
|
+
sliceID: string;
|
|
23
|
+
};
|
|
24
|
+
export declare class ScreenshotsManager extends BaseManager {
|
|
25
|
+
private _browserContext;
|
|
26
|
+
private _s3ACL;
|
|
27
|
+
initBrowserContext(): Promise<void>;
|
|
28
|
+
initS3ACL(): Promise<void>;
|
|
29
|
+
captureSliceSimulatorScreenshot(args: ScreenshotsManagerCaptureSliceSimulatorScreenshotArgs): Promise<ScreenshotsManagerCaptureSliceSimulatorScreenshotReturnType>;
|
|
30
|
+
uploadScreenshot(args: ScreenshotsManagerUploadScreenshotArgs): Promise<ScreenshotsManagerUploadScreenshotReturnType>;
|
|
31
|
+
deleteScreenshotFolder(args: ScreenshotsManagerDeleteScreenshotFolderArgs): Promise<void>;
|
|
32
|
+
private _fetch;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import * as t from "io-ts";
|
|
2
|
-
import { HookError } from "@slicemachine/plugin-kit";
|
|
3
|
-
import { DecodeError } from "../../lib/DecodeError";
|
|
4
|
-
import { BaseManager } from "../BaseManager";
|
|
5
|
-
declare const SliceSimulatorSetupStepValidationMessageCodec: t.TypeC<{
|
|
6
|
-
title: t.StringC;
|
|
7
|
-
message: t.StringC;
|
|
8
|
-
}>;
|
|
9
|
-
type SliceSimulatorSetupStepValidationMessageCodec = t.TypeOf<typeof SliceSimulatorSetupStepValidationMessageCodec>;
|
|
10
|
-
export type SimulatorManagerReadSliceSimulatorSetupStep = {
|
|
11
|
-
title: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
body: string;
|
|
14
|
-
/**
|
|
15
|
-
* Determines if the step is completed.
|
|
16
|
-
*
|
|
17
|
-
* This proeprty is `undefined` if the project's adapter does not provide a
|
|
18
|
-
* validation function for the step; we cannot know if the step is complete
|
|
19
|
-
* without a validator.
|
|
20
|
-
*/
|
|
21
|
-
isComplete: boolean | undefined;
|
|
22
|
-
validationMessages: SliceSimulatorSetupStepValidationMessageCodec[];
|
|
23
|
-
};
|
|
24
|
-
export type SimulatorManagerReadSliceSimulatorSetupStepsReturnType = {
|
|
25
|
-
steps: SimulatorManagerReadSliceSimulatorSetupStep[];
|
|
26
|
-
errors: (DecodeError | HookError)[];
|
|
27
|
-
};
|
|
28
|
-
export declare class SimulatorManager extends BaseManager {
|
|
29
|
-
getLocalSliceSimulatorURL(): Promise<string | undefined>;
|
|
30
|
-
/**
|
|
31
|
-
* @throws {@link UnexpectedDataError} Thrown if the project is not configured
|
|
32
|
-
* with a Slice Simulator URL.
|
|
33
|
-
*/
|
|
34
|
-
checkIsLocalSliceSimulatorURLAccessible(): Promise<boolean>;
|
|
35
|
-
readSliceSimulatorSetupSteps(): Promise<SimulatorManagerReadSliceSimulatorSetupStepsReturnType>;
|
|
36
|
-
supportsSliceSimulator(): boolean;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { HookError } from "@slicemachine/plugin-kit";
|
|
3
|
+
import { DecodeError } from "../../lib/DecodeError";
|
|
4
|
+
import { BaseManager } from "../BaseManager";
|
|
5
|
+
declare const SliceSimulatorSetupStepValidationMessageCodec: t.TypeC<{
|
|
6
|
+
title: t.StringC;
|
|
7
|
+
message: t.StringC;
|
|
8
|
+
}>;
|
|
9
|
+
type SliceSimulatorSetupStepValidationMessageCodec = t.TypeOf<typeof SliceSimulatorSetupStepValidationMessageCodec>;
|
|
10
|
+
export type SimulatorManagerReadSliceSimulatorSetupStep = {
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
body: string;
|
|
14
|
+
/**
|
|
15
|
+
* Determines if the step is completed.
|
|
16
|
+
*
|
|
17
|
+
* This proeprty is `undefined` if the project's adapter does not provide a
|
|
18
|
+
* validation function for the step; we cannot know if the step is complete
|
|
19
|
+
* without a validator.
|
|
20
|
+
*/
|
|
21
|
+
isComplete: boolean | undefined;
|
|
22
|
+
validationMessages: SliceSimulatorSetupStepValidationMessageCodec[];
|
|
23
|
+
};
|
|
24
|
+
export type SimulatorManagerReadSliceSimulatorSetupStepsReturnType = {
|
|
25
|
+
steps: SimulatorManagerReadSliceSimulatorSetupStep[];
|
|
26
|
+
errors: (DecodeError | HookError)[];
|
|
27
|
+
};
|
|
28
|
+
export declare class SimulatorManager extends BaseManager {
|
|
29
|
+
getLocalSliceSimulatorURL(): Promise<string | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* @throws {@link UnexpectedDataError} Thrown if the project is not configured
|
|
32
|
+
* with a Slice Simulator URL.
|
|
33
|
+
*/
|
|
34
|
+
checkIsLocalSliceSimulatorURLAccessible(): Promise<boolean>;
|
|
35
|
+
readSliceSimulatorSetupSteps(): Promise<SimulatorManagerReadSliceSimulatorSetupStepsReturnType>;
|
|
36
|
+
supportsSliceSimulator(): boolean;
|
|
37
|
+
}
|
|
38
|
+
export {};
|