diff --git a/test/e2e/cypress/integration/profiles/verification/registration/errors.spec.ts b/test/e2e/cypress/integration/profiles/verification/registration/errors.spec.ts index ba14f47c86ab..8ffa93362208 100644 --- a/test/e2e/cypress/integration/profiles/verification/registration/errors.spec.ts +++ b/test/e2e/cypress/integration/profiles/verification/registration/errors.spec.ts @@ -9,8 +9,8 @@ import { verifyHrefPattern, } from "../../../../helpers" -import { routes as react } from "../../../../helpers/react" import { routes as express } from "../../../../helpers/express" +import { routes as react } from "../../../../helpers/react" context("Account Verification Registration Errors", () => { ;[ @@ -49,7 +49,7 @@ context("Account Verification Registration Errors", () => { it("is unable to verify the email address if the code is no longer valid and resend the code", () => { cy.shortCodeLifespan() cy.verifyEmailButExpired({ - expect: { email: identity.email, password: identity.password }, + expect: { email: identity.email }, }) cy.longCodeLifespan() diff --git a/test/e2e/cypress/integration/profiles/verification/settings/error.spec.ts b/test/e2e/cypress/integration/profiles/verification/settings/error.spec.ts index ded77a04990f..23580fe0ea8d 100644 --- a/test/e2e/cypress/integration/profiles/verification/settings/error.spec.ts +++ b/test/e2e/cypress/integration/profiles/verification/settings/error.spec.ts @@ -9,8 +9,8 @@ import { verifyHrefPattern, } from "../../../../helpers" -import { routes as react } from "../../../../helpers/react" import { routes as express } from "../../../../helpers/express" +import { routes as react } from "../../../../helpers/react" context("Account Verification Settings Error", () => { ;[ @@ -62,7 +62,7 @@ context("Account Verification Settings Error", () => { cy.get('button[value="profile"]').click() cy.verifyEmailButExpired({ - expect: { email, password: identity.password }, + expect: { email }, }) }) diff --git a/test/e2e/cypress/integration/profiles/webhoooks/registration/success.spec.ts b/test/e2e/cypress/integration/profiles/webhoooks/registration/success.spec.ts index 4fe48081146f..a2dcd123923c 100644 --- a/test/e2e/cypress/integration/profiles/webhoooks/registration/success.spec.ts +++ b/test/e2e/cypress/integration/profiles/webhoooks/registration/success.spec.ts @@ -147,7 +147,9 @@ context("Registration success with email profile with webhooks", () => { expect(identity.schema_id).to.equal("default") expect(identity.schema_url).to.equal(`${APP_URL}/schemas/ZGVmYXVsdA`) expect(identity.traits.email).to.equal("updated-" + email) - expect(identity.metadata_public.some).to.equal("public fields") + expect((identity as any).metadata_public.some).to.equal( + "public fields", + ) expect(identity.verifiable_addresses[0].verified).to.equal(true) expect(identity.verifiable_addresses[0].verified_at).not.to.be.empty expect(identity.verifiable_addresses[0].via).to.eq("email") diff --git a/test/e2e/cypress/support/commands.ts b/test/e2e/cypress/support/commands.ts index f0b567b9ba4e..22a1541b076f 100644 --- a/test/e2e/cypress/support/commands.ts +++ b/test/e2e/cypress/support/commands.ts @@ -12,13 +12,12 @@ import { MOBILE_URL, parseHtml, pollInterval, - privilegedLifespan, } from "../helpers" -import { Session } from "@ory/kratos-client" import dayjs from "dayjs" import YAML from "yamljs" import { Strategy } from "." +import { OryKratosConfiguration } from "./config" const configFile = "kratos.generated.yml" @@ -49,7 +48,9 @@ function checkConfigVersion(previous, tries = 0) { }) } -const updateConfigFile = (cb: (arg: any) => any) => { +const updateConfigFile = ( + cb: (arg: OryKratosConfiguration) => OryKratosConfiguration, +) => { cy.request("GET", KRATOS_ADMIN + "/health/config").then(({ body }) => { cy.readFile(configFile).then((contents) => { cy.writeFile(configFile, YAML.stringify(cb(YAML.parse(contents)))) @@ -398,6 +399,7 @@ Cypress.Commands.add( }) .then(({ body }) => { expect(body.identity.traits.email).to.contain(email) + return body }), ) @@ -440,6 +442,7 @@ Cypress.Commands.add("loginApi", ({ email, password } = {}) => }) .then(({ body }) => { expect(body.session.identity.traits.email).to.contain(email) + return body }), ) @@ -1003,18 +1006,6 @@ Cypress.Commands.add("noSession", () => return request }), ) -Cypress.Commands.add("getIdentityByEmail", ({ email }) => - cy - .request({ - method: "GET", - url: `${KRATOS_ADMIN}/identities`, - failOnStatusCode: false, - }) - .then((response) => { - expect(response.status).to.eq(200) - return response.body.find((identity) => identity.traits.email === email) - }), -) Cypress.Commands.add( "performEmailVerification", @@ -1115,7 +1106,7 @@ Cypress.Commands.add( // Uses the verification email but waits so that it expires Cypress.Commands.add( "verifyEmailButExpired", - ({ expect: { email, password }, strategy = "code" }) => { + ({ expect: { email }, strategy = "code" }) => { cy.getMail().then((message) => { expect(message.subject).to.equal("Please verify your email address") @@ -1158,27 +1149,17 @@ Cypress.Commands.add("useVerificationStrategy", (strategy: Strategy) => { }) }) -// Uses the verification email but waits so that it expires -Cypress.Commands.add("waitForPrivilegedSessionToExpire", () => { - cy.getSession().should((session: Session) => { - expect(session.authenticated_at).to.not.be.empty - cy.wait( - dayjs(session.authenticated_at).add(privilegedLifespan).diff(dayjs()) + - 100, - ) - }) -}) - Cypress.Commands.add("getLookupSecrets", () => cy .get('[data-testid="node/text/lookup_secret_codes/text"] code') .then(($e) => $e.map((_, e) => e.innerText.trim()).toArray()), ) -Cypress.Commands.add("expectSettingsSaved", () => - cy - .get('[data-testid="ui/message/1050001"]') - .should("contain.text", "Your changes have been saved"), -) +Cypress.Commands.add("expectSettingsSaved", () => { + cy.get('[data-testid="ui/message/1050001"]').should( + "contain.text", + "Your changes have been saved", + ) +}) Cypress.Commands.add("getMail", ({ removeMail = true } = {}) => { let tries = 0 diff --git a/test/e2e/cypress/support/config.d.ts b/test/e2e/cypress/support/config.d.ts new file mode 100644 index 000000000000..089a3fbfe1cd --- /dev/null +++ b/test/e2e/cypress/support/config.d.ts @@ -0,0 +1,1142 @@ +/* eslint-disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type OryKratosConfiguration = OryKratosConfiguration1 & OryKratosConfiguration2; +export type OryKratosConfiguration1 = { + [k: string]: unknown | undefined; +}; +/** + * Ory Kratos redirects to this URL per default on completion of self-service flows and other browser interaction. Read this [article for more information on browser redirects](https://www.ory.sh/kratos/docs/concepts/browser-redirect-flow-completion). + */ +export type RedirectBrowsersToSetURLPerDefault = string; +/** + * List of URLs that are allowed to be redirected to. A redirection request is made by appending `?return_to=...` to Login, Registration, and other self-service flows. + */ +export type AllowedReturnToURLs = string[]; +/** + * URL where the Settings UI is hosted. Check the [reference implementation](https://github.com/ory/kratos-selfservice-ui-node). + */ +export type URLOfTheSettingsPage = string; +/** + * Sets what Authenticator Assurance Level (used for 2FA) is required to access this feature. If set to `highest_available` then this endpoint requires the highest AAL the identity has set up. If set to `aal1` then the identity can access this feature without 2FA. + */ +export type RequiredAuthenticatorAssuranceLevel = "aal1" | "highest_available"; +/** + * Define what the hook should do + */ +export type WebHookConfiguration = + | { + [k: string]: unknown | undefined; + } + | { + can_interrupt?: false; + [k: string]: unknown | undefined; + }; +export type SelfServiceHooks = SelfServiceWebHook[]; +/** + * If set to true will enable [User Registration](https://www.ory.sh/kratos/docs/self-service/flows/user-registration/). + */ +export type EnableUserRegistration = boolean; +/** + * URL where the Registration UI is hosted. Check the [reference implementation](https://github.com/ory/kratos-selfservice-ui-node). + */ +export type RegistrationUIURL = string; +/** + * URL where the Login UI is hosted. Check the [reference implementation](https://github.com/ory/kratos-selfservice-ui-node). + */ +export type LoginUIURL = string; +/** + * If set to true will enable [Email and Phone Verification and Account Activation](https://www.ory.sh/kratos/docs/self-service/flows/verify-email-account-activation/). + */ +export type EnableEmailPhoneVerification = boolean; +/** + * URL where the Ory Verify UI is hosted. This is the page where users activate and / or verify their email or telephone number. Check the [reference implementation](https://github.com/ory/kratos-selfservice-ui-node). + */ +export type VerifyUIURL = string; +/** + * Sets how long the verification request (for the UI interaction) is valid. + */ +export type SelfServiceVerificationRequestLifespan = string; +/** + * The strategy to use for verification requests + */ +export type VerificationStrategy = "link" | "code"; +/** + * Whether to notify recipients, if verification was requested for their address. + */ +export type NotifyUnknownRecipients = boolean; +/** + * If set to true will enable [Account Recovery](https://www.ory.sh/kratos/docs/self-service/flows/password-reset-account-recovery/). + */ +export type EnableAccountRecovery = boolean; +/** + * URL where the Ory Recovery UI is hosted. This is the page where users request and complete account recovery. Check the [reference implementation](https://github.com/ory/kratos-selfservice-ui-node). + */ +export type RecoveryUIURL = string; +export type SelfServiceAfterRecoveryHooks = (SelfServiceWebHook | SelfServiceSessionRevokerHook)[]; +/** + * Sets how long the recovery request is valid. If expired, the user has to redo the flow. + */ +export type SelfServiceRecoveryRequestLifespan = string; +/** + * The strategy to use for recovery requests + */ +export type RecoveryStrategy = "link" | "code"; +/** + * Whether to notify recipients, if recovery was requested for their account. + */ +export type NotifyUnknownRecipients1 = boolean; +/** + * URL where the Ory Kratos Error UI is hosted. Check the [reference implementation](https://github.com/ory/kratos-selfservice-ui-node). + */ +export type OryKratosErrorUIURL = string; +export type EnablesProfileManagementMethod = boolean; +export type EnablesLinkMethod = boolean; +export type OverrideTheBaseURLWhichShouldBeUsedAsTheBaseForRecoveryAndVerificationLinks = string; +export type HowLongALinkIsValidFor = string; +export type EnablesCodeMethod = boolean; +export type HowLongACodeIsValidFor = string; +export type EnablesUsernameEmailAndPasswordMethod = boolean; +/** + * Allows changing the default HIBP host to a self hosted version. + */ +export type CustomHaveibeenpwnedHost = string; +/** + * If set to false the password validation does not utilize the Have I Been Pwnd API. + */ +export type EnableTheHaveIBeenPwnedAPI = boolean; +/** + * Defines how often a password may have been breached before it is rejected. + */ +export type AllowPasswordBreaches = number; +/** + * If set to false the password validation fails when the network or the Have I Been Pwnd API is down. + */ +export type IgnoreLookupNetworkErrors = boolean; +/** + * Defines the minimum length of the password. + */ +export type MinimumPasswordLength = number; +/** + * If set to false the password validation does not check for similarity between the password and the user identifier. + */ +export type EnablePasswordIdentifierSimilarityCheck = boolean; +export type EnablesTheTOTPMethod = boolean; +/** + * The issuer (e.g. a domain name) will be shown in the TOTP app (e.g. Google Authenticator). It helps the user differentiate between different codes. + */ +export type TOTPIssuer = string; +export type EnablesTheLookupSecretMethod = boolean; +export type EnablesTheWebAuthnMethod = boolean; +/** + * If enabled will have the effect that WebAuthn is used for passwordless flows (as a first factor) and not for multi-factor set ups. With this set to true, users will see an option to sign up with WebAuthn on the registration screen. + */ +export type UseForPasswordlessFlows = boolean; +/** + * An name to help the user identify this RP. + */ +export type RelyingPartyDisplayName = string; +/** + * The id must be a subset of the domain currently in the browser. + */ +export type RelyingPartyIdentifier = string; +/** + * An explicit RP origin. If left empty, this defaults to `id`. + */ +export type RelyingPartyOrigin = string; +/** + * An icon to help the user identify this RP. + */ +export type RelyingPartyIcon = string; +export type EnablesOpenIDConnectMethod = boolean; +/** + * Can be used to modify the base URL for OAuth2 Redirect URLs. If unset, the Public Base URL will be used. + */ +export type BaseURLForOAuth2RedirectURIs = string; +export type SelfServiceOIDCProvider = SelfServiceOIDCProvider1 & { + id: string; + provider: Provider; + label?: OptionalStringWhichWillBeUsedWhenGeneratingLabelsForUIButtons; + client_id: string; + client_secret?: string; + issuer_url?: string; + auth_url?: string; + token_url?: string; + mapper_url: JsonnetMapperURL; + scope?: string[]; + microsoft_tenant?: AzureADTenant; + subject_source?: MicrosoftSubjectSource; + apple_team_id?: AppleDeveloperTeamID; + apple_private_key_id?: ApplePrivateKeyIdentifier; + apple_private_key?: ApplePrivateKey; + requested_claims?: OpenIDConnectClaims; +}; +export type SelfServiceOIDCProvider1 = { + [k: string]: unknown | undefined; +} & { + [k: string]: unknown | undefined; +}; +/** + * Can be one of github, github-app, gitlab, generic, google, microsoft, discord, slack, facebook, auth0, vk, yandex, apple, spotify, netid, dingtalk, patreon. + */ +export type Provider = + | "github" + | "github-app" + | "gitlab" + | "generic" + | "google" + | "microsoft" + | "discord" + | "slack" + | "facebook" + | "auth0" + | "vk" + | "yandex" + | "apple" + | "spotify" + | "netid" + | "dingtalk" + | "patreon" + | "linkedin"; +export type OptionalStringWhichWillBeUsedWhenGeneratingLabelsForUIButtons = string; +/** + * The URL where the jsonnet source is located for mapping the provider's data to Ory Kratos data. + */ +export type JsonnetMapperURL = string; +/** + * The Azure AD Tenant to use for authentication. + */ +export type AzureADTenant = string; +/** + * Controls which source the subject identifier is taken from by microsoft provider. If set to `userinfo` (the default) then the identifier is taken from the `sub` field of OIDC ID token or data received from `/userinfo` standard OIDC endpoint. If set to `me` then the `id` field of data structure received from `https://graph.microsoft.com/v1.0/me` is taken as an identifier. + */ +export type MicrosoftSubjectSource = "userinfo" | "me"; +/** + * Apple Developer Team ID needed for generating a JWT token for client secret + */ +export type AppleDeveloperTeamID = string; +/** + * Sign In with Apple Private Key Identifier needed for generating a JWT token for client secret + */ +export type ApplePrivateKeyIdentifier = string; +/** + * Sign In with Apple Private Key needed for generating a JWT token for client secret + */ +export type ApplePrivateKey = string; +/** + * A list and configuration of OAuth2 and OpenID Connect providers Ory Kratos should integrate with. + */ +export type OpenIDConnectAndOAuth2Providers = SelfServiceOIDCProvider[]; +/** + * Controls how many records should be purged from one table during database cleanup task + */ +export type NumberOfRecordsToCleanInOneIteration = number; +/** + * Controls the delay time between cleaning each table in one cleanup iteration + */ +export type DelayBetweenEachTableCleanups = string; +/** + * Controls how old records do we want to leave + */ +export type RemoveRecordsOlderThan = string; +/** + * DSN is used to specify the database credentials as a connection URI. + */ +export type DataSourceName = string; +/** + * You can override certain or all message templates by pointing this key to the path where the templates are located. + */ +export type OverrideMessageTemplates = string; +/** + * This URI will be used to connect to the SMTP server. Use the scheme smtps for implicit TLS sessions or smtp for explicit StartTLS/cleartext sessions. Please note that TLS is always enforced with certificate trust verification by default for security reasons on both schemes. With the smtp scheme you can use the query parameter (`?disable_starttls=true`) to allow cleartext sessions or (`?disable_starttls=false`) to enforce StartTLS (default behaviour). Additionally, use the query parameter to allow (`?skip_ssl_verify=true`) or disallow (`?skip_ssl_verify=false`) self-signed TLS certificates (default behaviour) on both implicit and explicit TLS sessions. + */ +export type SMTPConnectionString = string; +/** + * Path of the client X.509 certificate, in case of certificate based client authentication to the SMTP server. + */ +export type SMTPClientCertificatePath = string; +/** + * Path of the client certificate private key, in case of certificate based client authentication to the SMTP server + */ +export type SMTPClientPrivateKeyPath = string; +/** + * The recipient of an email will see this as the sender address. + */ +export type SMTPSenderAddress = string; +/** + * The recipient of an email will see this as the sender name. + */ +export type SMTPSenderName = string; +/** + * Identifier used in the SMTP HELO/EHLO command. Some SMTP relays require a unique identifier. + */ +export type SMTPHELOEHLOName = string; +/** + * The recipient of a sms will see this as the sender address. + */ +export type SMSSenderAddress = string; +/** + * This URL will be used to connect to the SMS provider. + */ +export type HTTPAddressOfAPIEndpoint = string; +/** + * Define which auth mechanism to use for auth with the SMS provider + */ +export type AuthMechanisms = WebHookAuthApiKeyProperties | WebHookAuthBasicAuthProperties; +/** + * If set, the login and registration flows will handle the Ory OAuth 2.0 & OpenID `login_challenge` query parameter to serve as an OpenID Connect Provider. This URL should point to Ory Hydra when you are not running on the Ory Network and be left untouched otherwise. + */ +export type OAuth20ProviderURL = string; +/** + * Disable request logging for /health/alive and /health/ready endpoints + */ +export type DisableHealthEndpointsRequestLogging = boolean; +/** + * The URL where the admin endpoint is exposed at. + */ +export type AdminBaseURL = string; +/** + * The host (interface) kratos' admin endpoint listens on. + */ +export type AdminHost = string; +/** + * The port kratos' admin endpoint listens on. + */ +export type AdminPort = number; +export type PrivateKeyPEM = TlsxSource; +export type PathToPEMEncodedFle = string; +/** + * The base64 string of the PEM-encoded file content. Can be generated using for example `base64 -i path/to/file.pem`. + */ +export type Base64EncodedInline = string; +export type TLSCertificatePEM = TlsxSource; +/** + * Disable request logging for /health/alive and /health/ready endpoints + */ +export type DisableHealthEndpointsRequestLogging1 = boolean; +/** + * The URL where the endpoint is exposed at. This domain is used to generate redirects, form URLs, and more. + */ +export type BaseURL = string; +/** + * The host (interface) kratos' public endpoint listens on. + */ +export type PublicHost = string; +/** + * The port kratos' public endpoint listens on. + */ +export type PublicPort = number; +/** + * If set will leak sensitive values (e.g. emails) in the logs. + */ +export type LeakSensitiveLogValues = boolean; +/** + * Text to use, when redacting sensitive log value. + */ +export type SensitiveLogValueRedactionText = string; +/** + * This Identity Schema will be used as the default for self-service flows. Its ID needs to exist in the "schemas" list. + */ +export type TheDefaultIdentitySchema = string; +/** + * Note that identities that used the "default_schema_url" field in older kratos versions will be corrupted unless you specify their schema url with the id "default" in this list. + * + * @minItems 1 + */ +export type AllJSONSchemasForIdentityTraits = [ + { + id: TheSchemaSID; + url: JSONSchemaURLForIdentityTraitsSchema; + [k: string]: unknown | undefined; + }, + ...{ + id: TheSchemaSID; + url: JSONSchemaURLForIdentityTraitsSchema; + [k: string]: unknown | undefined; + }[] +]; +export type TheSchemaSID = string; +/** + * URL for JSON Schema which describes a identity's traits. Can be a file path, a https URL, or a base64 encoded string. + */ +export type JSONSchemaURLForIdentityTraitsSchema = string; +/** + * The first secret in the array is used for signing and encrypting things while all other keys are used to verify and decrypt older things that were signed with that old secret. + */ +export type DefaultEncryptionSigningSecrets = string[]; +/** + * The first secret in the array is used for encrypting cookies while all other keys are used to decrypt older cookies that were signed with that old secret. + */ +export type SigningKeysForCookies = string[]; +/** + * The first secret in the array is used for encryption data while all other keys are used to decrypt older data that were signed with. + * + * @minItems 1 + */ +export type SecretsToUseForEncryptionByCipher = [string, ...string[]]; +/** + * One of the values: argon2, bcrypt. + * Any other hashes will be migrated to the set algorithm once an identity authenticates using their password. + */ +export type PasswordHashingAlgorithm = "argon2" | "bcrypt"; +/** + * One of the values: noop, aes, xchacha20-poly1305 + */ +export type CipheringAlgorithm = "noop" | "aes" | "xchacha20-poly1305"; +/** + * Sets the cookie domain for session and CSRF cookies. Useful when dealing with subdomains. Use with care! + */ +export type HTTPCookieDomain = string; +/** + * Sets the session and CSRF cookie path. Use with care! + */ +export type HTTPCookiePath = string; +/** + * Sets the session and CSRF cookie SameSite. + */ +export type HTTPCookieSameSiteConfiguration = "Strict" | "Lax" | "None"; +/** + * Defines how long a session is active. Once that lifespan has been reached, the user needs to sign in again. + */ +export type SessionLifespan = string; +/** + * Sets the session cookie domain. Useful when dealing with subdomains. Use with care! Overrides `cookies.domain`. + */ +export type SessionCookieDomain = string; +/** + * Sets the session cookie name. Use with care! + */ +export type SessionCookieName = string; +/** + * If set to true will persist the cookie in the end-user's browser using the `max-age` parameter which is set to the `session.lifespan` value. Persistent cookies are not deleted when the browser is closed (e.g. on reboot or alt+f4). This option affects the Ory OAuth2 and OpenID Provider's remember feature as well. + */ +export type MakeSessionCookiePersistent = boolean; +/** + * Sets the session cookie path. Use with care! Overrides `cookies.path`. + */ +export type SessionCookiePath = string; +/** + * Sets the session cookie SameSite. Overrides `cookies.same_site`. + */ +export type SessionCookieSameSiteConfiguration = "Strict" | "Lax" | "None"; +/** + * Sets when a session can be extended. Settings this value to `24h` will prevent the session from being extended before until 24 hours before it expires. This setting prevents excessive writes to the database. We highly recommend setting this value. + */ +export type EarliestPossibleSessionExtension = string; +/** + * SemVer according to https://semver.org/ prefixed with `v` as in our releases. + */ +export type TheKratosVersionThisConfigIsWrittenFor = string; +/** + * The port the courier's metrics endpoint listens on (0/disabled by default). This is a CLI flag and environment variable and can not be set using the config file. + */ +export type MetricsPort = number; +/** + * Disallow all outgoing HTTP calls to private IP ranges. This feature can help protect against SSRF attacks. + */ +export type DisallowPrivateIPRanges = boolean; +/** + * Allows the given URLs to be called despite them being in the private IP range. URLs need to have an exact and case-sensitive match to be excempt. + */ +export type AddExemptURLsToPrivateIPRanges = string[]; +/** + * If enabled allows Ory Sessions to be cached. Only effective in the Ory Network. + */ +export type EnableOrySessionsCaching = boolean; + +export interface OryKratosConfiguration2 { + selfservice: { + default_browser_return_url: RedirectBrowsersToSetURLPerDefault; + allowed_return_urls?: AllowedReturnToURLs; + flows?: { + settings?: { + ui_url?: URLOfTheSettingsPage; + lifespan?: string; + privileged_session_max_age?: string; + required_aal?: RequiredAuthenticatorAssuranceLevel; + after?: SelfServiceAfterSettings; + before?: SelfServiceBeforeSettings; + }; + logout?: { + after?: { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + }; + }; + registration?: { + enabled?: EnableUserRegistration; + ui_url?: RegistrationUIURL; + lifespan?: string; + before?: SelfServiceBeforeRegistration; + after?: SelfServiceAfterRegistration; + }; + login?: { + ui_url?: LoginUIURL; + lifespan?: string; + before?: SelfServiceBeforeLogin; + after?: SelfServiceAfterLogin; + }; + verification?: EmailAndPhoneVerificationAndAccountActivationConfiguration; + recovery?: AccountRecoveryConfiguration; + error?: { + ui_url?: OryKratosErrorUIURL; + }; + }; + methods?: { + profile?: { + enabled?: EnablesProfileManagementMethod; + }; + link?: { + enabled?: EnablesLinkMethod; + config?: LinkConfiguration; + }; + code?: { + enabled?: EnablesCodeMethod; + config?: CodeConfiguration; + }; + password?: { + enabled?: EnablesUsernameEmailAndPasswordMethod; + config?: PasswordConfiguration; + }; + totp?: { + enabled?: EnablesTheTOTPMethod; + config?: TOTPConfiguration; + }; + lookup_secret?: { + enabled?: EnablesTheLookupSecretMethod; + }; + webauthn?: { + enabled?: EnablesTheWebAuthnMethod; + config?: WebAuthnConfiguration; + }; + oidc?: SpecifyOpenIDConnectAndOAuth2Configuration; + }; + }; + database?: DatabaseRelatedConfiguration; + dsn: DataSourceName; + courier?: CourierConfiguration; + oauth2_provider?: OAuth2ProviderConfiguration; + serve?: { + admin?: { + request_log?: { + disable_for_health?: DisableHealthEndpointsRequestLogging; + }; + base_url?: AdminBaseURL; + host?: AdminHost; + port?: AdminPort; + socket?: Socket; + tls?: HTTPS; + }; + public?: { + request_log?: { + disable_for_health?: DisableHealthEndpointsRequestLogging1; + }; + /** + * Configures Cross Origin Resource Sharing for public endpoints. + */ + cors?: { + /** + * Sets whether CORS is enabled. + */ + enabled?: boolean; + /** + * A list of origins a cross-domain request can be executed from. If the special * value is present in the list, all origins will be allowed. An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com). Only one wildcard can be used per origin. + */ + allowed_origins?: ((string | "*") & string)[]; + /** + * A list of HTTP methods the user agent is allowed to use with cross-domain requests. + */ + allowed_methods?: ("POST" | "GET" | "PUT" | "PATCH" | "DELETE" | "CONNECT" | "HEAD" | "OPTIONS" | "TRACE")[]; + /** + * A list of non simple headers the client is allowed to use with cross-domain requests. + */ + allowed_headers?: string[]; + /** + * Sets which headers are safe to expose to the API of a CORS API specification. + */ + exposed_headers?: string[]; + /** + * Sets whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates. + */ + allow_credentials?: boolean; + /** + * TODO + */ + options_passthrough?: boolean; + /** + * Sets how long (in seconds) the results of a preflight request can be cached. If set to 0, every request is preceded by a preflight request. + */ + max_age?: number; + /** + * Adds additional log output to debug server side CORS issues. + */ + debug?: boolean; + }; + base_url?: BaseURL; + host?: PublicHost; + port?: PublicPort; + socket?: Socket; + tls?: HTTPS; + }; + }; + tracing?: OryTracingConfig; + log?: Log; + identity: { + default_schema_id?: TheDefaultIdentitySchema; + schemas: AllJSONSchemasForIdentityTraits; + }; + secrets?: { + default?: DefaultEncryptionSigningSecrets; + cookie?: SigningKeysForCookies; + cipher?: SecretsToUseForEncryptionByCipher; + }; + hashers?: HashingAlgorithmConfiguration; + ciphers?: CipherAlgorithmConfiguration; + cookies?: HTTPCookieConfiguration; + session?: { + whoami?: WhoAmIToSessionSettings; + lifespan?: SessionLifespan; + cookie?: { + domain?: SessionCookieDomain; + name?: SessionCookieName; + persistent?: MakeSessionCookiePersistent; + path?: SessionCookiePath; + same_site?: SessionCookieSameSiteConfiguration; + }; + earliest_possible_extend?: EarliestPossibleSessionExtension; + }; + version?: TheKratosVersionThisConfigIsWrittenFor; + dev?: boolean; + help?: boolean; + /** + * This is a CLI flag and environment variable and can not be set using the config file. + */ + "sqa-opt-out"?: boolean; + /** + * This is a CLI flag and environment variable and can not be set using the config file. + */ + "watch-courier"?: boolean; + "expose-metrics-port"?: MetricsPort; + /** + * This is a CLI flag and environment variable and can not be set using the config file. + */ + config?: string[]; + clients?: GlobalOutgoingNetworkSettings; + feature_flags?: FeatureFlags; +} +export interface SelfServiceAfterSettings { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + password?: SelfServiceAfterSettingsMethod; + profile?: SelfServiceAfterSettingsMethod; + hooks?: SelfServiceHooks; +} +export interface SelfServiceAfterSettingsMethod { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + hooks?: SelfServiceWebHook[]; +} +export interface SelfServiceWebHook { + hook: "web_hook"; + config: WebHookConfiguration; +} +export interface SelfServiceBeforeSettings { + hooks?: SelfServiceHooks; +} +export interface SelfServiceBeforeRegistration { + hooks?: SelfServiceHooks; +} +export interface SelfServiceAfterRegistration { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + password?: SelfServiceAfterRegistrationMethod; + webauthn?: SelfServiceAfterRegistrationMethod; + oidc?: SelfServiceAfterRegistrationMethod; + hooks?: SelfServiceHooks; +} +export interface SelfServiceAfterRegistrationMethod { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + hooks?: (SelfServiceSessionIssuerHook | SelfServiceWebHook)[]; +} +export interface SelfServiceSessionIssuerHook { + hook: "session"; +} +export interface SelfServiceBeforeLogin { + hooks?: SelfServiceHooks; +} +export interface SelfServiceAfterLogin { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + password?: SelfServiceAfterDefaultLoginMethod; + webauthn?: SelfServiceAfterDefaultLoginMethod; + oidc?: SelfServiceAfterOIDCLoginMethod; + hooks?: (SelfServiceWebHook | SelfServiceSessionRevokerHook | SelfServiceRequireVerifiedAddressHook)[]; +} +export interface SelfServiceAfterDefaultLoginMethod { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + hooks?: (SelfServiceSessionRevokerHook | SelfServiceRequireVerifiedAddressHook | SelfServiceWebHook)[]; +} +export interface SelfServiceSessionRevokerHook { + hook: "revoke_active_sessions"; +} +export interface SelfServiceRequireVerifiedAddressHook { + hook: "require_verified_address"; +} +export interface SelfServiceAfterOIDCLoginMethod { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + hooks?: (SelfServiceSessionRevokerHook | SelfServiceWebHook | SelfServiceRequireVerifiedAddressHook)[]; +} +export interface EmailAndPhoneVerificationAndAccountActivationConfiguration { + enabled?: EnableEmailPhoneVerification; + ui_url?: VerifyUIURL; + after?: SelfServiceAfterVerification; + lifespan?: SelfServiceVerificationRequestLifespan; + before?: SelfServiceBeforeVerification; + use?: VerificationStrategy; + notify_unknown_recipients?: NotifyUnknownRecipients; +} +export interface SelfServiceAfterVerification { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + hooks?: SelfServiceHooks; +} +export interface SelfServiceBeforeVerification { + hooks?: SelfServiceHooks; +} +export interface AccountRecoveryConfiguration { + enabled?: EnableAccountRecovery; + ui_url?: RecoveryUIURL; + after?: SelfServiceAfterRecovery; + lifespan?: SelfServiceRecoveryRequestLifespan; + before?: SelfServiceBeforeRecovery; + use?: RecoveryStrategy; + notify_unknown_recipients?: NotifyUnknownRecipients1; +} +export interface SelfServiceAfterRecovery { + default_browser_return_url?: RedirectBrowsersToSetURLPerDefault; + hooks?: SelfServiceAfterRecoveryHooks; +} +export interface SelfServiceBeforeRecovery { + hooks?: SelfServiceHooks; +} +/** + * Additional configuration for the link strategy. + */ +export interface LinkConfiguration { + base_url?: OverrideTheBaseURLWhichShouldBeUsedAsTheBaseForRecoveryAndVerificationLinks; + lifespan?: HowLongALinkIsValidFor; + [k: string]: unknown | undefined; +} +/** + * Additional configuration for the code strategy. + */ +export interface CodeConfiguration { + lifespan?: HowLongACodeIsValidFor; + [k: string]: unknown | undefined; +} +/** + * Define how passwords are validated. + */ +export interface PasswordConfiguration { + haveibeenpwned_host?: CustomHaveibeenpwnedHost; + haveibeenpwned_enabled?: EnableTheHaveIBeenPwnedAPI; + max_breaches?: AllowPasswordBreaches; + ignore_network_errors?: IgnoreLookupNetworkErrors; + min_password_length?: MinimumPasswordLength; + identifier_similarity_check_enabled?: EnablePasswordIdentifierSimilarityCheck; +} +export interface TOTPConfiguration { + issuer?: TOTPIssuer; +} +export interface WebAuthnConfiguration { + passwordless?: UseForPasswordlessFlows; + rp?: RelyingPartyRPConfig; +} +export interface RelyingPartyRPConfig { + display_name: RelyingPartyDisplayName; + id: RelyingPartyIdentifier; + origin?: RelyingPartyOrigin; + icon?: RelyingPartyIcon; + [k: string]: unknown | undefined; +} +export interface SpecifyOpenIDConnectAndOAuth2Configuration { + enabled?: EnablesOpenIDConnectMethod; + config?: { + base_redirect_uri?: BaseURLForOAuth2RedirectURIs; + providers?: OpenIDConnectAndOAuth2Providers; + }; +} +/** + * The OpenID Connect claims and optionally their properties which should be included in the id_token or returned from the UserInfo Endpoint. + */ +export interface OpenIDConnectClaims { + /** + * This interface was referenced by `OpenIDConnectClaims`'s JSON-Schema definition + * via the `patternProperty` "^userinfo$|^id_token$". + */ + [k: string]: { + /** + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` ".*". + */ + [k: string]: null | { + /** + * Indicates whether the Claim being requested is an Essential Claim. + */ + essential?: boolean; + /** + * Requests that the Claim be returned with a particular value. + */ + value?: { + [k: string]: unknown | undefined; + }; + /** + * Requests that the Claim be returned with one of a set of values, with the values appearing in order of preference. + */ + values?: { + [k: string]: unknown | undefined; + }[]; + }; + }; +} +/** + * Miscellaneous settings used in database related tasks (cleanup, etc.) + */ +export interface DatabaseRelatedConfiguration { + cleanup?: DatabaseCleanupSettings; +} +/** + * Settings that controls how the database cleanup process is configured (delays, batch size, etc.) + */ +export interface DatabaseCleanupSettings { + batch_size?: NumberOfRecordsToCleanInOneIteration; + sleep?: DelaysBetweenVariousDatabaseCleanupPhases; + older_than?: RemoveRecordsOlderThan; + [k: string]: unknown | undefined; +} +/** + * Configures delays between each step of the cleanup process. It is useful to tune the process so it will be efficient and performant. + */ +export interface DelaysBetweenVariousDatabaseCleanupPhases { + tables?: DelayBetweenEachTableCleanups; + [k: string]: unknown | undefined; +} +/** + * The courier is responsible for sending and delivering messages over email, sms, and other means. + */ +export interface CourierConfiguration { + templates?: { + recovery?: CourierTemplates; + recovery_code?: CourierTemplates; + verification?: CourierTemplates; + verification_code?: CourierTemplates; + }; + template_override_path?: OverrideMessageTemplates; + /** + * Defines the maximum number of times the sending of a message is retried after it failed before it is marked as abandoned + */ + message_retries?: number; + smtp: SMTPConfiguration; + sms?: SMSSenderConfiguration; +} +export interface CourierTemplates { + invalid?: { + email: EmailCourierTemplate; + }; + valid?: { + email: EmailCourierTemplate; + }; +} +export interface EmailCourierTemplate { + body?: { + /** + * The fallback template for email clients that do not support html. + */ + plaintext?: string; + /** + * The default template used for sending out emails. The template can contain HTML + */ + html?: string; + }; + subject?: string; +} +/** + * Configures outgoing emails using the SMTP protocol. + */ +export interface SMTPConfiguration { + connection_uri: SMTPConnectionString; + client_cert_path?: SMTPClientCertificatePath; + client_key_path?: SMTPClientPrivateKeyPath; + from_address?: SMTPSenderAddress; + from_name?: SMTPSenderName; + headers?: SMTPHeaders; + local_name?: SMTPHELOEHLOName; +} +/** + * These headers will be passed in the SMTP conversation -- e.g. when using the AWS SES SMTP interface for cross-account sending. + */ +export interface SMTPHeaders { + [k: string]: string | undefined; +} +/** + * Configures outgoing sms messages using HTTP protocol with generic SMS provider + */ +export interface SMSSenderConfiguration { + /** + * Determines if SMS functionality is enabled + */ + enabled?: boolean; + from?: SMSSenderAddress; + request_config?: { + url: HTTPAddressOfAPIEndpoint; + /** + * The HTTP method to use (GET, POST, etc). + */ + method: string; + /** + * The HTTP headers that must be applied to request + */ + headers?: { + [k: string]: string | undefined; + }; + /** + * URI pointing to the jsonnet template used for payload generation. Only used for those HTTP methods, which support HTTP body payloads + */ + body?: string; + auth?: AuthMechanisms; + additionalProperties?: false; + }; +} +export interface WebHookAuthApiKeyProperties { + type: "api_key"; + config: { + /** + * The name of the api key + */ + name: string; + /** + * The value of the api key + */ + value: string; + /** + * How the api key should be transferred + */ + in: "header" | "cookie"; + }; +} +export interface WebHookAuthBasicAuthProperties { + type: "basic_auth"; + config: { + /** + * user name for basic auth + */ + user: string; + /** + * password for basic auth + */ + password: string; + }; +} +export interface OAuth2ProviderConfiguration { + url?: OAuth20ProviderURL; + headers?: HTTPRequestHeaders; +} +/** + * These headers will be passed in HTTP request to the OAuth2 Provider. + */ +export interface HTTPRequestHeaders { + [k: string]: string | undefined; +} +/** + * Sets the permissions of the unix socket + */ +export interface Socket { + /** + * Owner of unix socket. If empty, the owner will be the user running Kratos. + */ + owner?: string; + /** + * Group of unix socket. If empty, the group will be the primary group of the user running Kratos. + */ + group?: string; + /** + * Mode of unix socket in numeric form + */ + mode?: number; +} +/** + * Configure HTTP over TLS (HTTPS). All options can also be set using environment variables by replacing dots (`.`) with underscores (`_`) and uppercasing the key. For example, `some.prefix.tls.key.path` becomes `export SOME_PREFIX_TLS_KEY_PATH`. If all keys are left undefined, TLS will be disabled. + */ +export interface HTTPS { + key?: PrivateKeyPEM; + cert?: TLSCertificatePEM; +} +export interface TlsxSource { + path?: PathToPEMEncodedFle; + base64?: Base64EncodedInline; +} +/** + * Configure distributed tracing using OpenTelemetry + */ +export interface OryTracingConfig { + /** + * Set this to the tracing backend you wish to use. Supports Jaeger, Zipkin, and OTEL. + */ + provider?: "jaeger" | "otel" | "zipkin"; + /** + * Specifies the service name to use on the tracer. + */ + service_name?: string; + providers?: { + /** + * Configures the jaeger tracing backend. + */ + jaeger?: { + /** + * The address of the jaeger-agent where spans should be sent to. + */ + local_agent_address?: (IPv6AddressAndPort | IPv4AddressAndPort | HostnameAndPort) & string; + sampling?: { + /** + * The address of jaeger-agent's HTTP sampling server + */ + server_url?: string; + /** + * Trace Id ratio sample + */ + trace_id_ratio?: number; + }; + }; + /** + * Configures the zipkin tracing backend. + */ + zipkin?: { + /** + * The address of the Zipkin server where spans should be sent to. + */ + server_url?: string; + sampling?: { + /** + * Sampling ratio for spans. + */ + sampling_ratio?: number; + }; + }; + /** + * Configures the OTLP tracing backend. + */ + otlp?: { + /** + * The endpoint of the OTLP exporter (HTTP) where spans should be sent to. + */ + server_url?: (IPv6AddressAndPort1 | IPv4AddressAndPort1 | HostnameAndPort1) & string; + /** + * Will use HTTP if set to true; defaults to HTTPS. + */ + insecure?: boolean; + sampling?: { + /** + * Sampling ratio for spans. + */ + sampling_ratio?: number; + }; + }; + }; +} +export interface IPv6AddressAndPort { + [k: string]: unknown | undefined; +} +export interface IPv4AddressAndPort { + [k: string]: unknown | undefined; +} +export interface HostnameAndPort { + [k: string]: unknown | undefined; +} +export interface IPv6AddressAndPort1 { + [k: string]: unknown | undefined; +} +export interface IPv4AddressAndPort1 { + [k: string]: unknown | undefined; +} +export interface HostnameAndPort1 { + [k: string]: unknown | undefined; +} +/** + * Configure logging using the following options. Logging will always be sent to stdout and stderr. + */ +export interface Log { + /** + * Debug enables stack traces on errors. Can also be set using environment variable LOG_LEVEL. + */ + level?: "trace" | "debug" | "info" | "warning" | "error" | "fatal" | "panic"; + leak_sensitive_values?: LeakSensitiveLogValues; + redaction_text?: SensitiveLogValueRedactionText; + /** + * The log format can either be text or JSON. + */ + format?: "json" | "text"; +} +export interface HashingAlgorithmConfiguration { + algorithm?: PasswordHashingAlgorithm; + argon2?: ConfigurationForTheArgon2IdHasher; + bcrypt?: ConfigurationForTheBcryptHasherMinimumIs4WhenDevFlagIsUsedAnd12Otherwise; +} +export interface ConfigurationForTheArgon2IdHasher { + memory?: string; + iterations?: number; + /** + * Number of parallel workers, defaults to 2*runtime.NumCPU(). + */ + parallelism?: number; + salt_length?: number; + key_length?: number; + /** + * The time a hashing operation (~login latency) should take. + */ + expected_duration?: string; + /** + * The standard deviation expected for hashing operations. If this value is exceeded you will be warned in the logs to adjust the parameters. + */ + expected_deviation?: string; + /** + * The memory dedicated for Kratos. As password hashing is very resource intense, Kratos will monitor the memory consumption and warn about high values. + */ + dedicated_memory?: string; +} +export interface ConfigurationForTheBcryptHasherMinimumIs4WhenDevFlagIsUsedAnd12Otherwise { + cost: number; +} +export interface CipherAlgorithmConfiguration { + algorithm?: CipheringAlgorithm; + [k: string]: unknown | undefined; +} +/** + * Configure the HTTP Cookies. Applies to both CSRF and session cookies. + */ +export interface HTTPCookieConfiguration { + domain?: HTTPCookieDomain; + path?: HTTPCookiePath; + same_site?: HTTPCookieSameSiteConfiguration; +} +/** + * Control how the `/sessions/whoami` endpoint is behaving. + */ +export interface WhoAmIToSessionSettings { + required_aal?: RequiredAuthenticatorAssuranceLevel; +} +/** + * Configure how outgoing network calls behave. + */ +export interface GlobalOutgoingNetworkSettings { + http?: GlobalHTTPClientConfiguration; + [k: string]: unknown | undefined; +} +/** + * Configure how outgoing HTTP calls behave. + */ +export interface GlobalHTTPClientConfiguration { + disallow_private_ip_ranges?: DisallowPrivateIPRanges; + private_ip_exception_urls?: AddExemptURLsToPrivateIPRanges; + [k: string]: unknown | undefined; +} +export interface FeatureFlags { + cacheable_sessions?: EnableOrySessionsCaching; +} diff --git a/test/e2e/cypress/support/index.d.ts b/test/e2e/cypress/support/index.d.ts index b66c89273cd1..6966aa8b4773 100644 --- a/test/e2e/cypress/support/index.d.ts +++ b/test/e2e/cypress/support/index.d.ts @@ -1,6 +1,9 @@ // Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 +import { Session as KratosSession } from "@ory/kratos-client" +import { OryKratosConfiguration } from "./config" + export interface MailMessage { fromAddress: string toAddresses: Array @@ -36,7 +39,7 @@ declare global { expectMethods?: Array< "password" | "webauthn" | "lookup_secret" | "totp" > - }): Chainable + }): Chainable /** * Expect that the browser has no valid Ory Kratos Cookie Session. @@ -53,7 +56,7 @@ declare global { password: string expectSession?: boolean cookieUrl?: string - }): Chainable> + }): Chainable> /** * Sign up a user @@ -91,6 +94,7 @@ declare global { performEmailVerification(opts?: { expect?: { email?: string; redirectTo?: string } strategy?: Strategy + useLinkFromEmail?: boolean }): Chainable /** @@ -111,7 +115,7 @@ declare global { email: string password: string fields: { [key: string]: string } - }): Chainable + }): Chainable /** * Submits a recovery flow via the API @@ -136,7 +140,7 @@ declare global { * * @param cb */ - updateConfigFile(cb: (arg: any) => any): Chainable + updateConfigFile(cb: (arg: OryKratosConfiguration) => any): Chainable /** * Submits a verification flow via the API @@ -257,7 +261,10 @@ declare global { * * @param opts */ - reauth(opts: { expect: { email; success?: boolean } }): Chainable + reauth(opts: { + expect: { email; success?: boolean } + type: { email?: string; password?: string } + }): Chainable /** * Re-authenticates a user. @@ -510,7 +517,7 @@ declare global { * @param opts */ verifyEmailButExpired(opts?: { - expect: { password?: string; email: string } + expect: { email: string } strategy?: Strategy }): Chainable @@ -571,7 +578,7 @@ declare global { recoverEmail(opts: { expect: { email: string } shouldVisit?: boolean - }): Chainable + }): Chainable /** * Expect a verification email which is valid. @@ -608,7 +615,7 @@ declare global { loginApi(opts: { email: string password: string - }): Chainable<{ session: Session }> + }): Chainable<{ session: KratosSession }> /** * Same as loginApi but uses dark magic to avoid cookie issues. @@ -618,7 +625,7 @@ declare global { loginApiWithoutCookies(opts: { email: string password: string - }): Chainable<{ session: Session }> + }): Chainable<{ session: KratosSession }> /** * Which app to proxy @@ -658,9 +665,24 @@ declare global { value: string, ): Chainable + /** + * Fetches the courier messages from the admin API + */ getCourierMessages(): Chainable< { recipient: string; template_type: string }[] > + + /** + * Enable the verification UI after registration hook + */ + enableVerificationUIAfterRegistration( + strategy: "password" | "oidc" | "webauthn", + ): Chainable + + /** + * Extracts a verification code from the received email + */ + getVerificationCodeFromEmail(email: string): Chainable } } } diff --git a/test/e2e/package-lock.json b/test/e2e/package-lock.json index 8de3e3f3c4c2..539c3af10899 100644 --- a/test/e2e/package-lock.json +++ b/test/e2e/package-lock.json @@ -15,12 +15,31 @@ "cypress": "^11.2.0", "dayjs": "^1.10.4", "got": "^11.8.2", + "json-schema-to-typescript": "^12.0.0", "otplib": "^12.0.1", "typescript": "^4.7.4", "wait-on": "5.3.0", "yamljs": "^0.3.0" } }, + "node_modules/@bcherny/json-schema-ref-parser": { + "version": "10.0.5-fork", + "resolved": "https://registry.npmjs.org/@bcherny/json-schema-ref-parser/-/json-schema-ref-parser-10.0.5-fork.tgz", + "integrity": "sha512-E/jKbPoca1tfUPj3iSbitDZTGnq6FUFjkH6L8U2oDwSuwK1WhnnVtCG7oFOTg/DDnyoXbQYUiUiGOibHqaGVnw==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, "node_modules/@cypress/request": { "version": "2.88.10", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", @@ -84,6 +103,12 @@ "@hapi/hoek": "^9.0.0" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, "node_modules/@ory/kratos-client": { "version": "0.0.0-next.8d3b018594f7", "resolved": "https://registry.npmjs.org/@ory/kratos-client/-/kratos-client-0.0.0-next.8d3b018594f7.tgz", @@ -197,12 +222,28 @@ "@types/responselike": "*" } }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, "node_modules/@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", "dev": true }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "node_modules/@types/keyv": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", @@ -212,12 +253,30 @@ "@types/node": "*" } }, + "node_modules/@types/lodash": { + "version": "4.14.191", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz", + "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true + }, "node_modules/@types/node": { "version": "16.11.26", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz", "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==", "dev": true }, + "node_modules/@types/prettier": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz", + "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==", + "dev": true + }, "node_modules/@types/responselike": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", @@ -316,6 +375,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "node_modules/arch": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", @@ -543,6 +608,12 @@ "node": ">=6" } }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true + }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -614,6 +685,22 @@ "node": ">=6" } }, + "node_modules/cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -825,6 +912,16 @@ "node": ">= 6" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -942,6 +1039,54 @@ "node": ">=8.6" } }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -951,6 +1096,16 @@ "node": ">=0.8.0" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/eventemitter2": { "version": "6.4.7", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", @@ -992,6 +1147,21 @@ "node": ">=4" } }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -1115,6 +1285,18 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -1168,6 +1350,25 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-promise": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", + "dev": true, + "dependencies": { + "@types/glob": "^7.1.3" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/ahmadnassri" + }, + "peerDependencies": { + "glob": "^7.1.6" + } + }, "node_modules/global-dirs": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", @@ -1331,6 +1532,15 @@ "is-ci": "bin.js" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -1340,6 +1550,18 @@ "node": ">=8" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -1365,6 +1587,12 @@ "node": ">=8" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -1420,6 +1648,24 @@ "@sideway/pinpoint": "^2.0.0" } }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/js-yaml/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -1438,6 +1684,34 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, + "node_modules/json-schema-to-typescript": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", + "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", + "dev": true, + "dependencies": { + "@bcherny/json-schema-ref-parser": "10.0.5-fork", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.6.2" + }, + "bin": { + "json2ts": "dist/src/cli.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -1614,6 +1888,31 @@ "node": ">=10" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -1677,12 +1976,41 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node_modules/normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -1707,6 +2035,15 @@ "node": ">=8" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1811,6 +2148,21 @@ "node": ">=0.10.0" } }, + "node_modules/prettier": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.5.tgz", + "integrity": "sha512-3gzuxrHbKUePRBB4ZeU08VNkUcqEHaUaouNt0m7LGP4Hti/NuB07C7PPTM/LkWqXoJYJn2McEo5+kxPNrtQkLQ==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -2105,6 +2457,27 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/thirty-two": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz", @@ -2126,6 +2499,16 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -2175,6 +2558,12 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -2369,6 +2758,18 @@ } }, "dependencies": { + "@bcherny/json-schema-ref-parser": { + "version": "10.0.5-fork", + "resolved": "https://registry.npmjs.org/@bcherny/json-schema-ref-parser/-/json-schema-ref-parser-10.0.5-fork.tgz", + "integrity": "sha512-E/jKbPoca1tfUPj3iSbitDZTGnq6FUFjkH6L8U2oDwSuwK1WhnnVtCG7oFOTg/DDnyoXbQYUiUiGOibHqaGVnw==", + "dev": true, + "requires": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, "@cypress/request": { "version": "2.88.10", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", @@ -2431,6 +2832,12 @@ "@hapi/hoek": "^9.0.0" } }, + "@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, "@ory/kratos-client": { "version": "0.0.0-next.8d3b018594f7", "resolved": "https://registry.npmjs.org/@ory/kratos-client/-/kratos-client-0.0.0-next.8d3b018594f7.tgz", @@ -2535,12 +2942,28 @@ "@types/responselike": "*" } }, + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, "@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", "dev": true }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "@types/keyv": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", @@ -2550,12 +2973,30 @@ "@types/node": "*" } }, + "@types/lodash": { + "version": "4.14.191", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz", + "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==", + "dev": true + }, + "@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true + }, "@types/node": { "version": "16.11.26", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz", "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==", "dev": true }, + "@types/prettier": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz", + "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==", + "dev": true + }, "@types/responselike": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", @@ -2633,6 +3074,12 @@ "color-convert": "^2.0.1" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "arch": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", @@ -2794,6 +3241,12 @@ "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true }, + "call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2849,6 +3302,19 @@ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + } + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -3023,6 +3489,16 @@ } } }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -3110,12 +3586,66 @@ "ansi-colors": "^4.1.1" } }, + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "eventemitter2": { "version": "6.4.7", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", @@ -3148,6 +3678,23 @@ "pify": "^2.2.0" } }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "requires": { + "type": "^2.7.2" + }, + "dependencies": { + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3231,6 +3778,12 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true + }, "get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -3272,6 +3825,15 @@ "path-is-absolute": "^1.0.0" } }, + "glob-promise": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-4.2.2.tgz", + "integrity": "sha512-xcUzJ8NWN5bktoTIX7eOclO1Npxd/dyVqUJxlLIDasT4C7KZyqlPIwkdJ0Ypiy3p2ZKahTjK4M9uC3sNSfNMzw==", + "dev": true, + "requires": { + "@types/glob": "^7.1.3" + } + }, "global-dirs": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", @@ -3388,12 +3950,27 @@ "ci-info": "^3.2.0" } }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -3410,6 +3987,12 @@ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3453,6 +4036,23 @@ "@sideway/pinpoint": "^2.0.0" } }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + } + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -3471,6 +4071,28 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, + "json-schema-to-typescript": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-12.0.0.tgz", + "integrity": "sha512-Uk/BDIAo8vqepPBhM86UhNMHgCv7JulicNj/BgnQPHE1fGCoej0UTtcEYzXU/uk6lSvbZCf7pccW+dnNMrr5rg==", + "dev": true, + "requires": { + "@bcherny/json-schema-ref-parser": "10.0.5-fork", + "@types/json-schema": "^7.0.11", + "@types/lodash": "^4.14.182", + "@types/prettier": "^2.6.1", + "cli-color": "^2.0.2", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^4.2.2", + "is-glob": "^4.0.3", + "lodash": "^4.17.21", + "minimist": "^1.2.6", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.6.2" + } + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -3603,6 +4225,31 @@ "yallist": "^4.0.0" } }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -3651,12 +4298,35 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -3672,6 +4342,12 @@ "path-key": "^3.0.0" } }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3752,6 +4428,12 @@ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, + "prettier": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.5.tgz", + "integrity": "sha512-3gzuxrHbKUePRBB4ZeU08VNkUcqEHaUaouNt0m7LGP4Hti/NuB07C7PPTM/LkWqXoJYJn2McEo5+kxPNrtQkLQ==", + "dev": true + }, "pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -3967,6 +4649,24 @@ "has-flag": "^4.0.0" } }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "thirty-two": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz", @@ -3985,6 +4685,16 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -4025,6 +4735,12 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", diff --git a/test/e2e/package.json b/test/e2e/package.json index 3dca8afef148..495f8ec650d6 100644 --- a/test/e2e/package.json +++ b/test/e2e/package.json @@ -2,20 +2,22 @@ "name": "@ory/kratos-e2e-suite", "version": "0.0.1", "scripts": { + "build": "tsc --noEmit", + "openapi-generator-cli": "openapi-generator-cli", "test": "cypress run --browser chrome", "test:watch": "cypress open --browser chrome", - "openapi-generator-cli": "openapi-generator-cli", - "wait-on": "wait-on", - "text-run": "exit 0" + "text-run": "exit 0", + "wait-on": "wait-on" }, "devDependencies": { - "@ory/kratos-client": "0.0.0-next.8d3b018594f7", + "@ory/client": "0.0.0-next.8d3b018594f7", "@types/node": "^16.9.6", "@types/yamljs": "^0.2.31", "chrome-remote-interface": "0.31.2", "cypress": "^11.2.0", "dayjs": "^1.10.4", "got": "^11.8.2", + "json-schema-to-typescript": "^12.0.0", "otplib": "^12.0.1", "typescript": "^4.7.4", "wait-on": "5.3.0", diff --git a/test/e2e/render-kratos-config.sh b/test/e2e/render-kratos-config.sh new file mode 100755 index 000000000000..45506efd0380 --- /dev/null +++ b/test/e2e/render-kratos-config.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Renders the config schema to a TypeScript file that can be used in Cypress tests. + +set -euxo pipefail + +dir=$(realpath $(dirname "${BASH_SOURCE[0]}")) + +ory_x_version="$(cd $dir/../..; go list -f '{{.Version}}' -m github.com/ory/x)" + +curl -s https://raw.githubusercontent.com/ory/x/$ory_x_version/otelx/config.schema.json > .tracing-config.schema.json + +sed "s!ory://tracing-config!.tracing-config.schema.json!g;" ../../embedx/config.schema.json | npx json2ts --strictIndexSignatures > cypress/support/config.d.ts + +rm .tracing-config.schema.json diff --git a/test/e2e/tsconfig.json b/test/e2e/tsconfig.json index 18edb199acdb..98af3d07e303 100644 --- a/test/e2e/tsconfig.json +++ b/test/e2e/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "target": "es5", "lib": ["es5", "dom"], - "types": ["cypress", "node"] + "types": ["cypress", "node"], + "esModuleInterop": true }, "include": ["**/*.ts"] }