@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.
Files changed (72) hide show
  1. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs +1 -2
  2. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs.map +1 -1
  3. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js +1 -2
  4. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js.map +1 -1
  5. package/dist/auth/PrismicAuthManager.d.ts +58 -58
  6. package/dist/auth/createPrismicAuthManager.d.ts +4 -4
  7. package/dist/auth/createPrismicAuthManagerMiddleware.d.ts +14 -14
  8. package/dist/client/index.d.ts +6 -6
  9. package/dist/constants/API_ENDPOINTS.d.ts +8 -8
  10. package/dist/constants/API_TOKENS.d.ts +5 -5
  11. package/dist/constants/APPLICATION_MODE.d.ts +5 -5
  12. package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.d.ts +5 -5
  13. package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.d.ts +1 -1
  14. package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.d.ts +1 -1
  15. package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.d.ts +1 -1
  16. package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.d.ts +1 -1
  17. package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.d.ts +1 -1
  18. package/dist/constants/SLICE_MACHINE_USER_AGENT.d.ts +1 -1
  19. package/dist/constants/TS_CONFIG_FILENAME.d.ts +1 -1
  20. package/dist/constants/VERSION_KIND.d.ts +6 -6
  21. package/dist/errors.d.ts +34 -34
  22. package/dist/index.d.ts +11 -11
  23. package/dist/lib/DecodeError.d.ts +12 -12
  24. package/dist/lib/addTrailingSlash.d.ts +1 -1
  25. package/dist/lib/assertPluginsInitialized.d.ts +2 -2
  26. package/dist/lib/bufferCodec.d.ts +4 -4
  27. package/dist/lib/buildPrismicRepositoryAPIEndpoint.d.ts +4 -4
  28. package/dist/lib/castArray.d.ts +1 -1
  29. package/dist/lib/checkIsURLAccessible.d.ts +1 -1
  30. package/dist/lib/createContentDigest.d.ts +9 -9
  31. package/dist/lib/decode.d.ts +10 -10
  32. package/dist/lib/decodeHookResult.d.ts +10 -10
  33. package/dist/lib/decodePackageJSON.d.ts +12 -12
  34. package/dist/lib/decodeSliceMachineConfig.d.ts +3 -3
  35. package/dist/lib/fetchGitHubReleaseBodyForRelease.d.ts +21 -21
  36. package/dist/lib/fetchNPMPackageVersions.d.ts +5 -5
  37. package/dist/lib/format.d.ts +12 -12
  38. package/dist/lib/functionCodec.d.ts +2 -2
  39. package/dist/lib/installDependencies.d.ts +13 -13
  40. package/dist/lib/locateFileUpward.d.ts +10 -10
  41. package/dist/lib/markdownToHTML.d.ts +1 -1
  42. package/dist/lib/mockSlice.d.ts +9 -9
  43. package/dist/lib/prismicrc.d.ts +10 -10
  44. package/dist/lib/serializeCookies.d.ts +6 -6
  45. package/dist/managers/BaseManager.d.ts +33 -33
  46. package/dist/managers/SliceMachineManager.d.ts +95 -95
  47. package/dist/managers/createSliceMachineManager.d.ts +5 -5
  48. package/dist/managers/createSliceMachineManagerClient.d.ts +8 -8
  49. package/dist/managers/createSliceMachineManagerMiddleware.d.ts +15 -15
  50. package/dist/managers/customTypes/CustomTypesManager.d.ts +56 -56
  51. package/dist/managers/plugins/PluginsManager.d.ts +13 -13
  52. package/dist/managers/prismicRepository/PrismicRepositoryManager.d.ts +30 -30
  53. package/dist/managers/prismicRepository/types.d.ts +123 -123
  54. package/dist/managers/project/ProjectManager.d.ts +49 -49
  55. package/dist/managers/screenshots/ScreenshotsManager.cjs +1 -1
  56. package/dist/managers/screenshots/ScreenshotsManager.cjs.map +1 -1
  57. package/dist/managers/screenshots/ScreenshotsManager.d.ts +34 -34
  58. package/dist/managers/screenshots/ScreenshotsManager.js +1 -1
  59. package/dist/managers/screenshots/ScreenshotsManager.js.map +1 -1
  60. package/dist/managers/simulator/SimulatorManager.d.ts +38 -38
  61. package/dist/managers/slices/SlicesManager.d.ts +128 -128
  62. package/dist/managers/snippets/SnippetsManager.d.ts +11 -11
  63. package/dist/managers/telemetry/TelemetryManager.d.ts +30 -30
  64. package/dist/managers/telemetry/types.d.ts +143 -143
  65. package/dist/managers/user/UserManager.d.ts +40 -40
  66. package/dist/managers/versions/VersionsManager.d.ts +19 -19
  67. package/dist/managers/versions/types.d.ts +5 -5
  68. package/dist/test/createSliceMachineManagerMSWHandler.d.ts +7 -7
  69. package/dist/test/index.d.ts +2 -2
  70. package/dist/types.d.ts +45 -45
  71. package/package.json +4 -4
  72. package/src/managers/screenshots/ScreenshotsManager.ts +1 -1
@@ -3,6 +3,5 @@ const TemplateTag = require("../TemplateTag/TemplateTag.cjs");
3
3
  const stripIndentTransformer = require("../stripIndentTransformer/stripIndentTransformer.cjs");
4
4
  const trimResultTransformer = require("../trimResultTransformer/trimResultTransformer.cjs");
5
5
  var stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer);
6
- const stripIndent$1 = stripIndent;
7
- module.exports = stripIndent$1;
6
+ module.exports = stripIndent;
8
7
  //# sourceMappingURL=stripIndent.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripIndent.cjs","sources":["../../../../../../../node_modules/common-tags/es/stripIndent/stripIndent.js"],"sourcesContent":["import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\n\nvar stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer);\n\nexport default stripIndent;\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHJpcEluZGVudC9zdHJpcEluZGVudC5qcyJdLCJuYW1lcyI6WyJUZW1wbGF0ZVRhZyIsInN0cmlwSW5kZW50VHJhbnNmb3JtZXIiLCJ0cmltUmVzdWx0VHJhbnNmb3JtZXIiLCJzdHJpcEluZGVudCJdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT0EsV0FBUCxNQUF3QixnQkFBeEI7QUFDQSxPQUFPQyxzQkFBUCxNQUFtQywyQkFBbkM7QUFDQSxPQUFPQyxxQkFBUCxNQUFrQywwQkFBbEM7O0FBRUEsSUFBTUMsY0FBYyxJQUFJSCxXQUFKLENBQ2xCQyxzQkFEa0IsRUFFbEJDLHFCQUZrQixDQUFwQjs7QUFLQSxlQUFlQyxXQUFmIiwiZmlsZSI6InN0cmlwSW5kZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFRlbXBsYXRlVGFnIGZyb20gJy4uL1RlbXBsYXRlVGFnJztcbmltcG9ydCBzdHJpcEluZGVudFRyYW5zZm9ybWVyIGZyb20gJy4uL3N0cmlwSW5kZW50VHJhbnNmb3JtZXInO1xuaW1wb3J0IHRyaW1SZXN1bHRUcmFuc2Zvcm1lciBmcm9tICcuLi90cmltUmVzdWx0VHJhbnNmb3JtZXInO1xuXG5jb25zdCBzdHJpcEluZGVudCA9IG5ldyBUZW1wbGF0ZVRhZyhcbiAgc3RyaXBJbmRlbnRUcmFuc2Zvcm1lcixcbiAgdHJpbVJlc3VsdFRyYW5zZm9ybWVyLFxuKTtcblxuZXhwb3J0IGRlZmF1bHQgc3RyaXBJbmRlbnQ7XG4iXX0="],"names":[],"mappings":";;;;AAIA,IAAI,cAAc,IAAI,YAAY,wBAAwB,qBAAqB;AAE/E,MAAA,gBAAe;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"stripIndent.cjs","sources":["../../../../../../../node_modules/common-tags/es/stripIndent/stripIndent.js"],"sourcesContent":["import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\n\nvar stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer);\n\nexport default stripIndent;\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHJpcEluZGVudC9zdHJpcEluZGVudC5qcyJdLCJuYW1lcyI6WyJUZW1wbGF0ZVRhZyIsInN0cmlwSW5kZW50VHJhbnNmb3JtZXIiLCJ0cmltUmVzdWx0VHJhbnNmb3JtZXIiLCJzdHJpcEluZGVudCJdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT0EsV0FBUCxNQUF3QixnQkFBeEI7QUFDQSxPQUFPQyxzQkFBUCxNQUFtQywyQkFBbkM7QUFDQSxPQUFPQyxxQkFBUCxNQUFrQywwQkFBbEM7O0FBRUEsSUFBTUMsY0FBYyxJQUFJSCxXQUFKLENBQ2xCQyxzQkFEa0IsRUFFbEJDLHFCQUZrQixDQUFwQjs7QUFLQSxlQUFlQyxXQUFmIiwiZmlsZSI6InN0cmlwSW5kZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFRlbXBsYXRlVGFnIGZyb20gJy4uL1RlbXBsYXRlVGFnJztcbmltcG9ydCBzdHJpcEluZGVudFRyYW5zZm9ybWVyIGZyb20gJy4uL3N0cmlwSW5kZW50VHJhbnNmb3JtZXInO1xuaW1wb3J0IHRyaW1SZXN1bHRUcmFuc2Zvcm1lciBmcm9tICcuLi90cmltUmVzdWx0VHJhbnNmb3JtZXInO1xuXG5jb25zdCBzdHJpcEluZGVudCA9IG5ldyBUZW1wbGF0ZVRhZyhcbiAgc3RyaXBJbmRlbnRUcmFuc2Zvcm1lcixcbiAgdHJpbVJlc3VsdFRyYW5zZm9ybWVyLFxuKTtcblxuZXhwb3J0IGRlZmF1bHQgc3RyaXBJbmRlbnQ7XG4iXX0="],"names":[],"mappings":";;;;AAIG,IAAC,cAAc,IAAI,YAAY,wBAAwB,qBAAqB;;","x_google_ignoreList":[0]}
@@ -2,8 +2,7 @@ import TemplateTag from "../TemplateTag/TemplateTag.js";
2
2
  import stripIndentTransformer from "../stripIndentTransformer/stripIndentTransformer.js";
3
3
  import trimResultTransformer from "../trimResultTransformer/trimResultTransformer.js";
4
4
  var stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer);
5
- const stripIndent$1 = stripIndent;
6
5
  export {
7
- stripIndent$1 as default
6
+ stripIndent as default
8
7
  };
9
8
  //# sourceMappingURL=stripIndent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripIndent.js","sources":["../../../../../../../node_modules/common-tags/es/stripIndent/stripIndent.js"],"sourcesContent":["import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\n\nvar stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer);\n\nexport default stripIndent;\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHJpcEluZGVudC9zdHJpcEluZGVudC5qcyJdLCJuYW1lcyI6WyJUZW1wbGF0ZVRhZyIsInN0cmlwSW5kZW50VHJhbnNmb3JtZXIiLCJ0cmltUmVzdWx0VHJhbnNmb3JtZXIiLCJzdHJpcEluZGVudCJdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT0EsV0FBUCxNQUF3QixnQkFBeEI7QUFDQSxPQUFPQyxzQkFBUCxNQUFtQywyQkFBbkM7QUFDQSxPQUFPQyxxQkFBUCxNQUFrQywwQkFBbEM7O0FBRUEsSUFBTUMsY0FBYyxJQUFJSCxXQUFKLENBQ2xCQyxzQkFEa0IsRUFFbEJDLHFCQUZrQixDQUFwQjs7QUFLQSxlQUFlQyxXQUFmIiwiZmlsZSI6InN0cmlwSW5kZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFRlbXBsYXRlVGFnIGZyb20gJy4uL1RlbXBsYXRlVGFnJztcbmltcG9ydCBzdHJpcEluZGVudFRyYW5zZm9ybWVyIGZyb20gJy4uL3N0cmlwSW5kZW50VHJhbnNmb3JtZXInO1xuaW1wb3J0IHRyaW1SZXN1bHRUcmFuc2Zvcm1lciBmcm9tICcuLi90cmltUmVzdWx0VHJhbnNmb3JtZXInO1xuXG5jb25zdCBzdHJpcEluZGVudCA9IG5ldyBUZW1wbGF0ZVRhZyhcbiAgc3RyaXBJbmRlbnRUcmFuc2Zvcm1lcixcbiAgdHJpbVJlc3VsdFRyYW5zZm9ybWVyLFxuKTtcblxuZXhwb3J0IGRlZmF1bHQgc3RyaXBJbmRlbnQ7XG4iXX0="],"names":[],"mappings":";;;AAIA,IAAI,cAAc,IAAI,YAAY,wBAAwB,qBAAqB;AAE/E,MAAA,gBAAe;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"stripIndent.js","sources":["../../../../../../../node_modules/common-tags/es/stripIndent/stripIndent.js"],"sourcesContent":["import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\n\nvar stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer);\n\nexport default stripIndent;\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHJpcEluZGVudC9zdHJpcEluZGVudC5qcyJdLCJuYW1lcyI6WyJUZW1wbGF0ZVRhZyIsInN0cmlwSW5kZW50VHJhbnNmb3JtZXIiLCJ0cmltUmVzdWx0VHJhbnNmb3JtZXIiLCJzdHJpcEluZGVudCJdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT0EsV0FBUCxNQUF3QixnQkFBeEI7QUFDQSxPQUFPQyxzQkFBUCxNQUFtQywyQkFBbkM7QUFDQSxPQUFPQyxxQkFBUCxNQUFrQywwQkFBbEM7O0FBRUEsSUFBTUMsY0FBYyxJQUFJSCxXQUFKLENBQ2xCQyxzQkFEa0IsRUFFbEJDLHFCQUZrQixDQUFwQjs7QUFLQSxlQUFlQyxXQUFmIiwiZmlsZSI6InN0cmlwSW5kZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFRlbXBsYXRlVGFnIGZyb20gJy4uL1RlbXBsYXRlVGFnJztcbmltcG9ydCBzdHJpcEluZGVudFRyYW5zZm9ybWVyIGZyb20gJy4uL3N0cmlwSW5kZW50VHJhbnNmb3JtZXInO1xuaW1wb3J0IHRyaW1SZXN1bHRUcmFuc2Zvcm1lciBmcm9tICcuLi90cmltUmVzdWx0VHJhbnNmb3JtZXInO1xuXG5jb25zdCBzdHJpcEluZGVudCA9IG5ldyBUZW1wbGF0ZVRhZyhcbiAgc3RyaXBJbmRlbnRUcmFuc2Zvcm1lcixcbiAgdHJpbVJlc3VsdFRyYW5zZm9ybWVyLFxuKTtcblxuZXhwb3J0IGRlZmF1bHQgc3RyaXBJbmRlbnQ7XG4iXX0="],"names":[],"mappings":";;;AAIG,IAAC,cAAc,IAAI,YAAY,wBAAwB,qBAAqB;","x_google_ignoreList":[0]}
@@ -1,58 +1,58 @@
1
- import * as t from "io-ts";
2
- declare const AUTH_COOKIE_KEY = "prismic-auth";
3
- declare const SESSION_COOKIE_KEY = "SESSION";
4
- declare const PrismicAuthState: t.IntersectionC<[t.TypeC<{
5
- base: t.StringC;
6
- cookies: t.IntersectionC<[t.PartialC<{
7
- "prismic-auth": t.StringC;
8
- SESSION: t.StringC;
9
- }>, t.RecordC<t.StringC, t.StringC>]>;
10
- }>, t.PartialC<{
11
- shortId: t.StringC;
12
- intercomHash: t.StringC;
13
- oauthAccessToken: t.StringC;
14
- authUrl: t.StringC;
15
- }>]>;
16
- export type PrismicAuthState = t.TypeOf<typeof PrismicAuthState>;
17
- declare const PrismicUserProfile: t.ExactC<t.TypeC<{
18
- userId: t.StringC;
19
- shortId: t.StringC;
20
- intercomHash: t.StringC;
21
- email: t.StringC;
22
- firstName: t.StringC;
23
- lastName: t.StringC;
24
- }>>;
25
- export type PrismicUserProfile = t.TypeOf<typeof PrismicUserProfile>;
26
- type PrismicAuthManagerConstructorArgs = {
27
- scopedDirectory?: string;
28
- };
29
- type PrismicAuthManagerLoginArgs = {
30
- email: string;
31
- cookies: string[];
32
- };
33
- type PrismicAuthManagerGetLoginSessionInfoReturnType = {
34
- port: number;
35
- url: string;
36
- };
37
- type PrismicAuthManagerNodeLoginSessionArgs = {
38
- port: number;
39
- onListenCallback?: () => void;
40
- };
41
- export declare class PrismicAuthManager {
42
- scopedDirectory: string;
43
- constructor({ scopedDirectory, }?: PrismicAuthManagerConstructorArgs);
44
- login(args: PrismicAuthManagerLoginArgs): Promise<void>;
45
- getLoginSessionInfo(): Promise<PrismicAuthManagerGetLoginSessionInfoReturnType>;
46
- nodeLoginSession(args: PrismicAuthManagerNodeLoginSessionArgs): Promise<void>;
47
- logout(): Promise<void>;
48
- checkIsLoggedIn(): Promise<boolean>;
49
- getAuthenticationCookies(): Promise<PrismicAuthState["cookies"] & Required<Pick<PrismicAuthState["cookies"], typeof AUTH_COOKIE_KEY | typeof SESSION_COOKIE_KEY>>>;
50
- getAuthenticationToken(): Promise<string>;
51
- refreshAuthenticationToken(): Promise<void>;
52
- getProfile(): Promise<PrismicUserProfile>;
53
- private _getProfileForAuthenticationToken;
54
- private _readPersistedAuthState;
55
- private _writePersistedAuthState;
56
- private _getPersistedAuthStateFilePath;
57
- }
58
- export {};
1
+ import * as t from "io-ts";
2
+ declare const AUTH_COOKIE_KEY = "prismic-auth";
3
+ declare const SESSION_COOKIE_KEY = "SESSION";
4
+ declare const PrismicAuthState: t.IntersectionC<[t.TypeC<{
5
+ base: t.StringC;
6
+ cookies: t.IntersectionC<[t.PartialC<{
7
+ "prismic-auth": t.StringC;
8
+ SESSION: t.StringC;
9
+ }>, t.RecordC<t.StringC, t.StringC>]>;
10
+ }>, t.PartialC<{
11
+ shortId: t.StringC;
12
+ intercomHash: t.StringC;
13
+ oauthAccessToken: t.StringC;
14
+ authUrl: t.StringC;
15
+ }>]>;
16
+ export type PrismicAuthState = t.TypeOf<typeof PrismicAuthState>;
17
+ declare const PrismicUserProfile: t.ExactC<t.TypeC<{
18
+ userId: t.StringC;
19
+ shortId: t.StringC;
20
+ intercomHash: t.StringC;
21
+ email: t.StringC;
22
+ firstName: t.StringC;
23
+ lastName: t.StringC;
24
+ }>>;
25
+ export type PrismicUserProfile = t.TypeOf<typeof PrismicUserProfile>;
26
+ type PrismicAuthManagerConstructorArgs = {
27
+ scopedDirectory?: string;
28
+ };
29
+ type PrismicAuthManagerLoginArgs = {
30
+ email: string;
31
+ cookies: string[];
32
+ };
33
+ type PrismicAuthManagerGetLoginSessionInfoReturnType = {
34
+ port: number;
35
+ url: string;
36
+ };
37
+ type PrismicAuthManagerNodeLoginSessionArgs = {
38
+ port: number;
39
+ onListenCallback?: () => void;
40
+ };
41
+ export declare class PrismicAuthManager {
42
+ scopedDirectory: string;
43
+ constructor({ scopedDirectory, }?: PrismicAuthManagerConstructorArgs);
44
+ login(args: PrismicAuthManagerLoginArgs): Promise<void>;
45
+ getLoginSessionInfo(): Promise<PrismicAuthManagerGetLoginSessionInfoReturnType>;
46
+ nodeLoginSession(args: PrismicAuthManagerNodeLoginSessionArgs): Promise<void>;
47
+ logout(): Promise<void>;
48
+ checkIsLoggedIn(): Promise<boolean>;
49
+ getAuthenticationCookies(): Promise<PrismicAuthState["cookies"] & Required<Pick<PrismicAuthState["cookies"], typeof AUTH_COOKIE_KEY | typeof SESSION_COOKIE_KEY>>>;
50
+ getAuthenticationToken(): Promise<string>;
51
+ refreshAuthenticationToken(): Promise<void>;
52
+ getProfile(): Promise<PrismicUserProfile>;
53
+ private _getProfileForAuthenticationToken;
54
+ private _readPersistedAuthState;
55
+ private _writePersistedAuthState;
56
+ private _getPersistedAuthStateFilePath;
57
+ }
58
+ export {};
@@ -1,4 +1,4 @@
1
- import { PrismicAuthManager } from "./PrismicAuthManager";
2
- type CreatePrismicAuthManager = ConstructorParameters<typeof PrismicAuthManager>[0];
3
- export declare const createPrismicAuthManager: (args?: CreatePrismicAuthManager) => PrismicAuthManager;
4
- export {};
1
+ import { PrismicAuthManager } from "./PrismicAuthManager";
2
+ type CreatePrismicAuthManager = ConstructorParameters<typeof PrismicAuthManager>[0];
3
+ export declare const createPrismicAuthManager: (args?: CreatePrismicAuthManager) => PrismicAuthManager;
4
+ export {};
@@ -1,14 +1,14 @@
1
- import { NodeMiddleware } from "h3";
2
- import { PrismicAuthManager } from "./PrismicAuthManager";
3
- export type PrismicAuthCheckStatusResponse = {
4
- status: "ok";
5
- shortId: string;
6
- intercomHash: string;
7
- } | {
8
- status: "pending";
9
- };
10
- export type CreatePrismicAuthManagerMiddlewareArgs = {
11
- prismicAuthManager: PrismicAuthManager;
12
- onLoginCallback?: () => void | Promise<void>;
13
- };
14
- export declare const createPrismicAuthManagerMiddleware: (args: CreatePrismicAuthManagerMiddlewareArgs) => NodeMiddleware;
1
+ import { NodeMiddleware } from "h3";
2
+ import { PrismicAuthManager } from "./PrismicAuthManager";
3
+ export type PrismicAuthCheckStatusResponse = {
4
+ status: "ok";
5
+ shortId: string;
6
+ intercomHash: string;
7
+ } | {
8
+ status: "pending";
9
+ };
10
+ export type CreatePrismicAuthManagerMiddlewareArgs = {
11
+ prismicAuthManager: PrismicAuthManager;
12
+ onLoginCallback?: () => void | Promise<void>;
13
+ };
14
+ export declare const createPrismicAuthManagerMiddleware: (args: CreatePrismicAuthManagerMiddlewareArgs) => NodeMiddleware;
@@ -1,6 +1,6 @@
1
- export { createSliceMachineManagerClient } from "../managers/createSliceMachineManagerClient";
2
- export type { CreateSliceMachineManagerClientArgs, SliceMachineManagerClient, } from "../managers/createSliceMachineManagerClient";
3
- export type { SimulatorManagerReadSliceSimulatorSetupStep, SimulatorManagerReadSliceSimulatorSetupStepsReturnType, } from "../managers/simulator/SimulatorManager";
4
- export type { SliceMachineManagerPushSliceReturnType } from "../managers/slices/SlicesManager";
5
- export { InternalError, NotFoundError, SliceMachineError, UnauthenticatedError, UnauthorizedError, UnexpectedDataError, isInternalError, isNotFoundError, isSliceMachineError, isUnauthenticatedError, isUnauthorizedError, isUnexpectedDataError, } from "../errors";
6
- export { DecodeError } from "../lib/DecodeError";
1
+ export { createSliceMachineManagerClient } from "../managers/createSliceMachineManagerClient";
2
+ export type { CreateSliceMachineManagerClientArgs, SliceMachineManagerClient, } from "../managers/createSliceMachineManagerClient";
3
+ export type { SimulatorManagerReadSliceSimulatorSetupStep, SimulatorManagerReadSliceSimulatorSetupStepsReturnType, } from "../managers/simulator/SimulatorManager";
4
+ export type { SliceMachineManagerPushSliceReturnType } from "../managers/slices/SlicesManager";
5
+ export { InternalError, NotFoundError, SliceMachineError, UnauthenticatedError, UnauthorizedError, UnexpectedDataError, isInternalError, isNotFoundError, isSliceMachineError, isUnauthenticatedError, isUnauthorizedError, isUnexpectedDataError, } from "../errors";
6
+ export { DecodeError } from "../lib/DecodeError";
@@ -1,8 +1,8 @@
1
- export type APIEndpoints = {
2
- PrismicWroom: string;
3
- PrismicAuthentication: string;
4
- PrismicModels: string;
5
- PrismicUser: string;
6
- AwsAclProvider: string;
7
- };
8
- export declare const API_ENDPOINTS: APIEndpoints;
1
+ export type APIEndpoints = {
2
+ PrismicWroom: string;
3
+ PrismicAuthentication: string;
4
+ PrismicModels: string;
5
+ PrismicUser: string;
6
+ AwsAclProvider: string;
7
+ };
8
+ export declare const API_ENDPOINTS: APIEndpoints;
@@ -1,5 +1,5 @@
1
- type APITokens = {
2
- SegmentKey: string;
3
- };
4
- export declare const API_TOKENS: APITokens;
5
- export {};
1
+ type APITokens = {
2
+ SegmentKey: string;
3
+ };
4
+ export declare const API_TOKENS: APITokens;
5
+ export {};
@@ -1,5 +1,5 @@
1
- export declare const APPLICATION_MODE: {
2
- readonly Development: "development";
3
- readonly Staging: "staging";
4
- readonly Production: "production";
5
- };
1
+ export declare const APPLICATION_MODE: {
2
+ readonly Development: "development";
3
+ readonly Staging: "staging";
4
+ readonly Production: "production";
5
+ };
@@ -1,5 +1,5 @@
1
- /**
2
- * The default Slice screenshot URL used when a Slice does not have a local
3
- * screenshot.
4
- */
5
- export declare const DEFAULT_SLICE_SCREENSHOT_URL = "https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format";
1
+ /**
2
+ * The default Slice screenshot URL used when a Slice does not have a local
3
+ * screenshot.
4
+ */
5
+ export declare const DEFAULT_SLICE_SCREENSHOT_URL = "https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format";
@@ -1 +1 @@
1
- export declare const SLICE_MACHINE_CONFIG_FILENAME = "slicemachine.config.json";
1
+ export declare const SLICE_MACHINE_CONFIG_FILENAME = "slicemachine.config.json";
@@ -1 +1 @@
1
- export declare const SLICE_MACHINE_GITHUB_PACKAGE_NAME = "slice-machine-ui";
1
+ export declare const SLICE_MACHINE_GITHUB_PACKAGE_NAME = "slice-machine-ui";
@@ -1 +1 @@
1
- export declare const SLICE_MACHINE_GITHUB_REPOSITORY_NAME = "slice-machine";
1
+ export declare const SLICE_MACHINE_GITHUB_REPOSITORY_NAME = "slice-machine";
@@ -1 +1 @@
1
- export declare const SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION = "prismicio";
1
+ export declare const SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION = "prismicio";
@@ -1 +1 @@
1
- export declare const SLICE_MACHINE_NPM_PACKAGE_NAME = "slice-machine-ui";
1
+ export declare const SLICE_MACHINE_NPM_PACKAGE_NAME = "slice-machine-ui";
@@ -1 +1 @@
1
- export declare const SLICE_MACHINE_USER_AGENT = "slice-machine";
1
+ export declare const SLICE_MACHINE_USER_AGENT = "slice-machine";
@@ -1 +1 @@
1
- export declare const TS_CONFIG_FILENAME = "tsconfig.json";
1
+ export declare const TS_CONFIG_FILENAME = "tsconfig.json";
@@ -1,6 +1,6 @@
1
- export declare const VERSION_KIND: {
2
- readonly MAJOR: "MAJOR";
3
- readonly MINOR: "MINOR";
4
- readonly PATCH: "PATCH";
5
- readonly FIRST: "FIRST";
6
- };
1
+ export declare const VERSION_KIND: {
2
+ readonly MAJOR: "MAJOR";
3
+ readonly MINOR: "MINOR";
4
+ readonly PATCH: "PATCH";
5
+ readonly FIRST: "FIRST";
6
+ };
package/dist/errors.d.ts CHANGED
@@ -1,34 +1,34 @@
1
- import { HookError } from "@slicemachine/plugin-kit";
2
- export declare class SliceMachineError extends Error {
3
- _sliceMachineError: boolean;
4
- name: string;
5
- }
6
- export declare class UnauthorizedError extends SliceMachineError {
7
- name: string;
8
- }
9
- export declare class UnauthenticatedError extends SliceMachineError {
10
- name: string;
11
- message: string;
12
- }
13
- export declare class NotFoundError extends SliceMachineError {
14
- name: string;
15
- }
16
- export declare class UnexpectedDataError extends SliceMachineError {
17
- name: string;
18
- }
19
- export declare class InternalError extends SliceMachineError {
20
- name: string;
21
- }
22
- export declare class PluginError extends SliceMachineError {
23
- name: string;
24
- }
25
- export declare class PluginHookResultError extends SliceMachineError {
26
- name: string;
27
- constructor(errors: HookError[]);
28
- }
29
- export declare const isSliceMachineError: (error: unknown) => error is SliceMachineError;
30
- export declare const isUnauthorizedError: (error: unknown) => error is UnauthorizedError;
31
- export declare const isUnauthenticatedError: (error: unknown) => error is UnauthenticatedError;
32
- export declare const isNotFoundError: (error: unknown) => error is NotFoundError;
33
- export declare const isUnexpectedDataError: (error: unknown) => error is UnexpectedDataError;
34
- export declare const isInternalError: (error: unknown) => error is InternalError;
1
+ import { HookError } from "@slicemachine/plugin-kit";
2
+ export declare class SliceMachineError extends Error {
3
+ _sliceMachineError: boolean;
4
+ name: string;
5
+ }
6
+ export declare class UnauthorizedError extends SliceMachineError {
7
+ name: string;
8
+ }
9
+ export declare class UnauthenticatedError extends SliceMachineError {
10
+ name: string;
11
+ message: string;
12
+ }
13
+ export declare class NotFoundError extends SliceMachineError {
14
+ name: string;
15
+ }
16
+ export declare class UnexpectedDataError extends SliceMachineError {
17
+ name: string;
18
+ }
19
+ export declare class InternalError extends SliceMachineError {
20
+ name: string;
21
+ }
22
+ export declare class PluginError extends SliceMachineError {
23
+ name: string;
24
+ }
25
+ export declare class PluginHookResultError extends SliceMachineError {
26
+ name: string;
27
+ constructor(errors: HookError[]);
28
+ }
29
+ export declare const isSliceMachineError: (error: unknown) => error is SliceMachineError;
30
+ export declare const isUnauthorizedError: (error: unknown) => error is UnauthorizedError;
31
+ export declare const isUnauthenticatedError: (error: unknown) => error is UnauthenticatedError;
32
+ export declare const isNotFoundError: (error: unknown) => error is NotFoundError;
33
+ export declare const isUnexpectedDataError: (error: unknown) => error is UnexpectedDataError;
34
+ export declare const isInternalError: (error: unknown) => error is InternalError;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export type { PrismicRepository } from "./managers/prismicRepository/types";
2
- export type { SliceMachineManager } from "./managers/SliceMachineManager";
3
- export { createSliceMachineManager } from "./managers/createSliceMachineManager";
4
- export { createSliceMachineManagerMiddleware } from "./managers/createSliceMachineManagerMiddleware";
5
- export type { CreateSliceMachineManagerMiddlewareArgs } from "./managers/createSliceMachineManagerMiddleware";
6
- export type { PrismicAuthManager, PrismicUserProfile, PrismicAuthState, } from "./auth/PrismicAuthManager";
7
- export { createPrismicAuthManager } from "./auth/createPrismicAuthManager";
8
- export { createPrismicAuthManagerMiddleware } from "./auth/createPrismicAuthManagerMiddleware";
9
- export type { CreatePrismicAuthManagerMiddlewareArgs, PrismicAuthCheckStatusResponse, } from "./auth/createPrismicAuthManagerMiddleware";
10
- export { DecodeError } from "./lib/DecodeError";
11
- export type { SliceMachineConfig, PackageManager } from "./types";
1
+ export type { PrismicRepository } from "./managers/prismicRepository/types";
2
+ export type { SliceMachineManager } from "./managers/SliceMachineManager";
3
+ export { createSliceMachineManager } from "./managers/createSliceMachineManager";
4
+ export { createSliceMachineManagerMiddleware } from "./managers/createSliceMachineManagerMiddleware";
5
+ export type { CreateSliceMachineManagerMiddlewareArgs } from "./managers/createSliceMachineManagerMiddleware";
6
+ export type { PrismicAuthManager, PrismicUserProfile, PrismicAuthState, } from "./auth/PrismicAuthManager";
7
+ export { createPrismicAuthManager } from "./auth/createPrismicAuthManager";
8
+ export { createPrismicAuthManagerMiddleware } from "./auth/createPrismicAuthManagerMiddleware";
9
+ export type { CreatePrismicAuthManagerMiddlewareArgs, PrismicAuthCheckStatusResponse, } from "./auth/createPrismicAuthManagerMiddleware";
10
+ export { DecodeError } from "./lib/DecodeError";
11
+ export type { SliceMachineConfig, PackageManager } from "./types";
@@ -1,12 +1,12 @@
1
- import * as t from "io-ts";
2
- type DecodeErrorConstructorArgs<TInput = unknown> = {
3
- input: TInput;
4
- errors: t.Errors;
5
- };
6
- export declare class DecodeError<TInput = unknown> extends Error {
7
- name: string;
8
- input: TInput;
9
- errors: string[];
10
- constructor(args: DecodeErrorConstructorArgs<TInput>);
11
- }
12
- export {};
1
+ import * as t from "io-ts";
2
+ type DecodeErrorConstructorArgs<TInput = unknown> = {
3
+ input: TInput;
4
+ errors: t.Errors;
5
+ };
6
+ export declare class DecodeError<TInput = unknown> extends Error {
7
+ name: string;
8
+ input: TInput;
9
+ errors: string[];
10
+ constructor(args: DecodeErrorConstructorArgs<TInput>);
11
+ }
12
+ export {};
@@ -1 +1 @@
1
- export declare const addTrailingSlash: (url: string | undefined) => string | undefined;
1
+ export declare const addTrailingSlash: (url: string | undefined) => string | undefined;
@@ -1,2 +1,2 @@
1
- import { SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
2
- export declare function assertPluginsInitialized(pluginRunner: SliceMachinePluginRunner | undefined): asserts pluginRunner is NonNullable<typeof pluginRunner>;
1
+ import { SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
2
+ export declare function assertPluginsInitialized(pluginRunner: SliceMachinePluginRunner | undefined): asserts pluginRunner is NonNullable<typeof pluginRunner>;
@@ -1,4 +1,4 @@
1
- /// <reference types="node" />
2
- import { Buffer } from "node:buffer";
3
- import * as t from "io-ts";
4
- export declare const bufferCodec: t.Type<Buffer, Buffer, unknown>;
1
+ /// <reference types="node" />
2
+ import { Buffer } from "node:buffer";
3
+ import * as t from "io-ts";
4
+ export declare const bufferCodec: t.Type<Buffer, Buffer, unknown>;
@@ -1,4 +1,4 @@
1
- export type BuildPrismicRepositoryAPIEndpointConfig = {
2
- withCDN?: boolean;
3
- };
4
- export declare const buildPrismicRepositoryAPIEndpoint: (repositoryName: string, { withCDN }?: BuildPrismicRepositoryAPIEndpointConfig) => string;
1
+ export type BuildPrismicRepositoryAPIEndpointConfig = {
2
+ withCDN?: boolean;
3
+ };
4
+ export declare const buildPrismicRepositoryAPIEndpoint: (repositoryName: string, { withCDN }?: BuildPrismicRepositoryAPIEndpointConfig) => string;
@@ -1 +1 @@
1
- export declare const castArray: <T>(input: T | readonly T[]) => T[];
1
+ export declare const castArray: <T>(input: T | readonly T[]) => T[];
@@ -1 +1 @@
1
- export declare const checkIsURLAccessible: (url: string) => Promise<boolean>;
1
+ export declare const checkIsURLAccessible: (url: string) => Promise<boolean>;
@@ -1,9 +1,9 @@
1
- import * as crypto from "node:crypto";
2
- /**
3
- * Creates a content digest for a given input.
4
- *
5
- * @param input - The value used to create a digest digest.
6
- *
7
- * @returns The content digest of `input`.
8
- */
9
- export declare const createContentDigest: (input: crypto.BinaryLike) => string;
1
+ import * as crypto from "node:crypto";
2
+ /**
3
+ * Creates a content digest for a given input.
4
+ *
5
+ * @param input - The value used to create a digest digest.
6
+ *
7
+ * @returns The content digest of `input`.
8
+ */
9
+ export declare const createContentDigest: (input: crypto.BinaryLike) => string;
@@ -1,10 +1,10 @@
1
- import * as t from "io-ts";
2
- import { DecodeError } from "./DecodeError";
3
- export type DecodeReturnType<A, _O, I> = {
4
- value: A;
5
- error?: never;
6
- } | {
7
- value?: never;
8
- error: DecodeError<I>;
9
- };
10
- export declare const decode: <A, O, I>(codec: t.Type<A, O, I>, input: I) => DecodeReturnType<A, O, I>;
1
+ import * as t from "io-ts";
2
+ import { DecodeError } from "./DecodeError";
3
+ export type DecodeReturnType<A, _O, I> = {
4
+ value: A;
5
+ error?: never;
6
+ } | {
7
+ value?: never;
8
+ error: DecodeError<I>;
9
+ };
10
+ export declare const decode: <A, O, I>(codec: t.Type<A, O, I>, input: I) => DecodeReturnType<A, O, I>;
@@ -1,10 +1,10 @@
1
- import * as t from "io-ts";
2
- import { HookError } from "@slicemachine/plugin-kit";
3
- import { DecodeError } from "./DecodeError";
4
- export declare const decodeHookResult: <A, O, I, THookResult extends {
5
- data: any[];
6
- errors: HookError<unknown>[];
7
- }>(codec: t.Type<A, O, I>, hookResult: THookResult) => {
8
- data: A[];
9
- errors: (HookError<unknown> | DecodeError<I>)[];
10
- };
1
+ import * as t from "io-ts";
2
+ import { HookError } from "@slicemachine/plugin-kit";
3
+ import { DecodeError } from "./DecodeError";
4
+ export declare const decodeHookResult: <A, O, I, THookResult extends {
5
+ data: any[];
6
+ errors: HookError<unknown>[];
7
+ }>(codec: t.Type<A, O, I>, hookResult: THookResult) => {
8
+ data: A[];
9
+ errors: (HookError<unknown> | DecodeError<I>)[];
10
+ };
@@ -1,12 +1,12 @@
1
- import * as t from "io-ts";
2
- import { DecodeReturnType } from "./decode";
3
- /**
4
- * A minimally defined codec for package.json files. Only data needed for
5
- * version detection is defined.
6
- */
7
- declare const PackageJSONCodec: t.TypeC<{
8
- version: t.StringC;
9
- }>;
10
- type PackageJSON = t.TypeOf<typeof PackageJSONCodec>;
11
- export declare const decodePackageJSON: (input: unknown) => DecodeReturnType<PackageJSON, PackageJSON, unknown>;
12
- export {};
1
+ import * as t from "io-ts";
2
+ import { DecodeReturnType } from "./decode";
3
+ /**
4
+ * A minimally defined codec for package.json files. Only data needed for
5
+ * version detection is defined.
6
+ */
7
+ declare const PackageJSONCodec: t.TypeC<{
8
+ version: t.StringC;
9
+ }>;
10
+ type PackageJSON = t.TypeOf<typeof PackageJSONCodec>;
11
+ export declare const decodePackageJSON: (input: unknown) => DecodeReturnType<PackageJSON, PackageJSON, unknown>;
12
+ export {};
@@ -1,3 +1,3 @@
1
- import { SliceMachineConfig } from "../types";
2
- import { DecodeReturnType } from "./decode";
3
- export declare const decodeSliceMachineConfig: (input: unknown) => DecodeReturnType<SliceMachineConfig, SliceMachineConfig, unknown>;
1
+ import { SliceMachineConfig } from "../types";
2
+ import { DecodeReturnType } from "./decode";
3
+ export declare const decodeSliceMachineConfig: (input: unknown) => DecodeReturnType<SliceMachineConfig, SliceMachineConfig, unknown>;
@@ -1,21 +1,21 @@
1
- import * as t from "io-ts";
2
- /**
3
- * A minimally defined codec for GitHub release metadata.
4
- *
5
- * @see https://docs.github.com/en/rest/releases/releases#get-a-release-by-tag-name
6
- */
7
- declare const GitHubReleaseMetadata: t.TypeC<{
8
- name: t.StringC;
9
- body: t.UnionC<[t.NullC, t.StringC]>;
10
- }>;
11
- export type GitHubReleaseMetadata = t.TypeOf<typeof GitHubReleaseMetadata>;
12
- type FetchGitHubReleaseBodyForReleaseArgs = {
13
- repositoryOwner: string;
14
- repositoryName: string;
15
- packageName?: string;
16
- version: string;
17
- cache?: Record<string, GitHubReleaseMetadata | undefined>;
18
- };
19
- declare const _fetchGitHubReleaseBodyForRelease: (args: FetchGitHubReleaseBodyForReleaseArgs) => Promise<string | undefined>;
20
- export declare const fetchGitHubReleaseBodyForRelease: (args: FetchGitHubReleaseBodyForReleaseArgs) => ReturnType<typeof _fetchGitHubReleaseBodyForRelease>;
21
- export {};
1
+ import * as t from "io-ts";
2
+ /**
3
+ * A minimally defined codec for GitHub release metadata.
4
+ *
5
+ * @see https://docs.github.com/en/rest/releases/releases#get-a-release-by-tag-name
6
+ */
7
+ declare const GitHubReleaseMetadata: t.TypeC<{
8
+ name: t.StringC;
9
+ body: t.UnionC<[t.NullC, t.StringC]>;
10
+ }>;
11
+ export type GitHubReleaseMetadata = t.TypeOf<typeof GitHubReleaseMetadata>;
12
+ type FetchGitHubReleaseBodyForReleaseArgs = {
13
+ repositoryOwner: string;
14
+ repositoryName: string;
15
+ packageName?: string;
16
+ version: string;
17
+ cache?: Record<string, GitHubReleaseMetadata | undefined>;
18
+ };
19
+ declare const _fetchGitHubReleaseBodyForRelease: (args: FetchGitHubReleaseBodyForReleaseArgs) => Promise<string | undefined>;
20
+ export declare const fetchGitHubReleaseBodyForRelease: (args: FetchGitHubReleaseBodyForReleaseArgs) => ReturnType<typeof _fetchGitHubReleaseBodyForRelease>;
21
+ export {};
@@ -1,5 +1,5 @@
1
- type FetchNPMPackageVersionsArgs = {
2
- packageName: string;
3
- };
4
- export declare const fetchNPMPackageVersions: (args: FetchNPMPackageVersionsArgs) => Promise<string[]>;
5
- export {};
1
+ type FetchNPMPackageVersionsArgs = {
2
+ packageName: string;
3
+ };
4
+ export declare const fetchNPMPackageVersions: (args: FetchNPMPackageVersionsArgs) => Promise<string[]>;
5
+ export {};