flucto 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -1
- package/README.md +81 -9
- package/dist-electron/cli/args.js +0 -2
- package/dist-electron/cli/args.js.map +1 -1
- package/dist-electron/cli/index.js +8 -6
- package/dist-electron/cli/index.js.map +1 -1
- package/dist-electron/cli/output.js +1 -2
- package/dist-electron/cli/output.js.map +1 -1
- package/dist-electron/main/index.js +34 -217
- package/dist-electron/main/index.js.map +1 -1
- package/dist-electron/main/search/reddit.js.map +1 -1
- package/dist-electron/main/services/binaryInstaller.js +89 -27
- package/dist-electron/main/services/binaryInstaller.js.map +1 -1
- package/dist-electron/main/services/cliUpdater.js +102 -83
- package/dist-electron/main/services/cliUpdater.js.map +1 -1
- package/dist-electron/main/services/mediaDownload.js +20 -23
- package/dist-electron/main/services/mediaDownload.js.map +1 -1
- package/dist-electron/main/services/platformAssets.js +13 -39
- package/dist-electron/main/services/platformAssets.js.map +1 -1
- package/dist-electron/main/services/releaseDownload.js +101 -0
- package/dist-electron/main/services/releaseDownload.js.map +1 -0
- package/dist-electron/main/updater.js +193 -21
- package/dist-electron/main/updater.js.map +1 -1
- package/node_modules/adm-zip/LICENSE +21 -0
- package/node_modules/adm-zip/README.md +90 -0
- package/node_modules/adm-zip/adm-zip.js +1020 -0
- package/node_modules/adm-zip/headers/entryHeader.js +396 -0
- package/node_modules/adm-zip/headers/index.js +2 -0
- package/node_modules/adm-zip/headers/mainHeader.js +177 -0
- package/node_modules/adm-zip/methods/deflater.js +33 -0
- package/node_modules/adm-zip/methods/index.js +3 -0
- package/node_modules/adm-zip/methods/inflater.js +64 -0
- package/node_modules/adm-zip/methods/zipcrypto.js +175 -0
- package/node_modules/adm-zip/package.json +56 -0
- package/node_modules/adm-zip/types.d.ts +223 -0
- package/node_modules/adm-zip/util/constants.js +142 -0
- package/node_modules/adm-zip/util/decoder.js +5 -0
- package/node_modules/adm-zip/util/errors.js +66 -0
- package/node_modules/adm-zip/util/fattr.js +76 -0
- package/node_modules/adm-zip/util/index.js +5 -0
- package/node_modules/adm-zip/util/utils.js +481 -0
- package/node_modules/adm-zip/zipEntry.js +415 -0
- package/node_modules/adm-zip/zipFile.js +466 -0
- package/node_modules/ajv/.runkit_example.js +23 -0
- package/node_modules/ajv/LICENSE +22 -0
- package/node_modules/ajv/README.md +207 -0
- package/node_modules/ajv/dist/2019.d.ts +19 -0
- package/node_modules/ajv/dist/2019.js +61 -0
- package/node_modules/ajv/dist/2019.js.map +1 -0
- package/node_modules/ajv/dist/2020.d.ts +19 -0
- package/node_modules/ajv/dist/2020.js +55 -0
- package/node_modules/ajv/dist/2020.js.map +1 -0
- package/node_modules/ajv/dist/ajv.d.ts +18 -0
- package/node_modules/ajv/dist/ajv.js +50 -0
- package/node_modules/ajv/dist/ajv.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
- package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
- package/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
- package/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
- package/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/node_modules/ajv/dist/compile/errors.d.ts +13 -0
- package/node_modules/ajv/dist/compile/errors.js +123 -0
- package/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/node_modules/ajv/dist/compile/index.d.ts +80 -0
- package/node_modules/ajv/dist/compile/index.js +242 -0
- package/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
- package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
- package/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
- package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
- package/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
- package/node_modules/ajv/dist/compile/names.d.ts +20 -0
- package/node_modules/ajv/dist/compile/names.js +28 -0
- package/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
- package/node_modules/ajv/dist/compile/ref_error.js +12 -0
- package/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
- package/node_modules/ajv/dist/compile/resolve.js +155 -0
- package/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/node_modules/ajv/dist/compile/rules.d.ts +28 -0
- package/node_modules/ajv/dist/compile/rules.js +26 -0
- package/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/node_modules/ajv/dist/compile/util.d.ts +40 -0
- package/node_modules/ajv/dist/compile/util.js +178 -0
- package/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
- package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
- package/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
- package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
- package/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
- package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
- package/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
- package/node_modules/ajv/dist/compile/validate/index.js +520 -0
- package/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
- package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
- package/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
- package/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/node_modules/ajv/dist/core.d.ts +174 -0
- package/node_modules/ajv/dist/core.js +618 -0
- package/node_modules/ajv/dist/core.js.map +1 -0
- package/node_modules/ajv/dist/jtd.d.ts +47 -0
- package/node_modules/ajv/dist/jtd.js +72 -0
- package/node_modules/ajv/dist/jtd.js.map +1 -0
- package/node_modules/ajv/dist/refs/data.json +13 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
- package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
- package/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
- package/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/equal.js +7 -0
- package/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
- package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
- package/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
- package/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/quote.js +30 -0
- package/node_modules/ajv/dist/runtime/quote.js.map +1 -0
- package/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/re2.js +6 -0
- package/node_modules/ajv/dist/runtime/re2.js.map +1 -0
- package/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
- package/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
- package/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
- package/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
- package/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/node_modules/ajv/dist/standalone/index.d.ts +6 -0
- package/node_modules/ajv/dist/standalone/index.js +90 -0
- package/node_modules/ajv/dist/standalone/index.js.map +1 -0
- package/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
- package/node_modules/ajv/dist/standalone/instance.js +35 -0
- package/node_modules/ajv/dist/standalone/instance.js.map +1 -0
- package/node_modules/ajv/dist/types/index.d.ts +183 -0
- package/node_modules/ajv/dist/types/index.js +3 -0
- package/node_modules/ajv/dist/types/index.js.map +1 -0
- package/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
- package/node_modules/ajv/dist/types/json-schema.js +3 -0
- package/node_modules/ajv/dist/types/json-schema.js.map +1 -0
- package/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
- package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
- package/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
- package/node_modules/ajv/dist/vocabularies/code.js +131 -0
- package/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
- package/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
- package/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
- package/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
- package/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
- package/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
- package/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
- package/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/next.js +8 -0
- package/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/node_modules/ajv/lib/2019.ts +81 -0
- package/node_modules/ajv/lib/2020.ts +75 -0
- package/node_modules/ajv/lib/ajv.ts +70 -0
- package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
- package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
- package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
- package/node_modules/ajv/lib/compile/errors.ts +184 -0
- package/node_modules/ajv/lib/compile/index.ts +324 -0
- package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
- package/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
- package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
- package/node_modules/ajv/lib/compile/names.ts +27 -0
- package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
- package/node_modules/ajv/lib/compile/resolve.ts +149 -0
- package/node_modules/ajv/lib/compile/rules.ts +50 -0
- package/node_modules/ajv/lib/compile/util.ts +213 -0
- package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
- package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
- package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
- package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
- package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
- package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
- package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
- package/node_modules/ajv/lib/core.ts +892 -0
- package/node_modules/ajv/lib/jtd.ts +132 -0
- package/node_modules/ajv/lib/refs/data.json +13 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
- package/node_modules/ajv/lib/runtime/equal.ts +7 -0
- package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
- package/node_modules/ajv/lib/runtime/quote.ts +31 -0
- package/node_modules/ajv/lib/runtime/re2.ts +6 -0
- package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
- package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
- package/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
- package/node_modules/ajv/lib/standalone/index.ts +100 -0
- package/node_modules/ajv/lib/standalone/instance.ts +36 -0
- package/node_modules/ajv/lib/types/index.ts +244 -0
- package/node_modules/ajv/lib/types/json-schema.ts +187 -0
- package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
- package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
- package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
- package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
- package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
- package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
- package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
- package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
- package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
- package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
- package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
- package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
- package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
- package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
- package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
- package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
- package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
- package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
- package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
- package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
- package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
- package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
- package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
- package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
- package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
- package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
- package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
- package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
- package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
- package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
- package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
- package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
- package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
- package/node_modules/ajv/package.json +126 -0
- package/node_modules/ajv-formats/LICENSE +21 -0
- package/node_modules/ajv-formats/README.md +125 -0
- package/node_modules/ajv-formats/dist/formats.d.ts +9 -0
- package/node_modules/ajv-formats/dist/formats.js +208 -0
- package/node_modules/ajv-formats/dist/formats.js.map +1 -0
- package/node_modules/ajv-formats/dist/index.d.ts +15 -0
- package/node_modules/ajv-formats/dist/index.js +37 -0
- package/node_modules/ajv-formats/dist/index.js.map +1 -0
- package/node_modules/ajv-formats/dist/limit.d.ts +10 -0
- package/node_modules/ajv-formats/dist/limit.js +69 -0
- package/node_modules/ajv-formats/dist/limit.js.map +1 -0
- package/node_modules/ajv-formats/package.json +74 -0
- package/node_modules/ajv-formats/src/formats.ts +269 -0
- package/node_modules/ajv-formats/src/index.ts +62 -0
- package/node_modules/ajv-formats/src/limit.ts +99 -0
- package/node_modules/argparse/LICENSE +254 -0
- package/node_modules/argparse/README.md +84 -0
- package/node_modules/argparse/argparse.js +3707 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +440 -0
- package/node_modules/argparse/package.json +31 -0
- package/node_modules/atomically/dist/constants.d.ts +15 -0
- package/node_modules/atomically/dist/constants.js +19 -0
- package/node_modules/atomically/dist/index.d.ts +15 -0
- package/node_modules/atomically/dist/index.js +209 -0
- package/node_modules/atomically/dist/types.d.ts +27 -0
- package/node_modules/atomically/dist/types.js +2 -0
- package/node_modules/atomically/dist/utils/lang.d.ts +6 -0
- package/node_modules/atomically/dist/utils/lang.js +16 -0
- package/node_modules/atomically/dist/utils/scheduler.d.ts +6 -0
- package/node_modules/atomically/dist/utils/scheduler.js +34 -0
- package/node_modules/atomically/dist/utils/temp.d.ts +11 -0
- package/node_modules/atomically/dist/utils/temp.js +59 -0
- package/node_modules/atomically/license +21 -0
- package/node_modules/atomically/package.json +42 -0
- package/node_modules/atomically/readme.md +147 -0
- package/node_modules/builder-util-runtime/LICENSE +22 -0
- package/node_modules/builder-util-runtime/out/CancellationToken.d.ts +17 -0
- package/node_modules/builder-util-runtime/out/CancellationToken.js +108 -0
- package/node_modules/builder-util-runtime/out/CancellationToken.js.map +1 -0
- package/node_modules/builder-util-runtime/out/MemoLazy.d.ts +10 -0
- package/node_modules/builder-util-runtime/out/MemoLazy.js +42 -0
- package/node_modules/builder-util-runtime/out/MemoLazy.js.map +1 -0
- package/node_modules/builder-util-runtime/out/ProgressCallbackTransform.d.ts +21 -0
- package/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js +54 -0
- package/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js.map +1 -0
- package/node_modules/builder-util-runtime/out/blockMapApi.d.ts +12 -0
- package/node_modules/builder-util-runtime/out/blockMapApi.js +3 -0
- package/node_modules/builder-util-runtime/out/blockMapApi.js.map +1 -0
- package/node_modules/builder-util-runtime/out/error.d.ts +1 -0
- package/node_modules/builder-util-runtime/out/error.js +9 -0
- package/node_modules/builder-util-runtime/out/error.js.map +1 -0
- package/node_modules/builder-util-runtime/out/httpExecutor.d.ts +86 -0
- package/node_modules/builder-util-runtime/out/httpExecutor.js +529 -0
- package/node_modules/builder-util-runtime/out/httpExecutor.js.map +1 -0
- package/node_modules/builder-util-runtime/out/index.d.ts +15 -0
- package/node_modules/builder-util-runtime/out/index.js +49 -0
- package/node_modules/builder-util-runtime/out/index.js.map +1 -0
- package/node_modules/builder-util-runtime/out/objects.d.ts +8 -0
- package/node_modules/builder-util-runtime/out/objects.js +106 -0
- package/node_modules/builder-util-runtime/out/objects.js.map +1 -0
- package/node_modules/builder-util-runtime/out/publishOptions.d.ts +396 -0
- package/node_modules/builder-util-runtime/out/publishOptions.js +76 -0
- package/node_modules/builder-util-runtime/out/publishOptions.js.map +1 -0
- package/node_modules/builder-util-runtime/out/retry.d.ts +9 -0
- package/node_modules/builder-util-runtime/out/retry.js +21 -0
- package/node_modules/builder-util-runtime/out/retry.js.map +1 -0
- package/node_modules/builder-util-runtime/out/rfc2253Parser.d.ts +1 -0
- package/node_modules/builder-util-runtime/out/rfc2253Parser.js +80 -0
- package/node_modules/builder-util-runtime/out/rfc2253Parser.js.map +1 -0
- package/node_modules/builder-util-runtime/out/updateInfo.d.ts +76 -0
- package/node_modules/builder-util-runtime/out/updateInfo.js +3 -0
- package/node_modules/builder-util-runtime/out/updateInfo.js.map +1 -0
- package/node_modules/builder-util-runtime/out/uuid.d.ts +21 -0
- package/node_modules/builder-util-runtime/out/uuid.js +200 -0
- package/node_modules/builder-util-runtime/out/uuid.js.map +1 -0
- package/node_modules/builder-util-runtime/out/xml.d.ts +15 -0
- package/node_modules/builder-util-runtime/out/xml.js +109 -0
- package/node_modules/builder-util-runtime/out/xml.js.map +1 -0
- package/node_modules/builder-util-runtime/package.json +29 -0
- package/node_modules/builder-util-runtime/readme.md +3 -0
- package/node_modules/conf/dist/source/index.d.ts +135 -0
- package/node_modules/conf/dist/source/index.js +672 -0
- package/node_modules/conf/dist/source/types.d.ts +311 -0
- package/node_modules/conf/dist/source/types.js +1 -0
- package/node_modules/conf/license +9 -0
- package/node_modules/conf/node_modules/semver/LICENSE +15 -0
- package/node_modules/conf/node_modules/semver/README.md +680 -0
- package/node_modules/conf/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/conf/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/conf/node_modules/semver/classes/index.js +7 -0
- package/node_modules/conf/node_modules/semver/classes/range.js +577 -0
- package/node_modules/conf/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/conf/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/conf/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/conf/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/conf/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/conf/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/conf/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/conf/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/conf/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/major.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/conf/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/conf/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/conf/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/conf/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/conf/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/conf/node_modules/semver/index.js +93 -0
- package/node_modules/conf/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/conf/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/conf/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/conf/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/conf/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/conf/node_modules/semver/internal/re.js +223 -0
- package/node_modules/conf/node_modules/semver/package.json +78 -0
- package/node_modules/conf/node_modules/semver/preload.js +4 -0
- package/node_modules/conf/node_modules/semver/range.bnf +17 -0
- package/node_modules/conf/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/conf/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/conf/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/conf/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/conf/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/conf/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/conf/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/conf/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/conf/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/conf/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/conf/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/conf/package.json +82 -0
- package/node_modules/conf/readme.md +599 -0
- package/node_modules/debounce-fn/index.d.ts +79 -0
- package/node_modules/debounce-fn/index.js +88 -0
- package/node_modules/debounce-fn/license +9 -0
- package/node_modules/debounce-fn/package.json +48 -0
- package/node_modules/debounce-fn/readme.md +73 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/dot-prop/index.d.ts +262 -0
- package/node_modules/dot-prop/index.js +551 -0
- package/node_modules/dot-prop/license +9 -0
- package/node_modules/dot-prop/package.json +58 -0
- package/node_modules/dot-prop/readme.md +312 -0
- package/node_modules/dotenv/CHANGELOG.md +643 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +757 -0
- package/node_modules/dotenv/README.md +812 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.d.ts +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +179 -0
- package/node_modules/dotenv/lib/main.js +423 -0
- package/node_modules/dotenv/package.json +62 -0
- package/node_modules/dotenv/skills/dotenv/SKILL.md +200 -0
- package/node_modules/dotenv/skills/dotenvx/SKILL.md +118 -0
- package/node_modules/electron-store/index.d.ts +64 -0
- package/node_modules/electron-store/index.js +83 -0
- package/node_modules/electron-store/license +9 -0
- package/node_modules/electron-store/package.json +72 -0
- package/node_modules/electron-store/readme.md +482 -0
- package/node_modules/electron-updater/LICENSE +22 -0
- package/node_modules/electron-updater/README.md +15 -0
- package/node_modules/electron-updater/node_modules/fs-extra/LICENSE +15 -0
- package/node_modules/electron-updater/node_modules/fs-extra/README.md +262 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/copy/copy-sync.js +169 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/copy/copy.js +235 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/file.js +69 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/ensure/symlink.js +82 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/fs/index.js +128 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/index.js +16 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/json/index.js +16 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/move/index.js +7 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/move/move-sync.js +54 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/move/move.js +75 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/output-file/index.js +40 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/remove/index.js +22 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/remove/rimraf.js +302 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/util/stat.js +154 -0
- package/node_modules/electron-updater/node_modules/fs-extra/lib/util/utimes.js +26 -0
- package/node_modules/electron-updater/node_modules/fs-extra/package.json +67 -0
- package/node_modules/electron-updater/node_modules/semver/LICENSE +15 -0
- package/node_modules/electron-updater/node_modules/semver/README.md +665 -0
- package/node_modules/electron-updater/node_modules/semver/bin/semver.js +191 -0
- package/node_modules/electron-updater/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/electron-updater/node_modules/semver/classes/index.js +7 -0
- package/node_modules/electron-updater/node_modules/semver/classes/range.js +557 -0
- package/node_modules/electron-updater/node_modules/semver/classes/semver.js +333 -0
- package/node_modules/electron-updater/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/electron-updater/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/electron-updater/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/electron-updater/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/electron-updater/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/electron-updater/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/electron-updater/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/electron-updater/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/major.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/electron-updater/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/electron-updater/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/electron-updater/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/electron-updater/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/electron-updater/node_modules/semver/index.js +91 -0
- package/node_modules/electron-updater/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/electron-updater/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/electron-updater/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/electron-updater/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/electron-updater/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/electron-updater/node_modules/semver/internal/re.js +223 -0
- package/node_modules/electron-updater/node_modules/semver/package.json +78 -0
- package/node_modules/electron-updater/node_modules/semver/preload.js +4 -0
- package/node_modules/electron-updater/node_modules/semver/range.bnf +16 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/electron-updater/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/electron-updater/out/AppAdapter.d.ts +22 -0
- package/node_modules/electron-updater/out/AppAdapter.js +21 -0
- package/node_modules/electron-updater/out/AppAdapter.js.map +1 -0
- package/node_modules/electron-updater/out/AppImageUpdater.d.ts +11 -0
- package/node_modules/electron-updater/out/AppImageUpdater.js +118 -0
- package/node_modules/electron-updater/out/AppImageUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/AppUpdater.d.ts +241 -0
- package/node_modules/electron-updater/out/AppUpdater.js +735 -0
- package/node_modules/electron-updater/out/AppUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/BaseUpdater.d.ts +33 -0
- package/node_modules/electron-updater/out/BaseUpdater.js +150 -0
- package/node_modules/electron-updater/out/BaseUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/DebUpdater.d.ts +13 -0
- package/node_modules/electron-updater/out/DebUpdater.js +84 -0
- package/node_modules/electron-updater/out/DebUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/DownloadedUpdateHelper.d.ts +35 -0
- package/node_modules/electron-updater/out/DownloadedUpdateHelper.js +169 -0
- package/node_modules/electron-updater/out/DownloadedUpdateHelper.js.map +1 -0
- package/node_modules/electron-updater/out/ElectronAppAdapter.d.ts +15 -0
- package/node_modules/electron-updater/out/ElectronAppAdapter.js +42 -0
- package/node_modules/electron-updater/out/ElectronAppAdapter.js.map +1 -0
- package/node_modules/electron-updater/out/LinuxUpdater.d.ts +29 -0
- package/node_modules/electron-updater/out/LinuxUpdater.js +119 -0
- package/node_modules/electron-updater/out/LinuxUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/MacUpdater.d.ts +20 -0
- package/node_modules/electron-updater/out/MacUpdater.js +259 -0
- package/node_modules/electron-updater/out/MacUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/NsisUpdater.d.ts +25 -0
- package/node_modules/electron-updater/out/NsisUpdater.js +178 -0
- package/node_modules/electron-updater/out/NsisUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/PacmanUpdater.d.ts +13 -0
- package/node_modules/electron-updater/out/PacmanUpdater.js +67 -0
- package/node_modules/electron-updater/out/PacmanUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/RpmUpdater.d.ts +13 -0
- package/node_modules/electron-updater/out/RpmUpdater.js +65 -0
- package/node_modules/electron-updater/out/RpmUpdater.js.map +1 -0
- package/node_modules/electron-updater/out/differentialDownloader/DataSplitter.d.ts +39 -0
- package/node_modules/electron-updater/out/differentialDownloader/DataSplitter.js +229 -0
- package/node_modules/electron-updater/out/differentialDownloader/DataSplitter.js.map +1 -0
- package/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.d.ts +30 -0
- package/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js +268 -0
- package/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js.map +1 -0
- package/node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.d.ts +4 -0
- package/node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js +37 -0
- package/node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js.map +1 -0
- package/node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.d.ts +5 -0
- package/node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js +11 -0
- package/node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js.map +1 -0
- package/node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.d.ts +31 -0
- package/node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js +90 -0
- package/node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js.map +1 -0
- package/node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.d.ts +12 -0
- package/node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js +113 -0
- package/node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js.map +1 -0
- package/node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.d.ts +6 -0
- package/node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js +114 -0
- package/node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js.map +1 -0
- package/node_modules/electron-updater/out/electronHttpExecutor.d.ts +16 -0
- package/node_modules/electron-updater/out/electronHttpExecutor.js +79 -0
- package/node_modules/electron-updater/out/electronHttpExecutor.js.map +1 -0
- package/node_modules/electron-updater/out/main.d.ts +19 -0
- package/node_modules/electron-updater/out/main.js +84 -0
- package/node_modules/electron-updater/out/main.js.map +1 -0
- package/node_modules/electron-updater/out/providerFactory.d.ts +5 -0
- package/node_modules/electron-updater/out/providerFactory.js +68 -0
- package/node_modules/electron-updater/out/providerFactory.js.map +1 -0
- package/node_modules/electron-updater/out/providers/BitbucketProvider.d.ts +14 -0
- package/node_modules/electron-updater/out/providers/BitbucketProvider.js +42 -0
- package/node_modules/electron-updater/out/providers/BitbucketProvider.js.map +1 -0
- package/node_modules/electron-updater/out/providers/GenericProvider.d.ts +13 -0
- package/node_modules/electron-updater/out/providers/GenericProvider.js +51 -0
- package/node_modules/electron-updater/out/providers/GenericProvider.js.map +1 -0
- package/node_modules/electron-updater/out/providers/GitHubProvider.d.ts +29 -0
- package/node_modules/electron-updater/out/providers/GitHubProvider.js +237 -0
- package/node_modules/electron-updater/out/providers/GitHubProvider.js.map +1 -0
- package/node_modules/electron-updater/out/providers/GitLabProvider.d.ts +58 -0
- package/node_modules/electron-updater/out/providers/GitLabProvider.js +281 -0
- package/node_modules/electron-updater/out/providers/GitLabProvider.js.map +1 -0
- package/node_modules/electron-updater/out/providers/KeygenProvider.d.ts +15 -0
- package/node_modules/electron-updater/out/providers/KeygenProvider.js +46 -0
- package/node_modules/electron-updater/out/providers/KeygenProvider.js.map +1 -0
- package/node_modules/electron-updater/out/providers/PrivateGitHubProvider.d.ts +26 -0
- package/node_modules/electron-updater/out/providers/PrivateGitHubProvider.js +95 -0
- package/node_modules/electron-updater/out/providers/PrivateGitHubProvider.js.map +1 -0
- package/node_modules/electron-updater/out/providers/Provider.d.ts +35 -0
- package/node_modules/electron-updater/out/providers/Provider.js +146 -0
- package/node_modules/electron-updater/out/providers/Provider.js.map +1 -0
- package/node_modules/electron-updater/out/types.d.ts +43 -0
- package/node_modules/electron-updater/out/types.js +42 -0
- package/node_modules/electron-updater/out/types.js.map +1 -0
- package/node_modules/electron-updater/out/util.d.ts +3 -0
- package/node_modules/electron-updater/out/util.js +33 -0
- package/node_modules/electron-updater/out/util.js.map +1 -0
- package/node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.d.ts +2 -0
- package/node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js +142 -0
- package/node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js.map +1 -0
- package/node_modules/electron-updater/package.json +40 -0
- package/node_modules/env-paths/index.d.ts +90 -0
- package/node_modules/env-paths/index.js +68 -0
- package/node_modules/env-paths/license +9 -0
- package/node_modules/env-paths/package.json +48 -0
- package/node_modules/env-paths/readme.md +113 -0
- package/node_modules/fast-deep-equal/LICENSE +21 -0
- package/node_modules/fast-deep-equal/README.md +96 -0
- package/node_modules/fast-deep-equal/es6/index.d.ts +2 -0
- package/node_modules/fast-deep-equal/es6/index.js +72 -0
- package/node_modules/fast-deep-equal/es6/react.d.ts +2 -0
- package/node_modules/fast-deep-equal/es6/react.js +79 -0
- package/node_modules/fast-deep-equal/index.d.ts +4 -0
- package/node_modules/fast-deep-equal/index.js +46 -0
- package/node_modules/fast-deep-equal/package.json +61 -0
- package/node_modules/fast-deep-equal/react.d.ts +2 -0
- package/node_modules/fast-deep-equal/react.js +53 -0
- package/node_modules/fast-uri/.gitattributes +2 -0
- package/node_modules/fast-uri/.github/dependabot.yml +13 -0
- package/node_modules/fast-uri/.github/workflows/ci.yml +106 -0
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +24 -0
- package/node_modules/fast-uri/LICENSE +30 -0
- package/node_modules/fast-uri/README.md +152 -0
- package/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
- package/node_modules/fast-uri/benchmark/equal.mjs +51 -0
- package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
- package/node_modules/fast-uri/benchmark/package.json +17 -0
- package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
- package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
- package/node_modules/fast-uri/eslint.config.js +6 -0
- package/node_modules/fast-uri/index.js +631 -0
- package/node_modules/fast-uri/lib/schemes.js +272 -0
- package/node_modules/fast-uri/lib/utils.js +747 -0
- package/node_modules/fast-uri/package.json +68 -0
- package/node_modules/fast-uri/test/ajv.test.js +43 -0
- package/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/fast-uri/test/equal.test.js +145 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +503 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
- package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/fast-uri/test/parse.test.js +327 -0
- package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/fast-uri/test/resolve.test.js +87 -0
- package/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
- package/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/fast-uri/test/security-normalization.test.js +178 -0
- package/node_modules/fast-uri/test/security.test.js +431 -0
- package/node_modules/fast-uri/test/serialize.test.js +151 -0
- package/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
- package/node_modules/fast-uri/test/uri-js.test.js +912 -0
- package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/fast-uri/test/util.test.js +38 -0
- package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/fast-uri/tsconfig.json +9 -0
- package/node_modules/fast-uri/types/index.d.ts +60 -0
- package/node_modules/fast-uri/types/index.test-d.ts +17 -0
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +143 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +53 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/js-yaml/LICENSE +21 -0
- package/node_modules/js-yaml/README.md +233 -0
- package/node_modules/js-yaml/bin/js-yaml.js +117 -0
- package/node_modules/js-yaml/dist/js-yaml.js +3022 -0
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs +3082 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -0
- package/node_modules/js-yaml/index.js +44 -0
- package/node_modules/js-yaml/lib/common.js +50 -0
- package/node_modules/js-yaml/lib/dumper.js +937 -0
- package/node_modules/js-yaml/lib/exception.js +51 -0
- package/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +37 -0
- package/node_modules/js-yaml/lib/loader.js +1803 -0
- package/node_modules/js-yaml/lib/schema/core.js +9 -0
- package/node_modules/js-yaml/lib/schema/default.js +20 -0
- package/node_modules/js-yaml/lib/schema/failsafe.js +14 -0
- package/node_modules/js-yaml/lib/schema/json.js +17 -0
- package/node_modules/js-yaml/lib/schema.js +109 -0
- package/node_modules/js-yaml/lib/snippet.js +96 -0
- package/node_modules/js-yaml/lib/type/binary.js +122 -0
- package/node_modules/js-yaml/lib/type/bool.js +35 -0
- package/node_modules/js-yaml/lib/type/float.js +99 -0
- package/node_modules/js-yaml/lib/type/int.js +142 -0
- package/node_modules/js-yaml/lib/type/map.js +8 -0
- package/node_modules/js-yaml/lib/type/merge.js +12 -0
- package/node_modules/js-yaml/lib/type/null.js +35 -0
- package/node_modules/js-yaml/lib/type/omap.js +45 -0
- package/node_modules/js-yaml/lib/type/pairs.js +50 -0
- package/node_modules/js-yaml/lib/type/seq.js +8 -0
- package/node_modules/js-yaml/lib/type/set.js +29 -0
- package/node_modules/js-yaml/lib/type/str.js +8 -0
- package/node_modules/js-yaml/lib/type/timestamp.js +88 -0
- package/node_modules/js-yaml/lib/type.js +66 -0
- package/node_modules/js-yaml/package.json +83 -0
- package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
- package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
- package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
- package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
- package/node_modules/json-schema-traverse/LICENSE +21 -0
- package/node_modules/json-schema-traverse/README.md +95 -0
- package/node_modules/json-schema-traverse/index.d.ts +40 -0
- package/node_modules/json-schema-traverse/index.js +93 -0
- package/node_modules/json-schema-traverse/package.json +43 -0
- package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
- package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
- package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
- package/node_modules/json-schema-typed/LICENSE.md +57 -0
- package/node_modules/json-schema-typed/README.md +108 -0
- package/node_modules/json-schema-typed/draft_07.d.ts +882 -0
- package/node_modules/json-schema-typed/draft_07.js +328 -0
- package/node_modules/json-schema-typed/draft_2019_09.d.ts +1247 -0
- package/node_modules/json-schema-typed/draft_2019_09.js +349 -0
- package/node_modules/json-schema-typed/draft_2020_12.d.ts +1239 -0
- package/node_modules/json-schema-typed/draft_2020_12.js +352 -0
- package/node_modules/json-schema-typed/package.json +44 -0
- package/node_modules/jsonfile/LICENSE +15 -0
- package/node_modules/jsonfile/README.md +230 -0
- package/node_modules/jsonfile/index.js +88 -0
- package/node_modules/jsonfile/package.json +40 -0
- package/node_modules/jsonfile/utils.js +18 -0
- package/node_modules/lazy-val/out/main.d.ts +7 -0
- package/node_modules/lazy-val/out/main.js +26 -0
- package/node_modules/lazy-val/out/main.js.map +1 -0
- package/node_modules/lazy-val/package.json +21 -0
- package/node_modules/lazy-val/readme.md +11 -0
- package/node_modules/lodash.escaperegexp/LICENSE +47 -0
- package/node_modules/lodash.escaperegexp/README.md +18 -0
- package/node_modules/lodash.escaperegexp/index.js +166 -0
- package/node_modules/lodash.escaperegexp/package.json +17 -0
- package/node_modules/lodash.isequal/LICENSE +47 -0
- package/node_modules/lodash.isequal/README.md +18 -0
- package/node_modules/lodash.isequal/index.js +1848 -0
- package/node_modules/lodash.isequal/package.json +16 -0
- package/node_modules/mimic-function/index.d.ts +52 -0
- package/node_modules/mimic-function/index.js +72 -0
- package/node_modules/mimic-function/license +9 -0
- package/node_modules/mimic-function/package.json +49 -0
- package/node_modules/mimic-function/readme.md +80 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/playwright-core/README.md +3 -0
- package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/browsers.json +52 -0
- package/node_modules/playwright-core/cli.js +21 -0
- package/node_modules/playwright-core/index.d.ts +17 -0
- package/node_modules/playwright-core/index.js +17 -0
- package/node_modules/playwright-core/index.mjs +28 -0
- package/node_modules/playwright-core/lib/bootstrap.js +88 -0
- package/node_modules/playwright-core/lib/coreBundle.js +75813 -0
- package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
- package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/playwright-core/lib/package.js +50 -0
- package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/server/electron/loader.js +116 -0
- package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
- package/node_modules/playwright-core/lib/tools/cli-client/help.json +721 -0
- package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/playwright-core/lib/tools/cli-client/output.js +351 -0
- package/node_modules/playwright-core/lib/tools/cli-client/program.js +418 -0
- package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/playwright-core/lib/tools/cli-client/session.js +259 -0
- package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +425 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +241 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +225 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +143 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/playwright-core/lib/utilsBundle.js +85357 -0
- package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
- package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js +32 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js +7 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/playwright-core/lib/xdg-open +1267 -0
- package/node_modules/playwright-core/package.json +34 -0
- package/node_modules/playwright-core/types/protocol.d.ts +24645 -0
- package/node_modules/playwright-core/types/structs.d.ts +52 -0
- package/node_modules/playwright-core/types/types.d.ts +26632 -0
- package/node_modules/require-from-string/index.js +34 -0
- package/node_modules/require-from-string/license +21 -0
- package/node_modules/require-from-string/package.json +28 -0
- package/node_modules/require-from-string/readme.md +56 -0
- package/node_modules/sax/LICENSE.md +55 -0
- package/node_modules/sax/README.md +227 -0
- package/node_modules/sax/lib/sax.js +1866 -0
- package/node_modules/sax/package.json +34 -0
- package/node_modules/stubborn-fs/dist/constants.d.ts +11 -0
- package/node_modules/stubborn-fs/dist/constants.js +16 -0
- package/node_modules/stubborn-fs/dist/handlers.d.ts +7 -0
- package/node_modules/stubborn-fs/dist/handlers.js +36 -0
- package/node_modules/stubborn-fs/dist/index.d.ts +274 -0
- package/node_modules/stubborn-fs/dist/index.js +52 -0
- package/node_modules/stubborn-fs/license +21 -0
- package/node_modules/stubborn-fs/package.json +32 -0
- package/node_modules/stubborn-fs/readme.md +69 -0
- package/node_modules/stubborn-utils/dist/attemptify_async.d.ts +3 -0
- package/node_modules/stubborn-utils/dist/attemptify_async.js +10 -0
- package/node_modules/stubborn-utils/dist/attemptify_sync.d.ts +3 -0
- package/node_modules/stubborn-utils/dist/attemptify_sync.js +15 -0
- package/node_modules/stubborn-utils/dist/constants.d.ts +2 -0
- package/node_modules/stubborn-utils/dist/constants.js +4 -0
- package/node_modules/stubborn-utils/dist/index.d.ts +9 -0
- package/node_modules/stubborn-utils/dist/index.js +7 -0
- package/node_modules/stubborn-utils/dist/retryify_async.d.ts +3 -0
- package/node_modules/stubborn-utils/dist/retryify_async.js +29 -0
- package/node_modules/stubborn-utils/dist/retryify_sync.d.ts +3 -0
- package/node_modules/stubborn-utils/dist/retryify_sync.js +25 -0
- package/node_modules/stubborn-utils/dist/types.d.ts +44 -0
- package/node_modules/stubborn-utils/dist/types.js +2 -0
- package/node_modules/stubborn-utils/license +21 -0
- package/node_modules/stubborn-utils/package.json +30 -0
- package/node_modules/stubborn-utils/readme.md +139 -0
- package/node_modules/tagged-tag/index.d.ts +3 -0
- package/node_modules/tagged-tag/license +9 -0
- package/node_modules/tagged-tag/package.json +36 -0
- package/node_modules/tagged-tag/readme.md +5 -0
- package/node_modules/tiny-typed-emitter/LICENSE +21 -0
- package/node_modules/tiny-typed-emitter/README.md +85 -0
- package/node_modules/tiny-typed-emitter/lib/index.d.ts +26 -0
- package/node_modules/tiny-typed-emitter/lib/index.js +3 -0
- package/node_modules/tiny-typed-emitter/package.json +37 -0
- package/node_modules/type-fest/index.d.ts +227 -0
- package/node_modules/type-fest/license-cc0 +121 -0
- package/node_modules/type-fest/license-mit +9 -0
- package/node_modules/type-fest/package.json +75 -0
- package/node_modules/type-fest/readme.md +1085 -0
- package/node_modules/type-fest/source/absolute.d.ts +52 -0
- package/node_modules/type-fest/source/all-extend.d.ts +121 -0
- package/node_modules/type-fest/source/all-union-fields.d.ts +91 -0
- package/node_modules/type-fest/source/and-all.d.ts +76 -0
- package/node_modules/type-fest/source/and.d.ts +82 -0
- package/node_modules/type-fest/source/array-element.d.ts +46 -0
- package/node_modules/type-fest/source/array-indices.d.ts +25 -0
- package/node_modules/type-fest/source/array-length.d.ts +36 -0
- package/node_modules/type-fest/source/array-reverse.d.ts +85 -0
- package/node_modules/type-fest/source/array-slice.d.ts +132 -0
- package/node_modules/type-fest/source/array-splice.d.ts +104 -0
- package/node_modules/type-fest/source/array-tail.d.ts +70 -0
- package/node_modules/type-fest/source/array-values.d.ts +24 -0
- package/node_modules/type-fest/source/arrayable.d.ts +31 -0
- package/node_modules/type-fest/source/async-return-type.d.ts +28 -0
- package/node_modules/type-fest/source/asyncify.d.ts +25 -0
- package/node_modules/type-fest/source/basic.d.ts +38 -0
- package/node_modules/type-fest/source/camel-case.d.ts +125 -0
- package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +106 -0
- package/node_modules/type-fest/source/camel-cased-properties.d.ts +49 -0
- package/node_modules/type-fest/source/characters.d.ts +67 -0
- package/node_modules/type-fest/source/conditional-except.d.ts +47 -0
- package/node_modules/type-fest/source/conditional-keys.d.ts +63 -0
- package/node_modules/type-fest/source/conditional-pick-deep.d.ts +122 -0
- package/node_modules/type-fest/source/conditional-pick.d.ts +48 -0
- package/node_modules/type-fest/source/conditional-simplify-deep.d.ts +73 -0
- package/node_modules/type-fest/source/conditional-simplify.d.ts +50 -0
- package/node_modules/type-fest/source/delimiter-case.d.ts +79 -0
- package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +115 -0
- package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +52 -0
- package/node_modules/type-fest/source/distributed-omit.d.ts +96 -0
- package/node_modules/type-fest/source/distributed-pick.d.ts +92 -0
- package/node_modules/type-fest/source/empty-object.d.ts +51 -0
- package/node_modules/type-fest/source/entries.d.ts +64 -0
- package/node_modules/type-fest/source/entry.d.ts +67 -0
- package/node_modules/type-fest/source/exact.d.ts +73 -0
- package/node_modules/type-fest/source/except.d.ts +112 -0
- package/node_modules/type-fest/source/exclude-exactly.d.ts +57 -0
- package/node_modules/type-fest/source/exclude-rest-element.d.ts +40 -0
- package/node_modules/type-fest/source/exclude-strict.d.ts +51 -0
- package/node_modules/type-fest/source/exclusify-union.d.ts +147 -0
- package/node_modules/type-fest/source/extends-strict.d.ts +151 -0
- package/node_modules/type-fest/source/extract-exactly.d.ts +56 -0
- package/node_modules/type-fest/source/extract-rest-element.d.ts +30 -0
- package/node_modules/type-fest/source/extract-strict.d.ts +51 -0
- package/node_modules/type-fest/source/find-global-type.d.ts +68 -0
- package/node_modules/type-fest/source/fixed-length-array.d.ts +97 -0
- package/node_modules/type-fest/source/get.d.ts +227 -0
- package/node_modules/type-fest/source/global-this.d.ts +24 -0
- package/node_modules/type-fest/source/globals/index.d.ts +3 -0
- package/node_modules/type-fest/source/globals/observable-like.d.ts +78 -0
- package/node_modules/type-fest/source/greater-than-or-equal.d.ts +63 -0
- package/node_modules/type-fest/source/greater-than.d.ts +92 -0
- package/node_modules/type-fest/source/has-optional-keys.d.ts +23 -0
- package/node_modules/type-fest/source/has-readonly-keys.d.ts +23 -0
- package/node_modules/type-fest/source/has-required-keys.d.ts +61 -0
- package/node_modules/type-fest/source/has-writable-keys.d.ts +23 -0
- package/node_modules/type-fest/source/if-any.d.ts +28 -0
- package/node_modules/type-fest/source/if-empty-object.d.ts +30 -0
- package/node_modules/type-fest/source/if-never.d.ts +28 -0
- package/node_modules/type-fest/source/if-null.d.ts +28 -0
- package/node_modules/type-fest/source/if-unknown.d.ts +28 -0
- package/node_modules/type-fest/source/if.d.ts +102 -0
- package/node_modules/type-fest/source/includes.d.ts +24 -0
- package/node_modules/type-fest/source/int-closed-range.d.ts +45 -0
- package/node_modules/type-fest/source/int-range.d.ts +67 -0
- package/node_modules/type-fest/source/internal/array.d.ts +144 -0
- package/node_modules/type-fest/source/internal/characters.d.ts +65 -0
- package/node_modules/type-fest/source/internal/enforce-optional.d.ts +49 -0
- package/node_modules/type-fest/source/internal/index.d.ts +11 -0
- package/node_modules/type-fest/source/internal/keys.d.ts +100 -0
- package/node_modules/type-fest/source/internal/numeric.d.ts +143 -0
- package/node_modules/type-fest/source/internal/object.d.ts +301 -0
- package/node_modules/type-fest/source/internal/string.d.ts +127 -0
- package/node_modules/type-fest/source/internal/tuple.d.ts +79 -0
- package/node_modules/type-fest/source/internal/type.d.ts +171 -0
- package/node_modules/type-fest/source/invariant-of.d.ts +85 -0
- package/node_modules/type-fest/source/is-any.d.ts +31 -0
- package/node_modules/type-fest/source/is-equal.d.ts +41 -0
- package/node_modules/type-fest/source/is-float.d.ts +43 -0
- package/node_modules/type-fest/source/is-integer.d.ts +60 -0
- package/node_modules/type-fest/source/is-literal.d.ts +317 -0
- package/node_modules/type-fest/source/is-lowercase.d.ts +38 -0
- package/node_modules/type-fest/source/is-never.d.ts +56 -0
- package/node_modules/type-fest/source/is-null.d.ts +22 -0
- package/node_modules/type-fest/source/is-nullable.d.ts +30 -0
- package/node_modules/type-fest/source/is-optional-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/is-optional.d.ts +28 -0
- package/node_modules/type-fest/source/is-readonly-key-of.d.ts +55 -0
- package/node_modules/type-fest/source/is-required-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/is-tuple.d.ts +92 -0
- package/node_modules/type-fest/source/is-undefined.d.ts +22 -0
- package/node_modules/type-fest/source/is-union.d.ts +40 -0
- package/node_modules/type-fest/source/is-unknown.d.ts +43 -0
- package/node_modules/type-fest/source/is-uppercase.d.ts +38 -0
- package/node_modules/type-fest/source/is-writable-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/iterable-element.d.ts +66 -0
- package/node_modules/type-fest/source/join.d.ts +79 -0
- package/node_modules/type-fest/source/json-value.d.ts +33 -0
- package/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
- package/node_modules/type-fest/source/jsonify.d.ts +127 -0
- package/node_modules/type-fest/source/kebab-case.d.ts +47 -0
- package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +72 -0
- package/node_modules/type-fest/source/kebab-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/key-as-string.d.ts +27 -0
- package/node_modules/type-fest/source/keys-of-union.d.ts +44 -0
- package/node_modules/type-fest/source/last-array-element.d.ts +89 -0
- package/node_modules/type-fest/source/less-than-or-equal.d.ts +60 -0
- package/node_modules/type-fest/source/less-than.d.ts +60 -0
- package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +71 -0
- package/node_modules/type-fest/source/literal-to-primitive.d.ts +38 -0
- package/node_modules/type-fest/source/literal-union.d.ts +39 -0
- package/node_modules/type-fest/source/merge-deep.d.ts +495 -0
- package/node_modules/type-fest/source/merge-exclusive.d.ts +45 -0
- package/node_modules/type-fest/source/merge.d.ts +87 -0
- package/node_modules/type-fest/source/multidimensional-array.d.ts +38 -0
- package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +38 -0
- package/node_modules/type-fest/source/non-empty-object.d.ts +38 -0
- package/node_modules/type-fest/source/non-empty-string.d.ts +32 -0
- package/node_modules/type-fest/source/non-empty-tuple.d.ts +24 -0
- package/node_modules/type-fest/source/non-nullable-deep.d.ts +102 -0
- package/node_modules/type-fest/source/numeric.d.ts +226 -0
- package/node_modules/type-fest/source/object-merge.d.ts +199 -0
- package/node_modules/type-fest/source/omit-deep.d.ts +153 -0
- package/node_modules/type-fest/source/omit-index-signature.d.ts +98 -0
- package/node_modules/type-fest/source/opaque.d.ts +3 -0
- package/node_modules/type-fest/source/optional-keys-of.d.ts +46 -0
- package/node_modules/type-fest/source/optional.d.ts +31 -0
- package/node_modules/type-fest/source/or-all.d.ts +73 -0
- package/node_modules/type-fest/source/or.d.ts +82 -0
- package/node_modules/type-fest/source/override-properties.d.ts +43 -0
- package/node_modules/type-fest/source/package-json.d.ts +710 -0
- package/node_modules/type-fest/source/partial-deep.d.ts +157 -0
- package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +81 -0
- package/node_modules/type-fest/source/pascal-case.d.ts +52 -0
- package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +79 -0
- package/node_modules/type-fest/source/pascal-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/paths.d.ts +241 -0
- package/node_modules/type-fest/source/pick-deep.d.ts +139 -0
- package/node_modules/type-fest/source/pick-index-signature.d.ts +52 -0
- package/node_modules/type-fest/source/primitive.d.ts +15 -0
- package/node_modules/type-fest/source/promisable.d.ts +27 -0
- package/node_modules/type-fest/source/readonly-deep.d.ts +118 -0
- package/node_modules/type-fest/source/readonly-keys-of.d.ts +38 -0
- package/node_modules/type-fest/source/readonly-tuple.d.ts +34 -0
- package/node_modules/type-fest/source/remove-prefix.d.ts +114 -0
- package/node_modules/type-fest/source/remove-suffix.d.ts +114 -0
- package/node_modules/type-fest/source/replace.d.ts +87 -0
- package/node_modules/type-fest/source/require-all-or-none.d.ts +54 -0
- package/node_modules/type-fest/source/require-at-least-one.d.ts +48 -0
- package/node_modules/type-fest/source/require-exactly-one.d.ts +48 -0
- package/node_modules/type-fest/source/require-one-or-none.d.ts +49 -0
- package/node_modules/type-fest/source/required-deep.d.ts +78 -0
- package/node_modules/type-fest/source/required-keys-of.d.ts +38 -0
- package/node_modules/type-fest/source/schema.d.ts +127 -0
- package/node_modules/type-fest/source/screaming-snake-case.d.ts +31 -0
- package/node_modules/type-fest/source/set-field-type.d.ts +67 -0
- package/node_modules/type-fest/source/set-non-nullable-deep.d.ts +89 -0
- package/node_modules/type-fest/source/set-non-nullable.d.ts +34 -0
- package/node_modules/type-fest/source/set-optional.d.ts +42 -0
- package/node_modules/type-fest/source/set-parameter-type.d.ts +125 -0
- package/node_modules/type-fest/source/set-readonly.d.ts +40 -0
- package/node_modules/type-fest/source/set-required-deep.d.ts +65 -0
- package/node_modules/type-fest/source/set-required.d.ts +75 -0
- package/node_modules/type-fest/source/set-return-type.d.ts +31 -0
- package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +180 -0
- package/node_modules/type-fest/source/shared-union-fields.d.ts +79 -0
- package/node_modules/type-fest/source/simplify-deep.d.ts +117 -0
- package/node_modules/type-fest/source/simplify.d.ts +61 -0
- package/node_modules/type-fest/source/single-key-object.d.ts +28 -0
- package/node_modules/type-fest/source/snake-case.d.ts +48 -0
- package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +72 -0
- package/node_modules/type-fest/source/snake-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/some-extend.d.ts +115 -0
- package/node_modules/type-fest/source/split-on-rest-element.d.ts +108 -0
- package/node_modules/type-fest/source/split.d.ts +90 -0
- package/node_modules/type-fest/source/spread.d.ts +78 -0
- package/node_modules/type-fest/source/string-length.d.ts +38 -0
- package/node_modules/type-fest/source/string-repeat.d.ts +76 -0
- package/node_modules/type-fest/source/string-slice.d.ts +39 -0
- package/node_modules/type-fest/source/string-to-array.d.ts +97 -0
- package/node_modules/type-fest/source/string-to-number.d.ts +67 -0
- package/node_modules/type-fest/source/stringified.d.ts +25 -0
- package/node_modules/type-fest/source/structured-cloneable.d.ts +89 -0
- package/node_modules/type-fest/source/subtract.d.ts +87 -0
- package/node_modules/type-fest/source/sum.d.ts +82 -0
- package/node_modules/type-fest/source/tagged-union.d.ts +53 -0
- package/node_modules/type-fest/source/tagged.d.ts +261 -0
- package/node_modules/type-fest/source/trim.d.ts +29 -0
- package/node_modules/type-fest/source/tsconfig-json.d.ts +1356 -0
- package/node_modules/type-fest/source/tuple-of.d.ts +114 -0
- package/node_modules/type-fest/source/tuple-to-object.d.ts +47 -0
- package/node_modules/type-fest/source/tuple-to-union.d.ts +54 -0
- package/node_modules/type-fest/source/typed-array.d.ts +19 -0
- package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +83 -0
- package/node_modules/type-fest/source/union-length.d.ts +27 -0
- package/node_modules/type-fest/source/union-member.d.ts +65 -0
- package/node_modules/type-fest/source/union-to-intersection.d.ts +35 -0
- package/node_modules/type-fest/source/union-to-tuple.d.ts +49 -0
- package/node_modules/type-fest/source/unknown-array.d.ts +27 -0
- package/node_modules/type-fest/source/unknown-map.d.ts +26 -0
- package/node_modules/type-fest/source/unknown-record.d.ts +33 -0
- package/node_modules/type-fest/source/unknown-set.d.ts +26 -0
- package/node_modules/type-fest/source/unwrap-partial.d.ts +33 -0
- package/node_modules/type-fest/source/unwrap-required.d.ts +37 -0
- package/node_modules/type-fest/source/value-of.d.ts +24 -0
- package/node_modules/type-fest/source/words.d.ts +148 -0
- package/node_modules/type-fest/source/writable-deep.d.ts +84 -0
- package/node_modules/type-fest/source/writable-keys-of.d.ts +34 -0
- package/node_modules/type-fest/source/writable.d.ts +68 -0
- package/node_modules/type-fest/source/xor.d.ts +83 -0
- package/node_modules/uint8array-extras/index.d.ts +331 -0
- package/node_modules/uint8array-extras/index.js +318 -0
- package/node_modules/uint8array-extras/license +9 -0
- package/node_modules/uint8array-extras/package.json +54 -0
- package/node_modules/uint8array-extras/readme.md +318 -0
- package/node_modules/universalify/LICENSE +20 -0
- package/node_modules/universalify/README.md +76 -0
- package/node_modules/universalify/index.js +24 -0
- package/node_modules/universalify/package.json +34 -0
- package/node_modules/when-exit/dist/browser/index.d.ts +2 -0
- package/node_modules/when-exit/dist/browser/index.js +6 -0
- package/node_modules/when-exit/dist/browser/interceptor.d.ts +10 -0
- package/node_modules/when-exit/dist/browser/interceptor.js +27 -0
- package/node_modules/when-exit/dist/node/constants.d.ts +3 -0
- package/node_modules/when-exit/dist/node/constants.js +7 -0
- package/node_modules/when-exit/dist/node/index.d.ts +2 -0
- package/node_modules/when-exit/dist/node/index.js +6 -0
- package/node_modules/when-exit/dist/node/interceptor.d.ts +11 -0
- package/node_modules/when-exit/dist/node/interceptor.js +50 -0
- package/node_modules/when-exit/dist/node/signals.d.ts +2 -0
- package/node_modules/when-exit/dist/node/signals.js +13 -0
- package/node_modules/when-exit/dist/types.d.ts +3 -0
- package/node_modules/when-exit/dist/types.js +2 -0
- package/node_modules/when-exit/license +21 -0
- package/node_modules/when-exit/package.json +35 -0
- package/node_modules/when-exit/readme.md +41 -0
- package/package.json +27 -12
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitLabProvider = void 0;
|
|
4
|
+
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
5
|
+
const url_1 = require("url");
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
const escapeRegExp = require("lodash.escaperegexp");
|
|
8
|
+
const util_1 = require("../util");
|
|
9
|
+
const Provider_1 = require("./Provider");
|
|
10
|
+
class GitLabProvider extends Provider_1.Provider {
|
|
11
|
+
/**
|
|
12
|
+
* Normalizes filenames by replacing spaces and underscores with dashes.
|
|
13
|
+
*
|
|
14
|
+
* This is a workaround to handle filename formatting differences between tools:
|
|
15
|
+
* - electron-builder formats filenames like "test file.txt" as "test-file.txt"
|
|
16
|
+
* - GitLab may provide asset URLs using underscores, such as "test_file.txt"
|
|
17
|
+
*
|
|
18
|
+
* Because of this mismatch, we can't reliably extract the correct filename from
|
|
19
|
+
* the asset path without normalization. This function ensures consistent matching
|
|
20
|
+
* across different filename formats by converting all spaces and underscores to dashes.
|
|
21
|
+
*
|
|
22
|
+
* @param filename The filename to normalize
|
|
23
|
+
* @returns The normalized filename with spaces and underscores replaced by dashes
|
|
24
|
+
*/
|
|
25
|
+
normalizeFilename(filename) {
|
|
26
|
+
return filename.replace(/ |_/g, "-");
|
|
27
|
+
}
|
|
28
|
+
constructor(options, updater, runtimeOptions) {
|
|
29
|
+
super({
|
|
30
|
+
...runtimeOptions,
|
|
31
|
+
// GitLab might not support multiple range requests efficiently
|
|
32
|
+
isUseMultipleRangeRequest: false,
|
|
33
|
+
});
|
|
34
|
+
this.options = options;
|
|
35
|
+
this.updater = updater;
|
|
36
|
+
// Cache the latest version info to avoid unnecessary HTTP requests
|
|
37
|
+
this.cachedLatestVersion = null;
|
|
38
|
+
const defaultHost = "gitlab.com";
|
|
39
|
+
const host = options.host || defaultHost;
|
|
40
|
+
this.baseApiUrl = (0, util_1.newBaseUrl)(`https://${host}/api/v4`);
|
|
41
|
+
}
|
|
42
|
+
createRequestOptions(url, headers) {
|
|
43
|
+
const result = super.createRequestOptions(url, headers);
|
|
44
|
+
result.redirect = "manual";
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
get channel() {
|
|
48
|
+
const result = this.updater.channel || this.options.channel;
|
|
49
|
+
return result == null ? this.getDefaultChannelName() : this.getCustomChannelName(result);
|
|
50
|
+
}
|
|
51
|
+
async getLatestVersion() {
|
|
52
|
+
const cancellationToken = new builder_util_runtime_1.CancellationToken();
|
|
53
|
+
// Get latest release from GitLab API using the permalink/latest endpoint
|
|
54
|
+
const latestReleaseUrl = (0, util_1.newUrlFromBase)(`projects/${this.options.projectId}/releases/permalink/latest`, this.baseApiUrl);
|
|
55
|
+
const header = { Accept: "application/json", ...this.setAuthHeaderForToken(this.options.token || null) };
|
|
56
|
+
let releaseResponse;
|
|
57
|
+
try {
|
|
58
|
+
releaseResponse = await this.httpRequest(latestReleaseUrl, header, cancellationToken);
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
throw (0, builder_util_runtime_1.newError)(`Unable to find latest release on GitLab (${latestReleaseUrl}): ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
|
|
62
|
+
}
|
|
63
|
+
if (!releaseResponse) {
|
|
64
|
+
throw (0, builder_util_runtime_1.newError)("No published releases on GitLab", "ERR_UPDATER_NO_PUBLISHED_VERSIONS");
|
|
65
|
+
}
|
|
66
|
+
let latestRelease;
|
|
67
|
+
try {
|
|
68
|
+
latestRelease = JSON.parse(releaseResponse);
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
throw (0, builder_util_runtime_1.newError)(`Unable to parse latest release response from GitLab (${latestReleaseUrl}): response was not valid JSON: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
|
|
72
|
+
}
|
|
73
|
+
if (latestRelease.upcoming_release) {
|
|
74
|
+
throw (0, builder_util_runtime_1.newError)("Latest GitLab release is scheduled but not yet published", "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
|
|
75
|
+
}
|
|
76
|
+
const tag = latestRelease.tag_name;
|
|
77
|
+
// Look for channel file in release assets
|
|
78
|
+
let rawData = null;
|
|
79
|
+
let channelFile = "";
|
|
80
|
+
let channelFileUrl = null;
|
|
81
|
+
const fetchChannelData = async (channelName) => {
|
|
82
|
+
channelFile = (0, util_1.getChannelFilename)(channelName);
|
|
83
|
+
// Find the channel file in GitLab release assets
|
|
84
|
+
const channelAsset = latestRelease.assets.links.find(asset => asset.name === channelFile);
|
|
85
|
+
if (!channelAsset) {
|
|
86
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find ${channelFile} in the latest release assets`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
|
|
87
|
+
}
|
|
88
|
+
channelFileUrl = new url_1.URL(channelAsset.direct_asset_url);
|
|
89
|
+
const authHeaders = this.setAuthHeaderForToken(this.options.token || null);
|
|
90
|
+
const headers = Object.keys(authHeaders).length ? authHeaders : undefined;
|
|
91
|
+
try {
|
|
92
|
+
const result = await this.httpRequest(channelFileUrl, headers, cancellationToken);
|
|
93
|
+
if (!result) {
|
|
94
|
+
throw (0, builder_util_runtime_1.newError)(`Empty response from ${channelFileUrl}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
if (e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) {
|
|
100
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
|
|
101
|
+
}
|
|
102
|
+
throw e;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
try {
|
|
106
|
+
rawData = await fetchChannelData(this.channel);
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
// If custom channel fails, try default channel as fallback
|
|
110
|
+
if (this.channel !== this.getDefaultChannelName()) {
|
|
111
|
+
rawData = await fetchChannelData(this.getDefaultChannelName());
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
throw e;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (!rawData) {
|
|
118
|
+
throw (0, builder_util_runtime_1.newError)(`Unable to parse channel data from ${channelFile}`, "ERR_UPDATER_INVALID_UPDATE_INFO");
|
|
119
|
+
}
|
|
120
|
+
const result = (0, Provider_1.parseUpdateInfo)(rawData, channelFile, channelFileUrl);
|
|
121
|
+
// Set release name from GitLab if not present
|
|
122
|
+
if (result.releaseName == null) {
|
|
123
|
+
result.releaseName = latestRelease.name;
|
|
124
|
+
}
|
|
125
|
+
// Set release notes from GitLab description if not present
|
|
126
|
+
if (result.releaseNotes == null) {
|
|
127
|
+
result.releaseNotes = latestRelease.description || null;
|
|
128
|
+
}
|
|
129
|
+
const gitlabUpdateInfo = {
|
|
130
|
+
tag: tag,
|
|
131
|
+
assets: this.convertAssetsToMap(latestRelease.assets),
|
|
132
|
+
...result,
|
|
133
|
+
};
|
|
134
|
+
// Cache the latest version info
|
|
135
|
+
this.cachedLatestVersion = gitlabUpdateInfo;
|
|
136
|
+
return gitlabUpdateInfo;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Utility function to convert GitlabReleaseAsset to Map<string, string>
|
|
140
|
+
* Maps asset names to their download URLs
|
|
141
|
+
*/
|
|
142
|
+
convertAssetsToMap(assets) {
|
|
143
|
+
const assetsMap = new Map();
|
|
144
|
+
for (const asset of assets.links) {
|
|
145
|
+
assetsMap.set(this.normalizeFilename(asset.name), asset.direct_asset_url);
|
|
146
|
+
}
|
|
147
|
+
return assetsMap;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Find blockmap file URL in assets map for a specific filename
|
|
151
|
+
*/
|
|
152
|
+
findBlockMapInAssets(assets, filename) {
|
|
153
|
+
const possibleBlockMapNames = [`${filename}.blockmap`, `${this.normalizeFilename(filename)}.blockmap`];
|
|
154
|
+
for (const blockMapName of possibleBlockMapNames) {
|
|
155
|
+
const assetUrl = assets.get(blockMapName);
|
|
156
|
+
if (assetUrl) {
|
|
157
|
+
return new url_1.URL(assetUrl);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
async fetchReleaseInfoByVersion(version) {
|
|
163
|
+
const cancellationToken = new builder_util_runtime_1.CancellationToken();
|
|
164
|
+
// Try v-prefixed version first, then fallback to plain version
|
|
165
|
+
const possibleReleaseIds = [`v${version}`, version];
|
|
166
|
+
for (const releaseId of possibleReleaseIds) {
|
|
167
|
+
const releaseUrl = (0, util_1.newUrlFromBase)(`projects/${this.options.projectId}/releases/${encodeURIComponent(releaseId)}`, this.baseApiUrl);
|
|
168
|
+
try {
|
|
169
|
+
const header = { Accept: "application/json", ...this.setAuthHeaderForToken(this.options.token || null) };
|
|
170
|
+
const releaseResponse = await this.httpRequest(releaseUrl, header, cancellationToken);
|
|
171
|
+
if (releaseResponse) {
|
|
172
|
+
const release = JSON.parse(releaseResponse);
|
|
173
|
+
return release;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (e) {
|
|
177
|
+
// If it's a 404 error, try the next release ID format
|
|
178
|
+
if (e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) {
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
// For other errors, throw immediately
|
|
182
|
+
throw (0, builder_util_runtime_1.newError)(`Unable to find release ${releaseId} on GitLab (${releaseUrl}): ${e.stack || e.message}`, "ERR_UPDATER_RELEASE_NOT_FOUND");
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// If we get here, none of the release ID formats worked
|
|
186
|
+
throw (0, builder_util_runtime_1.newError)(`Unable to find release with version ${version} (tried: ${possibleReleaseIds.join(", ")}) on GitLab`, "ERR_UPDATER_RELEASE_NOT_FOUND");
|
|
187
|
+
}
|
|
188
|
+
setAuthHeaderForToken(token) {
|
|
189
|
+
const headers = {};
|
|
190
|
+
if (token != null) {
|
|
191
|
+
// If the token starts with "Bearer", it is an OAuth application secret
|
|
192
|
+
// Note that the original gitlab token would not start with "Bearer"
|
|
193
|
+
// it might start with "gloas-", if so user needs to add "Bearer " prefix to the token
|
|
194
|
+
if (token.startsWith("Bearer")) {
|
|
195
|
+
headers.authorization = token;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
headers["PRIVATE-TOKEN"] = token;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return headers;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Get version info for blockmap files, using cache when possible
|
|
205
|
+
*/
|
|
206
|
+
async getVersionInfoForBlockMap(version) {
|
|
207
|
+
// Check if we can use cached version info
|
|
208
|
+
if (this.cachedLatestVersion && this.cachedLatestVersion.version === version) {
|
|
209
|
+
return this.cachedLatestVersion.assets;
|
|
210
|
+
}
|
|
211
|
+
// Fetch version info if not cached or version doesn't match
|
|
212
|
+
const versionInfo = await this.fetchReleaseInfoByVersion(version);
|
|
213
|
+
if (versionInfo && versionInfo.assets) {
|
|
214
|
+
return this.convertAssetsToMap(versionInfo.assets);
|
|
215
|
+
}
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Find blockmap URLs from version assets
|
|
220
|
+
*/
|
|
221
|
+
async findBlockMapUrlsFromAssets(oldVersion, newVersion, baseFilename) {
|
|
222
|
+
let newBlockMapUrl = null;
|
|
223
|
+
let oldBlockMapUrl = null;
|
|
224
|
+
// Get new version assets
|
|
225
|
+
const newVersionAssets = await this.getVersionInfoForBlockMap(newVersion);
|
|
226
|
+
if (newVersionAssets) {
|
|
227
|
+
newBlockMapUrl = this.findBlockMapInAssets(newVersionAssets, baseFilename);
|
|
228
|
+
}
|
|
229
|
+
// Get old version assets
|
|
230
|
+
const oldVersionAssets = await this.getVersionInfoForBlockMap(oldVersion);
|
|
231
|
+
if (oldVersionAssets) {
|
|
232
|
+
const oldFilename = baseFilename.replace(new RegExp(escapeRegExp(newVersion), "g"), oldVersion);
|
|
233
|
+
oldBlockMapUrl = this.findBlockMapInAssets(oldVersionAssets, oldFilename);
|
|
234
|
+
}
|
|
235
|
+
return [oldBlockMapUrl, newBlockMapUrl];
|
|
236
|
+
}
|
|
237
|
+
async getBlockMapFiles(baseUrl, oldVersion, newVersion, oldBlockMapFileBaseUrl = null) {
|
|
238
|
+
// If is `project_upload`, find blockmap files from corresponding gitLab assets
|
|
239
|
+
// Because each asset has an unique path that includes an identified hash code,
|
|
240
|
+
// e.g. https://gitlab.com/-/project/71361100/uploads/051f27a925eaf679f2ad688105362acc/latest.yml
|
|
241
|
+
if (this.options.uploadTarget === "project_upload") {
|
|
242
|
+
// Get the base filename from the URL to find corresponding blockmap files
|
|
243
|
+
const baseFilename = baseUrl.pathname.split("/").pop() || "";
|
|
244
|
+
// Try to find blockmap files in GitLab assets
|
|
245
|
+
const [oldBlockMapUrl, newBlockMapUrl] = await this.findBlockMapUrlsFromAssets(oldVersion, newVersion, baseFilename);
|
|
246
|
+
if (!newBlockMapUrl) {
|
|
247
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find blockmap file for ${newVersion} in GitLab assets`, "ERR_UPDATER_BLOCKMAP_FILE_NOT_FOUND");
|
|
248
|
+
}
|
|
249
|
+
if (!oldBlockMapUrl) {
|
|
250
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find blockmap file for ${oldVersion} in GitLab assets`, "ERR_UPDATER_BLOCKMAP_FILE_NOT_FOUND");
|
|
251
|
+
}
|
|
252
|
+
return [oldBlockMapUrl, newBlockMapUrl];
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
return super.getBlockMapFiles(baseUrl, oldVersion, newVersion, oldBlockMapFileBaseUrl);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
resolveFiles(updateInfo) {
|
|
259
|
+
return (0, Provider_1.getFileList)(updateInfo).map((fileInfo) => {
|
|
260
|
+
// Try both original and normalized filename formats
|
|
261
|
+
const possibleNames = [
|
|
262
|
+
fileInfo.url, // Original filename
|
|
263
|
+
this.normalizeFilename(fileInfo.url), // Normalized filename (spaces/underscores → dashes)
|
|
264
|
+
];
|
|
265
|
+
const matchingAssetName = possibleNames.find(name => updateInfo.assets.has(name));
|
|
266
|
+
const assetUrl = matchingAssetName ? updateInfo.assets.get(matchingAssetName) : undefined;
|
|
267
|
+
if (!assetUrl) {
|
|
268
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find asset "${fileInfo.url}" in GitLab release assets. Available assets: ${Array.from(updateInfo.assets.keys()).join(", ")}`, "ERR_UPDATER_ASSET_NOT_FOUND");
|
|
269
|
+
}
|
|
270
|
+
return {
|
|
271
|
+
url: new url_1.URL(assetUrl),
|
|
272
|
+
info: fileInfo,
|
|
273
|
+
};
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
toString() {
|
|
277
|
+
return `GitLab (projectId: ${this.options.projectId}, channel: ${this.channel})`;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
exports.GitLabProvider = GitLabProvider;
|
|
281
|
+
//# sourceMappingURL=GitLabProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitLabProvider.js","sourceRoot":"","sources":["../../src/providers/GitLabProvider.ts"],"names":[],"mappings":";;;AAAA,+DAA+J;AAE/J,6BAAyB;AACzB,aAAa;AACb,oDAAmD;AAGnD,kCAAwE;AACxE,yCAA2F;AAO3F,MAAa,cAAe,SAAQ,mBAA0B;IAK5D;;;;;;;;;;;;;OAaG;IACK,iBAAiB,CAAC,QAAgB;QACxC,OAAO,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtC,CAAC;IAED,YACmB,OAAsB,EACtB,OAAmB,EACpC,cAAsC;QAEtC,KAAK,CAAC;YACJ,GAAG,cAAc;YACjB,+DAA+D;YAC/D,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAAA;QARe,YAAO,GAAP,OAAO,CAAe;QACtB,YAAO,GAAP,OAAO,CAAY;QAvBtC,mEAAmE;QAC3D,wBAAmB,GAA4B,IAAI,CAAA;QA+BzD,MAAM,WAAW,GAAG,YAAY,CAAA;QAChC,MAAM,IAAI,GAAG,OAA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f,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,sBAAsB,IAAI,CAAC,OAAO,CAAC,SAAS,cAAc,IAAI,CAAC,OAAO,GAAG,CAAA;IAClF,CAAC;CACF;AAtUD,wCAsUC","sourcesContent":["import { CancellationToken, GitlabOptions, HttpError, newError, UpdateFileInfo, UpdateInfo, GitlabReleaseInfo, GitlabReleaseAsset } from \"builder-util-runtime\"\nimport { OutgoingHttpHeaders, RequestOptions } from \"http\"\nimport { URL } from \"url\"\n// @ts-ignore\nimport * as escapeRegExp from \"lodash.escaperegexp\"\nimport { AppUpdater } from \"../AppUpdater\"\nimport { ResolvedUpdateFileInfo } from \"../types\"\nimport { getChannelFilename, newBaseUrl, newUrlFromBase } from \"../util\"\nimport { getFileList, parseUpdateInfo, Provider, ProviderRuntimeOptions } from \"./Provider\"\n\ninterface GitlabUpdateInfo extends UpdateInfo {\n tag: string\n assets: Map<string, string> // filename -> download URL mapping\n}\n\nexport class GitLabProvider extends Provider<GitlabUpdateInfo> {\n private readonly baseApiUrl: URL\n // Cache the latest version info to avoid unnecessary HTTP requests\n private cachedLatestVersion: GitlabUpdateInfo | null = null\n\n /**\n * Normalizes filenames by replacing spaces and underscores with dashes.\n *\n * This is a workaround to handle filename formatting differences between tools:\n * - electron-builder formats filenames like \"test file.txt\" as \"test-file.txt\"\n * - GitLab may provide asset URLs using underscores, such as \"test_file.txt\"\n *\n * Because of this mismatch, we can't reliably extract the correct filename from\n * the asset path without normalization. This function ensures consistent matching\n * across different filename formats by converting all spaces and underscores to dashes.\n *\n * @param filename The filename to normalize\n * @returns The normalized filename with spaces and underscores replaced by dashes\n */\n private normalizeFilename(filename: string): string {\n return filename.replace(/ |_/g, \"-\")\n }\n\n constructor(\n private readonly options: GitlabOptions,\n private readonly updater: AppUpdater,\n runtimeOptions: ProviderRuntimeOptions\n ) {\n super({\n ...runtimeOptions,\n // GitLab might not support multiple range requests efficiently\n isUseMultipleRangeRequest: false,\n })\n\n const defaultHost = \"gitlab.com\"\n const host = options.host || defaultHost\n\n this.baseApiUrl = newBaseUrl(`https://${host}/api/v4`)\n }\n\n protected createRequestOptions(url: URL, headers?: OutgoingHttpHeaders | null): RequestOptions {\n const result = super.createRequestOptions(url, headers)\n ;(result as any).redirect = \"manual\"\n return result\n }\n\n private get channel(): string {\n const result = this.updater.channel || this.options.channel\n return result == null ? this.getDefaultChannelName() : this.getCustomChannelName(result)\n }\n\n async getLatestVersion(): Promise<GitlabUpdateInfo> {\n const cancellationToken = new CancellationToken()\n\n // Get latest release from GitLab API using the permalink/latest endpoint\n const latestReleaseUrl = newUrlFromBase(`projects/${this.options.projectId}/releases/permalink/latest`, this.baseApiUrl)\n\n const header = { Accept: \"application/json\", ...this.setAuthHeaderForToken(this.options.token || null) }\n let releaseResponse: string | null\n try {\n releaseResponse = await this.httpRequest(latestReleaseUrl, header, cancellationToken)\n } catch (e: any) {\n throw newError(`Unable to find latest release on GitLab (${latestReleaseUrl}): ${e.stack || e.message}`, \"ERR_UPDATER_LATEST_VERSION_NOT_FOUND\")\n }\n\n if (!releaseResponse) {\n throw newError(\"No published releases on GitLab\", \"ERR_UPDATER_NO_PUBLISHED_VERSIONS\")\n }\n\n let latestRelease: GitlabReleaseInfo\n try {\n latestRelease = JSON.parse(releaseResponse)\n } catch (e: any) {\n throw newError(\n `Unable to parse latest release response from GitLab (${latestReleaseUrl}): response was not valid JSON: ${e.stack || e.message}`,\n \"ERR_UPDATER_LATEST_VERSION_NOT_FOUND\"\n )\n }\n\n if (latestRelease.upcoming_release) {\n throw newError(\"Latest GitLab release is scheduled but not yet published\", \"ERR_UPDATER_LATEST_VERSION_NOT_FOUND\")\n }\n\n const tag = latestRelease.tag_name\n\n // Look for channel file in release assets\n let rawData: string | null = null\n let channelFile = \"\"\n let channelFileUrl: URL | null = null\n\n const fetchChannelData = async (channelName: string): Promise<string> => {\n channelFile = getChannelFilename(channelName)\n\n // Find the channel file in GitLab release assets\n const channelAsset = latestRelease.assets.links.find(asset => asset.name === channelFile)\n\n if (!channelAsset) {\n throw newError(`Cannot find ${channelFile} in the latest release assets`, \"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND\")\n }\n\n channelFileUrl = new URL(channelAsset.direct_asset_url)\n const authHeaders = this.setAuthHeaderForToken(this.options.token || null)\n const headers = Object.keys(authHeaders).length ? authHeaders : undefined\n\n try {\n const result = await this.httpRequest(channelFileUrl, headers, cancellationToken)\n if (!result) {\n throw newError(`Empty response from ${channelFileUrl}`, \"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND\")\n }\n return result\n } catch (e: any) {\n if (e instanceof HttpError && e.statusCode === 404) {\n throw newError(`Cannot find ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}`, \"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND\")\n }\n throw e\n }\n }\n\n try {\n rawData = await fetchChannelData(this.channel)\n } catch (e: any) {\n // If custom channel fails, try default channel as fallback\n if (this.channel !== this.getDefaultChannelName()) {\n rawData = await fetchChannelData(this.getDefaultChannelName())\n } else {\n throw e\n }\n }\n\n if (!rawData) {\n throw newError(`Unable to parse channel data from ${channelFile}`, \"ERR_UPDATER_INVALID_UPDATE_INFO\")\n }\n\n const result = parseUpdateInfo(rawData, channelFile, channelFileUrl!)\n\n // Set release name from GitLab if not present\n if (result.releaseName == null) {\n result.releaseName = latestRelease.name\n }\n\n // Set release notes from GitLab description if not present\n if (result.releaseNotes == null) {\n result.releaseNotes = latestRelease.description || null\n }\n\n const gitlabUpdateInfo = {\n tag: tag,\n assets: this.convertAssetsToMap(latestRelease.assets),\n ...result,\n }\n\n // Cache the latest version info\n this.cachedLatestVersion = gitlabUpdateInfo\n\n return gitlabUpdateInfo\n }\n\n /**\n * Utility function to convert GitlabReleaseAsset to Map<string, string>\n * Maps asset names to their download URLs\n */\n private convertAssetsToMap(assets: GitlabReleaseAsset): Map<string, string> {\n const assetsMap = new Map<string, string>()\n for (const asset of assets.links) {\n assetsMap.set(this.normalizeFilename(asset.name), asset.direct_asset_url)\n }\n return assetsMap\n }\n\n /**\n * Find blockmap file URL in assets map for a specific filename\n */\n private findBlockMapInAssets(assets: Map<string, string>, filename: string): URL | null {\n const possibleBlockMapNames = [`${filename}.blockmap`, `${this.normalizeFilename(filename)}.blockmap`]\n\n for (const blockMapName of possibleBlockMapNames) {\n const assetUrl = assets.get(blockMapName)\n if (assetUrl) {\n return new URL(assetUrl)\n }\n }\n return null\n }\n\n private async fetchReleaseInfoByVersion(version: string): Promise<GitlabReleaseInfo | null> {\n const cancellationToken = new CancellationToken()\n\n // Try v-prefixed version first, then fallback to plain version\n const possibleReleaseIds = [`v${version}`, version]\n\n for (const releaseId of possibleReleaseIds) {\n const releaseUrl = newUrlFromBase(`projects/${this.options.projectId}/releases/${encodeURIComponent(releaseId)}`, this.baseApiUrl)\n\n try {\n const header = { Accept: \"application/json\", ...this.setAuthHeaderForToken(this.options.token || null) }\n const releaseResponse = await this.httpRequest(releaseUrl, header, cancellationToken)\n\n if (releaseResponse) {\n const release: GitlabReleaseInfo = JSON.parse(releaseResponse)\n return release\n }\n } catch (e: any) {\n // If it's a 404 error, try the next release ID format\n if (e instanceof HttpError && e.statusCode === 404) {\n continue\n }\n // For other errors, throw immediately\n throw newError(`Unable to find release ${releaseId} on GitLab (${releaseUrl}): ${e.stack || e.message}`, \"ERR_UPDATER_RELEASE_NOT_FOUND\")\n }\n }\n\n // If we get here, none of the release ID formats worked\n throw newError(`Unable to find release with version ${version} (tried: ${possibleReleaseIds.join(\", \")}) on GitLab`, \"ERR_UPDATER_RELEASE_NOT_FOUND\")\n }\n\n private setAuthHeaderForToken(token: string | null): { [key: string]: string } {\n const headers: { [key: string]: string } = {}\n\n if (token != null) {\n // If the token starts with \"Bearer\", it is an OAuth application secret\n // Note that the original gitlab token would not start with \"Bearer\"\n // it might start with \"gloas-\", if so user needs to add \"Bearer \" prefix to the token\n if (token.startsWith(\"Bearer\")) {\n headers.authorization = token\n } else {\n headers[\"PRIVATE-TOKEN\"] = token\n }\n }\n\n return headers\n }\n\n /**\n * Get version info for blockmap files, using cache when possible\n */\n private async getVersionInfoForBlockMap(version: string): Promise<Map<string, string> | null> {\n // Check if we can use cached version info\n if (this.cachedLatestVersion && this.cachedLatestVersion.version === version) {\n return this.cachedLatestVersion.assets\n }\n\n // Fetch version info if not cached or version doesn't match\n const versionInfo = await this.fetchReleaseInfoByVersion(version)\n if (versionInfo && versionInfo.assets) {\n return this.convertAssetsToMap(versionInfo.assets)\n }\n\n return null\n }\n\n /**\n * Find blockmap URLs from version assets\n */\n private async findBlockMapUrlsFromAssets(oldVersion: string, newVersion: string, baseFilename: string): Promise<[URL | null, URL | null]> {\n let newBlockMapUrl: URL | null = null\n let oldBlockMapUrl: URL | null = null\n\n // Get new version assets\n const newVersionAssets = await this.getVersionInfoForBlockMap(newVersion)\n if (newVersionAssets) {\n newBlockMapUrl = this.findBlockMapInAssets(newVersionAssets, baseFilename)\n }\n\n // Get old version assets\n const oldVersionAssets = await this.getVersionInfoForBlockMap(oldVersion)\n if (oldVersionAssets) {\n const oldFilename = baseFilename.replace(new RegExp(escapeRegExp(newVersion), \"g\"), oldVersion)\n oldBlockMapUrl = this.findBlockMapInAssets(oldVersionAssets, oldFilename)\n }\n\n return [oldBlockMapUrl, newBlockMapUrl]\n }\n\n async getBlockMapFiles(baseUrl: URL, oldVersion: string, newVersion: string, oldBlockMapFileBaseUrl: string | null = null): Promise<URL[]> {\n // If is `project_upload`, find blockmap files from corresponding gitLab assets\n // Because each asset has an unique path that includes an identified hash code,\n // e.g. https://gitlab.com/-/project/71361100/uploads/051f27a925eaf679f2ad688105362acc/latest.yml\n if (this.options.uploadTarget === \"project_upload\") {\n // Get the base filename from the URL to find corresponding blockmap files\n const baseFilename = baseUrl.pathname.split(\"/\").pop() || \"\"\n\n // Try to find blockmap files in GitLab assets\n const [oldBlockMapUrl, newBlockMapUrl] = await this.findBlockMapUrlsFromAssets(oldVersion, newVersion, baseFilename)\n\n if (!newBlockMapUrl) {\n throw newError(`Cannot find blockmap file for ${newVersion} in GitLab assets`, \"ERR_UPDATER_BLOCKMAP_FILE_NOT_FOUND\")\n }\n\n if (!oldBlockMapUrl) {\n throw newError(`Cannot find blockmap file for ${oldVersion} in GitLab assets`, \"ERR_UPDATER_BLOCKMAP_FILE_NOT_FOUND\")\n }\n\n return [oldBlockMapUrl, newBlockMapUrl]\n } else {\n return super.getBlockMapFiles(baseUrl, oldVersion, newVersion, oldBlockMapFileBaseUrl)\n }\n }\n\n resolveFiles(updateInfo: GitlabUpdateInfo): Array<ResolvedUpdateFileInfo> {\n return getFileList(updateInfo).map((fileInfo: UpdateFileInfo) => {\n // Try both original and normalized filename formats\n const possibleNames = [\n fileInfo.url, // Original filename\n this.normalizeFilename(fileInfo.url), // Normalized filename (spaces/underscores → dashes)\n ]\n\n const matchingAssetName = possibleNames.find(name => updateInfo.assets.has(name))\n const assetUrl = matchingAssetName ? updateInfo.assets.get(matchingAssetName) : undefined\n\n if (!assetUrl) {\n throw newError(\n `Cannot find asset \"${fileInfo.url}\" in GitLab release assets. Available assets: ${Array.from(updateInfo.assets.keys()).join(\", \")}`,\n \"ERR_UPDATER_ASSET_NOT_FOUND\"\n )\n }\n\n return {\n url: new URL(assetUrl),\n info: fileInfo,\n }\n })\n }\n\n toString(): string {\n return `GitLab (projectId: ${this.options.projectId}, channel: ${this.channel})`\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { KeygenOptions, UpdateInfo } from "builder-util-runtime";
|
|
2
|
+
import { AppUpdater } from "../AppUpdater";
|
|
3
|
+
import { ResolvedUpdateFileInfo } from "../types";
|
|
4
|
+
import { Provider, ProviderRuntimeOptions } from "./Provider";
|
|
5
|
+
export declare class KeygenProvider extends Provider<UpdateInfo> {
|
|
6
|
+
private readonly configuration;
|
|
7
|
+
private readonly updater;
|
|
8
|
+
private readonly defaultHostname;
|
|
9
|
+
private readonly baseUrl;
|
|
10
|
+
constructor(configuration: KeygenOptions, updater: AppUpdater, runtimeOptions: ProviderRuntimeOptions);
|
|
11
|
+
private get channel();
|
|
12
|
+
getLatestVersion(): Promise<UpdateInfo>;
|
|
13
|
+
resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo>;
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeygenProvider = void 0;
|
|
4
|
+
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
5
|
+
const util_1 = require("../util");
|
|
6
|
+
const Provider_1 = require("./Provider");
|
|
7
|
+
class KeygenProvider extends Provider_1.Provider {
|
|
8
|
+
constructor(configuration, updater, runtimeOptions) {
|
|
9
|
+
super({
|
|
10
|
+
...runtimeOptions,
|
|
11
|
+
isUseMultipleRangeRequest: false,
|
|
12
|
+
});
|
|
13
|
+
this.configuration = configuration;
|
|
14
|
+
this.updater = updater;
|
|
15
|
+
this.defaultHostname = "api.keygen.sh";
|
|
16
|
+
const host = this.configuration.host || this.defaultHostname;
|
|
17
|
+
this.baseUrl = (0, util_1.newBaseUrl)(`https://${host}/v1/accounts/${this.configuration.account}/artifacts?product=${this.configuration.product}`);
|
|
18
|
+
}
|
|
19
|
+
get channel() {
|
|
20
|
+
return this.updater.channel || this.configuration.channel || "stable";
|
|
21
|
+
}
|
|
22
|
+
async getLatestVersion() {
|
|
23
|
+
const cancellationToken = new builder_util_runtime_1.CancellationToken();
|
|
24
|
+
const channelFile = (0, util_1.getChannelFilename)(this.getCustomChannelName(this.channel));
|
|
25
|
+
const channelUrl = (0, util_1.newUrlFromBase)(channelFile, this.baseUrl, this.updater.isAddNoCacheQuery);
|
|
26
|
+
try {
|
|
27
|
+
const updateInfo = await this.httpRequest(channelUrl, {
|
|
28
|
+
Accept: "application/vnd.api+json",
|
|
29
|
+
"Keygen-Version": "1.1",
|
|
30
|
+
}, cancellationToken);
|
|
31
|
+
return (0, Provider_1.parseUpdateInfo)(updateInfo, channelFile, channelUrl);
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
throw (0, builder_util_runtime_1.newError)(`Unable to find latest version on ${this.toString()}, please ensure release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
resolveFiles(updateInfo) {
|
|
38
|
+
return (0, Provider_1.resolveFiles)(updateInfo, this.baseUrl);
|
|
39
|
+
}
|
|
40
|
+
toString() {
|
|
41
|
+
const { account, product, platform } = this.configuration;
|
|
42
|
+
return `Keygen (account: ${account}, product: ${product}, platform: ${platform}, channel: ${this.channel})`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.KeygenProvider = KeygenProvider;
|
|
46
|
+
//# sourceMappingURL=KeygenProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeygenProvider.js","sourceRoot":"","sources":["../../src/providers/KeygenProvider.ts"],"names":[],"mappings":";;;AAAA,+DAA6F;AAG7F,kCAAwE;AACxE,yCAA4F;AAE5F,MAAa,cAAe,SAAQ,mBAAoB;IAItD,YACmB,aAA4B,EAC5B,OAAmB,EACpC,cAAsC;QAEtC,KAAK,CAAC;YACJ,GAAG,cAAc;YACjB,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAAA;QAPe,kBAAa,GAAb,aAAa,CAAe;QAC5B,YAAO,GAAP,OAAO,CAAY;QALrB,oBAAe,GAAG,eAAe,CAAA;QAYhD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC,eAAe,CAAA;QAC5D,IAAI,CAAC,OAAO,GAAG,IAAA,iBAAU,EAAC,WAAW,IAAI,gBAAgB,IAAI,CAAC,aAAa,CAAC,OAAO,sBAAsB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAA;IACxI,CAAC;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{ CancellationToken, KeygenOptions, newError, UpdateInfo } from \"builder-util-runtime\"\nimport { AppUpdater } from \"../AppUpdater\"\nimport { ResolvedUpdateFileInfo } from \"../types\"\nimport { getChannelFilename, newBaseUrl, newUrlFromBase } from \"../util\"\nimport { parseUpdateInfo, Provider, ProviderRuntimeOptions, resolveFiles } from \"./Provider\"\n\nexport class KeygenProvider extends Provider<UpdateInfo> {\n private readonly defaultHostname = \"api.keygen.sh\"\n private readonly baseUrl: URL\n\n constructor(\n private readonly configuration: KeygenOptions,\n private readonly updater: AppUpdater,\n runtimeOptions: ProviderRuntimeOptions\n ) {\n super({\n ...runtimeOptions,\n isUseMultipleRangeRequest: false,\n })\n const host = this.configuration.host || this.defaultHostname\n this.baseUrl = newBaseUrl(`https://${host}/v1/accounts/${this.configuration.account}/artifacts?product=${this.configuration.product}`)\n }\n\n private get channel(): string {\n return this.updater.channel || this.configuration.channel || \"stable\"\n }\n\n async getLatestVersion(): Promise<UpdateInfo> {\n const cancellationToken = new CancellationToken()\n const channelFile = getChannelFilename(this.getCustomChannelName(this.channel))\n const channelUrl = newUrlFromBase(channelFile, this.baseUrl, this.updater.isAddNoCacheQuery)\n try {\n const updateInfo = await this.httpRequest(\n channelUrl,\n {\n Accept: \"application/vnd.api+json\",\n \"Keygen-Version\": \"1.1\",\n },\n cancellationToken\n )\n return parseUpdateInfo(updateInfo, channelFile, channelUrl)\n } catch (e: any) {\n throw newError(`Unable to find latest version on ${this.toString()}, please ensure release exists: ${e.stack || e.message}`, \"ERR_UPDATER_LATEST_VERSION_NOT_FOUND\")\n }\n }\n\n resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo> {\n return resolveFiles(updateInfo, this.baseUrl)\n }\n\n toString() {\n const { account, product, platform } = this.configuration\n return `Keygen (account: ${account}, product: ${product}, platform: ${platform}, channel: ${this.channel})`\n }\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GithubOptions, UpdateInfo } from "builder-util-runtime";
|
|
2
|
+
import { OutgoingHttpHeaders, RequestOptions } from "http";
|
|
3
|
+
import { AppUpdater } from "../AppUpdater";
|
|
4
|
+
import { URL } from "url";
|
|
5
|
+
import { BaseGitHubProvider } from "./GitHubProvider";
|
|
6
|
+
import { ResolvedUpdateFileInfo } from "../types";
|
|
7
|
+
import { ProviderRuntimeOptions } from "./Provider";
|
|
8
|
+
export interface PrivateGitHubUpdateInfo extends UpdateInfo {
|
|
9
|
+
assets: Array<Asset>;
|
|
10
|
+
}
|
|
11
|
+
export declare class PrivateGitHubProvider extends BaseGitHubProvider<PrivateGitHubUpdateInfo> {
|
|
12
|
+
private readonly updater;
|
|
13
|
+
private readonly token;
|
|
14
|
+
constructor(options: GithubOptions, updater: AppUpdater, token: string, runtimeOptions: ProviderRuntimeOptions);
|
|
15
|
+
protected createRequestOptions(url: URL, headers?: OutgoingHttpHeaders | null): RequestOptions;
|
|
16
|
+
getLatestVersion(): Promise<PrivateGitHubUpdateInfo>;
|
|
17
|
+
get fileExtraDownloadHeaders(): OutgoingHttpHeaders | null;
|
|
18
|
+
private configureHeaders;
|
|
19
|
+
private getLatestVersionInfo;
|
|
20
|
+
private get basePath();
|
|
21
|
+
resolveFiles(updateInfo: PrivateGitHubUpdateInfo): Array<ResolvedUpdateFileInfo>;
|
|
22
|
+
}
|
|
23
|
+
export interface Asset {
|
|
24
|
+
name: string;
|
|
25
|
+
url: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrivateGitHubProvider = void 0;
|
|
4
|
+
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
5
|
+
const js_yaml_1 = require("js-yaml");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const url_1 = require("url");
|
|
8
|
+
const util_1 = require("../util");
|
|
9
|
+
const GitHubProvider_1 = require("./GitHubProvider");
|
|
10
|
+
const Provider_1 = require("./Provider");
|
|
11
|
+
class PrivateGitHubProvider extends GitHubProvider_1.BaseGitHubProvider {
|
|
12
|
+
constructor(options, updater, token, runtimeOptions) {
|
|
13
|
+
super(options, "api.github.com", runtimeOptions);
|
|
14
|
+
this.updater = updater;
|
|
15
|
+
this.token = token;
|
|
16
|
+
}
|
|
17
|
+
createRequestOptions(url, headers) {
|
|
18
|
+
const result = super.createRequestOptions(url, headers);
|
|
19
|
+
result.redirect = "manual";
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
async getLatestVersion() {
|
|
23
|
+
const cancellationToken = new builder_util_runtime_1.CancellationToken();
|
|
24
|
+
const channelFile = (0, util_1.getChannelFilename)(this.getDefaultChannelName());
|
|
25
|
+
const releaseInfo = await this.getLatestVersionInfo(cancellationToken);
|
|
26
|
+
const asset = releaseInfo.assets.find(it => it.name === channelFile);
|
|
27
|
+
if (asset == null) {
|
|
28
|
+
// html_url must be always, but just to be sure
|
|
29
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find ${channelFile} in the release ${releaseInfo.html_url || releaseInfo.name}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
|
|
30
|
+
}
|
|
31
|
+
const url = new url_1.URL(asset.url);
|
|
32
|
+
let result;
|
|
33
|
+
try {
|
|
34
|
+
result = (0, js_yaml_1.load)((await this.httpRequest(url, this.configureHeaders("application/octet-stream"), cancellationToken)));
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
if (e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) {
|
|
38
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find ${channelFile} in the latest release artifacts (${url}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
|
|
39
|
+
}
|
|
40
|
+
throw e;
|
|
41
|
+
}
|
|
42
|
+
;
|
|
43
|
+
result.assets = releaseInfo.assets;
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
get fileExtraDownloadHeaders() {
|
|
47
|
+
return this.configureHeaders("application/octet-stream");
|
|
48
|
+
}
|
|
49
|
+
configureHeaders(accept) {
|
|
50
|
+
return {
|
|
51
|
+
accept,
|
|
52
|
+
authorization: `token ${this.token}`,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
async getLatestVersionInfo(cancellationToken) {
|
|
56
|
+
const allowPrerelease = this.updater.allowPrerelease;
|
|
57
|
+
let basePath = this.basePath;
|
|
58
|
+
if (!allowPrerelease) {
|
|
59
|
+
basePath = `${basePath}/latest`;
|
|
60
|
+
}
|
|
61
|
+
const url = (0, util_1.newUrlFromBase)(basePath, this.baseUrl);
|
|
62
|
+
try {
|
|
63
|
+
const version = JSON.parse((await this.httpRequest(url, this.configureHeaders("application/vnd.github.v3+json"), cancellationToken)));
|
|
64
|
+
// only `latest` can return a single ReleaseInfo. Otherwise, a list of ReleaseInfo is returned and we need to find the latest one ourselves
|
|
65
|
+
if (allowPrerelease) {
|
|
66
|
+
const candidates = version.filter(it => !it.draft);
|
|
67
|
+
return candidates.find(it => it.prerelease) || candidates[0];
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return version;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
throw (0, builder_util_runtime_1.newError)(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
get basePath() {
|
|
78
|
+
return this.computeGithubBasePath(`/repos/${this.options.owner}/${this.options.repo}/releases`);
|
|
79
|
+
}
|
|
80
|
+
resolveFiles(updateInfo) {
|
|
81
|
+
return (0, Provider_1.getFileList)(updateInfo).map(it => {
|
|
82
|
+
const name = path.posix.basename(it.url).replace(/ /g, "-");
|
|
83
|
+
const asset = updateInfo.assets.find(it => it != null && it.name === name);
|
|
84
|
+
if (asset == null) {
|
|
85
|
+
throw (0, builder_util_runtime_1.newError)(`Cannot find asset "${name}" in: ${JSON.stringify(updateInfo.assets, null, 2)}`, "ERR_UPDATER_ASSET_NOT_FOUND");
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
url: new url_1.URL(asset.url),
|
|
89
|
+
info: it,
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.PrivateGitHubProvider = PrivateGitHubProvider;
|
|
95
|
+
//# sourceMappingURL=PrivateGitHubProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrivateGitHubProvider.js","sourceRoot":"","sources":["../../src/providers/PrivateGitHubProvider.ts"],"names":[],"mappings":";;;AAAA,+DAAwG;AAExG,qCAA8B;AAC9B,6BAA4B;AAE5B,6BAAyB;AACzB,kCAA4D;AAC5D,qDAAqD;AAErD,yCAAgE;AAMhE,MAAa,qBAAsB,SAAQ,mCAA2C;IACpF,YACE,OAAsB,EACL,OAAmB,EACnB,KAAa,EAC9B,cAAsC;QAEtC,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAA;QAJ/B,YAAO,GAAP,OAAO,CAAY;QACnB,UAAK,GAAL,KAAK,CAAQ;IAIhC,CAAC;IAES,oBAAoB,CAAC,GAAQ,EAAE,OAAoC;QAC3E,MAAM,MAAM,GAAG,KAAK,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,CACtD;QAAC,MAAc,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACpC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,iBAAiB,GAAG,IAAI,wCAAiB,EAAE,CAAA;QACjD,MAAM,WAAW,GAAG,IAAA,yBAAkB,EAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAA;QAEpE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;QACtE,MAAM,KAAK,GAA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BAAW,EAAC,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YACtC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC3D,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;YAC1E,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAA,+BAAQ,EAAC,sBAAsB,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,6BAA6B,CAAC,CAAA;YAChI,CAAC;YAED,OAAO;gBACL,GAAG,EAAE,IAAI,SAAG,CAAC,KAAK,CAAC,GAAG,CAAC;gBACvB,IAAI,EAAE,EAAE;aACT,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA7FD,sDA6FC","sourcesContent":["import { CancellationToken, GithubOptions, HttpError, newError, UpdateInfo } from \"builder-util-runtime\"\nimport { OutgoingHttpHeaders, RequestOptions } from \"http\"\nimport { load } from \"js-yaml\"\nimport * as path from \"path\"\nimport { AppUpdater } from \"../AppUpdater\"\nimport { URL } from \"url\"\nimport { getChannelFilename, newUrlFromBase } from \"../util\"\nimport { BaseGitHubProvider } from \"./GitHubProvider\"\nimport { ResolvedUpdateFileInfo } from \"../types\"\nimport { getFileList, ProviderRuntimeOptions } from \"./Provider\"\n\nexport interface PrivateGitHubUpdateInfo extends UpdateInfo {\n assets: Array<Asset>\n}\n\nexport class PrivateGitHubProvider extends BaseGitHubProvider<PrivateGitHubUpdateInfo> {\n constructor(\n options: GithubOptions,\n private readonly updater: AppUpdater,\n private readonly token: string,\n runtimeOptions: ProviderRuntimeOptions\n ) {\n super(options, \"api.github.com\", runtimeOptions)\n }\n\n protected createRequestOptions(url: URL, headers?: OutgoingHttpHeaders | null): RequestOptions {\n const result = super.createRequestOptions(url, headers)\n ;(result as any).redirect = \"manual\"\n return result\n }\n\n async getLatestVersion(): Promise<PrivateGitHubUpdateInfo> {\n const cancellationToken = new CancellationToken()\n const channelFile = getChannelFilename(this.getDefaultChannelName())\n\n const releaseInfo = await this.getLatestVersionInfo(cancellationToken)\n const asset = releaseInfo.assets.find(it => it.name === channelFile)\n if (asset == null) {\n // html_url must be always, but just to be sure\n throw newError(`Cannot find ${channelFile} in the release ${releaseInfo.html_url || releaseInfo.name}`, \"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND\")\n }\n\n const url = new URL(asset.url)\n let result: any\n try {\n result = load((await this.httpRequest(url, this.configureHeaders(\"application/octet-stream\"), cancellationToken))!)\n } catch (e: any) {\n if (e instanceof HttpError && e.statusCode === 404) {\n throw newError(`Cannot find ${channelFile} in the latest release artifacts (${url}): ${e.stack || e.message}`, \"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND\")\n }\n throw e\n }\n\n ;(result as PrivateGitHubUpdateInfo).assets = releaseInfo.assets\n return result\n }\n\n get fileExtraDownloadHeaders(): OutgoingHttpHeaders | null {\n return this.configureHeaders(\"application/octet-stream\")\n }\n\n private configureHeaders(accept: string) {\n return {\n accept,\n authorization: `token ${this.token}`,\n }\n }\n\n private async getLatestVersionInfo(cancellationToken: CancellationToken): Promise<ReleaseInfo> {\n const allowPrerelease = this.updater.allowPrerelease\n let basePath = this.basePath\n if (!allowPrerelease) {\n basePath = `${basePath}/latest`\n }\n\n const url = newUrlFromBase(basePath, this.baseUrl)\n try {\n const version = JSON.parse((await this.httpRequest(url, this.configureHeaders(\"application/vnd.github.v3+json\"), cancellationToken))!)\n // only `latest` can return a single ReleaseInfo. Otherwise, a list of ReleaseInfo is returned and we need to find the latest one ourselves\n if (allowPrerelease) {\n const candidates = (version as Array<ReleaseInfo>).filter(it => !it.draft)\n return candidates.find(it => it.prerelease) || candidates[0]\n } else {\n return version\n }\n } catch (e: any) {\n throw newError(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, \"ERR_UPDATER_LATEST_VERSION_NOT_FOUND\")\n }\n }\n\n private get basePath(): string {\n return this.computeGithubBasePath(`/repos/${this.options.owner}/${this.options.repo}/releases`)\n }\n\n resolveFiles(updateInfo: PrivateGitHubUpdateInfo): Array<ResolvedUpdateFileInfo> {\n return getFileList(updateInfo).map(it => {\n const name = path.posix.basename(it.url).replace(/ /g, \"-\")\n const asset = updateInfo.assets.find(it => it != null && it.name === name)\n if (asset == null) {\n throw newError(`Cannot find asset \"${name}\" in: ${JSON.stringify(updateInfo.assets, null, 2)}`, \"ERR_UPDATER_ASSET_NOT_FOUND\")\n }\n\n return {\n url: new URL(asset.url),\n info: it,\n }\n })\n }\n}\n\ninterface ReleaseInfo {\n name: string\n html_url: string\n draft: boolean\n prerelease: boolean\n assets: Array<Asset>\n}\n\nexport interface Asset {\n name: string\n url: string\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CancellationToken, UpdateFileInfo, UpdateInfo } from "builder-util-runtime";
|
|
2
|
+
import { OutgoingHttpHeaders, RequestOptions } from "http";
|
|
3
|
+
import { URL } from "url";
|
|
4
|
+
import { ElectronHttpExecutor } from "../electronHttpExecutor";
|
|
5
|
+
import { ResolvedUpdateFileInfo } from "../types";
|
|
6
|
+
export type ProviderPlatform = "darwin" | "linux" | "win32";
|
|
7
|
+
export interface ProviderRuntimeOptions {
|
|
8
|
+
isUseMultipleRangeRequest: boolean;
|
|
9
|
+
platform: ProviderPlatform;
|
|
10
|
+
executor: ElectronHttpExecutor;
|
|
11
|
+
}
|
|
12
|
+
export declare abstract class Provider<T extends UpdateInfo> {
|
|
13
|
+
private readonly runtimeOptions;
|
|
14
|
+
private requestHeaders;
|
|
15
|
+
protected readonly executor: ElectronHttpExecutor;
|
|
16
|
+
protected constructor(runtimeOptions: ProviderRuntimeOptions);
|
|
17
|
+
getBlockMapFiles(baseUrl: URL, oldVersion: string, newVersion: string, oldBlockMapFileBaseUrl?: string | null): URL[] | Promise<URL[]>;
|
|
18
|
+
get isUseMultipleRangeRequest(): boolean;
|
|
19
|
+
private getChannelFilePrefix;
|
|
20
|
+
protected getDefaultChannelName(): string;
|
|
21
|
+
protected getCustomChannelName(channel: string): string;
|
|
22
|
+
get fileExtraDownloadHeaders(): OutgoingHttpHeaders | null;
|
|
23
|
+
setRequestHeaders(value: OutgoingHttpHeaders | null): void;
|
|
24
|
+
abstract getLatestVersion(): Promise<T>;
|
|
25
|
+
abstract resolveFiles(updateInfo: T): Array<ResolvedUpdateFileInfo>;
|
|
26
|
+
/**
|
|
27
|
+
* Method to perform API request only to resolve update info, but not to download update.
|
|
28
|
+
*/
|
|
29
|
+
protected httpRequest(url: URL, headers?: OutgoingHttpHeaders | null, cancellationToken?: CancellationToken): Promise<string | null>;
|
|
30
|
+
protected createRequestOptions(url: URL, headers?: OutgoingHttpHeaders | null): RequestOptions;
|
|
31
|
+
}
|
|
32
|
+
export declare function findFile(files: Array<ResolvedUpdateFileInfo>, extension: string, not?: Array<string>): ResolvedUpdateFileInfo | null | undefined;
|
|
33
|
+
export declare function parseUpdateInfo(rawData: string | null, channelFile: string, channelFileUrl: URL): UpdateInfo;
|
|
34
|
+
export declare function getFileList(updateInfo: UpdateInfo): Array<UpdateFileInfo>;
|
|
35
|
+
export declare function resolveFiles(updateInfo: UpdateInfo, baseUrl: URL, pathTransformer?: (p: string) => string): Array<ResolvedUpdateFileInfo>;
|