@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
package/src/errors.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { HookError } from "@slicemachine/plugin-kit";
|
|
2
|
+
|
|
3
|
+
export class SliceMachineError extends Error {
|
|
4
|
+
_sliceMachineError = true;
|
|
5
|
+
name = "SliceMachineError";
|
|
6
|
+
}
|
|
7
|
+
export class UnauthorizedError extends SliceMachineError {
|
|
8
|
+
name = "UnauthorizedError";
|
|
9
|
+
}
|
|
10
|
+
export class UnauthenticatedError extends SliceMachineError {
|
|
11
|
+
name = "UnauthenticatedError";
|
|
12
|
+
message = "Authenticate before trying again.";
|
|
13
|
+
}
|
|
14
|
+
export class NotFoundError extends SliceMachineError {
|
|
15
|
+
name = "NotFoundError";
|
|
16
|
+
}
|
|
17
|
+
export class UnexpectedDataError extends SliceMachineError {
|
|
18
|
+
name = "UnexpectedDataError";
|
|
19
|
+
}
|
|
20
|
+
export class InternalError extends SliceMachineError {
|
|
21
|
+
name = "InternalError";
|
|
22
|
+
}
|
|
23
|
+
export class PluginError extends SliceMachineError {
|
|
24
|
+
name = "PluginError";
|
|
25
|
+
}
|
|
26
|
+
export class PluginHookResultError extends SliceMachineError {
|
|
27
|
+
name = "PluginHookResultError";
|
|
28
|
+
|
|
29
|
+
constructor(errors: HookError[]) {
|
|
30
|
+
super(
|
|
31
|
+
`${errors.length} error${
|
|
32
|
+
errors.length === 1 ? "" : "s"
|
|
33
|
+
} were returned by one or more plugins.`,
|
|
34
|
+
{
|
|
35
|
+
cause: errors,
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const isSliceMachineError = (
|
|
42
|
+
error: unknown,
|
|
43
|
+
): error is SliceMachineError => {
|
|
44
|
+
// TODO: Discuss a stronger way to serialize error for the client to detect with r19
|
|
45
|
+
// @ts-expect-error We don't want to add "dom" to tsconfig "lib" because of the TODO
|
|
46
|
+
if (typeof window !== "undefined") {
|
|
47
|
+
return typeof error === "object" && error !== null;
|
|
48
|
+
} else {
|
|
49
|
+
return (
|
|
50
|
+
typeof error === "object" &&
|
|
51
|
+
error !== null &&
|
|
52
|
+
"_sliceMachineError" in error
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const isUnauthorizedError = (
|
|
58
|
+
error: unknown,
|
|
59
|
+
): error is UnauthorizedError => {
|
|
60
|
+
return isSliceMachineError(error) && error.name === UnauthorizedError.name;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const isUnauthenticatedError = (
|
|
64
|
+
error: unknown,
|
|
65
|
+
): error is UnauthenticatedError => {
|
|
66
|
+
return isSliceMachineError(error) && error.name === UnauthenticatedError.name;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const isNotFoundError = (error: unknown): error is NotFoundError => {
|
|
70
|
+
return isSliceMachineError(error) && error.name === NotFoundError.name;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const isUnexpectedDataError = (
|
|
74
|
+
error: unknown,
|
|
75
|
+
): error is UnexpectedDataError => {
|
|
76
|
+
return isSliceMachineError(error) && error.name === UnexpectedDataError.name;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const isInternalError = (error: unknown): error is InternalError => {
|
|
80
|
+
return isSliceMachineError(error) && error.name === InternalError.name;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const isPluginError = (error: unknown): error is PluginError => {
|
|
84
|
+
return isSliceMachineError(error) && error.name === PluginError.name;
|
|
85
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// This file defines the root `@slicemachine/manager` export.
|
|
2
|
+
// Non-Node.js-compatible exports should be defined in `./client.ts`.
|
|
3
|
+
|
|
4
|
+
export type { CustomTypeFormat } from "./managers/customTypes/types";
|
|
5
|
+
export type {
|
|
6
|
+
PrismicRepository,
|
|
7
|
+
FrameworkWroomTelemetryID,
|
|
8
|
+
StarterId,
|
|
9
|
+
} from "./managers/prismicRepository/types";
|
|
10
|
+
|
|
11
|
+
export type { SliceMachineManager } from "./managers/SliceMachineManager";
|
|
12
|
+
export { createSliceMachineManager } from "./managers/createSliceMachineManager";
|
|
13
|
+
export { createSliceMachineManagerMiddleware } from "./managers/createSliceMachineManagerMiddleware";
|
|
14
|
+
export type { CreateSliceMachineManagerMiddlewareArgs } from "./managers/createSliceMachineManagerMiddleware";
|
|
15
|
+
|
|
16
|
+
export type { Environment } from "./managers/prismicRepository/types";
|
|
17
|
+
|
|
18
|
+
export type {
|
|
19
|
+
PrismicAuthManager,
|
|
20
|
+
PrismicUserProfile,
|
|
21
|
+
PrismicAuthState,
|
|
22
|
+
} from "./auth/PrismicAuthManager";
|
|
23
|
+
export { createPrismicAuthManager } from "./auth/createPrismicAuthManager";
|
|
24
|
+
export { createPrismicAuthManagerMiddleware } from "./auth/createPrismicAuthManagerMiddleware";
|
|
25
|
+
export type {
|
|
26
|
+
CreatePrismicAuthManagerMiddlewareArgs,
|
|
27
|
+
PrismicAuthCheckStatusResponse,
|
|
28
|
+
} from "./auth/createPrismicAuthManagerMiddleware";
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
SliceMachineError,
|
|
32
|
+
UnauthorizedError,
|
|
33
|
+
UnauthenticatedError,
|
|
34
|
+
NotFoundError,
|
|
35
|
+
UnexpectedDataError,
|
|
36
|
+
InternalError,
|
|
37
|
+
PluginError,
|
|
38
|
+
PluginHookResultError,
|
|
39
|
+
} from "./errors";
|
|
40
|
+
|
|
41
|
+
export { DecodeError } from "./lib/DecodeError";
|
|
42
|
+
|
|
43
|
+
export type { SliceMachineConfig, PackageManager } from "./types";
|
|
44
|
+
export type { APIEndpoints } from "./constants/API_ENDPOINTS";
|
|
45
|
+
|
|
46
|
+
export { REPOSITORY_NAME_VALIDATION } from "./constants/REPOSITORY_NAME_VALIDATION";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { formatValidationErrors } from "io-ts-reporters";
|
|
3
|
+
|
|
4
|
+
type DecodeErrorConstructorArgs<TInput = unknown> = {
|
|
5
|
+
input: TInput;
|
|
6
|
+
errors: t.Errors;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export class DecodeError<TInput = unknown> extends Error {
|
|
10
|
+
name = "DecodeError";
|
|
11
|
+
input: TInput;
|
|
12
|
+
errors: string[];
|
|
13
|
+
|
|
14
|
+
constructor(args: DecodeErrorConstructorArgs<TInput>) {
|
|
15
|
+
const formattedErrors = formatValidationErrors(args.errors);
|
|
16
|
+
|
|
17
|
+
super(formattedErrors.join(", "));
|
|
18
|
+
|
|
19
|
+
this.input = args.input;
|
|
20
|
+
this.errors = formattedErrors;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SliceMachinePluginRunner } from "@slicemachine/plugin-kit";
|
|
2
|
+
|
|
3
|
+
export function assertPluginsInitialized(
|
|
4
|
+
pluginRunner: SliceMachinePluginRunner | undefined,
|
|
5
|
+
): asserts pluginRunner is NonNullable<typeof pluginRunner> {
|
|
6
|
+
if (pluginRunner == undefined) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"Plugins have not been initialized. Run `SliceMachineManager.plugins.prototype.initPlugins()` before re-calling this method.",
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import * as t from "io-ts";
|
|
3
|
+
|
|
4
|
+
export const bufferCodec = new t.Type<Buffer, Buffer, unknown>(
|
|
5
|
+
"Buffer",
|
|
6
|
+
(input): input is Buffer => Buffer.isBuffer(input),
|
|
7
|
+
(input, context) =>
|
|
8
|
+
Buffer.isBuffer(input) ? t.success(input) : t.failure(input, context),
|
|
9
|
+
t.identity,
|
|
10
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { API_ENDPOINTS } from "../constants/API_ENDPOINTS";
|
|
2
|
+
|
|
3
|
+
export type BuildPrismicRepositoryAPIEndpointConfig = {
|
|
4
|
+
withCDN?: boolean;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const buildPrismicRepositoryAPIEndpoint = (
|
|
8
|
+
repositoryName: string,
|
|
9
|
+
{ withCDN = true }: BuildPrismicRepositoryAPIEndpointConfig = {},
|
|
10
|
+
): string => {
|
|
11
|
+
const baseEndpoint = new URL(API_ENDPOINTS.PrismicWroom);
|
|
12
|
+
|
|
13
|
+
return `${baseEndpoint.protocol}//${repositoryName}${withCDN ? ".cdn" : ""}.${
|
|
14
|
+
baseEndpoint.host
|
|
15
|
+
}/api/v2`;
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as crypto from "node:crypto";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Creates a content digest for a given input.
|
|
5
|
+
*
|
|
6
|
+
* @param input - The value used to create a digest digest.
|
|
7
|
+
*
|
|
8
|
+
* @returns The content digest of `input`.
|
|
9
|
+
*/
|
|
10
|
+
export const createContentDigest = (input: crypto.BinaryLike): string => {
|
|
11
|
+
return crypto.createHash("sha1").update(input).digest("hex");
|
|
12
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import * as E from "fp-ts/Either";
|
|
3
|
+
import { pipe } from "fp-ts/function";
|
|
4
|
+
|
|
5
|
+
import { DecodeError } from "./DecodeError";
|
|
6
|
+
|
|
7
|
+
export type DecodeReturnType<A, _O, I> =
|
|
8
|
+
| {
|
|
9
|
+
value: A;
|
|
10
|
+
error?: never;
|
|
11
|
+
}
|
|
12
|
+
| {
|
|
13
|
+
value?: never;
|
|
14
|
+
error: DecodeError<I>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const decode = <A, O, I>(
|
|
18
|
+
codec: t.Type<A, O, I>,
|
|
19
|
+
input: I,
|
|
20
|
+
): DecodeReturnType<A, O, I> => {
|
|
21
|
+
return pipe(
|
|
22
|
+
codec.decode(input),
|
|
23
|
+
E.foldW(
|
|
24
|
+
(errors) => {
|
|
25
|
+
return {
|
|
26
|
+
error: new DecodeError({ input, errors }),
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
(value) => {
|
|
30
|
+
return {
|
|
31
|
+
value,
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { CallHookReturnType, HookError } from "@slicemachine/plugin-kit";
|
|
3
|
+
|
|
4
|
+
import { DecodeError } from "./DecodeError";
|
|
5
|
+
import { decode } from "./decode";
|
|
6
|
+
|
|
7
|
+
export const decodeHookResult = <
|
|
8
|
+
A,
|
|
9
|
+
O,
|
|
10
|
+
I,
|
|
11
|
+
THookResult extends Awaited<CallHookReturnType>,
|
|
12
|
+
>(
|
|
13
|
+
codec: t.Type<A, O, I>,
|
|
14
|
+
hookResult: THookResult,
|
|
15
|
+
): {
|
|
16
|
+
data: A[];
|
|
17
|
+
errors: (HookError | DecodeError<I>)[];
|
|
18
|
+
} => {
|
|
19
|
+
const data: A[] = [];
|
|
20
|
+
const errors: DecodeError<I>[] = [];
|
|
21
|
+
|
|
22
|
+
for (const dataElement of hookResult.data) {
|
|
23
|
+
const { value, error } = decode(codec, dataElement);
|
|
24
|
+
|
|
25
|
+
if (error) {
|
|
26
|
+
errors.push(error);
|
|
27
|
+
} else {
|
|
28
|
+
data.push(value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
data,
|
|
34
|
+
errors: [...errors, ...hookResult.errors],
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
|
|
3
|
+
import { decode, DecodeReturnType } from "./decode";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A minimally defined codec for package.json files. Only data needed for
|
|
7
|
+
* version detection is defined.
|
|
8
|
+
*/
|
|
9
|
+
const PackageJSONCodec = t.type({
|
|
10
|
+
version: t.string,
|
|
11
|
+
});
|
|
12
|
+
type PackageJSON = t.TypeOf<typeof PackageJSONCodec>;
|
|
13
|
+
|
|
14
|
+
export const decodePackageJSON = (
|
|
15
|
+
input: unknown,
|
|
16
|
+
): DecodeReturnType<PackageJSON, PackageJSON, unknown> => {
|
|
17
|
+
return decode(PackageJSONCodec, input);
|
|
18
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
|
|
3
|
+
import { SliceMachineConfig } from "../types";
|
|
4
|
+
|
|
5
|
+
import { decode, DecodeReturnType } from "./decode";
|
|
6
|
+
|
|
7
|
+
const SliceMachineConfigPluginRegistrationCodec = t.union([
|
|
8
|
+
t.string,
|
|
9
|
+
t.intersection([
|
|
10
|
+
t.type({
|
|
11
|
+
resolve: t.string,
|
|
12
|
+
}),
|
|
13
|
+
t.partial({
|
|
14
|
+
options: t.UnknownRecord,
|
|
15
|
+
}),
|
|
16
|
+
]),
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
const SliceMachineConfigCodec = t.intersection([
|
|
20
|
+
t.type({
|
|
21
|
+
repositoryName: t.string,
|
|
22
|
+
adapter: SliceMachineConfigPluginRegistrationCodec,
|
|
23
|
+
}),
|
|
24
|
+
t.partial({
|
|
25
|
+
apiEndpoint: t.string,
|
|
26
|
+
libraries: t.array(t.string),
|
|
27
|
+
localSliceSimulatorURL: t.string,
|
|
28
|
+
plugins: t.array(SliceMachineConfigPluginRegistrationCodec),
|
|
29
|
+
labs: t.partial({ legacySliceUpgrader: t.boolean }),
|
|
30
|
+
}),
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
// TODO: Maybe rename "decode" to "validate". "decode" exposes the `io-ts`
|
|
34
|
+
// internals.
|
|
35
|
+
export const decodeSliceMachineConfig = (
|
|
36
|
+
input: unknown,
|
|
37
|
+
): DecodeReturnType<SliceMachineConfig, SliceMachineConfig, unknown> => {
|
|
38
|
+
return decode(SliceMachineConfigCodec, input);
|
|
39
|
+
};
|
package/src/lib/fetch.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// This temporary wrapper around `node-fetch` fixes an issue where quick
|
|
2
|
+
// consecutive network requests cause failed requests.
|
|
3
|
+
//
|
|
4
|
+
// See https://github.com/node-fetch/node-fetch/issues/1735 for more details.
|
|
5
|
+
//
|
|
6
|
+
// TODO: Remove this wrapper and replace all imports with `node-fetch` if https://github.com/node-fetch/node-fetch/pull/1736 is merged.
|
|
7
|
+
|
|
8
|
+
import * as http from "node:http";
|
|
9
|
+
import * as https from "node:https";
|
|
10
|
+
import baseFetch from "node-fetch";
|
|
11
|
+
|
|
12
|
+
export * from "node-fetch";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The default HTTP Agent with `keepAlive: true` used in `fetch()` requests.
|
|
16
|
+
*/
|
|
17
|
+
const DEFAULT_HTTP_AGENT = new http.Agent({ keepAlive: true });
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The default HTTPS Agent with `keepAlive: true` used in `fetch()` requests.
|
|
21
|
+
*/
|
|
22
|
+
const DEFAULT_HTTPS_AGENT = new https.Agent({ keepAlive: true });
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Patched `fetch()` from `node-fetch` that fixes a bug where quick consecutive
|
|
26
|
+
* network requests cause failed requests.
|
|
27
|
+
*
|
|
28
|
+
* Use this `fetch()` in place of `node-fetch`'s `fetch()`.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* `fetch()` is patched by setting an HTTP/HTTPS Agent with `keepAlive: true`.
|
|
32
|
+
* If you need to assign an Agent, be sure to retain the `keepAlive: true`
|
|
33
|
+
* option.
|
|
34
|
+
*/
|
|
35
|
+
const fetch: typeof baseFetch = (url, init) => {
|
|
36
|
+
return baseFetch(url, {
|
|
37
|
+
agent: (parsedURL) => {
|
|
38
|
+
return parsedURL.protocol === "http:"
|
|
39
|
+
? DEFAULT_HTTP_AGENT
|
|
40
|
+
: DEFAULT_HTTPS_AGENT;
|
|
41
|
+
},
|
|
42
|
+
...init,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default fetch;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import fetch from "./fetch";
|
|
3
|
+
import pLimit from "p-limit";
|
|
4
|
+
|
|
5
|
+
import { decode } from "./decode";
|
|
6
|
+
|
|
7
|
+
const GITHUB_JSON_ACCEPT_HEADER = "application/vnd.github+json";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A minimally defined codec for GitHub release metadata.
|
|
11
|
+
*
|
|
12
|
+
* @see https://docs.github.com/en/rest/releases/releases#get-a-release-by-tag-name
|
|
13
|
+
*/
|
|
14
|
+
const GitHubReleaseMetadata = t.type({
|
|
15
|
+
name: t.string,
|
|
16
|
+
body: t.union([t.null, t.string]),
|
|
17
|
+
});
|
|
18
|
+
export type GitHubReleaseMetadata = t.TypeOf<typeof GitHubReleaseMetadata>;
|
|
19
|
+
|
|
20
|
+
type FetchAllGitHubReleasesArgs = {
|
|
21
|
+
repositoryOwner: string;
|
|
22
|
+
repositoryName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const fetchAllGitHubReleases = async (
|
|
26
|
+
args: FetchAllGitHubReleasesArgs,
|
|
27
|
+
): Promise<GitHubReleaseMetadata[]> => {
|
|
28
|
+
const res = await fetch(
|
|
29
|
+
`https://api.github.com/repos/${args.repositoryOwner}/${args.repositoryName}/releases`,
|
|
30
|
+
{
|
|
31
|
+
headers: {
|
|
32
|
+
Accept: GITHUB_JSON_ACCEPT_HEADER,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
if (res.ok) {
|
|
38
|
+
const json = await res.json();
|
|
39
|
+
|
|
40
|
+
const { value, error } = decode(t.array(GitHubReleaseMetadata), json);
|
|
41
|
+
|
|
42
|
+
if (error) {
|
|
43
|
+
throw new Error(`Invalid GitHub Release response.`, { cause: error });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return value;
|
|
47
|
+
} else {
|
|
48
|
+
const text = await res.text();
|
|
49
|
+
throw new Error(`Invalid GitHub Release response.`, {
|
|
50
|
+
cause: text,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
type FetchGitHubReleaseByVersionArgs = {
|
|
56
|
+
repositoryOwner: string;
|
|
57
|
+
repositoryName: string;
|
|
58
|
+
packageName?: string;
|
|
59
|
+
version: string;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const fetchGitHubReleaseByVersion = async (
|
|
63
|
+
args: FetchGitHubReleaseByVersionArgs,
|
|
64
|
+
): Promise<GitHubReleaseMetadata | undefined> => {
|
|
65
|
+
let url: string;
|
|
66
|
+
|
|
67
|
+
if (args.packageName) {
|
|
68
|
+
url = `https://api.github.com/repos/${args.repositoryOwner}/${args.repositoryName}/releases/tags/${args.packageName}@${args.version}`;
|
|
69
|
+
} else {
|
|
70
|
+
url = `https://api.github.com/repos/${args.repositoryOwner}/${args.repositoryName}/releases/tags/${args.version}`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const res = await fetch(url, {
|
|
74
|
+
headers: {
|
|
75
|
+
Accept: GITHUB_JSON_ACCEPT_HEADER,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (res.ok) {
|
|
80
|
+
const json = await res.json();
|
|
81
|
+
|
|
82
|
+
const { value, error } = decode(GitHubReleaseMetadata, json);
|
|
83
|
+
|
|
84
|
+
if (error) {
|
|
85
|
+
throw new Error(`Invalid GitHub Release response.`, { cause: error });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
type FetchGitHubReleaseBodyForReleaseArgs = {
|
|
93
|
+
repositoryOwner: string;
|
|
94
|
+
repositoryName: string;
|
|
95
|
+
packageName?: string;
|
|
96
|
+
version: string;
|
|
97
|
+
cache?: Record<string, GitHubReleaseMetadata | undefined>;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const _fetchGitHubReleaseBodyForRelease = async (
|
|
101
|
+
args: FetchGitHubReleaseBodyForReleaseArgs,
|
|
102
|
+
): Promise<string | undefined> => {
|
|
103
|
+
const cache = args.cache || {};
|
|
104
|
+
|
|
105
|
+
if (Object.keys(cache).length < 1) {
|
|
106
|
+
const releases = await fetchAllGitHubReleases({
|
|
107
|
+
repositoryOwner: args.repositoryOwner,
|
|
108
|
+
repositoryName: args.repositoryName,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
for (const release of releases) {
|
|
112
|
+
cache[release.name] = release;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (args.version in cache) {
|
|
117
|
+
const release = cache[args.version];
|
|
118
|
+
|
|
119
|
+
return release?.body ?? undefined;
|
|
120
|
+
} else {
|
|
121
|
+
try {
|
|
122
|
+
const version = await fetchGitHubReleaseByVersion({
|
|
123
|
+
repositoryOwner: args.repositoryOwner,
|
|
124
|
+
repositoryName: args.repositoryName,
|
|
125
|
+
packageName: args.packageName,
|
|
126
|
+
version: args.version,
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
cache[args.version] = version;
|
|
130
|
+
|
|
131
|
+
return version?.body ?? undefined;
|
|
132
|
+
} catch {
|
|
133
|
+
cache[args.version] = undefined;
|
|
134
|
+
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const limit = pLimit(1);
|
|
141
|
+
|
|
142
|
+
export const fetchGitHubReleaseBodyForRelease = async (
|
|
143
|
+
...args: Parameters<typeof _fetchGitHubReleaseBodyForRelease>
|
|
144
|
+
): ReturnType<typeof _fetchGitHubReleaseBodyForRelease> => {
|
|
145
|
+
return await limit(() => _fetchGitHubReleaseBodyForRelease(...args));
|
|
146
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import fetch from "./fetch";
|
|
3
|
+
|
|
4
|
+
import { decode } from "./decode";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The Accept header value used when only metadata required for package
|
|
8
|
+
* installation is needed. The response includes all versions and some of their
|
|
9
|
+
* metadata.
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/npm/registry/blob/cfe04736f34db9274a780184d1cdb2fb3e4ead2a/docs/responses/package-metadata.md#package-metadata
|
|
12
|
+
*/
|
|
13
|
+
const NPM_REGISTRY_ABBREVIATED_METADATA_ACCEPT_HEADER =
|
|
14
|
+
"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A minimally defined codec for NPM registry package metadata. Only data needed
|
|
18
|
+
* for version detection is defined.
|
|
19
|
+
*/
|
|
20
|
+
const NPMRegistryPackageMetadataCodec = t.type({
|
|
21
|
+
versions: t.UnknownRecord,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
type FetchNPMPackageVersionsArgs = {
|
|
25
|
+
packageName: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const fetchNPMPackageVersions = async (
|
|
29
|
+
args: FetchNPMPackageVersionsArgs,
|
|
30
|
+
): Promise<string[]> => {
|
|
31
|
+
const res = await fetch(`https://registry.npmjs.org/${args.packageName}`, {
|
|
32
|
+
headers: {
|
|
33
|
+
Accept: NPM_REGISTRY_ABBREVIATED_METADATA_ACCEPT_HEADER,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const json = await res.json();
|
|
38
|
+
|
|
39
|
+
const { value, error } = decode(NPMRegistryPackageMetadataCodec, json);
|
|
40
|
+
|
|
41
|
+
if (error) {
|
|
42
|
+
throw new Error(`Invalid NPM registry response.`, { cause: error });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return Object.keys(value.versions);
|
|
46
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import prettier from "prettier";
|
|
2
|
+
import { stripIndent } from "common-tags";
|
|
3
|
+
|
|
4
|
+
type FormatOptions = {
|
|
5
|
+
prettier?: prettier.Options;
|
|
6
|
+
/**
|
|
7
|
+
* Determines if a newline is included at the end of the formatted result.
|
|
8
|
+
*
|
|
9
|
+
* @defaultValue `true`
|
|
10
|
+
*/
|
|
11
|
+
includeNewlineAtEnd?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const format = async (
|
|
15
|
+
source: string,
|
|
16
|
+
filePath: string,
|
|
17
|
+
options?: FormatOptions,
|
|
18
|
+
): Promise<string> => {
|
|
19
|
+
let formatted = stripIndent(source);
|
|
20
|
+
|
|
21
|
+
const prettierOptions = await prettier.resolveConfig(filePath);
|
|
22
|
+
|
|
23
|
+
formatted = await prettier.format(formatted, {
|
|
24
|
+
...prettierOptions,
|
|
25
|
+
filepath: filePath,
|
|
26
|
+
...(options?.prettier ?? {}),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
if (options?.includeNewlineAtEnd === false) {
|
|
30
|
+
formatted.replace(/[\r\n]+$/, "");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return formatted;
|
|
34
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
|
|
3
|
+
export const functionCodec = new t.Type<
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
5
|
+
Function,
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7
|
+
Function,
|
|
8
|
+
unknown
|
|
9
|
+
>(
|
|
10
|
+
"function",
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12
|
+
(input: unknown): input is Function => typeof input === "function",
|
|
13
|
+
(input, context) =>
|
|
14
|
+
typeof input === "function" ? t.success(input) : t.failure(input, context),
|
|
15
|
+
t.identity,
|
|
16
|
+
);
|