@slicemachine/manager 0.0.0-alpha.dev-new-release-process.1
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/README.md +85 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.cjs +68 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.js +68 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.cjs +43 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.js +43 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.cjs +804 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.js +804 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Encoder.cjs +354 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Encoder.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Encoder.js +354 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Encoder.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.cjs +14 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.js +14 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtensionCodec.cjs +65 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtensionCodec.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtensionCodec.js +65 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtensionCodec.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/decode.cjs +14 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/decode.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/decode.js +14 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/decode.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/encode.cjs +13 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/encode.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/encode.js +13 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/encode.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/timestamp.cjs +91 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/timestamp.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/timestamp.js +91 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/timestamp.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/int.cjs +31 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/int.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/int.js +31 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/int.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/prettyByte.cjs +7 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/prettyByte.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/prettyByte.js +7 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/prettyByte.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/typedArrays.cjs +23 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/typedArrays.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/typedArrays.js +23 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/typedArrays.js.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/utf8.cjs +132 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/utf8.cjs.map +1 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/utf8.js +132 -0
- package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/utf8.js.map +1 -0
- package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.cjs +135 -0
- package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.js +136 -0
- package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.js.map +1 -0
- package/dist/_node_modules/common-tags/es/commaLists/commaLists.cjs +7 -0
- package/dist/_node_modules/common-tags/es/commaLists/commaLists.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/commaLists/commaLists.js +6 -0
- package/dist/_node_modules/common-tags/es/commaLists/commaLists.js.map +1 -0
- package/dist/_node_modules/common-tags/es/commaListsAnd/commaListsAnd.cjs +7 -0
- package/dist/_node_modules/common-tags/es/commaListsAnd/commaListsAnd.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/commaListsAnd/commaListsAnd.js +6 -0
- package/dist/_node_modules/common-tags/es/commaListsAnd/commaListsAnd.js.map +1 -0
- package/dist/_node_modules/common-tags/es/commaListsOr/commaListsOr.cjs +7 -0
- package/dist/_node_modules/common-tags/es/commaListsOr/commaListsOr.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/commaListsOr/commaListsOr.js +6 -0
- package/dist/_node_modules/common-tags/es/commaListsOr/commaListsOr.js.map +1 -0
- package/dist/_node_modules/common-tags/es/html/html.cjs +9 -0
- package/dist/_node_modules/common-tags/es/html/html.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/html/html.js +8 -0
- package/dist/_node_modules/common-tags/es/html/html.js.map +1 -0
- package/dist/_node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.cjs +32 -0
- package/dist/_node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.js +33 -0
- package/dist/_node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.js.map +1 -0
- package/dist/_node_modules/common-tags/es/inlineLists/inlineLists.cjs +7 -0
- package/dist/_node_modules/common-tags/es/inlineLists/inlineLists.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/inlineLists/inlineLists.js +6 -0
- package/dist/_node_modules/common-tags/es/inlineLists/inlineLists.js.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLine/oneLine.cjs +6 -0
- package/dist/_node_modules/common-tags/es/oneLine/oneLine.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLine/oneLine.js +5 -0
- package/dist/_node_modules/common-tags/es/oneLine/oneLine.js.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.cjs +7 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.js +6 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.js.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.cjs +7 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.js +6 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.js.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.cjs +7 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.js +6 -0
- package/dist/_node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.js.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.cjs +7 -0
- package/dist/_node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.js +6 -0
- package/dist/_node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.js.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineTrim/oneLineTrim.cjs +6 -0
- package/dist/_node_modules/common-tags/es/oneLineTrim/oneLineTrim.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/oneLineTrim/oneLineTrim.js +5 -0
- package/dist/_node_modules/common-tags/es/oneLineTrim/oneLineTrim.js.map +1 -0
- package/dist/_node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.cjs +19 -0
- package/dist/_node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.js +20 -0
- package/dist/_node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.js.map +1 -0
- package/dist/_node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.cjs +13 -0
- package/dist/_node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.js +14 -0
- package/dist/_node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.js.map +1 -0
- package/dist/_node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.cjs +17 -0
- package/dist/_node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.js +18 -0
- package/dist/_node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.js.map +1 -0
- package/dist/_node_modules/common-tags/es/safeHtml/safeHtml.cjs +9 -0
- package/dist/_node_modules/common-tags/es/safeHtml/safeHtml.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/safeHtml/safeHtml.js +8 -0
- package/dist/_node_modules/common-tags/es/safeHtml/safeHtml.js.map +1 -0
- package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.cjs +17 -0
- package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.js +18 -0
- package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.js.map +1 -0
- package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs +8 -0
- package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js +9 -0
- package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js.map +1 -0
- package/dist/_node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.cjs +35 -0
- package/dist/_node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.js +36 -0
- package/dist/_node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.js.map +1 -0
- package/dist/_node_modules/common-tags/es/stripIndents/stripIndents.cjs +6 -0
- package/dist/_node_modules/common-tags/es/stripIndents/stripIndents.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/stripIndents/stripIndents.js +5 -0
- package/dist/_node_modules/common-tags/es/stripIndents/stripIndents.js.map +1 -0
- package/dist/_node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.cjs +21 -0
- package/dist/_node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.cjs.map +1 -0
- package/dist/_node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.js +22 -0
- package/dist/_node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.js.map +1 -0
- package/dist/_node_modules/cross-spawn/index.cjs +30 -0
- package/dist/_node_modules/cross-spawn/index.cjs.map +1 -0
- package/dist/_node_modules/cross-spawn/index.js +31 -0
- package/dist/_node_modules/cross-spawn/index.js.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/enoent.cjs +47 -0
- package/dist/_node_modules/cross-spawn/lib/enoent.cjs.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/enoent.js +47 -0
- package/dist/_node_modules/cross-spawn/lib/enoent.js.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/parse.cjs +64 -0
- package/dist/_node_modules/cross-spawn/lib/parse.cjs.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/parse.js +64 -0
- package/dist/_node_modules/cross-spawn/lib/parse.js.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/util/escape.cjs +22 -0
- package/dist/_node_modules/cross-spawn/lib/util/escape.cjs.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/util/escape.js +23 -0
- package/dist/_node_modules/cross-spawn/lib/util/escape.js.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/util/readShebang.cjs +21 -0
- package/dist/_node_modules/cross-spawn/lib/util/readShebang.cjs.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/util/readShebang.js +21 -0
- package/dist/_node_modules/cross-spawn/lib/util/readShebang.js.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.cjs +42 -0
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.cjs.map +1 -0
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.js +42 -0
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.js.map +1 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs +41 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js +41 -0
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/buffer-stream.cjs +43 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/buffer-stream.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/buffer-stream.js +43 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/buffer-stream.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/index.cjs +59 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/index.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/index.js +60 -0
- package/dist/_node_modules/execa/_node_modules/get-stream/index.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/core.cjs +275 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/core.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/core.js +275 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/core.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/main.cjs +53 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/main.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/main.js +53 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/main.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/realtime.cjs +18 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/realtime.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/realtime.js +18 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/realtime.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/signals.cjs +27 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/signals.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/signals.js +27 -0
- package/dist/_node_modules/execa/_node_modules/human-signals/build/src/signals.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/is-stream/index.cjs +11 -0
- package/dist/_node_modules/execa/_node_modules/is-stream/index.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/is-stream/index.js +11 -0
- package/dist/_node_modules/execa/_node_modules/is-stream/index.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/mimic-fn/index.cjs +46 -0
- package/dist/_node_modules/execa/_node_modules/mimic-fn/index.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/mimic-fn/index.js +47 -0
- package/dist/_node_modules/execa/_node_modules/mimic-fn/index.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/npm-run-path/index.cjs +34 -0
- package/dist/_node_modules/execa/_node_modules/npm-run-path/index.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/npm-run-path/index.js +34 -0
- package/dist/_node_modules/execa/_node_modules/npm-run-path/index.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/onetime/index.cjs +32 -0
- package/dist/_node_modules/execa/_node_modules/onetime/index.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/onetime/index.js +33 -0
- package/dist/_node_modules/execa/_node_modules/onetime/index.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/path-key/index.cjs +13 -0
- package/dist/_node_modules/execa/_node_modules/path-key/index.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/path-key/index.js +14 -0
- package/dist/_node_modules/execa/_node_modules/path-key/index.js.map +1 -0
- package/dist/_node_modules/execa/_node_modules/strip-final-newline/index.cjs +14 -0
- package/dist/_node_modules/execa/_node_modules/strip-final-newline/index.cjs.map +1 -0
- package/dist/_node_modules/execa/_node_modules/strip-final-newline/index.js +15 -0
- package/dist/_node_modules/execa/_node_modules/strip-final-newline/index.js.map +1 -0
- package/dist/_node_modules/execa/index.cjs +147 -0
- package/dist/_node_modules/execa/index.cjs.map +1 -0
- package/dist/_node_modules/execa/index.js +147 -0
- package/dist/_node_modules/execa/index.js.map +1 -0
- package/dist/_node_modules/execa/lib/command.cjs +37 -0
- package/dist/_node_modules/execa/lib/command.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/command.js +37 -0
- package/dist/_node_modules/execa/lib/command.js.map +1 -0
- package/dist/_node_modules/execa/lib/error.cjs +73 -0
- package/dist/_node_modules/execa/lib/error.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/error.js +73 -0
- package/dist/_node_modules/execa/lib/error.js.map +1 -0
- package/dist/_node_modules/execa/lib/kill.cjs +80 -0
- package/dist/_node_modules/execa/lib/kill.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/kill.js +80 -0
- package/dist/_node_modules/execa/lib/kill.js.map +1 -0
- package/dist/_node_modules/execa/lib/pipe.cjs +37 -0
- package/dist/_node_modules/execa/lib/pipe.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/pipe.js +37 -0
- package/dist/_node_modules/execa/lib/pipe.js.map +1 -0
- package/dist/_node_modules/execa/lib/promise.cjs +30 -0
- package/dist/_node_modules/execa/lib/promise.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/promise.js +30 -0
- package/dist/_node_modules/execa/lib/promise.js.map +1 -0
- package/dist/_node_modules/execa/lib/stdio.cjs +26 -0
- package/dist/_node_modules/execa/lib/stdio.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/stdio.js +26 -0
- package/dist/_node_modules/execa/lib/stdio.js.map +1 -0
- package/dist/_node_modules/execa/lib/stream.cjs +81 -0
- package/dist/_node_modules/execa/lib/stream.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/stream.js +81 -0
- package/dist/_node_modules/execa/lib/stream.js.map +1 -0
- package/dist/_node_modules/execa/lib/verbose.cjs +20 -0
- package/dist/_node_modules/execa/lib/verbose.cjs.map +1 -0
- package/dist/_node_modules/execa/lib/verbose.js +20 -0
- package/dist/_node_modules/execa/lib/verbose.js.map +1 -0
- package/dist/_node_modules/fetch-blob/file.cjs +61 -0
- package/dist/_node_modules/fetch-blob/file.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/file.js +61 -0
- package/dist/_node_modules/fetch-blob/file.js.map +1 -0
- package/dist/_node_modules/fetch-blob/index.cjs +223 -0
- package/dist/_node_modules/fetch-blob/index.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/index.js +223 -0
- package/dist/_node_modules/fetch-blob/index.js.map +1 -0
- package/dist/_node_modules/fetch-blob/streams.cjs +43 -0
- package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -0
- package/dist/_node_modules/fetch-blob/streams.js +42 -0
- package/dist/_node_modules/fetch-blob/streams.js.map +1 -0
- package/dist/_node_modules/file-type/core.cjs +1234 -0
- package/dist/_node_modules/file-type/core.cjs.map +1 -0
- package/dist/_node_modules/file-type/core.js +1234 -0
- package/dist/_node_modules/file-type/core.js.map +1 -0
- package/dist/_node_modules/file-type/supported.cjs +308 -0
- package/dist/_node_modules/file-type/supported.cjs.map +1 -0
- package/dist/_node_modules/file-type/supported.js +308 -0
- package/dist/_node_modules/file-type/supported.js.map +1 -0
- package/dist/_node_modules/file-type/util.cjs +27 -0
- package/dist/_node_modules/file-type/util.cjs.map +1 -0
- package/dist/_node_modules/file-type/util.js +27 -0
- package/dist/_node_modules/file-type/util.js.map +1 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs +116 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.js +116 -0
- package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -0
- package/dist/_node_modules/fp-ts/es6/Either.cjs +18 -0
- package/dist/_node_modules/fp-ts/es6/Either.cjs.map +1 -0
- package/dist/_node_modules/fp-ts/es6/Either.js +18 -0
- package/dist/_node_modules/fp-ts/es6/Either.js.map +1 -0
- package/dist/_node_modules/fp-ts/es6/function.cjs +44 -0
- package/dist/_node_modules/fp-ts/es6/function.cjs.map +1 -0
- package/dist/_node_modules/fp-ts/es6/function.js +44 -0
- package/dist/_node_modules/fp-ts/es6/function.js.map +1 -0
- package/dist/_node_modules/fp-ts/es6/internal.cjs +18 -0
- package/dist/_node_modules/fp-ts/es6/internal.cjs.map +1 -0
- package/dist/_node_modules/fp-ts/es6/internal.js +18 -0
- package/dist/_node_modules/fp-ts/es6/internal.js.map +1 -0
- package/dist/_node_modules/get-port/index.cjs +113 -0
- package/dist/_node_modules/get-port/index.cjs.map +1 -0
- package/dist/_node_modules/get-port/index.js +114 -0
- package/dist/_node_modules/get-port/index.js.map +1 -0
- package/dist/_node_modules/isexe/index.cjs +56 -0
- package/dist/_node_modules/isexe/index.cjs.map +1 -0
- package/dist/_node_modules/isexe/index.js +56 -0
- package/dist/_node_modules/isexe/index.js.map +1 -0
- package/dist/_node_modules/isexe/mode.cjs +40 -0
- package/dist/_node_modules/isexe/mode.cjs.map +1 -0
- package/dist/_node_modules/isexe/mode.js +40 -0
- package/dist/_node_modules/isexe/mode.js.map +1 -0
- package/dist/_node_modules/isexe/windows.cjs +47 -0
- package/dist/_node_modules/isexe/windows.cjs.map +1 -0
- package/dist/_node_modules/isexe/windows.js +47 -0
- package/dist/_node_modules/isexe/windows.js.map +1 -0
- package/dist/_node_modules/merge-stream/index.cjs +39 -0
- package/dist/_node_modules/merge-stream/index.cjs.map +1 -0
- package/dist/_node_modules/merge-stream/index.js +40 -0
- package/dist/_node_modules/merge-stream/index.js.map +1 -0
- package/dist/_node_modules/node-domexception/index.cjs +11 -0
- package/dist/_node_modules/node-domexception/index.cjs.map +1 -0
- package/dist/_node_modules/node-domexception/index.js +10 -0
- package/dist/_node_modules/node-domexception/index.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/body.cjs +262 -0
- package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/body.js +262 -0
- package/dist/_node_modules/node-fetch/src/body.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs +10 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js +10 -0
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/base.cjs +17 -0
- package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/base.js +17 -0
- package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs +19 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js +19 -0
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/headers.cjs +190 -0
- package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/headers.js +190 -0
- package/dist/_node_modules/node-fetch/src/headers.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/index.cjs +292 -0
- package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/index.js +292 -0
- package/dist/_node_modules/node-fetch/src/index.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/request.cjs +206 -0
- package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/request.js +206 -0
- package/dist/_node_modules/node-fetch/src/request.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/response.cjs +122 -0
- package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/response.js +123 -0
- package/dist/_node_modules/node-fetch/src/response.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs +12 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.js +12 -0
- package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs +8 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js +8 -0
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is.cjs +28 -0
- package/dist/_node_modules/node-fetch/src/utils/is.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/is.js +28 -0
- package/dist/_node_modules/node-fetch/src/utils/is.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +356 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +356 -0
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs +149 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.js +149 -0
- package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -0
- package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.cjs +89 -0
- package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.cjs.map +1 -0
- package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.js +90 -0
- package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.js.map +1 -0
- package/dist/_node_modules/p-limit/index.cjs +53 -0
- package/dist/_node_modules/p-limit/index.cjs.map +1 -0
- package/dist/_node_modules/p-limit/index.js +54 -0
- package/dist/_node_modules/p-limit/index.js.map +1 -0
- package/dist/_node_modules/path-key/index.cjs +16 -0
- package/dist/_node_modules/path-key/index.cjs.map +1 -0
- package/dist/_node_modules/path-key/index.js +16 -0
- package/dist/_node_modules/path-key/index.js.map +1 -0
- package/dist/_node_modules/peek-readable/lib/EndOfFileStream.cjs +11 -0
- package/dist/_node_modules/peek-readable/lib/EndOfFileStream.cjs.map +1 -0
- package/dist/_node_modules/peek-readable/lib/EndOfFileStream.js +11 -0
- package/dist/_node_modules/peek-readable/lib/EndOfFileStream.js.map +1 -0
- package/dist/_node_modules/r19/dist/R19Error.cjs +25 -0
- package/dist/_node_modules/r19/dist/R19Error.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/R19Error.js +25 -0
- package/dist/_node_modules/r19/dist/R19Error.js.map +1 -0
- package/dist/_node_modules/r19/dist/client/createRPCClient.cjs +90 -0
- package/dist/_node_modules/r19/dist/client/createRPCClient.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/client/createRPCClient.js +90 -0
- package/dist/_node_modules/r19/dist/client/createRPCClient.js.map +1 -0
- package/dist/_node_modules/r19/dist/createRPCMiddleware.cjs +36 -0
- package/dist/_node_modules/r19/dist/createRPCMiddleware.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/createRPCMiddleware.js +36 -0
- package/dist/_node_modules/r19/dist/createRPCMiddleware.js.map +1 -0
- package/dist/_node_modules/r19/dist/handleRPCRequest.cjs +121 -0
- package/dist/_node_modules/r19/dist/handleRPCRequest.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/handleRPCRequest.js +121 -0
- package/dist/_node_modules/r19/dist/handleRPCRequest.js.map +1 -0
- package/dist/_node_modules/r19/dist/lib/isErrorLike.cjs +7 -0
- package/dist/_node_modules/r19/dist/lib/isErrorLike.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/lib/isErrorLike.js +7 -0
- package/dist/_node_modules/r19/dist/lib/isErrorLike.js.map +1 -0
- package/dist/_node_modules/r19/dist/lib/isPlainObject.cjs +11 -0
- package/dist/_node_modules/r19/dist/lib/isPlainObject.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/lib/isPlainObject.js +11 -0
- package/dist/_node_modules/r19/dist/lib/isPlainObject.js.map +1 -0
- package/dist/_node_modules/r19/dist/lib/isR19ErrorLike.cjs +8 -0
- package/dist/_node_modules/r19/dist/lib/isR19ErrorLike.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/lib/isR19ErrorLike.js +8 -0
- package/dist/_node_modules/r19/dist/lib/isR19ErrorLike.js.map +1 -0
- package/dist/_node_modules/r19/dist/lib/replaceLeaves.cjs +28 -0
- package/dist/_node_modules/r19/dist/lib/replaceLeaves.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/lib/replaceLeaves.js +28 -0
- package/dist/_node_modules/r19/dist/lib/replaceLeaves.js.map +1 -0
- package/dist/_node_modules/r19/dist/proceduresFromInstance.cjs +33 -0
- package/dist/_node_modules/r19/dist/proceduresFromInstance.cjs.map +1 -0
- package/dist/_node_modules/r19/dist/proceduresFromInstance.js +33 -0
- package/dist/_node_modules/r19/dist/proceduresFromInstance.js.map +1 -0
- package/dist/_node_modules/shebang-command/index.cjs +18 -0
- package/dist/_node_modules/shebang-command/index.cjs.map +1 -0
- package/dist/_node_modules/shebang-command/index.js +18 -0
- package/dist/_node_modules/shebang-command/index.js.map +1 -0
- package/dist/_node_modules/shebang-regex/index.cjs +5 -0
- package/dist/_node_modules/shebang-regex/index.cjs.map +1 -0
- package/dist/_node_modules/shebang-regex/index.js +5 -0
- package/dist/_node_modules/shebang-regex/index.js.map +1 -0
- package/dist/_node_modules/signal-exit/index.cjs +150 -0
- package/dist/_node_modules/signal-exit/index.cjs.map +1 -0
- package/dist/_node_modules/signal-exit/index.js +151 -0
- package/dist/_node_modules/signal-exit/index.js.map +1 -0
- package/dist/_node_modules/signal-exit/signals.cjs +45 -0
- package/dist/_node_modules/signal-exit/signals.cjs.map +1 -0
- package/dist/_node_modules/signal-exit/signals.js +45 -0
- package/dist/_node_modules/signal-exit/signals.js.map +1 -0
- package/dist/_node_modules/strtok3/lib/AbstractTokenizer.cjs +98 -0
- package/dist/_node_modules/strtok3/lib/AbstractTokenizer.cjs.map +1 -0
- package/dist/_node_modules/strtok3/lib/AbstractTokenizer.js +98 -0
- package/dist/_node_modules/strtok3/lib/AbstractTokenizer.js.map +1 -0
- package/dist/_node_modules/strtok3/lib/BufferTokenizer.cjs +53 -0
- package/dist/_node_modules/strtok3/lib/BufferTokenizer.cjs.map +1 -0
- package/dist/_node_modules/strtok3/lib/BufferTokenizer.js +53 -0
- package/dist/_node_modules/strtok3/lib/BufferTokenizer.js.map +1 -0
- package/dist/_node_modules/strtok3/lib/core.cjs +9 -0
- package/dist/_node_modules/strtok3/lib/core.cjs.map +1 -0
- package/dist/_node_modules/strtok3/lib/core.js +9 -0
- package/dist/_node_modules/strtok3/lib/core.js.map +1 -0
- package/dist/_node_modules/token-types/lib/index.cjs +94 -0
- package/dist/_node_modules/token-types/lib/index.cjs.map +1 -0
- package/dist/_node_modules/token-types/lib/index.js +94 -0
- package/dist/_node_modules/token-types/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-is/lib/index.cjs +76 -0
- package/dist/_node_modules/unist-util-is/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-is/lib/index.js +76 -0
- package/dist/_node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-visit/lib/index.cjs +39 -0
- package/dist/_node_modules/unist-util-visit/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit/lib/index.js +40 -0
- package/dist/_node_modules/unist-util-visit/lib/index.js.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.browser.cjs +7 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.browser.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.browser.js +7 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/color.browser.js.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs +86 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.cjs.map +1 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js +86 -0
- package/dist/_node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +3822 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +3822 -0
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -0
- package/dist/_node_modules/which/which.cjs +96 -0
- package/dist/_node_modules/which/which.cjs.map +1 -0
- package/dist/_node_modules/which/which.js +96 -0
- package/dist/_node_modules/which/which.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +9 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/escape.cjs +5 -0
- package/dist/_virtual/escape.cjs.map +1 -0
- package/dist/_virtual/escape.js +5 -0
- package/dist/_virtual/escape.js.map +1 -0
- package/dist/_virtual/index.cjs +5 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.cjs +5 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.cjs +5 -0
- package/dist/_virtual/index3.cjs.map +1 -0
- package/dist/_virtual/index3.js +5 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.cjs +5 -0
- package/dist/_virtual/index4.cjs.map +1 -0
- package/dist/_virtual/index4.js +5 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/ponyfill.es2018.cjs +5 -0
- package/dist/_virtual/ponyfill.es2018.cjs.map +1 -0
- package/dist/_virtual/ponyfill.es2018.js +5 -0
- package/dist/_virtual/ponyfill.es2018.js.map +1 -0
- package/dist/_virtual/signals.cjs +5 -0
- package/dist/_virtual/signals.cjs.map +1 -0
- package/dist/_virtual/signals.js +5 -0
- package/dist/_virtual/signals.js.map +1 -0
- package/dist/auth/PrismicAuthManager.cjs +291 -0
- package/dist/auth/PrismicAuthManager.cjs.map +1 -0
- package/dist/auth/PrismicAuthManager.d.ts +58 -0
- package/dist/auth/PrismicAuthManager.js +269 -0
- package/dist/auth/PrismicAuthManager.js.map +1 -0
- package/dist/auth/createPrismicAuthManager.cjs +8 -0
- package/dist/auth/createPrismicAuthManager.cjs.map +1 -0
- package/dist/auth/createPrismicAuthManager.d.ts +4 -0
- package/dist/auth/createPrismicAuthManager.js +8 -0
- package/dist/auth/createPrismicAuthManager.js.map +1 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.cjs +51 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.cjs.map +1 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.d.ts +14 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.js +34 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.js.map +1 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client.cjs +21 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.js +21 -0
- package/dist/client.js.map +1 -0
- package/dist/constants/API_ENDPOINTS.cjs +55 -0
- package/dist/constants/API_ENDPOINTS.cjs.map +1 -0
- package/dist/constants/API_ENDPOINTS.d.ts +11 -0
- package/dist/constants/API_ENDPOINTS.js +55 -0
- package/dist/constants/API_ENDPOINTS.js.map +1 -0
- package/dist/constants/API_TOKENS.cjs +18 -0
- package/dist/constants/API_TOKENS.cjs.map +1 -0
- package/dist/constants/API_TOKENS.d.ts +5 -0
- package/dist/constants/API_TOKENS.js +18 -0
- package/dist/constants/API_TOKENS.js.map +1 -0
- package/dist/constants/APPLICATION_MODE.cjs +9 -0
- package/dist/constants/APPLICATION_MODE.cjs.map +1 -0
- package/dist/constants/APPLICATION_MODE.d.ts +5 -0
- package/dist/constants/APPLICATION_MODE.js +9 -0
- package/dist/constants/APPLICATION_MODE.js.map +1 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.cjs +5 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.cjs.map +1 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.d.ts +5 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.js +5 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.js.map +1 -0
- package/dist/constants/REPOSITORY_NAME_VALIDATION.cjs +8 -0
- package/dist/constants/REPOSITORY_NAME_VALIDATION.cjs.map +1 -0
- package/dist/constants/REPOSITORY_NAME_VALIDATION.d.ts +4 -0
- package/dist/constants/REPOSITORY_NAME_VALIDATION.js +8 -0
- package/dist/constants/REPOSITORY_NAME_VALIDATION.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.js +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.js +5 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.js.map +1 -0
- package/dist/constants/TS_CONFIG_FILENAME.cjs +5 -0
- package/dist/constants/TS_CONFIG_FILENAME.cjs.map +1 -0
- package/dist/constants/TS_CONFIG_FILENAME.d.ts +1 -0
- package/dist/constants/TS_CONFIG_FILENAME.js +5 -0
- package/dist/constants/TS_CONFIG_FILENAME.js.map +1 -0
- package/dist/constants/VERSION_KIND.cjs +10 -0
- package/dist/constants/VERSION_KIND.cjs.map +1 -0
- package/dist/constants/VERSION_KIND.d.ts +6 -0
- package/dist/constants/VERSION_KIND.js +10 -0
- package/dist/constants/VERSION_KIND.js.map +1 -0
- package/dist/errors.cjs +101 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +35 -0
- package/dist/errors.js +101 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.cjs +24 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/DecodeError.cjs +22 -0
- package/dist/lib/DecodeError.cjs.map +1 -0
- package/dist/lib/DecodeError.d.ts +12 -0
- package/dist/lib/DecodeError.js +22 -0
- package/dist/lib/DecodeError.js.map +1 -0
- package/dist/lib/assertPluginsInitialized.cjs +9 -0
- package/dist/lib/assertPluginsInitialized.cjs.map +1 -0
- package/dist/lib/assertPluginsInitialized.d.ts +2 -0
- package/dist/lib/assertPluginsInitialized.js +9 -0
- package/dist/lib/assertPluginsInitialized.js.map +1 -0
- package/dist/lib/bufferCodec.cjs +24 -0
- package/dist/lib/bufferCodec.cjs.map +1 -0
- package/dist/lib/bufferCodec.d.ts +4 -0
- package/dist/lib/bufferCodec.js +7 -0
- package/dist/lib/bufferCodec.js.map +1 -0
- package/dist/lib/buildPrismicRepositoryAPIEndpoint.cjs +9 -0
- package/dist/lib/buildPrismicRepositoryAPIEndpoint.cjs.map +1 -0
- package/dist/lib/buildPrismicRepositoryAPIEndpoint.d.ts +4 -0
- package/dist/lib/buildPrismicRepositoryAPIEndpoint.js +9 -0
- package/dist/lib/buildPrismicRepositoryAPIEndpoint.js.map +1 -0
- package/dist/lib/castArray.cjs +7 -0
- package/dist/lib/castArray.cjs.map +1 -0
- package/dist/lib/castArray.d.ts +1 -0
- package/dist/lib/castArray.js +7 -0
- package/dist/lib/castArray.js.map +1 -0
- package/dist/lib/checkIsURLAccessible.d.ts +1 -0
- package/dist/lib/createContentDigest.cjs +25 -0
- package/dist/lib/createContentDigest.cjs.map +1 -0
- package/dist/lib/createContentDigest.d.ts +9 -0
- package/dist/lib/createContentDigest.js +8 -0
- package/dist/lib/createContentDigest.js.map +1 -0
- package/dist/lib/decode.cjs +18 -0
- package/dist/lib/decode.cjs.map +1 -0
- package/dist/lib/decode.d.ts +10 -0
- package/dist/lib/decode.js +18 -0
- package/dist/lib/decode.js.map +1 -0
- package/dist/lib/decodeHookResult.cjs +21 -0
- package/dist/lib/decodeHookResult.cjs.map +1 -0
- package/dist/lib/decodeHookResult.d.ts +10 -0
- package/dist/lib/decodeHookResult.js +21 -0
- package/dist/lib/decodeHookResult.js.map +1 -0
- package/dist/lib/decodePackageJSON.cjs +29 -0
- package/dist/lib/decodePackageJSON.cjs.map +1 -0
- package/dist/lib/decodePackageJSON.d.ts +12 -0
- package/dist/lib/decodePackageJSON.js +12 -0
- package/dist/lib/decodePackageJSON.js.map +1 -0
- package/dist/lib/decodeSliceMachineConfig.cjs +50 -0
- package/dist/lib/decodeSliceMachineConfig.cjs.map +1 -0
- package/dist/lib/decodeSliceMachineConfig.d.ts +3 -0
- package/dist/lib/decodeSliceMachineConfig.js +33 -0
- package/dist/lib/decodeSliceMachineConfig.js.map +1 -0
- package/dist/lib/fetch.cjs +36 -0
- package/dist/lib/fetch.cjs.map +1 -0
- package/dist/lib/fetch.d.ts +15 -0
- package/dist/lib/fetch.js +18 -0
- package/dist/lib/fetch.js.map +1 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.cjs +105 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.cjs.map +1 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.d.ts +21 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.js +88 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.js.map +1 -0
- package/dist/lib/fetchNPMPackageVersions.cjs +41 -0
- package/dist/lib/fetchNPMPackageVersions.cjs.map +1 -0
- package/dist/lib/fetchNPMPackageVersions.d.ts +5 -0
- package/dist/lib/fetchNPMPackageVersions.js +24 -0
- package/dist/lib/fetchNPMPackageVersions.js.map +1 -0
- package/dist/lib/format.cjs +33 -0
- package/dist/lib/format.cjs.map +1 -0
- package/dist/lib/format.d.ts +12 -0
- package/dist/lib/format.js +33 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/functionCodec.cjs +29 -0
- package/dist/lib/functionCodec.cjs.map +1 -0
- package/dist/lib/functionCodec.d.ts +2 -0
- package/dist/lib/functionCodec.js +12 -0
- package/dist/lib/functionCodec.js.map +1 -0
- package/dist/lib/installDependencies.cjs +38 -0
- package/dist/lib/installDependencies.cjs.map +1 -0
- package/dist/lib/installDependencies.d.ts +13 -0
- package/dist/lib/installDependencies.js +38 -0
- package/dist/lib/installDependencies.js.map +1 -0
- package/dist/lib/locateFileUpward.cjs +47 -0
- package/dist/lib/locateFileUpward.cjs.map +1 -0
- package/dist/lib/locateFileUpward.d.ts +10 -0
- package/dist/lib/locateFileUpward.js +29 -0
- package/dist/lib/locateFileUpward.js.map +1 -0
- package/dist/lib/markdownToHTML.cjs +91 -0
- package/dist/lib/markdownToHTML.cjs.map +1 -0
- package/dist/lib/markdownToHTML.d.ts +1 -0
- package/dist/lib/markdownToHTML.js +69 -0
- package/dist/lib/markdownToHTML.js.map +1 -0
- package/dist/lib/mockSlice.cjs +32 -0
- package/dist/lib/mockSlice.cjs.map +1 -0
- package/dist/lib/mockSlice.d.ts +9 -0
- package/dist/lib/mockSlice.js +32 -0
- package/dist/lib/mockSlice.js.map +1 -0
- package/dist/lib/prismicrc.cjs +48 -0
- package/dist/lib/prismicrc.cjs.map +1 -0
- package/dist/lib/prismicrc.d.ts +10 -0
- package/dist/lib/prismicrc.js +29 -0
- package/dist/lib/prismicrc.js.map +1 -0
- package/dist/lib/serializeCookies.cjs +29 -0
- package/dist/lib/serializeCookies.cjs.map +1 -0
- package/dist/lib/serializeCookies.d.ts +6 -0
- package/dist/lib/serializeCookies.js +29 -0
- package/dist/lib/serializeCookies.js.map +1 -0
- package/dist/lib/trailingSlash.cjs +11 -0
- package/dist/lib/trailingSlash.cjs.map +1 -0
- package/dist/lib/trailingSlash.d.ts +2 -0
- package/dist/lib/trailingSlash.js +11 -0
- package/dist/lib/trailingSlash.js.map +1 -0
- package/dist/managers/BaseManager.cjs +69 -0
- package/dist/managers/BaseManager.cjs.map +1 -0
- package/dist/managers/BaseManager.d.ts +37 -0
- package/dist/managers/BaseManager.js +69 -0
- package/dist/managers/BaseManager.js.map +1 -0
- package/dist/managers/SliceMachineManager.cjs +251 -0
- package/dist/managers/SliceMachineManager.cjs.map +1 -0
- package/dist/managers/SliceMachineManager.d.ts +99 -0
- package/dist/managers/SliceMachineManager.js +251 -0
- package/dist/managers/SliceMachineManager.js.map +1 -0
- package/dist/managers/createSliceMachineManager.cjs +8 -0
- package/dist/managers/createSliceMachineManager.cjs.map +1 -0
- package/dist/managers/createSliceMachineManager.d.ts +5 -0
- package/dist/managers/createSliceMachineManager.js +8 -0
- package/dist/managers/createSliceMachineManager.js.map +1 -0
- package/dist/managers/createSliceMachineManagerClient.cjs +11 -0
- package/dist/managers/createSliceMachineManagerClient.cjs.map +1 -0
- package/dist/managers/createSliceMachineManagerClient.d.ts +8 -0
- package/dist/managers/createSliceMachineManagerClient.js +11 -0
- package/dist/managers/createSliceMachineManagerClient.js.map +1 -0
- package/dist/managers/createSliceMachineManagerMiddleware.cjs +44 -0
- package/dist/managers/createSliceMachineManagerMiddleware.cjs.map +1 -0
- package/dist/managers/createSliceMachineManagerMiddleware.d.ts +15 -0
- package/dist/managers/createSliceMachineManagerMiddleware.js +44 -0
- package/dist/managers/createSliceMachineManagerMiddleware.js.map +1 -0
- package/dist/managers/customTypes/CustomTypesManager.cjs +190 -0
- package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -0
- package/dist/managers/customTypes/CustomTypesManager.d.ts +61 -0
- package/dist/managers/customTypes/CustomTypesManager.js +172 -0
- package/dist/managers/customTypes/CustomTypesManager.js.map +1 -0
- package/dist/managers/customTypes/types.d.ts +2 -0
- package/dist/managers/documentation/DocumentationManager.cjs +42 -0
- package/dist/managers/documentation/DocumentationManager.cjs.map +1 -0
- package/dist/managers/documentation/DocumentationManager.d.ts +11 -0
- package/dist/managers/documentation/DocumentationManager.js +25 -0
- package/dist/managers/documentation/DocumentationManager.js.map +1 -0
- package/dist/managers/plugins/PluginsManager.cjs +36 -0
- package/dist/managers/plugins/PluginsManager.cjs.map +1 -0
- package/dist/managers/plugins/PluginsManager.d.ts +13 -0
- package/dist/managers/plugins/PluginsManager.js +36 -0
- package/dist/managers/plugins/PluginsManager.js.map +1 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.cjs +404 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.cjs.map +1 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.d.ts +36 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.js +387 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.js.map +1 -0
- package/dist/managers/prismicRepository/sortEnvironments.cjs +36 -0
- package/dist/managers/prismicRepository/sortEnvironments.cjs.map +1 -0
- package/dist/managers/prismicRepository/sortEnvironments.d.ts +17 -0
- package/dist/managers/prismicRepository/sortEnvironments.js +36 -0
- package/dist/managers/prismicRepository/sortEnvironments.js.map +1 -0
- package/dist/managers/prismicRepository/types.cjs +78 -0
- package/dist/managers/prismicRepository/types.cjs.map +1 -0
- package/dist/managers/prismicRepository/types.d.ts +148 -0
- package/dist/managers/prismicRepository/types.js +63 -0
- package/dist/managers/prismicRepository/types.js.map +1 -0
- package/dist/managers/project/ProjectManager.cjs +273 -0
- package/dist/managers/project/ProjectManager.cjs.map +1 -0
- package/dist/managers/project/ProjectManager.d.ts +84 -0
- package/dist/managers/project/ProjectManager.js +254 -0
- package/dist/managers/project/ProjectManager.js.map +1 -0
- package/dist/managers/screenshots/ScreenshotsManager.cjs +164 -0
- package/dist/managers/screenshots/ScreenshotsManager.cjs.map +1 -0
- package/dist/managers/screenshots/ScreenshotsManager.d.ts +20 -0
- package/dist/managers/screenshots/ScreenshotsManager.js +147 -0
- package/dist/managers/screenshots/ScreenshotsManager.js.map +1 -0
- package/dist/managers/simulator/SimulatorManager.cjs +105 -0
- package/dist/managers/simulator/SimulatorManager.cjs.map +1 -0
- package/dist/managers/simulator/SimulatorManager.d.ts +38 -0
- package/dist/managers/simulator/SimulatorManager.js +88 -0
- package/dist/managers/simulator/SimulatorManager.js.map +1 -0
- package/dist/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.cjs +139 -0
- package/dist/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.cjs.map +1 -0
- package/dist/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.d.ts +27 -0
- package/dist/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.js +122 -0
- package/dist/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.js.map +1 -0
- package/dist/managers/slices/SlicesManager.cjs +652 -0
- package/dist/managers/slices/SlicesManager.cjs.map +1 -0
- package/dist/managers/slices/SlicesManager.d.ts +178 -0
- package/dist/managers/slices/SlicesManager.js +634 -0
- package/dist/managers/slices/SlicesManager.js.map +1 -0
- package/dist/managers/snippets/SnippetsManager.cjs +41 -0
- package/dist/managers/snippets/SnippetsManager.cjs.map +1 -0
- package/dist/managers/snippets/SnippetsManager.d.ts +11 -0
- package/dist/managers/snippets/SnippetsManager.js +24 -0
- package/dist/managers/snippets/SnippetsManager.js.map +1 -0
- package/dist/managers/telemetry/TelemetryManager.cjs +154 -0
- package/dist/managers/telemetry/TelemetryManager.cjs.map +1 -0
- package/dist/managers/telemetry/TelemetryManager.d.ts +29 -0
- package/dist/managers/telemetry/TelemetryManager.js +154 -0
- package/dist/managers/telemetry/TelemetryManager.js.map +1 -0
- package/dist/managers/telemetry/types.cjs +57 -0
- package/dist/managers/telemetry/types.cjs.map +1 -0
- package/dist/managers/telemetry/types.d.ts +165 -0
- package/dist/managers/telemetry/types.js +57 -0
- package/dist/managers/telemetry/types.js.map +1 -0
- package/dist/managers/user/UserManager.cjs +29 -0
- package/dist/managers/user/UserManager.cjs.map +1 -0
- package/dist/managers/user/UserManager.d.ts +40 -0
- package/dist/managers/user/UserManager.js +29 -0
- package/dist/managers/user/UserManager.js.map +1 -0
- package/dist/managers/versions/VersionsManager.cjs +140 -0
- package/dist/managers/versions/VersionsManager.cjs.map +1 -0
- package/dist/managers/versions/VersionsManager.d.ts +22 -0
- package/dist/managers/versions/VersionsManager.js +122 -0
- package/dist/managers/versions/VersionsManager.js.map +1 -0
- package/dist/managers/versions/types.d.ts +5 -0
- package/dist/test/createSliceMachineManagerMSWHandler.cjs +18 -0
- package/dist/test/createSliceMachineManagerMSWHandler.cjs.map +1 -0
- package/dist/test/createSliceMachineManagerMSWHandler.d.ts +7 -0
- package/dist/test/createSliceMachineManagerMSWHandler.js +18 -0
- package/dist/test/createSliceMachineManagerMSWHandler.js.map +1 -0
- package/dist/test/index.d.ts +2 -0
- package/dist/test.cjs +5 -0
- package/dist/test.cjs.map +1 -0
- package/dist/test.js +5 -0
- package/dist/test.js.map +1 -0
- package/dist/types.d.ts +37 -0
- package/package.json +140 -0
- package/src/auth/PrismicAuthManager.ts +412 -0
- package/src/auth/createPrismicAuthManager.ts +11 -0
- package/src/auth/createPrismicAuthManagerMiddleware.ts +72 -0
- package/src/client/index.ts +35 -0
- package/src/constants/API_ENDPOINTS.ts +86 -0
- package/src/constants/API_TOKENS.ts +19 -0
- package/src/constants/APPLICATION_MODE.ts +5 -0
- package/src/constants/DEFAULT_SLICE_SCREENSHOT_URL.ts +6 -0
- package/src/constants/REPOSITORY_NAME_VALIDATION.ts +4 -0
- package/src/constants/SLICE_MACHINE_CONFIG_FILENAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.ts +1 -0
- package/src/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_USER_AGENT.ts +1 -0
- package/src/constants/TS_CONFIG_FILENAME.ts +1 -0
- package/src/constants/VERSION_KIND.ts +6 -0
- package/src/errors.ts +85 -0
- package/src/index.ts +46 -0
- package/src/lib/DecodeError.ts +22 -0
- package/src/lib/assertPluginsInitialized.ts +11 -0
- package/src/lib/bufferCodec.ts +10 -0
- package/src/lib/buildPrismicRepositoryAPIEndpoint.ts +16 -0
- package/src/lib/castArray.ts +3 -0
- package/src/lib/checkIsURLAccessible.ts +7 -0
- package/src/lib/createContentDigest.ts +12 -0
- package/src/lib/decode.ts +36 -0
- package/src/lib/decodeHookResult.ts +36 -0
- package/src/lib/decodePackageJSON.ts +18 -0
- package/src/lib/decodeSliceMachineConfig.ts +39 -0
- package/src/lib/fetch.ts +46 -0
- package/src/lib/fetchGitHubReleaseBodyForRelease.ts +146 -0
- package/src/lib/fetchNPMPackageVersions.ts +46 -0
- package/src/lib/format.ts +34 -0
- package/src/lib/functionCodec.ts +16 -0
- package/src/lib/installDependencies.ts +65 -0
- package/src/lib/locateFileUpward.ts +53 -0
- package/src/lib/markdownToHTML.ts +116 -0
- package/src/lib/mockSlice.ts +50 -0
- package/src/lib/prismicrc.ts +64 -0
- package/src/lib/serializeCookies.ts +45 -0
- package/src/lib/trailingSlash.ts +9 -0
- package/src/managers/BaseManager.ts +100 -0
- package/src/managers/SliceMachineManager.ts +399 -0
- package/src/managers/createSliceMachineManager.ts +11 -0
- package/src/managers/createSliceMachineManagerClient.ts +23 -0
- package/src/managers/createSliceMachineManagerMiddleware.ts +78 -0
- package/src/managers/customTypes/CustomTypesManager.ts +332 -0
- package/src/managers/customTypes/types.ts +3 -0
- package/src/managers/documentation/DocumentationManager.ts +44 -0
- package/src/managers/plugins/PluginsManager.ts +48 -0
- package/src/managers/prismicRepository/PrismicRepositoryManager.ts +569 -0
- package/src/managers/prismicRepository/sortEnvironments.ts +55 -0
- package/src/managers/prismicRepository/types.ts +169 -0
- package/src/managers/project/ProjectManager.ts +443 -0
- package/src/managers/screenshots/ScreenshotsManager.ts +199 -0
- package/src/managers/simulator/SimulatorManager.ts +161 -0
- package/src/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.ts +201 -0
- package/src/managers/slices/SlicesManager.ts +1105 -0
- package/src/managers/snippets/SnippetsManager.ts +45 -0
- package/src/managers/telemetry/TelemetryManager.ts +248 -0
- package/src/managers/telemetry/types.ts +283 -0
- package/src/managers/user/UserManager.ts +39 -0
- package/src/managers/versions/VersionsManager.ts +167 -0
- package/src/managers/versions/types.ts +6 -0
- package/src/test/createSliceMachineManagerMSWHandler.ts +29 -0
- package/src/test/index.ts +2 -0
- package/src/types.ts +47 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import fetch from "../../lib/fetch.js";
|
|
3
|
+
import { fold } from './../../_node_modules/fp-ts/es6/Either.js';
|
|
4
|
+
import { assertPluginsInitialized } from "../../lib/assertPluginsInitialized.js";
|
|
5
|
+
import { decode } from "../../lib/decode.js";
|
|
6
|
+
import { serializeCookies } from "../../lib/serializeCookies.js";
|
|
7
|
+
import { SLICE_MACHINE_USER_AGENT } from "../../constants/SLICE_MACHINE_USER_AGENT.js";
|
|
8
|
+
import { API_ENDPOINTS } from "../../constants/API_ENDPOINTS.js";
|
|
9
|
+
import { REPOSITORY_NAME_VALIDATION } from "../../constants/REPOSITORY_NAME_VALIDATION.js";
|
|
10
|
+
import { UnauthenticatedError, isUnauthenticatedError, UnexpectedDataError, UnauthorizedError } from "../../errors.js";
|
|
11
|
+
import { BaseManager } from "../BaseManager.js";
|
|
12
|
+
import { PrismicRepository, PrismicRepositoryRole, PrismicRepositoryUserAgent, ChangeTypes, LimitType, Environment, RawLimit } from "./types.js";
|
|
13
|
+
import { sortEnvironments } from "./sortEnvironments.js";
|
|
14
|
+
const DEFAULT_REPOSITORY_SETTINGS = {
|
|
15
|
+
plan: "personal",
|
|
16
|
+
isAnnual: "false",
|
|
17
|
+
role: "developer"
|
|
18
|
+
};
|
|
19
|
+
class PrismicRepositoryManager extends BaseManager {
|
|
20
|
+
// TODO: Add methods for repository-specific actions. E.g. creating a
|
|
21
|
+
// new repository.
|
|
22
|
+
async readAll() {
|
|
23
|
+
const url = new URL("./repositories", API_ENDPOINTS.PrismicUser);
|
|
24
|
+
const res = await this._fetch({ url });
|
|
25
|
+
if (res.ok) {
|
|
26
|
+
const json = await res.json();
|
|
27
|
+
const { value: repositories, error } = decode(t.array(PrismicRepository), json);
|
|
28
|
+
if (error) {
|
|
29
|
+
throw new Error(`Failed to decode repositories: ${error.errors.join(", ")}`);
|
|
30
|
+
}
|
|
31
|
+
return repositories;
|
|
32
|
+
} else {
|
|
33
|
+
const text = await res.text();
|
|
34
|
+
throw new Error(`Failed to read repositories`, { cause: text });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Should this be in manager? It's one of the few sync method
|
|
38
|
+
//
|
|
39
|
+
// Reply from Angelo 2022-12-22: I think it should be in manager
|
|
40
|
+
// because we shouldn't be exporting root-level utilities from this
|
|
41
|
+
// package. If we want to make it more inline with the other methods,
|
|
42
|
+
// we could simplify the API by changing its signature to the
|
|
43
|
+
// following:
|
|
44
|
+
//
|
|
45
|
+
// ```ts
|
|
46
|
+
// (repositoryName: string) => Promise<boolean>
|
|
47
|
+
// ```
|
|
48
|
+
//
|
|
49
|
+
// This method would:
|
|
50
|
+
//
|
|
51
|
+
// 1. Fetch the list of repositories for the user using `readAll()`.
|
|
52
|
+
// The list would be cached.
|
|
53
|
+
// 2. Determine if the user has write access to the given repository.
|
|
54
|
+
//
|
|
55
|
+
// This version has the following benefits:
|
|
56
|
+
//
|
|
57
|
+
// - Does not expect the consumer to supply a repository object; it
|
|
58
|
+
// only requires a repository name, which could be sourced from
|
|
59
|
+
// anything (incl. the project's `slicemachine.config.json`).
|
|
60
|
+
//
|
|
61
|
+
// - Similarly, it does not expect the consumer to call `readAll()`
|
|
62
|
+
// before calling this method.
|
|
63
|
+
//
|
|
64
|
+
// - Works for repositories that the user does not have access to. For
|
|
65
|
+
// example, I could use it to check if I have access to "qwerty",
|
|
66
|
+
// even if I am not added as a user. The purpose of the method is
|
|
67
|
+
// still valid: do I have write access to a given repository?
|
|
68
|
+
hasWriteAccess(repository) {
|
|
69
|
+
switch (repository.role) {
|
|
70
|
+
case PrismicRepositoryRole.SuperUser:
|
|
71
|
+
case PrismicRepositoryRole.Owner:
|
|
72
|
+
case PrismicRepositoryRole.Administrator:
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async checkExists(args) {
|
|
79
|
+
const url = new URL(`./app/dashboard/repositories/${args.domain}/exists`, API_ENDPOINTS.PrismicWroom);
|
|
80
|
+
const res = await this._fetch({
|
|
81
|
+
url,
|
|
82
|
+
skipAuthentication: true
|
|
83
|
+
});
|
|
84
|
+
const text = await res.text();
|
|
85
|
+
if (res.ok) {
|
|
86
|
+
return text === "false";
|
|
87
|
+
} else {
|
|
88
|
+
throw new Error(`Failed to check repository existence for domain \`${args.domain}\``, { cause: text });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async create(args) {
|
|
92
|
+
const url = new URL("./authentication/newrepository?app=slicemachine", API_ENDPOINTS.PrismicWroom);
|
|
93
|
+
const body = {
|
|
94
|
+
...DEFAULT_REPOSITORY_SETTINGS,
|
|
95
|
+
domain: args.domain,
|
|
96
|
+
// These properties are optional in the API but needed for tracking
|
|
97
|
+
framework: args.framework,
|
|
98
|
+
starterId: args.starterId
|
|
99
|
+
};
|
|
100
|
+
const res = await this._fetch({
|
|
101
|
+
url,
|
|
102
|
+
method: "POST",
|
|
103
|
+
body,
|
|
104
|
+
userAgent: PrismicRepositoryUserAgent.SliceMachine
|
|
105
|
+
// Custom User Agent is required
|
|
106
|
+
});
|
|
107
|
+
const text = await res.text();
|
|
108
|
+
if (!res.ok || text.length < REPOSITORY_NAME_VALIDATION.Min || text.length > REPOSITORY_NAME_VALIDATION.Max) {
|
|
109
|
+
throw new Error(`Failed to create repository \`${args.domain}\``, {
|
|
110
|
+
cause: text
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// TODO: Delete this endpoint? It doesn't seem to be used (I might be wrong). - Angelo
|
|
115
|
+
async delete(args) {
|
|
116
|
+
const cookies = await this.user.getAuthenticationCookies();
|
|
117
|
+
const url = new URL(
|
|
118
|
+
`./app/settings/delete?_=${cookies["X_XSRF"]}`,
|
|
119
|
+
// TODO: Maybe we want to throw early if the token is no available, or get the token another way
|
|
120
|
+
API_ENDPOINTS.PrismicWroom
|
|
121
|
+
);
|
|
122
|
+
url.hostname = `${args.domain}.${url.hostname}`;
|
|
123
|
+
const body = {
|
|
124
|
+
confirm: args.domain,
|
|
125
|
+
password: args.password
|
|
126
|
+
};
|
|
127
|
+
const res = await this._fetch({
|
|
128
|
+
url,
|
|
129
|
+
method: "POST",
|
|
130
|
+
body,
|
|
131
|
+
userAgent: PrismicRepositoryUserAgent.LegacyZero
|
|
132
|
+
// Custom User Agent is required
|
|
133
|
+
});
|
|
134
|
+
if (!res.ok) {
|
|
135
|
+
throw new Error(`Failed to delete repository \`${args.domain}\``, {
|
|
136
|
+
cause: res
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
async pushDocuments(args) {
|
|
141
|
+
const url = new URL("./starter/documents", API_ENDPOINTS.PrismicWroom);
|
|
142
|
+
url.hostname = `${args.domain}.${url.hostname}`;
|
|
143
|
+
const body = {
|
|
144
|
+
signature: args.signature,
|
|
145
|
+
documents: JSON.stringify(args.documents)
|
|
146
|
+
};
|
|
147
|
+
const res = await this._fetch({
|
|
148
|
+
url,
|
|
149
|
+
method: "POST",
|
|
150
|
+
body,
|
|
151
|
+
userAgent: PrismicRepositoryUserAgent.LegacyZero
|
|
152
|
+
// Custom User Agent is required
|
|
153
|
+
});
|
|
154
|
+
if (!res.ok) {
|
|
155
|
+
let reason = null;
|
|
156
|
+
try {
|
|
157
|
+
reason = await res.text();
|
|
158
|
+
} catch {
|
|
159
|
+
}
|
|
160
|
+
if (reason === "Repository should not contain documents") {
|
|
161
|
+
throw new Error(`Failed to push documents to repository \`${args.domain}\`, repository is not empty`, {
|
|
162
|
+
cause: reason
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
throw new Error(`Failed to push documents to repository \`${args.domain}\`, ${res.status} ${res.statusText}`, {
|
|
166
|
+
cause: reason
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async pushChanges(args) {
|
|
171
|
+
assertPluginsInitialized(this.sliceMachinePluginRunner);
|
|
172
|
+
if (!await this.user.checkIsLoggedIn()) {
|
|
173
|
+
throw new UnauthenticatedError();
|
|
174
|
+
}
|
|
175
|
+
try {
|
|
176
|
+
await this.screenshots.initS3ACL();
|
|
177
|
+
const allChanges = await Promise.all(args.changes.map(async (change) => {
|
|
178
|
+
if (change.type === "Slice") {
|
|
179
|
+
switch (change.status) {
|
|
180
|
+
case "NEW": {
|
|
181
|
+
const { model } = await this.slices.readSlice({
|
|
182
|
+
libraryID: change.libraryID,
|
|
183
|
+
sliceID: change.id
|
|
184
|
+
});
|
|
185
|
+
if (!model) {
|
|
186
|
+
throw Error(`Could not find model ${change.id}`);
|
|
187
|
+
}
|
|
188
|
+
const modelWithScreenshots = await this.slices.updateSliceModelScreenshotsInPlace({
|
|
189
|
+
libraryID: change.libraryID,
|
|
190
|
+
model
|
|
191
|
+
});
|
|
192
|
+
return {
|
|
193
|
+
id: change.id,
|
|
194
|
+
payload: modelWithScreenshots,
|
|
195
|
+
type: ChangeTypes.SLICE_INSERT
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
case "MODIFIED": {
|
|
199
|
+
const { model } = await this.slices.readSlice({
|
|
200
|
+
libraryID: change.libraryID,
|
|
201
|
+
sliceID: change.id
|
|
202
|
+
});
|
|
203
|
+
if (!model) {
|
|
204
|
+
throw Error(`Could not find model ${change.id}`);
|
|
205
|
+
}
|
|
206
|
+
const modelWithScreenshots = await this.slices.updateSliceModelScreenshotsInPlace({
|
|
207
|
+
libraryID: change.libraryID,
|
|
208
|
+
model
|
|
209
|
+
});
|
|
210
|
+
return {
|
|
211
|
+
id: change.id,
|
|
212
|
+
payload: modelWithScreenshots,
|
|
213
|
+
type: ChangeTypes.SLICE_UPDATE
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
case "DELETED":
|
|
217
|
+
await this.screenshots.deleteScreenshotFolder({
|
|
218
|
+
sliceID: change.id
|
|
219
|
+
});
|
|
220
|
+
return {
|
|
221
|
+
id: change.id,
|
|
222
|
+
payload: { id: change.id },
|
|
223
|
+
type: ChangeTypes.SLICE_DELETE
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
} else {
|
|
227
|
+
switch (change.status) {
|
|
228
|
+
case "NEW": {
|
|
229
|
+
const { model } = await this.customTypes.readCustomType({
|
|
230
|
+
id: change.id
|
|
231
|
+
});
|
|
232
|
+
if (!model) {
|
|
233
|
+
throw Error(`Could not find model ${change.id}`);
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
type: ChangeTypes.CUSTOM_TYPE_INSERT,
|
|
237
|
+
id: change.id,
|
|
238
|
+
payload: model
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
case "MODIFIED": {
|
|
242
|
+
const { model } = await this.customTypes.readCustomType({
|
|
243
|
+
id: change.id
|
|
244
|
+
});
|
|
245
|
+
if (!model) {
|
|
246
|
+
throw Error(`Could not find model ${change.id}`);
|
|
247
|
+
}
|
|
248
|
+
return {
|
|
249
|
+
type: ChangeTypes.CUSTOM_TYPE_UPDATE,
|
|
250
|
+
id: change.id,
|
|
251
|
+
payload: model
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
case "DELETED":
|
|
255
|
+
return {
|
|
256
|
+
id: change.id,
|
|
257
|
+
payload: { id: change.id },
|
|
258
|
+
type: ChangeTypes.CUSTOM_TYPE_DELETE
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}));
|
|
263
|
+
const requestBody = {
|
|
264
|
+
confirmDeleteDocuments: args.confirmDeleteDocuments,
|
|
265
|
+
changes: allChanges
|
|
266
|
+
};
|
|
267
|
+
const repositoryName = await this.project.getResolvedRepositoryName();
|
|
268
|
+
const response = await this._fetch({
|
|
269
|
+
url: new URL("./bulk", API_ENDPOINTS.PrismicModels),
|
|
270
|
+
method: "POST",
|
|
271
|
+
body: requestBody,
|
|
272
|
+
repository: repositoryName
|
|
273
|
+
});
|
|
274
|
+
switch (response.status) {
|
|
275
|
+
case 202:
|
|
276
|
+
return this._decodeLimitOrThrow(await response.json(), response.status, LimitType.SOFT);
|
|
277
|
+
case 204:
|
|
278
|
+
return null;
|
|
279
|
+
case 401:
|
|
280
|
+
throw new UnauthenticatedError();
|
|
281
|
+
case 403:
|
|
282
|
+
return this._decodeLimitOrThrow(await response.json(), response.status, LimitType.HARD);
|
|
283
|
+
case 400:
|
|
284
|
+
const text = await response.text();
|
|
285
|
+
throw new Error(text);
|
|
286
|
+
default:
|
|
287
|
+
throw new Error(`Unexpected status code ${response.status}`, {
|
|
288
|
+
cause: await response.text()
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
} catch (err) {
|
|
292
|
+
console.error("An error happened while pushing your changes");
|
|
293
|
+
console.error(err);
|
|
294
|
+
throw err;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
async fetchEnvironments() {
|
|
298
|
+
const repositoryName = await this.project.getRepositoryName();
|
|
299
|
+
const url = new URL(`./environments`, API_ENDPOINTS.SliceMachineV1);
|
|
300
|
+
url.searchParams.set("repository", repositoryName);
|
|
301
|
+
let res;
|
|
302
|
+
try {
|
|
303
|
+
res = await this._fetch({ url });
|
|
304
|
+
} catch (error) {
|
|
305
|
+
if (isUnauthenticatedError(error)) {
|
|
306
|
+
return { error: new UnauthenticatedError() };
|
|
307
|
+
}
|
|
308
|
+
return {
|
|
309
|
+
error: new UnexpectedDataError("Unexpected Error while fetching Environments")
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
if (res.ok) {
|
|
313
|
+
const json = await res.json();
|
|
314
|
+
const { value, error } = decode(t.union([
|
|
315
|
+
t.type({
|
|
316
|
+
results: t.array(Environment)
|
|
317
|
+
}),
|
|
318
|
+
t.type({
|
|
319
|
+
error: t.literal("invalid_token")
|
|
320
|
+
})
|
|
321
|
+
]), json);
|
|
322
|
+
if (error) {
|
|
323
|
+
return {
|
|
324
|
+
error: new UnexpectedDataError(`Failed to decode environments: ${error.errors.join(", ")}`)
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
if ("results" in value) {
|
|
328
|
+
return { environments: sortEnvironments(value.results) };
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
switch (res.status) {
|
|
332
|
+
case 400:
|
|
333
|
+
case 401:
|
|
334
|
+
return { error: new UnauthenticatedError() };
|
|
335
|
+
case 403:
|
|
336
|
+
return { error: new UnauthorizedError() };
|
|
337
|
+
default:
|
|
338
|
+
return { error: new Error("Failed to fetch environments.") };
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
_decodeLimitOrThrow(potentialLimit, statusCode, limitType) {
|
|
342
|
+
return fold(() => {
|
|
343
|
+
const error = {
|
|
344
|
+
status: statusCode,
|
|
345
|
+
message: `Unable to parse raw limit from ${JSON.stringify(potentialLimit)}`
|
|
346
|
+
};
|
|
347
|
+
throw error;
|
|
348
|
+
}, (rawLimit) => {
|
|
349
|
+
const limit = { ...rawLimit, type: limitType };
|
|
350
|
+
return limit;
|
|
351
|
+
})(RawLimit.decode(potentialLimit));
|
|
352
|
+
}
|
|
353
|
+
async _fetch(args) {
|
|
354
|
+
let cookies;
|
|
355
|
+
try {
|
|
356
|
+
cookies = await this.user.getAuthenticationCookies();
|
|
357
|
+
} catch (e) {
|
|
358
|
+
if (!args.skipAuthentication) {
|
|
359
|
+
throw e;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
const extraHeaders = {};
|
|
363
|
+
if (args.body) {
|
|
364
|
+
extraHeaders["Content-Type"] = "application/json";
|
|
365
|
+
}
|
|
366
|
+
if (args.repository) {
|
|
367
|
+
extraHeaders.repository = args.repository;
|
|
368
|
+
}
|
|
369
|
+
return await fetch(args.url.toString(), {
|
|
370
|
+
method: args.method,
|
|
371
|
+
body: args.body ? JSON.stringify(args.body) : void 0,
|
|
372
|
+
headers: {
|
|
373
|
+
// Some endpoints rely on the authorization header...
|
|
374
|
+
...cookies !== void 0 ? {
|
|
375
|
+
Authorization: `Bearer ${cookies["prismic-auth"]}`,
|
|
376
|
+
Cookie: serializeCookies(cookies)
|
|
377
|
+
} : {},
|
|
378
|
+
"User-Agent": args.userAgent || SLICE_MACHINE_USER_AGENT,
|
|
379
|
+
...extraHeaders
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
export {
|
|
385
|
+
PrismicRepositoryManager
|
|
386
|
+
};
|
|
387
|
+
//# sourceMappingURL=PrismicRepositoryManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrismicRepositoryManager.js","sources":["../../../../src/managers/prismicRepository/PrismicRepositoryManager.ts"],"sourcesContent":["import * as t from \"io-ts\";\nimport fetch, { Response } from \"../../lib/fetch\";\nimport { fold } from \"fp-ts/Either\";\n\nimport { assertPluginsInitialized } from \"../../lib/assertPluginsInitialized\";\nimport { decode } from \"../../lib/decode\";\nimport { serializeCookies } from \"../../lib/serializeCookies\";\n\nimport { SLICE_MACHINE_USER_AGENT } from \"../../constants/SLICE_MACHINE_USER_AGENT\";\nimport { API_ENDPOINTS } from \"../../constants/API_ENDPOINTS\";\nimport { REPOSITORY_NAME_VALIDATION } from \"../../constants/REPOSITORY_NAME_VALIDATION\";\n\nimport {\n\tUnauthenticatedError,\n\tUnauthorizedError,\n\tUnexpectedDataError,\n\tisUnauthenticatedError,\n} from \"../../errors\";\n\nimport { BaseManager } from \"../BaseManager\";\n\nimport {\n\tAllChangeTypes,\n\tBulkBody,\n\tChangeTypes,\n\tClientError,\n\tLimit,\n\tLimitType,\n\tPrismicRepository,\n\tPrismicRepositoryRole,\n\tPrismicRepositoryUserAgent,\n\tPrismicRepositoryUserAgents,\n\tRawLimit,\n\tTransactionalMergeArgs,\n\tTransactionalMergeReturnType,\n\tFrameworkWroomTelemetryID,\n\tStarterId,\n\tEnvironment,\n} from \"./types\";\nimport { sortEnvironments } from \"./sortEnvironments\";\n\nconst DEFAULT_REPOSITORY_SETTINGS = {\n\tplan: \"personal\",\n\tisAnnual: \"false\",\n\trole: \"developer\",\n};\n\ntype PrismicRepositoryManagerCheckExistsArgs = {\n\tdomain: string;\n};\n\ntype PrismicRepositoryManagerCreateArgs = {\n\tdomain: string;\n\tframework: FrameworkWroomTelemetryID;\n\tstarterId?: StarterId;\n};\n\ntype PrismicRepositoryManagerDeleteArgs = {\n\tdomain: string;\n\tpassword: string;\n};\n\ntype PrismicRepositoryManagerPushDocumentsArgs = {\n\tdomain: string;\n\tsignature: string;\n\tdocuments: Record<string, unknown>; // TODO: Type unknown if possible(?)\n};\n\ntype PrismicRepositoryManagerFetchEnvironmentsReturnType = {\n\tenvironments?: Environment[];\n\terror?: unknown;\n};\n\nexport class PrismicRepositoryManager extends BaseManager {\n\t// TODO: Add methods for repository-specific actions. E.g. creating a\n\t// new repository.\n\n\tasync readAll(): Promise<PrismicRepository[]> {\n\t\tconst url = new URL(\"./repositories\", API_ENDPOINTS.PrismicUser);\n\t\tconst res = await this._fetch({ url });\n\n\t\tif (res.ok) {\n\t\t\tconst json = await res.json();\n\t\t\tconst { value: repositories, error } = decode(\n\t\t\t\tt.array(PrismicRepository),\n\t\t\t\tjson,\n\t\t\t);\n\n\t\t\tif (error) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Failed to decode repositories: ${error.errors.join(\", \")}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn repositories;\n\t\t} else {\n\t\t\tconst text = await res.text();\n\t\t\tthrow new Error(`Failed to read repositories`, { cause: text });\n\t\t}\n\t}\n\n\t// Should this be in manager? It's one of the few sync method\n\t//\n\t// Reply from Angelo 2022-12-22: I think it should be in manager\n\t// because we shouldn't be exporting root-level utilities from this\n\t// package. If we want to make it more inline with the other methods,\n\t// we could simplify the API by changing its signature to the\n\t// following:\n\t//\n\t// ```ts\n\t// (repositoryName: string) => Promise<boolean>\n\t// ```\n\t//\n\t// This method would:\n\t//\n\t// 1. Fetch the list of repositories for the user using `readAll()`.\n\t// The list would be cached.\n\t// 2. Determine if the user has write access to the given repository.\n\t//\n\t// This version has the following benefits:\n\t//\n\t// - Does not expect the consumer to supply a repository object; it\n\t// only requires a repository name, which could be sourced from\n\t// anything (incl. the project's `slicemachine.config.json`).\n\t//\n\t// - Similarly, it does not expect the consumer to call `readAll()`\n\t// before calling this method.\n\t//\n\t// - Works for repositories that the user does not have access to. For\n\t// example, I could use it to check if I have access to \"qwerty\",\n\t// even if I am not added as a user. The purpose of the method is\n\t// still valid: do I have write access to a given repository?\n\thasWriteAccess(repository: PrismicRepository): boolean {\n\t\tswitch (repository.role) {\n\t\t\tcase PrismicRepositoryRole.SuperUser:\n\t\t\tcase PrismicRepositoryRole.Owner:\n\t\t\tcase PrismicRepositoryRole.Administrator:\n\t\t\t\treturn true;\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\tasync checkExists(\n\t\targs: PrismicRepositoryManagerCheckExistsArgs,\n\t): Promise<boolean> {\n\t\tconst url = new URL(\n\t\t\t`./app/dashboard/repositories/${args.domain}/exists`,\n\t\t\tAPI_ENDPOINTS.PrismicWroom,\n\t\t);\n\t\tconst res = await this._fetch({\n\t\t\turl,\n\t\t\tskipAuthentication: true,\n\t\t});\n\n\t\tconst text = await res.text();\n\n\t\tif (res.ok) {\n\t\t\treturn text === \"false\"; // Endpoint returns `false` when repository exists\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to check repository existence for domain \\`${args.domain}\\``,\n\t\t\t\t{ cause: text },\n\t\t\t);\n\t\t}\n\t}\n\n\tasync create(args: PrismicRepositoryManagerCreateArgs): Promise<void> {\n\t\tconst url = new URL(\n\t\t\t\"./authentication/newrepository?app=slicemachine\",\n\t\t\tAPI_ENDPOINTS.PrismicWroom,\n\t\t);\n\n\t\tconst body = {\n\t\t\t...DEFAULT_REPOSITORY_SETTINGS,\n\t\t\tdomain: args.domain,\n\t\t\t// These properties are optional in the API but needed for tracking\n\t\t\tframework: args.framework,\n\t\t\tstarterId: args.starterId,\n\t\t};\n\n\t\tconst res = await this._fetch({\n\t\t\turl,\n\t\t\tmethod: \"POST\",\n\t\t\tbody,\n\t\t\tuserAgent: PrismicRepositoryUserAgent.SliceMachine, // Custom User Agent is required\n\t\t});\n\t\tconst text = await res.text();\n\n\t\t// Endpoint returns repository name on success, that should be within the validation range\n\t\t// Even when there is an error, we get a 200 success and so we have to check the name thanks to that\n\t\tif (\n\t\t\t!res.ok ||\n\t\t\ttext.length < REPOSITORY_NAME_VALIDATION.Min ||\n\t\t\ttext.length > REPOSITORY_NAME_VALIDATION.Max\n\t\t) {\n\t\t\tthrow new Error(`Failed to create repository \\`${args.domain}\\``, {\n\t\t\t\tcause: text,\n\t\t\t});\n\t\t}\n\t}\n\n\t// TODO: Delete this endpoint? It doesn't seem to be used (I might be wrong). - Angelo\n\tasync delete(args: PrismicRepositoryManagerDeleteArgs): Promise<void> {\n\t\tconst cookies = await this.user.getAuthenticationCookies();\n\n\t\tconst url = new URL(\n\t\t\t`./app/settings/delete?_=${cookies[\"X_XSRF\"]}`, // TODO: Maybe we want to throw early if the token is no available, or get the token another way\n\t\t\tAPI_ENDPOINTS.PrismicWroom,\n\t\t);\n\t\t// Update hostname to include repository domain\n\t\turl.hostname = `${args.domain}.${url.hostname}`;\n\n\t\tconst body = {\n\t\t\tconfirm: args.domain,\n\t\t\tpassword: args.password,\n\t\t};\n\n\t\tconst res = await this._fetch({\n\t\t\turl,\n\t\t\tmethod: \"POST\",\n\t\t\tbody,\n\t\t\tuserAgent: PrismicRepositoryUserAgent.LegacyZero, // Custom User Agent is required\n\t\t});\n\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(`Failed to delete repository \\`${args.domain}\\``, {\n\t\t\t\tcause: res,\n\t\t\t});\n\t\t}\n\t}\n\n\tasync pushDocuments(\n\t\targs: PrismicRepositoryManagerPushDocumentsArgs,\n\t): Promise<void> {\n\t\tconst url = new URL(\"./starter/documents\", API_ENDPOINTS.PrismicWroom);\n\t\t// Update hostname to include repository domain\n\t\turl.hostname = `${args.domain}.${url.hostname}`;\n\n\t\tconst body = {\n\t\t\tsignature: args.signature,\n\t\t\tdocuments: JSON.stringify(args.documents),\n\t\t};\n\n\t\tconst res = await this._fetch({\n\t\t\turl,\n\t\t\tmethod: \"POST\",\n\t\t\tbody,\n\t\t\tuserAgent: PrismicRepositoryUserAgent.LegacyZero, // Custom User Agent is required\n\t\t});\n\n\t\tif (!res.ok) {\n\t\t\tlet reason: string | null = null;\n\t\t\ttry {\n\t\t\t\treason = await res.text();\n\t\t\t} catch {\n\t\t\t\t// Noop\n\t\t\t}\n\n\t\t\t// Ideally the API should throw a 409 or something like that...\n\t\t\tif (reason === \"Repository should not contain documents\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Failed to push documents to repository \\`${args.domain}\\`, repository is not empty`,\n\t\t\t\t\t{\n\t\t\t\t\t\tcause: reason,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to push documents to repository \\`${args.domain}\\`, ${res.status} ${res.statusText}`,\n\t\t\t\t{\n\t\t\t\t\tcause: reason,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t}\n\n\tasync pushChanges(\n\t\targs: TransactionalMergeArgs,\n\t): Promise<TransactionalMergeReturnType> {\n\t\tassertPluginsInitialized(this.sliceMachinePluginRunner);\n\n\t\tif (!(await this.user.checkIsLoggedIn())) {\n\t\t\tthrow new UnauthenticatedError();\n\t\t}\n\n\t\ttry {\n\t\t\t// Update the AWS ACL before uploading screenshots as it might have expired\n\t\t\tawait this.screenshots.initS3ACL();\n\n\t\t\tconst allChanges: AllChangeTypes[] = await Promise.all(\n\t\t\t\targs.changes.map(async (change) => {\n\t\t\t\t\tif (change.type === \"Slice\") {\n\t\t\t\t\t\tswitch (change.status) {\n\t\t\t\t\t\t\tcase \"NEW\": {\n\t\t\t\t\t\t\t\tconst { model } = await this.slices.readSlice({\n\t\t\t\t\t\t\t\t\tlibraryID: change.libraryID,\n\t\t\t\t\t\t\t\t\tsliceID: change.id,\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (!model) {\n\t\t\t\t\t\t\t\t\tthrow Error(`Could not find model ${change.id}`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconst modelWithScreenshots =\n\t\t\t\t\t\t\t\t\tawait this.slices.updateSliceModelScreenshotsInPlace({\n\t\t\t\t\t\t\t\t\t\tlibraryID: change.libraryID,\n\t\t\t\t\t\t\t\t\t\tmodel,\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t\tpayload: modelWithScreenshots,\n\t\t\t\t\t\t\t\t\ttype: ChangeTypes.SLICE_INSERT,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase \"MODIFIED\": {\n\t\t\t\t\t\t\t\tconst { model } = await this.slices.readSlice({\n\t\t\t\t\t\t\t\t\tlibraryID: change.libraryID,\n\t\t\t\t\t\t\t\t\tsliceID: change.id,\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (!model) {\n\t\t\t\t\t\t\t\t\tthrow Error(`Could not find model ${change.id}`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconst modelWithScreenshots =\n\t\t\t\t\t\t\t\t\tawait this.slices.updateSliceModelScreenshotsInPlace({\n\t\t\t\t\t\t\t\t\t\tlibraryID: change.libraryID,\n\t\t\t\t\t\t\t\t\t\tmodel,\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t\tpayload: modelWithScreenshots,\n\t\t\t\t\t\t\t\t\ttype: ChangeTypes.SLICE_UPDATE,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase \"DELETED\":\n\t\t\t\t\t\t\t\tawait this.screenshots.deleteScreenshotFolder({\n\t\t\t\t\t\t\t\t\tsliceID: change.id,\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t\tpayload: { id: change.id },\n\t\t\t\t\t\t\t\t\ttype: ChangeTypes.SLICE_DELETE,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tswitch (change.status) {\n\t\t\t\t\t\t\tcase \"NEW\": {\n\t\t\t\t\t\t\t\tconst { model } = await this.customTypes.readCustomType({\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tif (!model) {\n\t\t\t\t\t\t\t\t\tthrow Error(`Could not find model ${change.id}`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttype: ChangeTypes.CUSTOM_TYPE_INSERT,\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t\tpayload: model,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase \"MODIFIED\": {\n\t\t\t\t\t\t\t\tconst { model } = await this.customTypes.readCustomType({\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tif (!model) {\n\t\t\t\t\t\t\t\t\tthrow Error(`Could not find model ${change.id}`);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttype: ChangeTypes.CUSTOM_TYPE_UPDATE,\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t\tpayload: model,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcase \"DELETED\":\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tid: change.id,\n\t\t\t\t\t\t\t\t\tpayload: { id: change.id },\n\t\t\t\t\t\t\t\t\ttype: ChangeTypes.CUSTOM_TYPE_DELETE,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\t// Compute the POST body\n\t\t\tconst requestBody: BulkBody = {\n\t\t\t\tconfirmDeleteDocuments: args.confirmDeleteDocuments,\n\t\t\t\tchanges: allChanges,\n\t\t\t};\n\n\t\t\tconst repositoryName = await this.project.getResolvedRepositoryName();\n\n\t\t\t// TODO: move to customtypes client\n\t\t\tconst response = await this._fetch({\n\t\t\t\turl: new URL(\"./bulk\", API_ENDPOINTS.PrismicModels),\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: requestBody,\n\t\t\t\trepository: repositoryName,\n\t\t\t});\n\n\t\t\tswitch (response.status) {\n\t\t\t\tcase 202:\n\t\t\t\t\treturn this._decodeLimitOrThrow(\n\t\t\t\t\t\tawait response.json(),\n\t\t\t\t\t\tresponse.status,\n\t\t\t\t\t\tLimitType.SOFT,\n\t\t\t\t\t);\n\t\t\t\tcase 204:\n\t\t\t\t\treturn null;\n\t\t\t\tcase 401:\n\t\t\t\t\tthrow new UnauthenticatedError();\n\t\t\t\tcase 403:\n\t\t\t\t\treturn this._decodeLimitOrThrow(\n\t\t\t\t\t\tawait response.json(),\n\t\t\t\t\t\tresponse.status,\n\t\t\t\t\t\tLimitType.HARD,\n\t\t\t\t\t);\n\t\t\t\tcase 400:\n\t\t\t\t\tconst text = await response.text();\n\t\t\t\t\tthrow new Error(text);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unexpected status code ${response.status}`, {\n\t\t\t\t\t\tcause: await response.text(),\n\t\t\t\t\t});\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error(\"An error happened while pushing your changes\");\n\t\t\tconsole.error(err);\n\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\tasync fetchEnvironments(): Promise<PrismicRepositoryManagerFetchEnvironmentsReturnType> {\n\t\tconst repositoryName = await this.project.getRepositoryName();\n\n\t\tconst url = new URL(`./environments`, API_ENDPOINTS.SliceMachineV1);\n\t\turl.searchParams.set(\"repository\", repositoryName);\n\n\t\tlet res;\n\t\ttry {\n\t\t\tres = await this._fetch({ url });\n\t\t} catch (error) {\n\t\t\tif (isUnauthenticatedError(error)) {\n\t\t\t\treturn { error: new UnauthenticatedError() };\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\terror: new UnexpectedDataError(\n\t\t\t\t\t\"Unexpected Error while fetching Environments\",\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\tif (res.ok) {\n\t\t\tconst json = await res.json();\n\n\t\t\tconst { value, error } = decode(\n\t\t\t\tt.union([\n\t\t\t\t\tt.type({\n\t\t\t\t\t\tresults: t.array(Environment),\n\t\t\t\t\t}),\n\t\t\t\t\tt.type({\n\t\t\t\t\t\terror: t.literal(\"invalid_token\"),\n\t\t\t\t\t}),\n\t\t\t\t]),\n\t\t\t\tjson,\n\t\t\t);\n\n\t\t\tif (error) {\n\t\t\t\treturn {\n\t\t\t\t\terror: new UnexpectedDataError(\n\t\t\t\t\t\t`Failed to decode environments: ${error.errors.join(\", \")}`,\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (\"results\" in value) {\n\t\t\t\treturn { environments: sortEnvironments(value.results) };\n\t\t\t}\n\t\t}\n\n\t\tswitch (res.status) {\n\t\t\tcase 400:\n\t\t\tcase 401:\n\t\t\t\treturn { error: new UnauthenticatedError() };\n\t\t\tcase 403:\n\t\t\t\treturn { error: new UnauthorizedError() };\n\t\t\tdefault:\n\t\t\t\treturn { error: new Error(\"Failed to fetch environments.\") };\n\t\t}\n\t}\n\n\tprivate _decodeLimitOrThrow(\n\t\tpotentialLimit: unknown,\n\t\tstatusCode: number,\n\t\tlimitType: LimitType,\n\t): Limit | null {\n\t\treturn fold<t.Errors, RawLimit, Limit | null>(\n\t\t\t() => {\n\t\t\t\tconst error: ClientError = {\n\t\t\t\t\tstatus: statusCode,\n\t\t\t\t\tmessage: `Unable to parse raw limit from ${JSON.stringify(\n\t\t\t\t\t\tpotentialLimit,\n\t\t\t\t\t)}`,\n\t\t\t\t};\n\t\t\t\tthrow error;\n\t\t\t},\n\t\t\t(rawLimit: RawLimit) => {\n\t\t\t\tconst limit = { ...rawLimit, type: limitType };\n\n\t\t\t\treturn limit;\n\t\t\t},\n\t\t)(RawLimit.decode(potentialLimit));\n\t}\n\n\tprivate async _fetch(args: {\n\t\turl: URL;\n\t\tmethod?: \"GET\" | \"POST\";\n\t\tbody?: unknown;\n\t\tuserAgent?: PrismicRepositoryUserAgents;\n\t\trepository?: string;\n\t\tskipAuthentication?: boolean;\n\t}): Promise<Response> {\n\t\tlet cookies;\n\t\ttry {\n\t\t\tcookies = await this.user.getAuthenticationCookies();\n\t\t} catch (e) {\n\t\t\tif (!args.skipAuthentication) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\n\t\tconst extraHeaders: Record<string, string> = {};\n\n\t\tif (args.body) {\n\t\t\textraHeaders[\"Content-Type\"] = \"application/json\";\n\t\t}\n\n\t\tif (args.repository) {\n\t\t\textraHeaders.repository = args.repository;\n\t\t}\n\n\t\treturn await fetch(args.url.toString(), {\n\t\t\tmethod: args.method,\n\t\t\tbody: args.body ? JSON.stringify(args.body) : undefined,\n\t\t\theaders: {\n\t\t\t\t// Some endpoints rely on the authorization header...\n\n\t\t\t\t...(cookies !== undefined\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tAuthorization: `Bearer ${cookies[\"prismic-auth\"]}`,\n\t\t\t\t\t\t\tCookie: serializeCookies(cookies),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t\"User-Agent\": args.userAgent || SLICE_MACHINE_USER_AGENT,\n\t\t\t\t...extraHeaders,\n\t\t\t},\n\t\t});\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyCA,MAAM,8BAA8B;AAAA,EACnC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;;AA6BD,MAAO,iCAAiC,YAAW;AAAA;AAAA;AAAA,EAIxD,MAAM,UAAO;AACZ,UAAM,MAAM,IAAI,IAAI,kBAAkB,cAAc,WAAW;AAC/D,UAAM,MAAM,MAAM,KAAK,OAAO,EAAE,IAAK,CAAA;AAErC,QAAI,IAAI,IAAI;AACL,YAAA,OAAO,MAAM,IAAI;AACjB,YAAA,EAAE,OAAO,cAAc,UAAU,OACtC,EAAE,MAAM,iBAAiB,GACzB,IAAI;AAGL,UAAI,OAAO;AACV,cAAM,IAAI,MACT,kCAAkC,MAAM,OAAO,KAAK,IAAI,GAAG;AAAA,MAE5D;AAEM,aAAA;AAAA,IAAA,OACD;AACA,YAAA,OAAO,MAAM,IAAI;AACvB,YAAM,IAAI,MAAM,+BAA+B,EAAE,OAAO,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,MAAM,KAAK,IAAI,YAAY;AAAA,MACvC,QAAQ,KAAK;AAAA,MACb,MAAM,KAAK,OAAO,KAAK,UAAU,KAAK,IAAI,IAAI;AAAA,MAC9C,SAAS;AAAA;AAAA,QAGR,GAAI,YAAY,SACb;AAAA,UACA,eAAe,UAAU,QAAQ,cAAc;AAAA,UAC/C,QAAQ,iBAAiB,OAAO;AAAA,QAAA,IAEhC;QACH,cAAc,KAAK,aAAa;AAAA,QAChC,GAAG;AAAA,MACH;AAAA,IAAA,CACD;AAAA,EACF;AACA;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function sortEnvironments(environments) {
|
|
4
|
+
return [...environments].sort((a, b) => {
|
|
5
|
+
switch (a.kind) {
|
|
6
|
+
case "prod": {
|
|
7
|
+
return -1;
|
|
8
|
+
}
|
|
9
|
+
case "stage": {
|
|
10
|
+
switch (b.kind) {
|
|
11
|
+
case "prod": {
|
|
12
|
+
return 1;
|
|
13
|
+
}
|
|
14
|
+
case "stage": {
|
|
15
|
+
return a.name.localeCompare(b.name);
|
|
16
|
+
}
|
|
17
|
+
case "dev":
|
|
18
|
+
default: {
|
|
19
|
+
return -1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
case "dev": {
|
|
24
|
+
return 1;
|
|
25
|
+
}
|
|
26
|
+
default: {
|
|
27
|
+
if (b.kind === void 0) {
|
|
28
|
+
return a.name.localeCompare(b.name);
|
|
29
|
+
}
|
|
30
|
+
return 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
exports.sortEnvironments = sortEnvironments;
|
|
36
|
+
//# sourceMappingURL=sortEnvironments.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortEnvironments.cjs","sources":["../../../../src/managers/prismicRepository/sortEnvironments.ts"],"sourcesContent":["import { Environment } from \"./types\";\n\n/**\n * Sorts a list of environments using the following criteria:\n *\n * - The production environment is always first.\n * - Staging environments are always after production, before development\n * environments, and sorted alphabetically by name.\n * - The development environment is always last.\n *\n * It assumes the list of environments contains one production environment and\n * at most one dev environment.\n *\n * @param environments - The environments to sort.\n *\n * @returns The sorted environments.\n */\nexport function sortEnvironments(environments: Environment[]): Environment[] {\n\treturn [...environments].sort((a, b) => {\n\t\tswitch (a.kind) {\n\t\t\tcase \"prod\": {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tcase \"stage\": {\n\t\t\t\tswitch (b.kind) {\n\t\t\t\t\tcase \"prod\": {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase \"stage\": {\n\t\t\t\t\t\treturn a.name.localeCompare(b.name);\n\t\t\t\t\t}\n\n\t\t\t\t\tcase \"dev\":\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcase \"dev\": {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tif (b.kind === undefined) {\n\t\t\t\t\treturn a.name.localeCompare(b.name);\n\t\t\t\t}\n\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t});\n}\n"],"names":[],"mappings":";;AAiBM,SAAU,iBAAiB,cAA2B;AAC3D,SAAO,CAAC,GAAG,YAAY,EAAE,KAAK,CAAC,GAAG,MAAK;AACtC,YAAQ,EAAE,MAAM;AAAA,MACf,KAAK,QAAQ;AACL,eAAA;AAAA,MACP;AAAA,MAED,KAAK,SAAS;AACb,gBAAQ,EAAE,MAAM;AAAA,UACf,KAAK,QAAQ;AACL,mBAAA;AAAA,UACP;AAAA,UAED,KAAK,SAAS;AACb,mBAAO,EAAE,KAAK,cAAc,EAAE,IAAI;AAAA,UAClC;AAAA,UAED,KAAK;AAAA,UACL,SAAS;AACD,mBAAA;AAAA,UACP;AAAA,QACD;AAAA,MACD;AAAA,MAED,KAAK,OAAO;AACJ,eAAA;AAAA,MACP;AAAA,MAED,SAAS;AACJ,YAAA,EAAE,SAAS,QAAW;AACzB,iBAAO,EAAE,KAAK,cAAc,EAAE,IAAI;AAAA,QAClC;AAEM,eAAA;AAAA,MACP;AAAA,IACD;AAAA,EAAA,CACD;AACF;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Environment } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Sorts a list of environments using the following criteria:
|
|
4
|
+
*
|
|
5
|
+
* - The production environment is always first.
|
|
6
|
+
* - Staging environments are always after production, before development
|
|
7
|
+
* environments, and sorted alphabetically by name.
|
|
8
|
+
* - The development environment is always last.
|
|
9
|
+
*
|
|
10
|
+
* It assumes the list of environments contains one production environment and
|
|
11
|
+
* at most one dev environment.
|
|
12
|
+
*
|
|
13
|
+
* @param environments - The environments to sort.
|
|
14
|
+
*
|
|
15
|
+
* @returns The sorted environments.
|
|
16
|
+
*/
|
|
17
|
+
export declare function sortEnvironments(environments: Environment[]): Environment[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function sortEnvironments(environments) {
|
|
2
|
+
return [...environments].sort((a, b) => {
|
|
3
|
+
switch (a.kind) {
|
|
4
|
+
case "prod": {
|
|
5
|
+
return -1;
|
|
6
|
+
}
|
|
7
|
+
case "stage": {
|
|
8
|
+
switch (b.kind) {
|
|
9
|
+
case "prod": {
|
|
10
|
+
return 1;
|
|
11
|
+
}
|
|
12
|
+
case "stage": {
|
|
13
|
+
return a.name.localeCompare(b.name);
|
|
14
|
+
}
|
|
15
|
+
case "dev":
|
|
16
|
+
default: {
|
|
17
|
+
return -1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
case "dev": {
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
default: {
|
|
25
|
+
if (b.kind === void 0) {
|
|
26
|
+
return a.name.localeCompare(b.name);
|
|
27
|
+
}
|
|
28
|
+
return 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
sortEnvironments
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=sortEnvironments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortEnvironments.js","sources":["../../../../src/managers/prismicRepository/sortEnvironments.ts"],"sourcesContent":["import { Environment } from \"./types\";\n\n/**\n * Sorts a list of environments using the following criteria:\n *\n * - The production environment is always first.\n * - Staging environments are always after production, before development\n * environments, and sorted alphabetically by name.\n * - The development environment is always last.\n *\n * It assumes the list of environments contains one production environment and\n * at most one dev environment.\n *\n * @param environments - The environments to sort.\n *\n * @returns The sorted environments.\n */\nexport function sortEnvironments(environments: Environment[]): Environment[] {\n\treturn [...environments].sort((a, b) => {\n\t\tswitch (a.kind) {\n\t\t\tcase \"prod\": {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tcase \"stage\": {\n\t\t\t\tswitch (b.kind) {\n\t\t\t\t\tcase \"prod\": {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase \"stage\": {\n\t\t\t\t\t\treturn a.name.localeCompare(b.name);\n\t\t\t\t\t}\n\n\t\t\t\t\tcase \"dev\":\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcase \"dev\": {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tif (b.kind === undefined) {\n\t\t\t\t\treturn a.name.localeCompare(b.name);\n\t\t\t\t}\n\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t});\n}\n"],"names":[],"mappings":"AAiBM,SAAU,iBAAiB,cAA2B;AAC3D,SAAO,CAAC,GAAG,YAAY,EAAE,KAAK,CAAC,GAAG,MAAK;AACtC,YAAQ,EAAE,MAAM;AAAA,MACf,KAAK,QAAQ;AACL,eAAA;AAAA,MACP;AAAA,MAED,KAAK,SAAS;AACb,gBAAQ,EAAE,MAAM;AAAA,UACf,KAAK,QAAQ;AACL,mBAAA;AAAA,UACP;AAAA,UAED,KAAK,SAAS;AACb,mBAAO,EAAE,KAAK,cAAc,EAAE,IAAI;AAAA,UAClC;AAAA,UAED,KAAK;AAAA,UACL,SAAS;AACD,mBAAA;AAAA,UACP;AAAA,QACD;AAAA,MACD;AAAA,MAED,KAAK,OAAO;AACJ,eAAA;AAAA,MACP;AAAA,MAED,SAAS;AACJ,YAAA,EAAE,SAAS,QAAW;AACzB,iBAAO,EAAE,KAAK,cAAc,EAAE,IAAI;AAAA,QAClC;AAEM,eAAA;AAAA,MACP;AAAA,IACD;AAAA,EAAA,CACD;AACF;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const t = require("io-ts");
|
|
4
|
+
function _interopNamespaceDefault(e) {
|
|
5
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
6
|
+
if (e) {
|
|
7
|
+
for (const k in e) {
|
|
8
|
+
if (k !== "default") {
|
|
9
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: () => e[k]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
n.default = e;
|
|
18
|
+
return Object.freeze(n);
|
|
19
|
+
}
|
|
20
|
+
const t__namespace = /* @__PURE__ */ _interopNamespaceDefault(t);
|
|
21
|
+
const PrismicRepositoryUserAgent = {
|
|
22
|
+
SliceMachine: "prismic-cli/sm",
|
|
23
|
+
LegacyZero: "prismic-cli/0"
|
|
24
|
+
};
|
|
25
|
+
const PrismicRepositoryRole = {
|
|
26
|
+
SuperUser: "SuperUser",
|
|
27
|
+
Administrator: "Administrator",
|
|
28
|
+
Owner: "Owner",
|
|
29
|
+
Manager: "Manager",
|
|
30
|
+
Publisher: "Publisher",
|
|
31
|
+
Writer: "Writer",
|
|
32
|
+
Readonly: "Readonly"
|
|
33
|
+
};
|
|
34
|
+
const PrismicRepository = t__namespace.type({
|
|
35
|
+
domain: t__namespace.string,
|
|
36
|
+
name: t__namespace.string,
|
|
37
|
+
role: t__namespace.union([
|
|
38
|
+
t__namespace.keyof(PrismicRepositoryRole),
|
|
39
|
+
t__namespace.record(t__namespace.string, t__namespace.keyof(PrismicRepositoryRole))
|
|
40
|
+
])
|
|
41
|
+
});
|
|
42
|
+
exports.ChangeTypes = void 0;
|
|
43
|
+
(function(ChangeTypes2) {
|
|
44
|
+
ChangeTypes2["SLICE_INSERT"] = "SLICE_INSERT";
|
|
45
|
+
ChangeTypes2["SLICE_UPDATE"] = "SLICE_UPDATE";
|
|
46
|
+
ChangeTypes2["SLICE_DELETE"] = "SLICE_DELETE";
|
|
47
|
+
ChangeTypes2["CUSTOM_TYPE_INSERT"] = "CUSTOM_TYPE_INSERT";
|
|
48
|
+
ChangeTypes2["CUSTOM_TYPE_UPDATE"] = "CUSTOM_TYPE_UPDATE";
|
|
49
|
+
ChangeTypes2["CUSTOM_TYPE_DELETE"] = "CUSTOM_TYPE_DELETE";
|
|
50
|
+
})(exports.ChangeTypes || (exports.ChangeTypes = {}));
|
|
51
|
+
const RawLimit = t__namespace.type({
|
|
52
|
+
details: t__namespace.type({
|
|
53
|
+
customTypes: t__namespace.array(t__namespace.type({
|
|
54
|
+
id: t__namespace.string,
|
|
55
|
+
numberOfDocuments: t__namespace.number,
|
|
56
|
+
url: t__namespace.string
|
|
57
|
+
}))
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
exports.LimitType = void 0;
|
|
61
|
+
(function(LimitType2) {
|
|
62
|
+
LimitType2["SOFT"] = "SOFT";
|
|
63
|
+
LimitType2["HARD"] = "HARD";
|
|
64
|
+
})(exports.LimitType || (exports.LimitType = {}));
|
|
65
|
+
const Environment = t__namespace.type({
|
|
66
|
+
kind: t__namespace.union([t__namespace.literal("prod"), t__namespace.literal("stage"), t__namespace.literal("dev")]),
|
|
67
|
+
name: t__namespace.string,
|
|
68
|
+
domain: t__namespace.string,
|
|
69
|
+
users: t__namespace.array(t__namespace.type({
|
|
70
|
+
id: t__namespace.string
|
|
71
|
+
}))
|
|
72
|
+
});
|
|
73
|
+
exports.Environment = Environment;
|
|
74
|
+
exports.PrismicRepository = PrismicRepository;
|
|
75
|
+
exports.PrismicRepositoryRole = PrismicRepositoryRole;
|
|
76
|
+
exports.PrismicRepositoryUserAgent = PrismicRepositoryUserAgent;
|
|
77
|
+
exports.RawLimit = RawLimit;
|
|
78
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../../../src/managers/prismicRepository/types.ts"],"sourcesContent":["import {\n\tCustomType,\n\tSharedSlice,\n} from \"@prismicio/types-internal/lib/customtypes\";\nimport * as t from \"io-ts\";\n\nexport const PrismicRepositoryUserAgent = {\n\tSliceMachine: \"prismic-cli/sm\",\n\tLegacyZero: \"prismic-cli/0\",\n} as const;\nexport type PrismicRepositoryUserAgents =\n\t(typeof PrismicRepositoryUserAgent)[keyof typeof PrismicRepositoryUserAgent];\n\nexport const PrismicRepositoryRole = {\n\tSuperUser: \"SuperUser\",\n\tAdministrator: \"Administrator\",\n\tOwner: \"Owner\",\n\tManager: \"Manager\",\n\tPublisher: \"Publisher\",\n\tWriter: \"Writer\",\n\tReadonly: \"Readonly\",\n} as const;\nexport type PrismicRepositoryRoles =\n\t(typeof PrismicRepositoryRole)[keyof typeof PrismicRepositoryRole];\n\nexport const PrismicRepository = t.type({\n\tdomain: t.string,\n\tname: t.string,\n\trole: t.union([\n\t\tt.keyof(PrismicRepositoryRole),\n\t\tt.record(t.string, t.keyof(PrismicRepositoryRole)),\n\t]),\n});\nexport type PrismicRepository = t.TypeOf<typeof PrismicRepository>;\n\nexport enum ChangeTypes {\n\tSLICE_INSERT = \"SLICE_INSERT\",\n\tSLICE_UPDATE = \"SLICE_UPDATE\",\n\tSLICE_DELETE = \"SLICE_DELETE\",\n\tCUSTOM_TYPE_INSERT = \"CUSTOM_TYPE_INSERT\",\n\tCUSTOM_TYPE_UPDATE = \"CUSTOM_TYPE_UPDATE\",\n\tCUSTOM_TYPE_DELETE = \"CUSTOM_TYPE_DELETE\",\n}\ninterface Change {\n\ttype: ChangeTypes;\n\tid: string;\n\tpayload: Record<string, unknown>;\n}\ninterface DeleteChange extends Change {\n\tpayload: {\n\t\tid: Change[\"id\"];\n\t};\n}\nexport interface SliceInsertChange extends Change {\n\ttype: ChangeTypes.SLICE_INSERT;\n\tpayload: SharedSlice;\n}\nexport interface SliceUpdateChange extends Change {\n\ttype: ChangeTypes.SLICE_UPDATE;\n\tpayload: SharedSlice;\n}\nexport interface SliceDeleteChange extends DeleteChange {\n\ttype: ChangeTypes.SLICE_DELETE;\n}\nexport interface CustomTypeInsertChange extends Change {\n\ttype: ChangeTypes.CUSTOM_TYPE_INSERT;\n\tpayload: CustomType;\n}\nexport interface CustomTypeUpdateChange extends Change {\n\ttype: ChangeTypes.CUSTOM_TYPE_UPDATE;\n\tpayload: CustomType;\n}\nexport interface CustomTypeDeleteChange extends DeleteChange {\n\ttype: ChangeTypes.CUSTOM_TYPE_DELETE;\n}\nexport type AllChangeTypes =\n\t| SliceInsertChange\n\t| SliceUpdateChange\n\t| SliceDeleteChange\n\t| CustomTypeInsertChange\n\t| CustomTypeUpdateChange\n\t| CustomTypeDeleteChange;\nexport interface BulkBody extends Record<string, unknown> {\n\tconfirmDeleteDocuments: boolean;\n\tchanges: AllChangeTypes[];\n}\n\nexport const RawLimit = t.type({\n\tdetails: t.type({\n\t\tcustomTypes: t.array(\n\t\t\tt.type({\n\t\t\t\tid: t.string,\n\t\t\t\tnumberOfDocuments: t.number,\n\t\t\t\turl: t.string,\n\t\t\t}),\n\t\t),\n\t}),\n});\nexport type RawLimit = t.TypeOf<typeof RawLimit>;\nexport enum LimitType {\n\tSOFT = \"SOFT\",\n\tHARD = \"HARD\",\n}\nexport type Limit = RawLimit & {\n\ttype: LimitType;\n};\n\nexport interface ClientError {\n\tstatus: number;\n\tmessage: string;\n}\n\ntype ChangeStatus = \"NEW\" | \"MODIFIED\" | \"DELETED\";\n\ntype CustomTypeChange = {\n\tid: string;\n\ttype: \"CustomType\";\n\tstatus: ChangeStatus;\n};\n\ntype SliceChange = {\n\tid: string;\n\ttype: \"Slice\";\n\tstatus: ChangeStatus;\n\tlibraryID: string;\n};\n\nexport type TransactionalMergeArgs = {\n\tconfirmDeleteDocuments: boolean;\n\tchanges: (CustomTypeChange | SliceChange)[];\n};\n\nexport type TransactionalMergeReturnType = Limit | null;\n\n/**\n * Framework id sent to Segment from wroom. Property used for the \"framework\"\n * and \"hasSlicemachine\" properties.\n *\n * Values from:\n * https://github.com/prismicio/wroom/blob/65d4f53fd46df7d366d80e7ba9c965339ac7369d/subprojects/common/app/models/Framework.scala#LL20C6-L20C6\n */\nexport type FrameworkWroomTelemetryID = \"next\" | \"nuxt\" | \"sveltekit\" | \"other\";\n\n/**\n * Starter id sent to Segment from wroom.Property used for the \"starter\"\n * properties.\n *\n * Values from:\n * https://github.com/prismicio/wroom/blob/65d4f53fd46df7d366d80e7ba9c965339ac7369d/conf/application.conf#L938\n */\nexport type StarterId =\n\t| \"next_multi_page\"\n\t| \"next_blog\"\n\t| \"next_multi_lang\"\n\t| \"nuxt_multi_page\"\n\t| \"nuxt_blog\"\n\t| \"nuxt_multi_lang\";\n\nexport const Environment = t.type({\n\tkind: t.union([t.literal(\"prod\"), t.literal(\"stage\"), t.literal(\"dev\")]),\n\tname: t.string,\n\tdomain: t.string,\n\tusers: t.array(\n\t\tt.type({\n\t\t\tid: t.string,\n\t\t}),\n\t),\n});\nexport type Environment = t.Type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