@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
package/dist/lib/format.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import prettier from "prettier";
|
|
2
|
-
type FormatOptions = {
|
|
3
|
-
prettier?: prettier.Options;
|
|
4
|
-
/**
|
|
5
|
-
* Determines if a newline is included at the end of the formatted result.
|
|
6
|
-
*
|
|
7
|
-
* @defaultValue `true`
|
|
8
|
-
*/
|
|
9
|
-
includeNewlineAtEnd?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const format: (source: string, filePath: string, options?: FormatOptions) => Promise<string>;
|
|
12
|
-
export {};
|
|
1
|
+
import prettier from "prettier";
|
|
2
|
+
type FormatOptions = {
|
|
3
|
+
prettier?: prettier.Options;
|
|
4
|
+
/**
|
|
5
|
+
* Determines if a newline is included at the end of the formatted result.
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue `true`
|
|
8
|
+
*/
|
|
9
|
+
includeNewlineAtEnd?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const format: (source: string, filePath: string, options?: FormatOptions) => Promise<string>;
|
|
12
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as t from "io-ts";
|
|
2
|
-
export declare const functionCodec: t.Type<Function, Function, unknown>;
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare const functionCodec: t.Type<Function, Function, unknown>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ExecaChildProcess, Options as ExacaOptions } from "execa";
|
|
2
|
-
import { PackageManager } from "../types";
|
|
3
|
-
type InstallDependenciesArgs = {
|
|
4
|
-
packageManager: PackageManager;
|
|
5
|
-
dependencies: Record<string, string>;
|
|
6
|
-
dev?: boolean;
|
|
7
|
-
execa?: ExacaOptions;
|
|
8
|
-
};
|
|
9
|
-
type InstallDependenciesReturnType = {
|
|
10
|
-
execaProcess: ExecaChildProcess;
|
|
11
|
-
};
|
|
12
|
-
export declare const installDependencies: (args: InstallDependenciesArgs) => Promise<InstallDependenciesReturnType>;
|
|
13
|
-
export {};
|
|
1
|
+
import { ExecaChildProcess, Options as ExacaOptions } from "execa";
|
|
2
|
+
import { PackageManager } from "../types";
|
|
3
|
+
type InstallDependenciesArgs = {
|
|
4
|
+
packageManager: PackageManager;
|
|
5
|
+
dependencies: Record<string, string>;
|
|
6
|
+
dev?: boolean;
|
|
7
|
+
execa?: ExacaOptions;
|
|
8
|
+
};
|
|
9
|
+
type InstallDependenciesReturnType = {
|
|
10
|
+
execaProcess: ExecaChildProcess;
|
|
11
|
+
};
|
|
12
|
+
export declare const installDependencies: (args: InstallDependenciesArgs) => Promise<InstallDependenciesReturnType>;
|
|
13
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
type LocateFileUpwardConfig = {
|
|
2
|
-
startDir?: string;
|
|
3
|
-
stopDir?: string;
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
_originalStartDir?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const locateFileUpward: (filePathOrPaths: string | readonly string[], { startDir, stopDir, _originalStartDir, }?: LocateFileUpwardConfig) => Promise<string>;
|
|
10
|
-
export {};
|
|
1
|
+
type LocateFileUpwardConfig = {
|
|
2
|
+
startDir?: string;
|
|
3
|
+
stopDir?: string;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
_originalStartDir?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const locateFileUpward: (filePathOrPaths: string | readonly string[], { startDir, stopDir, _originalStartDir, }?: LocateFileUpwardConfig) => Promise<string>;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const markdownToHTML: (markdown: string) => Promise<string>;
|
|
1
|
+
export declare const markdownToHTML: (markdown: string) => Promise<string>;
|
package/dist/lib/mockSlice.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
-
import { SharedSlice, SliceDiff } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
-
type mockSliceArgs = {
|
|
4
|
-
model: SharedSlice;
|
|
5
|
-
mocks?: SharedSliceContent[];
|
|
6
|
-
diff?: SliceDiff;
|
|
7
|
-
};
|
|
8
|
-
export declare const mockSlice: (args: mockSliceArgs) => SharedSliceContent[];
|
|
9
|
-
export {};
|
|
1
|
+
import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import { SharedSlice, SliceDiff } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
type mockSliceArgs = {
|
|
4
|
+
model: SharedSlice;
|
|
5
|
+
mocks?: SharedSliceContent[];
|
|
6
|
+
diff?: SliceDiff;
|
|
7
|
+
};
|
|
8
|
+
export declare const mockSlice: (args: mockSliceArgs) => SharedSliceContent[];
|
|
9
|
+
export {};
|
package/dist/lib/prismicrc.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as t from "io-ts";
|
|
2
|
-
declare const Prismicrc: t.PartialC<{
|
|
3
|
-
telemetry: t.BooleanC;
|
|
4
|
-
}>;
|
|
5
|
-
type Prismicrc = t.TypeOf<typeof Prismicrc>;
|
|
6
|
-
export declare const readRawPrismicrc: (dir?: string) => Prismicrc;
|
|
7
|
-
export declare const readPrismicrc: (dir: string) => Prismicrc;
|
|
8
|
-
export declare const writePrismicrc: (config: Prismicrc, dir?: string) => void;
|
|
9
|
-
export declare const updatePrismicrc: (config: Prismicrc, dir?: string) => Prismicrc;
|
|
10
|
-
export {};
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
declare const Prismicrc: t.PartialC<{
|
|
3
|
+
telemetry: t.BooleanC;
|
|
4
|
+
}>;
|
|
5
|
+
type Prismicrc = t.TypeOf<typeof Prismicrc>;
|
|
6
|
+
export declare const readRawPrismicrc: (dir?: string) => Prismicrc;
|
|
7
|
+
export declare const readPrismicrc: (dir: string) => Prismicrc;
|
|
8
|
+
export declare const writePrismicrc: (config: Prismicrc, dir?: string) => void;
|
|
9
|
+
export declare const updatePrismicrc: (config: Prismicrc, dir?: string) => Prismicrc;
|
|
10
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
type Cookies = string | string[] | Record<string, string>;
|
|
2
|
-
type SerializeCookiesArgs = {
|
|
3
|
-
cookieJar?: Cookies;
|
|
4
|
-
};
|
|
5
|
-
export declare const serializeCookies: (cookies: Cookies, args?: SerializeCookiesArgs) => string;
|
|
6
|
-
export {};
|
|
1
|
+
type Cookies = string | string[] | Record<string, string>;
|
|
2
|
+
type SerializeCookiesArgs = {
|
|
3
|
+
cookieJar?: Cookies;
|
|
4
|
+
};
|
|
5
|
+
export declare const serializeCookies: (cookies: Cookies, args?: SerializeCookiesArgs) => string;
|
|
6
|
+
export {};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
|
|
2
|
-
import { PrismicAuthManager } from "../auth/PrismicAuthManager";
|
|
3
|
-
import { SliceMachineManager } from "./SliceMachineManager";
|
|
4
|
-
import { UserManager } from "./user/UserManager";
|
|
5
|
-
import { PrismicRepositoryManager } from "./prismicRepository/PrismicRepositoryManager";
|
|
6
|
-
import { PluginsManager } from "./plugins/PluginsManager";
|
|
7
|
-
import { ProjectManager } from "./project/ProjectManager";
|
|
8
|
-
import { CustomTypesManager } from "./customTypes/CustomTypesManager";
|
|
9
|
-
import { SlicesManager } from "./slices/SlicesManager";
|
|
10
|
-
import { SnippetsManager } from "./snippets/SnippetsManager";
|
|
11
|
-
import { ScreenshotsManager } from "./screenshots/ScreenshotsManager";
|
|
12
|
-
import { SimulatorManager } from "./simulator/SimulatorManager";
|
|
13
|
-
import { VersionsManager } from "./versions/VersionsManager";
|
|
14
|
-
import { TelemetryManager } from "./telemetry/TelemetryManager";
|
|
15
|
-
export declare abstract class BaseManager {
|
|
16
|
-
private _sliceMachineManager;
|
|
17
|
-
constructor(sliceMachineManager: SliceMachineManager);
|
|
18
|
-
protected get prismicAuthManager(): PrismicAuthManager;
|
|
19
|
-
protected get sliceMachinePluginRunner(): SliceMachinePluginRunner | undefined;
|
|
20
|
-
protected set sliceMachinePluginRunner(sliceMachinePluginRunner: SliceMachinePluginRunner | undefined);
|
|
21
|
-
protected get cwd(): string;
|
|
22
|
-
protected get user(): UserManager;
|
|
23
|
-
protected get prismicRepository(): PrismicRepositoryManager;
|
|
24
|
-
protected get plugins(): PluginsManager;
|
|
25
|
-
protected get project(): ProjectManager;
|
|
26
|
-
protected get customTypes(): CustomTypesManager;
|
|
27
|
-
protected get slices(): SlicesManager;
|
|
28
|
-
protected get snippets(): SnippetsManager;
|
|
29
|
-
protected get screenshots(): ScreenshotsManager;
|
|
30
|
-
protected get simulator(): SimulatorManager;
|
|
31
|
-
protected get versions(): VersionsManager;
|
|
32
|
-
protected get telemetry(): TelemetryManager;
|
|
33
|
-
}
|
|
1
|
+
import { SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { PrismicAuthManager } from "../auth/PrismicAuthManager";
|
|
3
|
+
import { SliceMachineManager } from "./SliceMachineManager";
|
|
4
|
+
import { UserManager } from "./user/UserManager";
|
|
5
|
+
import { PrismicRepositoryManager } from "./prismicRepository/PrismicRepositoryManager";
|
|
6
|
+
import { PluginsManager } from "./plugins/PluginsManager";
|
|
7
|
+
import { ProjectManager } from "./project/ProjectManager";
|
|
8
|
+
import { CustomTypesManager } from "./customTypes/CustomTypesManager";
|
|
9
|
+
import { SlicesManager } from "./slices/SlicesManager";
|
|
10
|
+
import { SnippetsManager } from "./snippets/SnippetsManager";
|
|
11
|
+
import { ScreenshotsManager } from "./screenshots/ScreenshotsManager";
|
|
12
|
+
import { SimulatorManager } from "./simulator/SimulatorManager";
|
|
13
|
+
import { VersionsManager } from "./versions/VersionsManager";
|
|
14
|
+
import { TelemetryManager } from "./telemetry/TelemetryManager";
|
|
15
|
+
export declare abstract class BaseManager {
|
|
16
|
+
private _sliceMachineManager;
|
|
17
|
+
constructor(sliceMachineManager: SliceMachineManager);
|
|
18
|
+
protected get prismicAuthManager(): PrismicAuthManager;
|
|
19
|
+
protected get sliceMachinePluginRunner(): SliceMachinePluginRunner | undefined;
|
|
20
|
+
protected set sliceMachinePluginRunner(sliceMachinePluginRunner: SliceMachinePluginRunner | undefined);
|
|
21
|
+
protected get cwd(): string;
|
|
22
|
+
protected get user(): UserManager;
|
|
23
|
+
protected get prismicRepository(): PrismicRepositoryManager;
|
|
24
|
+
protected get plugins(): PluginsManager;
|
|
25
|
+
protected get project(): ProjectManager;
|
|
26
|
+
protected get customTypes(): CustomTypesManager;
|
|
27
|
+
protected get slices(): SlicesManager;
|
|
28
|
+
protected get snippets(): SnippetsManager;
|
|
29
|
+
protected get screenshots(): ScreenshotsManager;
|
|
30
|
+
protected get simulator(): SimulatorManager;
|
|
31
|
+
protected get versions(): VersionsManager;
|
|
32
|
+
protected get telemetry(): TelemetryManager;
|
|
33
|
+
}
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { SharedSlice, CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
-
import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
|
|
4
|
-
import { SliceMachinePlugin, SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
|
|
5
|
-
import { PackageChangelog, PackageManager } from "../types";
|
|
6
|
-
import { PrismicAuthManager } from "../auth/PrismicAuthManager";
|
|
7
|
-
import { APIEndpoints } from "../constants/API_ENDPOINTS";
|
|
8
|
-
import { UserManager } from "./user/UserManager";
|
|
9
|
-
import { PrismicRepositoryManager } from "./prismicRepository/PrismicRepositoryManager";
|
|
10
|
-
import { PluginsManager } from "./plugins/PluginsManager";
|
|
11
|
-
import { ProjectManager } from "./project/ProjectManager";
|
|
12
|
-
import { CustomTypesManager } from "./customTypes/CustomTypesManager";
|
|
13
|
-
import { SlicesManager } from "./slices/SlicesManager";
|
|
14
|
-
import { SnippetsManager } from "./snippets/SnippetsManager";
|
|
15
|
-
import { ScreenshotsManager } from "./screenshots/ScreenshotsManager";
|
|
16
|
-
import { SimulatorManager } from "./simulator/SimulatorManager";
|
|
17
|
-
import { VersionsManager } from "./versions/VersionsManager";
|
|
18
|
-
import { TelemetryManager } from "./telemetry/TelemetryManager";
|
|
19
|
-
type SliceMachineManagerGetStateReturnType = {
|
|
20
|
-
env: {
|
|
21
|
-
shortId?: string;
|
|
22
|
-
intercomHash?: string;
|
|
23
|
-
manifest: {
|
|
24
|
-
apiEndpoint: string;
|
|
25
|
-
localSliceSimulatorURL?: string;
|
|
26
|
-
};
|
|
27
|
-
repo: string;
|
|
28
|
-
changelog?: PackageChangelog;
|
|
29
|
-
packageManager: PackageManager;
|
|
30
|
-
supportsSliceSimulator: boolean;
|
|
31
|
-
};
|
|
32
|
-
libraries: {
|
|
33
|
-
name: string;
|
|
34
|
-
path: string;
|
|
35
|
-
isLocal: boolean;
|
|
36
|
-
components: {
|
|
37
|
-
from: string;
|
|
38
|
-
href: string;
|
|
39
|
-
pathToSlice: string;
|
|
40
|
-
fileName: string | null;
|
|
41
|
-
extension: string | null;
|
|
42
|
-
model: SharedSlice;
|
|
43
|
-
screenshots: Record<string, {
|
|
44
|
-
hash: string;
|
|
45
|
-
data: Buffer;
|
|
46
|
-
}>;
|
|
47
|
-
mocks?: SharedSliceContent[];
|
|
48
|
-
}[];
|
|
49
|
-
meta: {
|
|
50
|
-
name?: string;
|
|
51
|
-
version?: string;
|
|
52
|
-
isNodeModule: boolean;
|
|
53
|
-
isDownloaded: boolean;
|
|
54
|
-
isManual: boolean;
|
|
55
|
-
};
|
|
56
|
-
}[];
|
|
57
|
-
customTypes: CustomType[];
|
|
58
|
-
remoteCustomTypes: CustomType[];
|
|
59
|
-
remoteSlices: SharedSlice[];
|
|
60
|
-
clientError?: {
|
|
61
|
-
name: string;
|
|
62
|
-
message: string;
|
|
63
|
-
status: number;
|
|
64
|
-
reason: string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
type SliceMachineManagerConstructorArgs = {
|
|
68
|
-
cwd?: string;
|
|
69
|
-
nativePlugins?: Record<string, SliceMachinePlugin>;
|
|
70
|
-
};
|
|
71
|
-
export declare class SliceMachineManager {
|
|
72
|
-
private _sliceMachinePluginRunner;
|
|
73
|
-
private _prismicAuthManager;
|
|
74
|
-
cwd: string;
|
|
75
|
-
customTypes: CustomTypesManager;
|
|
76
|
-
plugins: PluginsManager;
|
|
77
|
-
prismicRepository: PrismicRepositoryManager;
|
|
78
|
-
project: ProjectManager;
|
|
79
|
-
screenshots: ScreenshotsManager;
|
|
80
|
-
simulator: SimulatorManager;
|
|
81
|
-
slices: SlicesManager;
|
|
82
|
-
snippets: SnippetsManager;
|
|
83
|
-
telemetry: TelemetryManager;
|
|
84
|
-
user: UserManager;
|
|
85
|
-
versions: VersionsManager;
|
|
86
|
-
constructor(args?: SliceMachineManagerConstructorArgs);
|
|
87
|
-
getSliceMachinePluginRunner(): SliceMachinePluginRunner | undefined;
|
|
88
|
-
getPrismicAuthManager(): PrismicAuthManager;
|
|
89
|
-
getAPIEndpoints(): APIEndpoints;
|
|
90
|
-
getState(): Promise<SliceMachineManagerGetStateReturnType>;
|
|
91
|
-
private _getProfile;
|
|
92
|
-
private _getLibraries;
|
|
93
|
-
private _getCustomTypes;
|
|
94
|
-
}
|
|
95
|
-
export {};
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { SharedSlice, CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import { SharedSliceContent } from "@prismicio/types-internal/lib/content";
|
|
4
|
+
import { SliceMachinePlugin, SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
|
|
5
|
+
import { PackageChangelog, PackageManager } from "../types";
|
|
6
|
+
import { PrismicAuthManager } from "../auth/PrismicAuthManager";
|
|
7
|
+
import { APIEndpoints } from "../constants/API_ENDPOINTS";
|
|
8
|
+
import { UserManager } from "./user/UserManager";
|
|
9
|
+
import { PrismicRepositoryManager } from "./prismicRepository/PrismicRepositoryManager";
|
|
10
|
+
import { PluginsManager } from "./plugins/PluginsManager";
|
|
11
|
+
import { ProjectManager } from "./project/ProjectManager";
|
|
12
|
+
import { CustomTypesManager } from "./customTypes/CustomTypesManager";
|
|
13
|
+
import { SlicesManager } from "./slices/SlicesManager";
|
|
14
|
+
import { SnippetsManager } from "./snippets/SnippetsManager";
|
|
15
|
+
import { ScreenshotsManager } from "./screenshots/ScreenshotsManager";
|
|
16
|
+
import { SimulatorManager } from "./simulator/SimulatorManager";
|
|
17
|
+
import { VersionsManager } from "./versions/VersionsManager";
|
|
18
|
+
import { TelemetryManager } from "./telemetry/TelemetryManager";
|
|
19
|
+
type SliceMachineManagerGetStateReturnType = {
|
|
20
|
+
env: {
|
|
21
|
+
shortId?: string;
|
|
22
|
+
intercomHash?: string;
|
|
23
|
+
manifest: {
|
|
24
|
+
apiEndpoint: string;
|
|
25
|
+
localSliceSimulatorURL?: string;
|
|
26
|
+
};
|
|
27
|
+
repo: string;
|
|
28
|
+
changelog?: PackageChangelog;
|
|
29
|
+
packageManager: PackageManager;
|
|
30
|
+
supportsSliceSimulator: boolean;
|
|
31
|
+
};
|
|
32
|
+
libraries: {
|
|
33
|
+
name: string;
|
|
34
|
+
path: string;
|
|
35
|
+
isLocal: boolean;
|
|
36
|
+
components: {
|
|
37
|
+
from: string;
|
|
38
|
+
href: string;
|
|
39
|
+
pathToSlice: string;
|
|
40
|
+
fileName: string | null;
|
|
41
|
+
extension: string | null;
|
|
42
|
+
model: SharedSlice;
|
|
43
|
+
screenshots: Record<string, {
|
|
44
|
+
hash: string;
|
|
45
|
+
data: Buffer;
|
|
46
|
+
}>;
|
|
47
|
+
mocks?: SharedSliceContent[];
|
|
48
|
+
}[];
|
|
49
|
+
meta: {
|
|
50
|
+
name?: string;
|
|
51
|
+
version?: string;
|
|
52
|
+
isNodeModule: boolean;
|
|
53
|
+
isDownloaded: boolean;
|
|
54
|
+
isManual: boolean;
|
|
55
|
+
};
|
|
56
|
+
}[];
|
|
57
|
+
customTypes: CustomType[];
|
|
58
|
+
remoteCustomTypes: CustomType[];
|
|
59
|
+
remoteSlices: SharedSlice[];
|
|
60
|
+
clientError?: {
|
|
61
|
+
name: string;
|
|
62
|
+
message: string;
|
|
63
|
+
status: number;
|
|
64
|
+
reason: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
type SliceMachineManagerConstructorArgs = {
|
|
68
|
+
cwd?: string;
|
|
69
|
+
nativePlugins?: Record<string, SliceMachinePlugin>;
|
|
70
|
+
};
|
|
71
|
+
export declare class SliceMachineManager {
|
|
72
|
+
private _sliceMachinePluginRunner;
|
|
73
|
+
private _prismicAuthManager;
|
|
74
|
+
cwd: string;
|
|
75
|
+
customTypes: CustomTypesManager;
|
|
76
|
+
plugins: PluginsManager;
|
|
77
|
+
prismicRepository: PrismicRepositoryManager;
|
|
78
|
+
project: ProjectManager;
|
|
79
|
+
screenshots: ScreenshotsManager;
|
|
80
|
+
simulator: SimulatorManager;
|
|
81
|
+
slices: SlicesManager;
|
|
82
|
+
snippets: SnippetsManager;
|
|
83
|
+
telemetry: TelemetryManager;
|
|
84
|
+
user: UserManager;
|
|
85
|
+
versions: VersionsManager;
|
|
86
|
+
constructor(args?: SliceMachineManagerConstructorArgs);
|
|
87
|
+
getSliceMachinePluginRunner(): SliceMachinePluginRunner | undefined;
|
|
88
|
+
getPrismicAuthManager(): PrismicAuthManager;
|
|
89
|
+
getAPIEndpoints(): APIEndpoints;
|
|
90
|
+
getState(): Promise<SliceMachineManagerGetStateReturnType>;
|
|
91
|
+
private _getProfile;
|
|
92
|
+
private _getLibraries;
|
|
93
|
+
private _getCustomTypes;
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SliceMachineManager } from "./SliceMachineManager";
|
|
2
|
-
export declare const createSliceMachineManager: (args?: {
|
|
3
|
-
cwd?: string | undefined;
|
|
4
|
-
nativePlugins?: Record<string, import("@slicemachine/plugin-kit").SliceMachinePlugin<Record<string, unknown>>> | undefined;
|
|
5
|
-
} | undefined) => SliceMachineManager;
|
|
1
|
+
import { SliceMachineManager } from "./SliceMachineManager";
|
|
2
|
+
export declare const createSliceMachineManager: (args?: {
|
|
3
|
+
cwd?: string | undefined;
|
|
4
|
+
nativePlugins?: Record<string, import("@slicemachine/plugin-kit").SliceMachinePlugin<Record<string, unknown>>> | undefined;
|
|
5
|
+
} | undefined) => SliceMachineManager;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CreateRPCClientArgs, RPCClient } from "r19/client";
|
|
2
|
-
import type { SliceMachineManagerProcedures } from "./createSliceMachineManagerMiddleware";
|
|
3
|
-
export type SliceMachineManagerClient = RPCClient<SliceMachineManagerProcedures>;
|
|
4
|
-
export type CreateSliceMachineManagerClientArgs = {
|
|
5
|
-
serverURL: CreateRPCClientArgs["serverURL"];
|
|
6
|
-
fetch?: NonNullable<CreateRPCClientArgs["fetch"]>;
|
|
7
|
-
};
|
|
8
|
-
export declare const createSliceMachineManagerClient: (args: CreateSliceMachineManagerClientArgs) => SliceMachineManagerClient;
|
|
1
|
+
import { CreateRPCClientArgs, RPCClient } from "r19/client";
|
|
2
|
+
import type { SliceMachineManagerProcedures } from "./createSliceMachineManagerMiddleware";
|
|
3
|
+
export type SliceMachineManagerClient = RPCClient<SliceMachineManagerProcedures>;
|
|
4
|
+
export type CreateSliceMachineManagerClientArgs = {
|
|
5
|
+
serverURL: CreateRPCClientArgs["serverURL"];
|
|
6
|
+
fetch?: NonNullable<CreateRPCClientArgs["fetch"]>;
|
|
7
|
+
};
|
|
8
|
+
export declare const createSliceMachineManagerClient: (args: CreateSliceMachineManagerClientArgs) => SliceMachineManagerClient;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ExtractProcedures, ProceduresFromInstance, RPCMiddleware, OnErrorEventHandler } from "r19";
|
|
2
|
-
import { SliceMachineManager } from "./SliceMachineManager";
|
|
3
|
-
declare const omitProcedures: readonly ("getSliceMachinePluginRunner" | "getPrismicAuthManager")[];
|
|
4
|
-
export type SliceMachineManagerMiddleware = RPCMiddleware<ProceduresFromInstance<SliceMachineManager, (typeof omitProcedures)[number]>>;
|
|
5
|
-
export type SliceMachineManagerProcedures = ExtractProcedures<SliceMachineManagerMiddleware>;
|
|
6
|
-
type GetSliceMachineManagerProceduresArgs = {
|
|
7
|
-
sliceMachineManager: SliceMachineManager;
|
|
8
|
-
};
|
|
9
|
-
export declare const getSliceMachineManagerProcedures: (args: GetSliceMachineManagerProceduresArgs) => SliceMachineManagerProcedures;
|
|
10
|
-
export type CreateSliceMachineManagerMiddlewareArgs = {
|
|
11
|
-
sliceMachineManager: SliceMachineManager;
|
|
12
|
-
onError?: OnErrorEventHandler;
|
|
13
|
-
};
|
|
14
|
-
export declare const createSliceMachineManagerMiddleware: (args: CreateSliceMachineManagerMiddlewareArgs) => SliceMachineManagerMiddleware;
|
|
15
|
-
export {};
|
|
1
|
+
import { ExtractProcedures, ProceduresFromInstance, RPCMiddleware, OnErrorEventHandler } from "r19";
|
|
2
|
+
import { SliceMachineManager } from "./SliceMachineManager";
|
|
3
|
+
declare const omitProcedures: readonly ("getSliceMachinePluginRunner" | "getPrismicAuthManager")[];
|
|
4
|
+
export type SliceMachineManagerMiddleware = RPCMiddleware<ProceduresFromInstance<SliceMachineManager, (typeof omitProcedures)[number]>>;
|
|
5
|
+
export type SliceMachineManagerProcedures = ExtractProcedures<SliceMachineManagerMiddleware>;
|
|
6
|
+
type GetSliceMachineManagerProceduresArgs = {
|
|
7
|
+
sliceMachineManager: SliceMachineManager;
|
|
8
|
+
};
|
|
9
|
+
export declare const getSliceMachineManagerProcedures: (args: GetSliceMachineManagerProceduresArgs) => SliceMachineManagerProcedures;
|
|
10
|
+
export type CreateSliceMachineManagerMiddlewareArgs = {
|
|
11
|
+
sliceMachineManager: SliceMachineManager;
|
|
12
|
+
onError?: OnErrorEventHandler;
|
|
13
|
+
};
|
|
14
|
+
export declare const createSliceMachineManagerMiddleware: (args: CreateSliceMachineManagerMiddlewareArgs) => SliceMachineManagerMiddleware;
|
|
15
|
+
export {};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
-
import { CallHookReturnType, CustomTypeCreateHook, CustomTypeCreateHookData, CustomTypeReadHookData, CustomTypeRenameHook, CustomTypeRenameHookData, CustomTypeUpdateHook, CustomTypeUpdateHookData, HookError } from "@slicemachine/plugin-kit";
|
|
3
|
-
import { DecodeError } from "../../lib/DecodeError";
|
|
4
|
-
import { OnlyHookErrors } from "../../types";
|
|
5
|
-
import { BaseManager } from "../BaseManager";
|
|
6
|
-
type SliceMachineManagerReadCustomTypeLibraryReturnType = {
|
|
7
|
-
ids: string[];
|
|
8
|
-
errors: (DecodeError | HookError)[];
|
|
9
|
-
};
|
|
10
|
-
type SliceMachineManagerReadAllCustomTypeReturnType = {
|
|
11
|
-
models: {
|
|
12
|
-
model: CustomType;
|
|
13
|
-
}[];
|
|
14
|
-
errors: (DecodeError | HookError)[];
|
|
15
|
-
};
|
|
16
|
-
type SliceMachineManagerReadCustomTypeReturnType = {
|
|
17
|
-
model: CustomType | undefined;
|
|
18
|
-
errors: (DecodeError | HookError)[];
|
|
19
|
-
};
|
|
20
|
-
type SliceMachineManagerPushCustomTypeArgs = {
|
|
21
|
-
id: string;
|
|
22
|
-
};
|
|
23
|
-
type SliceMachineManagerReadCustomTypeMocksConfigArgs = {
|
|
24
|
-
customTypeID: string;
|
|
25
|
-
};
|
|
26
|
-
type SliceMachineManagerReadCustomTypeMocksConfigArgsReturnType = {
|
|
27
|
-
mocksConfig?: Record<string, unknown>;
|
|
28
|
-
errors: HookError[];
|
|
29
|
-
};
|
|
30
|
-
type SliceMachineManagerUpdateCustomTypeMocksConfigArgs = {
|
|
31
|
-
customTypeID: string;
|
|
32
|
-
mocksConfig: Record<string, unknown>;
|
|
33
|
-
};
|
|
34
|
-
type SliceMachineManagerUpdateCustomTypeMocksConfigArgsReturnType = {
|
|
35
|
-
errors: HookError[];
|
|
36
|
-
};
|
|
37
|
-
type CustomTypesMachineManagerDeleteCustomTypeArgs = {
|
|
38
|
-
id: string;
|
|
39
|
-
};
|
|
40
|
-
type CustomTypesMachineManagerDeleteCustomTypeReturnType = {
|
|
41
|
-
errors: (DecodeError | HookError)[];
|
|
42
|
-
};
|
|
43
|
-
export declare class CustomTypesManager extends BaseManager {
|
|
44
|
-
readCustomTypeLibrary(): Promise<SliceMachineManagerReadCustomTypeLibraryReturnType>;
|
|
45
|
-
readAllCustomTypes(): Promise<SliceMachineManagerReadAllCustomTypeReturnType>;
|
|
46
|
-
createCustomType(args: CustomTypeCreateHookData): Promise<OnlyHookErrors<CallHookReturnType<CustomTypeCreateHook>>>;
|
|
47
|
-
readCustomType(args: CustomTypeReadHookData): Promise<SliceMachineManagerReadCustomTypeReturnType>;
|
|
48
|
-
updateCustomType(args: CustomTypeUpdateHookData): Promise<OnlyHookErrors<CallHookReturnType<CustomTypeUpdateHook>>>;
|
|
49
|
-
renameCustomType(args: CustomTypeRenameHookData): Promise<OnlyHookErrors<CallHookReturnType<CustomTypeRenameHook>>>;
|
|
50
|
-
deleteCustomType(args: CustomTypesMachineManagerDeleteCustomTypeArgs): Promise<CustomTypesMachineManagerDeleteCustomTypeReturnType>;
|
|
51
|
-
pushCustomType(args: SliceMachineManagerPushCustomTypeArgs): Promise<void>;
|
|
52
|
-
readCustomTypeMocksConfig(args: SliceMachineManagerReadCustomTypeMocksConfigArgs): Promise<SliceMachineManagerReadCustomTypeMocksConfigArgsReturnType>;
|
|
53
|
-
updateCustomTypeMocksConfig(args: SliceMachineManagerUpdateCustomTypeMocksConfigArgs): Promise<SliceMachineManagerUpdateCustomTypeMocksConfigArgsReturnType>;
|
|
54
|
-
fetchRemoteCustomTypes(): Promise<CustomType[]>;
|
|
55
|
-
}
|
|
56
|
-
export {};
|
|
1
|
+
import { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
+
import { CallHookReturnType, CustomTypeCreateHook, CustomTypeCreateHookData, CustomTypeReadHookData, CustomTypeRenameHook, CustomTypeRenameHookData, CustomTypeUpdateHook, CustomTypeUpdateHookData, HookError } from "@slicemachine/plugin-kit";
|
|
3
|
+
import { DecodeError } from "../../lib/DecodeError";
|
|
4
|
+
import { OnlyHookErrors } from "../../types";
|
|
5
|
+
import { BaseManager } from "../BaseManager";
|
|
6
|
+
type SliceMachineManagerReadCustomTypeLibraryReturnType = {
|
|
7
|
+
ids: string[];
|
|
8
|
+
errors: (DecodeError | HookError)[];
|
|
9
|
+
};
|
|
10
|
+
type SliceMachineManagerReadAllCustomTypeReturnType = {
|
|
11
|
+
models: {
|
|
12
|
+
model: CustomType;
|
|
13
|
+
}[];
|
|
14
|
+
errors: (DecodeError | HookError)[];
|
|
15
|
+
};
|
|
16
|
+
type SliceMachineManagerReadCustomTypeReturnType = {
|
|
17
|
+
model: CustomType | undefined;
|
|
18
|
+
errors: (DecodeError | HookError)[];
|
|
19
|
+
};
|
|
20
|
+
type SliceMachineManagerPushCustomTypeArgs = {
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
23
|
+
type SliceMachineManagerReadCustomTypeMocksConfigArgs = {
|
|
24
|
+
customTypeID: string;
|
|
25
|
+
};
|
|
26
|
+
type SliceMachineManagerReadCustomTypeMocksConfigArgsReturnType = {
|
|
27
|
+
mocksConfig?: Record<string, unknown>;
|
|
28
|
+
errors: HookError[];
|
|
29
|
+
};
|
|
30
|
+
type SliceMachineManagerUpdateCustomTypeMocksConfigArgs = {
|
|
31
|
+
customTypeID: string;
|
|
32
|
+
mocksConfig: Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
type SliceMachineManagerUpdateCustomTypeMocksConfigArgsReturnType = {
|
|
35
|
+
errors: HookError[];
|
|
36
|
+
};
|
|
37
|
+
type CustomTypesMachineManagerDeleteCustomTypeArgs = {
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
type CustomTypesMachineManagerDeleteCustomTypeReturnType = {
|
|
41
|
+
errors: (DecodeError | HookError)[];
|
|
42
|
+
};
|
|
43
|
+
export declare class CustomTypesManager extends BaseManager {
|
|
44
|
+
readCustomTypeLibrary(): Promise<SliceMachineManagerReadCustomTypeLibraryReturnType>;
|
|
45
|
+
readAllCustomTypes(): Promise<SliceMachineManagerReadAllCustomTypeReturnType>;
|
|
46
|
+
createCustomType(args: CustomTypeCreateHookData): Promise<OnlyHookErrors<CallHookReturnType<CustomTypeCreateHook>>>;
|
|
47
|
+
readCustomType(args: CustomTypeReadHookData): Promise<SliceMachineManagerReadCustomTypeReturnType>;
|
|
48
|
+
updateCustomType(args: CustomTypeUpdateHookData): Promise<OnlyHookErrors<CallHookReturnType<CustomTypeUpdateHook>>>;
|
|
49
|
+
renameCustomType(args: CustomTypeRenameHookData): Promise<OnlyHookErrors<CallHookReturnType<CustomTypeRenameHook>>>;
|
|
50
|
+
deleteCustomType(args: CustomTypesMachineManagerDeleteCustomTypeArgs): Promise<CustomTypesMachineManagerDeleteCustomTypeReturnType>;
|
|
51
|
+
pushCustomType(args: SliceMachineManagerPushCustomTypeArgs): Promise<void>;
|
|
52
|
+
readCustomTypeMocksConfig(args: SliceMachineManagerReadCustomTypeMocksConfigArgs): Promise<SliceMachineManagerReadCustomTypeMocksConfigArgsReturnType>;
|
|
53
|
+
updateCustomTypeMocksConfig(args: SliceMachineManagerUpdateCustomTypeMocksConfigArgs): Promise<SliceMachineManagerUpdateCustomTypeMocksConfigArgsReturnType>;
|
|
54
|
+
fetchRemoteCustomTypes(): Promise<CustomType[]>;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { SliceMachinePlugin, SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
|
|
2
|
-
import { BaseManager } from "../BaseManager";
|
|
3
|
-
import { SliceMachineManager } from "../SliceMachineManager";
|
|
4
|
-
type PluginsManagerConfig = {
|
|
5
|
-
nativePlugins?: Record<string, SliceMachinePlugin>;
|
|
6
|
-
};
|
|
7
|
-
export declare class PluginsManager extends BaseManager {
|
|
8
|
-
private _nativePlugins;
|
|
9
|
-
constructor(sliceMachineManager: SliceMachineManager, config: PluginsManagerConfig);
|
|
10
|
-
initPlugins(): Promise<void>;
|
|
11
|
-
dangerouslyCallHook: SliceMachinePluginRunner["callHook"];
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
1
|
+
import { SliceMachinePlugin, SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
|
|
2
|
+
import { BaseManager } from "../BaseManager";
|
|
3
|
+
import { SliceMachineManager } from "../SliceMachineManager";
|
|
4
|
+
type PluginsManagerConfig = {
|
|
5
|
+
nativePlugins?: Record<string, SliceMachinePlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare class PluginsManager extends BaseManager {
|
|
8
|
+
private _nativePlugins;
|
|
9
|
+
constructor(sliceMachineManager: SliceMachineManager, config: PluginsManagerConfig);
|
|
10
|
+
initPlugins(): Promise<void>;
|
|
11
|
+
dangerouslyCallHook: SliceMachinePluginRunner["callHook"];
|
|
12
|
+
}
|
|
13
|
+
export {};
|