From cfd5291f98bdde60e07d2d7106e4212ab3cbdbbb Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 15 May 2024 13:22:11 +0200 Subject: [PATCH 01/56] fix: add `--data-migration-logs` flag in order to optionally hide migration logs --- packages/cli-plugin-deploy-pulumi/commands/index.js | 5 +++++ .../src/api/plugins/executeDataMigrations.ts | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/cli-plugin-deploy-pulumi/commands/index.js b/packages/cli-plugin-deploy-pulumi/commands/index.js index 5949e5addcf..270a7bd16d2 100644 --- a/packages/cli-plugin-deploy-pulumi/commands/index.js +++ b/packages/cli-plugin-deploy-pulumi/commands/index.js @@ -59,6 +59,11 @@ module.exports = [ describe: `Enable base compilation-related logs`, type: "boolean" }); + yargs.option("--data-migration-logs", { + default: true, + describe: `Enable data migration logs`, + type: "boolean" + }); }, async argv => { await deploy(argv, context); diff --git a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts index e0c4bfd66ff..d7ca74be0f5 100644 --- a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts +++ b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts @@ -6,7 +6,8 @@ import { InteractiveCliStatusReporter, NonInteractiveCliStatusReporter, MigrationRunner, - CliMigrationRunReporter + CliMigrationRunReporter, + MigrationStatusReporter } from "@webiny/data-migration/cli"; /** @@ -43,10 +44,14 @@ export const executeDataMigrations = { const functionName = apiOutput["migrationLambdaArn"]; const logReporter = new LogReporter(functionName); - const statusReporter = - !process.stdout.isTTY || "CI" in process.env + + let statusReporter: MigrationStatusReporter | undefined; + if (inputs.dataMigrationLogs) { + const useNonInteractiveReporter = !process.stdout.isTTY || "CI" in process.env; + statusReporter = useNonInteractiveReporter ? new NonInteractiveCliStatusReporter(logReporter) : new InteractiveCliStatusReporter(logReporter); + } const runner = MigrationRunner.create({ lambdaClient, From 4f13ca0c977756442d243820329f5ad7621a7758 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 15 May 2024 13:23:27 +0200 Subject: [PATCH 02/56] fix: remove default logger For now, we're removing the logger just so redundant logs are no longer printed in CloudWatch. In the near future, we'll have our own Pino logger that we'll pass to Fastify. --- packages/handler/src/fastify.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/handler/src/fastify.ts b/packages/handler/src/fastify.ts index dede0fc3288..b512ba7e720 100644 --- a/packages/handler/src/fastify.ts +++ b/packages/handler/src/fastify.ts @@ -187,6 +187,10 @@ export const createHandler = (params: CreateHandlerParams) => { */ const app = fastify({ bodyLimit: 536870912, // 512MB + + // TODO: in the near future, pass own Pino logger instance. + logger: false, + ...(params.options || {}) }); From a0d465c1c052bf194f9077307e02e9f048232692 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 15 May 2024 13:25:56 +0200 Subject: [PATCH 03/56] fix: remove extra dashes --- packages/cli-plugin-deploy-pulumi/commands/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli-plugin-deploy-pulumi/commands/index.js b/packages/cli-plugin-deploy-pulumi/commands/index.js index 270a7bd16d2..ba700cf89f3 100644 --- a/packages/cli-plugin-deploy-pulumi/commands/index.js +++ b/packages/cli-plugin-deploy-pulumi/commands/index.js @@ -59,7 +59,7 @@ module.exports = [ describe: `Enable base compilation-related logs`, type: "boolean" }); - yargs.option("--data-migration-logs", { + yargs.option("data-migration-logs", { default: true, describe: `Enable data migration logs`, type: "boolean" From a4220a1b4e76fe07f12e0d078d970adc26fc9e66 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 15 May 2024 13:48:26 +0200 Subject: [PATCH 04/56] fix: change `--data-migration-logs` to `-data-migration-reporter` --- packages/cli-plugin-deploy-pulumi/commands/index.js | 4 ++-- .../src/api/plugins/executeDataMigrations.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli-plugin-deploy-pulumi/commands/index.js b/packages/cli-plugin-deploy-pulumi/commands/index.js index ba700cf89f3..495680dd5b9 100644 --- a/packages/cli-plugin-deploy-pulumi/commands/index.js +++ b/packages/cli-plugin-deploy-pulumi/commands/index.js @@ -59,9 +59,9 @@ module.exports = [ describe: `Enable base compilation-related logs`, type: "boolean" }); - yargs.option("data-migration-logs", { + yargs.option("data-migration-reporter", { default: true, - describe: `Enable data migration logs`, + describe: `Enable data migration reporting during the deployment process`, type: "boolean" }); }, diff --git a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts index d7ca74be0f5..584c7ca95cf 100644 --- a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts +++ b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts @@ -46,7 +46,7 @@ export const executeDataMigrations = { const logReporter = new LogReporter(functionName); let statusReporter: MigrationStatusReporter | undefined; - if (inputs.dataMigrationLogs) { + if (inputs.dataMigrationReporter) { const useNonInteractiveReporter = !process.stdout.isTTY || "CI" in process.env; statusReporter = useNonInteractiveReporter ? new NonInteractiveCliStatusReporter(logReporter) From cdab32360fdecf0c885cfcce3bf048ba2705defa Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 16 May 2024 10:49:25 +0200 Subject: [PATCH 05/56] fix: toggle data migration log streaming via `WEBINY_MIGRATION_LOG_STREAMING` env var --- .../commands/index.js | 5 --- .../src/api/plugins/executeDataMigrations.ts | 36 ++++++++++++------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/cli-plugin-deploy-pulumi/commands/index.js b/packages/cli-plugin-deploy-pulumi/commands/index.js index 495680dd5b9..5949e5addcf 100644 --- a/packages/cli-plugin-deploy-pulumi/commands/index.js +++ b/packages/cli-plugin-deploy-pulumi/commands/index.js @@ -59,11 +59,6 @@ module.exports = [ describe: `Enable base compilation-related logs`, type: "boolean" }); - yargs.option("data-migration-reporter", { - default: true, - describe: `Enable data migration reporting during the deployment process`, - type: "boolean" - }); }, async argv => { await deploy(argv, context); diff --git a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts index 584c7ca95cf..b30ed10e9c6 100644 --- a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts +++ b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts @@ -9,6 +9,7 @@ import { CliMigrationRunReporter, MigrationStatusReporter } from "@webiny/data-migration/cli"; +import { VoidStatusReporter } from "@webiny/data-migration/cli/VoidStatusReporter"; /** * On every deployment of the API project application, this plugin invokes the data migrations Lambda. @@ -22,19 +23,30 @@ export const executeDataMigrations = { return; } - if (inputs.build === false) { - context.info(`"--no-build" argument detected - skipping data migrations.`); - return; - } - - // No need to run migrations if we're doing a preview. - if (inputs.preview) { - return; - } + // if (inputs.build === false) { + // context.info(`"--no-build" argument detected - skipping data migrations.`); + // return; + // } + // + // // No need to run migrations if we're doing a preview. + // if (inputs.preview) { + // return; + // } const apiOutput = getStackOutput({ folder: "apps/api", env }); - context.info("Executing data migrations Lambda function..."); + context.info("Executing data migrations AWS Lambda function..."); + + const logStreamingEnabled = process.env.WEBINY_MIGRATION_LOG_STREAMING !== "false"; + if (!logStreamingEnabled) { + context.warning( + [ + "Data migration log streaming is disabled.", + "Note that the logs will still be accessible in Amazon CloudWatch.", + "Learn more: https://webiny.link/cloudwatch" + ].join(" ") + ); + } try { const lambdaClient = new LambdaClient({ @@ -45,8 +57,8 @@ export const executeDataMigrations = { const logReporter = new LogReporter(functionName); - let statusReporter: MigrationStatusReporter | undefined; - if (inputs.dataMigrationReporter) { + let statusReporter: MigrationStatusReporter = new VoidStatusReporter(); + if (inputs.dataMigrationLogStreaming) { const useNonInteractiveReporter = !process.stdout.isTTY || "CI" in process.env; statusReporter = useNonInteractiveReporter ? new NonInteractiveCliStatusReporter(logReporter) From 85ef4d9da1a89c287b9e29810035885c33bfe7ac Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 16 May 2024 10:55:35 +0200 Subject: [PATCH 06/56] fix: toggle data migration log streaming via `WEBINY_MIGRATION_LOG_STREAMING` env var --- .../src/api/plugins/executeDataMigrations.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts index b30ed10e9c6..36d5a3e72c6 100644 --- a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts +++ b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts @@ -23,15 +23,15 @@ export const executeDataMigrations = { return; } - // if (inputs.build === false) { - // context.info(`"--no-build" argument detected - skipping data migrations.`); - // return; - // } - // - // // No need to run migrations if we're doing a preview. - // if (inputs.preview) { - // return; - // } + if (inputs.build === false) { + context.info(`"--no-build" argument detected - skipping data migrations.`); + return; + } + + // No need to run migrations if we're doing a preview. + if (inputs.preview) { + return; + } const apiOutput = getStackOutput({ folder: "apps/api", env }); From c5e7026b7382d63ed8f58e163753b134707fa9d0 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 16 May 2024 10:57:08 +0200 Subject: [PATCH 07/56] fix: export `VoidStatusReporter` from `cli/index.ts` --- packages/data-migration/src/cli/index.ts | 1 + .../src/api/plugins/executeDataMigrations.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/data-migration/src/cli/index.ts b/packages/data-migration/src/cli/index.ts index cd9c67861ee..99b5d9bd11a 100644 --- a/packages/data-migration/src/cli/index.ts +++ b/packages/data-migration/src/cli/index.ts @@ -4,6 +4,7 @@ export * from "./MigrationStatusReporter"; export * from "./MigrationRunReporter"; export * from "./InteractiveCliStatusReporter"; export * from "./NonInteractiveCliStatusReporter"; +export * from "./VoidStatusReporter"; export * from "./CliMigrationRunReporter"; export * from "./LogStream"; export * from "./LogReporter"; diff --git a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts index 36d5a3e72c6..ca4922595d6 100644 --- a/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts +++ b/packages/serverless-cms-aws/src/api/plugins/executeDataMigrations.ts @@ -7,9 +7,9 @@ import { NonInteractiveCliStatusReporter, MigrationRunner, CliMigrationRunReporter, - MigrationStatusReporter + MigrationStatusReporter, + VoidStatusReporter } from "@webiny/data-migration/cli"; -import { VoidStatusReporter } from "@webiny/data-migration/cli/VoidStatusReporter"; /** * On every deployment of the API project application, this plugin invokes the data migrations Lambda. From 8283006cd99f426b5452ff1a0581159470aacf5f Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 22 May 2024 10:33:41 +0200 Subject: [PATCH 08/56] fix: create a migration script that can be run manually --- packages/migrations/package.json | 1 + .../5.39.6/001/ddb-es/SegmentProcessor.ts | 58 +++ .../src/scripts/5.39.6/001/ddb-es/index.ts | 51 +++ .../src/scripts/5.39.6/001/ddb-es/worker.ts | 395 ++++++++++++++++++ yarn.lock | 1 + 5 files changed, 506 insertions(+) create mode 100644 packages/migrations/src/scripts/5.39.6/001/ddb-es/SegmentProcessor.ts create mode 100644 packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts create mode 100644 packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 04e4e45a808..e3c6faf26ff 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -16,6 +16,7 @@ "@webiny/ioc": "0.0.0", "@webiny/logger": "0.0.0", "@webiny/utils": "0.0.0", + "execa": "^5.0.0", "jsonpack": "^1.1.5", "lodash": "^4.17.21", "pluralize": "^8.0.0" diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/SegmentProcessor.ts b/packages/migrations/src/scripts/5.39.6/001/ddb-es/SegmentProcessor.ts new file mode 100644 index 00000000000..e645b6a1004 --- /dev/null +++ b/packages/migrations/src/scripts/5.39.6/001/ddb-es/SegmentProcessor.ts @@ -0,0 +1,58 @@ +import { Logger } from "@webiny/logger"; +import execa from "execa"; +import path from "path"; + +interface SegmentProcessorParams { + region: string; + primaryDynamoDbTable: string; + ddbEsTable: string; + elasticsearchEndpoint: string; + segmentIndex: number; + totalSegments: number; + logger: Logger; +} + +export class SegmentProcessor { + private readonly region: string; + private readonly primaryDynamoDbTable: string; + private readonly ddbEsTable: string; + private readonly elasticsearchEndpoint: string; + private readonly segmentIndex: number; + private readonly totalSegments: number; + private readonly logger: Logger; + + constructor(params: SegmentProcessorParams) { + this.region = params.region; + this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbEsTable = params.ddbEsTable; + this.elasticsearchEndpoint = params.elasticsearchEndpoint; + this.segmentIndex = params.segmentIndex; + this.totalSegments = params.totalSegments; + this.logger = params.logger; + } + + execute() { + return execa( + "node", + [ + path.join(__dirname, "worker"), + "--region", + this.region, + "--primaryDynamoDbTable", + this.primaryDynamoDbTable, + "--ddbEsTable", + this.ddbEsTable, + "--elasticsearchEndpoint", + this.elasticsearchEndpoint, + "--segmentIndex", + String(this.segmentIndex), + "--totalSegments", + String(this.totalSegments) + ], + { + stdio: "inherit", + env: process.env + } + ); + } +} diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts b/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts new file mode 100644 index 00000000000..01d11a8ebc9 --- /dev/null +++ b/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts @@ -0,0 +1,51 @@ +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; +import { SegmentProcessor } from "./SegmentProcessor"; + +const DDB_SCAN_SEGMENTS_COUNT = 12; +const REGION = "eu-central-1"; +const PRIMARY_DDB_TABLE_NAME = "wby-webiny-8546414"; +const DDB_ES_TABLE_NAME = "wby-webiny-es-afefe0e"; +const ELASTICSEARCH_ENDPOINT = + "search-wby-webiny-js-84c5cef-qlecptwfzpymdjizfjbljziczu.eu-central-1.es.amazonaws.com"; + +(async () => { + const parallelScanPromises = []; + + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ + ignore: "pid,hostname" + }) + ); + + const start = Date.now(); + const getDuration = () => { + return (Date.now() - start) / 1000; + } + + logger.trace(`Starting 5.39.6-001 migration...`); + logger.trace(`Using segments count: ${DDB_SCAN_SEGMENTS_COUNT}`); + + for (let segmentIndex = 0; segmentIndex < DDB_SCAN_SEGMENTS_COUNT; segmentIndex++) { + const segmentPrefix = `[segment index ${segmentIndex}]`; + logger.trace(`${segmentPrefix} Scanning primary DynamoDB table...`); + + const segmentProcessor = new SegmentProcessor({ + region: REGION, + segmentIndex, + totalSegments: DDB_SCAN_SEGMENTS_COUNT, + logger, + primaryDynamoDbTable: PRIMARY_DDB_TABLE_NAME, + ddbEsTable: DDB_ES_TABLE_NAME, + elasticsearchEndpoint: ELASTICSEARCH_ENDPOINT + }); + parallelScanPromises.push(segmentProcessor.execute()); + } + + await Promise.all(parallelScanPromises); + + logger.trace(`5.39.6-001 migration completed in ${getDuration()}s.`); +})(); diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts new file mode 100644 index 00000000000..36dbb40cf69 --- /dev/null +++ b/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts @@ -0,0 +1,395 @@ +import { executeWithRetry } from "@webiny/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import { createTable } from "@webiny/data-migration"; +import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; +import { createElasticsearchClient } from "@webiny/api-elasticsearch"; +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; +import { hasValidTypeFieldValue } from "~/migrations/5.39.0/001/utils/hasValidTypeFieldValue"; +import { hasAllNonNullableValues } from "~/migrations/5.39.0/001/utils/hasAllNonNullableValues"; +import { getOldestRevisionCreatedOn } from "~/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn"; +import { getFirstLastPublishedOnBy } from "~/migrations/5.39.0/001/utils/getFirstLastPublishedOn"; +import { assignNewMetaFields } from "~/migrations/5.39.0/001/utils/assignNewMetaFields"; +import { fixTypeFieldValue } from "~/migrations/5.39.0/001/utils/fixTypeFieldValue"; +import { getFallbackIdentity } from "~/migrations/5.39.0/001/utils/getFallbackIdentity"; +import { ensureAllNonNullableValues } from "~/migrations/5.39.0/001/utils/ensureAllNonNullableValues"; +import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; +import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; +import { CmsEntry } from "~/migrations/5.39.0/001/types"; +import { + createDdbEntryEntity, + createDdbEsEntryEntity +} from "~/migrations/5.39.0/001/entities/createEntryEntity"; +import { + batchReadAll, + BatchReadItem, + batchWriteAll, + BatchWriteItem, + ddbScanWithCallback, + disableElasticsearchIndexing, + esGetIndexName, + fetchOriginalElasticsearchSettings +} from "~/utils"; +import pinoPretty from "pino-pretty"; + +const argv = yargs(hideBin(process.argv)) + .options({ + region: { type: "string", demandOption: true }, + primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + elasticsearchEndpoint: { type: "string", demandOption: true }, + segmentIndex: { type: "number", demandOption: true }, + totalSegments: { type: "number", demandOption: true } + }) + .parseSync(); + +interface LastEvaluatedKeyObject { + PK: string; + SK: string; + GSI1_PK: string; + GSI1_SK: string; +} + +type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; + +interface IndexSettings { + number_of_replicas: number; + refresh_interval: `${number}s`; +} + +interface MigrationStatus { + lastEvaluatedKey: LastEvaluatedKey; + iterationsCount: number; + recordsScanned: number; + indexes: { + [index: string]: IndexSettings | null; + }; +} + +interface DynamoDbElasticsearchRecord { + PK: string; + SK: string; + data: string; +} + +const createInitialCheckpoint = (): MigrationStatus => { + return { + lastEvaluatedKey: null, + iterationsCount: 0, + recordsScanned: 0, + indexes: {} + }; +}; + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), + msgPrefix: `[segment index ${argv.segmentIndex}] ` + }, + pinoPretty({ + ignore: "pid,hostname" + }) + ); + + const documentClient = getDocumentClient(); + const elasticsearchClient = createElasticsearchClient({ + endpoint: `https://${process.env.ELASTIC_SEARCH_ENDPOINT}` + }); + + const primaryTable = createTable({ + name: argv.primaryDynamoDbTable, + documentClient + }); + const dynamoToEsTable = createTable({ + name: argv.ddbEsTable, + documentClient + }); + + const ddbEntryEntity = createDdbEntryEntity(primaryTable); + const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); + + const status = createInitialCheckpoint(); + + await ddbScanWithCallback( + { + entity: ddbEntryEntity, + options: { + segment: argv.segmentIndex, + segments: argv.totalSegments, + filters: [ + { + attr: "_et", + eq: "CmsEntries" + } + ], + startKey: status.lastEvaluatedKey || undefined, + limit: 100 + } + }, + async result => { + status.iterationsCount++; + status.recordsScanned += result.items.length; + + logger.trace(`Analyzing ${result.items.length} record(s)...`); + const ddbItems: BatchWriteItem[] = []; + const ddbEsItems: BatchWriteItem[] = []; + const ddbEsGetItems: Record = {}; + + const fallbackDateTime = new Date().toISOString(); + + // Update records in primary DynamoDB table. Also do preparations for + // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. + for (const item of result.items) { + const isFullyMigrated = + isMigratedEntry(item) && + hasValidTypeFieldValue(item) && + hasAllNonNullableValues(item); + + if (isFullyMigrated) { + continue; + } + + const index = esGetIndexName({ + tenant: item.tenant, + locale: item.locale, + type: item.modelId, + isHeadlessCmsModel: true + }); + + // Check ES index settings. + if (!status.indexes[index]) { + // We need to fetch the index settings first + const settings = await fetchOriginalElasticsearchSettings({ + index, + logger, + elasticsearchClient: elasticsearchClient + }); + + // ... add it to the checkpoint... + status.indexes[index] = settings; + + // and then set not to index + await disableElasticsearchIndexing({ + elasticsearchClient: elasticsearchClient, + index, + logger + }); + } + + // 1. Check if the data migration was ever performed. If not, let's perform it. + if (!isMigratedEntry(item)) { + // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. + const createdOn = await getOldestRevisionCreatedOn({ + entry: item, + entryEntity: ddbEntryEntity + }); + + const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ + entry: item, + entryEntity: ddbEntryEntity + }); + + assignNewMetaFields(item, { + createdOn, + ...firstLastPublishedOnByFields + }); + } + + // 2. We've noticed some of the records had an invalid `TYPE` field value + // in the database. This step addresses this issue. + if (!hasValidTypeFieldValue(item)) { + // Fixes the value of the `TYPE` field, if it's not valid. + fixTypeFieldValue(item); + } + + // 3. Finally, once both of the steps were performed, ensure that all + // new non-nullable meta fields have a value and nothing is missing. + if (!hasAllNonNullableValues(item)) { + logger.trace( + `Detected an entry with missing values for non-nullable meta fields (${item.modelId}/${item.id}).` + ); + + try { + const fallbackIdentity = await getFallbackIdentity({ + entity: ddbEntryEntity, + tenant: item.tenant + }); + + ensureAllNonNullableValues(item, { + dateTime: fallbackDateTime, + identity: fallbackIdentity + }); + + logger.trace( + `Successfully ensured all non-nullable meta fields have values (${item.modelId}/${item.id}). Will be saving into the database soon.` + ); + } catch (e) { + logger.debug( + `Failed to ensure all non-nullable meta fields have values (${item.modelId}/${item.id}): ${e.message}` + ); + } + } + + ddbItems.push(ddbEntryEntity.putBatch(item)); + + /** + * Prepare the loading of DynamoDB Elasticsearch part of the records. + */ + if (ddbEsGetItems[`${item.entryId}:L`]) { + continue; + } + + ddbEsGetItems[`${item.entryId}:L`] = ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "L" + }); + + if (item.status === "published" || !!item.locked) { + ddbEsGetItems[`${item.entryId}:P`] = ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "P" + }); + } + } + + /** + * Get all the records from DynamoDB Elasticsearch. + */ + const ddbEsRecords = await batchReadAll({ + table: ddbEsEntryEntity.table, + items: Object.values(ddbEsGetItems) + }); + + for (const ddbEsRecord of ddbEsRecords) { + const decompressedData = await getDecompressedData(ddbEsRecord.data); + if (!decompressedData) { + logger.trace( + `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` + ); + continue; + } + + // 1. Check if the data migration was ever performed. If not, let's perform it. + if (!isMigratedEntry(decompressedData)) { + // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. + const createdOn = await getOldestRevisionCreatedOn({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: ddbEntryEntity + }); + + const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: ddbEntryEntity + }); + + assignNewMetaFields(decompressedData, { + createdOn, + ...firstLastPublishedOnByFields + }); + } + + // 2. Ensure new non-nullable meta fields have a value and nothing is missing. + if (!hasAllNonNullableValues(decompressedData)) { + logger.trace( + [ + `[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields`, + `(${decompressedData.modelId}/${decompressedData.id}).` + ].join(" ") + ); + + try { + const fallbackIdentity = await getFallbackIdentity({ + entity: ddbEntryEntity, + tenant: decompressedData.tenant + }); + + ensureAllNonNullableValues(decompressedData, { + dateTime: fallbackDateTime, + identity: fallbackIdentity + }); + + logger.trace( + [ + `[DDB-ES Table] Successfully ensured all non-nullable meta fields`, + `have values (${decompressedData.modelId}/${decompressedData.id}).`, + "Will be saving the changes soon." + ].join(" ") + ); + } catch (e) { + logger.error( + [ + "[DDB-ES Table] Failed to ensure all non-nullable meta fields have values", + `(${decompressedData.modelId}/${decompressedData.id}): ${e.message}` + ].join(" ") + ); + } + } + + const compressedData = await getCompressedData(decompressedData); + + ddbEsItems.push( + ddbEsEntryEntity.putBatch({ + ...ddbEsRecord, + data: compressedData + }) + ); + } + + if (ddbItems.length) { + // Store data in primary DynamoDB table. + const execute = () => { + return batchWriteAll({ + table: ddbEntryEntity.table, + items: ddbItems + }); + }; + + logger.trace(`Storing records in primary DynamoDB table...`); + await executeWithRetry(execute, { + onFailedAttempt: error => { + logger.error( + `Batch write attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + + // Store data in DDB-ES DynamoDB table. + const executeDdbEs = () => { + return batchWriteAll({ + table: ddbEsEntryEntity.table, + items: ddbEsItems + }); + }; + + logger.trace(`Storing records in DDB-ES DynamoDB table...`); + await executeWithRetry(executeDdbEs, { + onFailedAttempt: error => { + logger.error( + `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + } + + + // Update checkpoint after every batch. + let lastEvaluatedKey: LastEvaluatedKey = true; + if (result.lastEvaluatedKey) { + lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; + } + + status.lastEvaluatedKey = lastEvaluatedKey; + + if (lastEvaluatedKey === true) { + return false; + } + + // Continue further scanning. + return true; + } + ); + + logger.trace(status) +})(); diff --git a/yarn.lock b/yarn.lock index 6ccba9a0e15..24c4d6951c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18428,6 +18428,7 @@ __metadata: "@webiny/project-utils": 0.0.0 "@webiny/utils": 0.0.0 elastic-ts: ^0.8.0 + execa: ^5.0.0 jest-dynalite: ^3.2.0 jsonpack: ^1.1.5 lodash: ^4.17.21 From ddd2a70cb1e08f68faf212d47093ba4be5670634 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 23 May 2024 06:43:10 +0200 Subject: [PATCH 09/56] wip: create a migration script that can be run manually --- packages/migrations/package.json | 1 + .../scripts/5.39.6/001/ddb-es/Migration.ts | 97 +++++++++ .../src/scripts/5.39.6/001/ddb-es/index.ts | 60 ++---- .../src/scripts/5.39.6/001/ddb-es/worker.ts | 200 +++++++++--------- .../src/utils/elasticsearch/esListIndexes.ts | 25 +++ .../src/utils/elasticsearch/index.ts | 1 + yarn.lock | 139 +++++++++++- 7 files changed, 389 insertions(+), 134 deletions(-) create mode 100644 packages/migrations/src/scripts/5.39.6/001/ddb-es/Migration.ts create mode 100644 packages/migrations/src/utils/elasticsearch/esListIndexes.ts diff --git a/packages/migrations/package.json b/packages/migrations/package.json index e3c6faf26ff..21eb15150de 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -26,6 +26,7 @@ "directory": "dist" }, "devDependencies": { + "@types/execa": "^2.0.0", "@webiny/api-headless-cms": "0.0.0", "@webiny/api-headless-cms-ddb-es": "0.0.0", "@webiny/cli": "0.0.0", diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/Migration.ts b/packages/migrations/src/scripts/5.39.6/001/ddb-es/Migration.ts new file mode 100644 index 00000000000..c08e283b5e4 --- /dev/null +++ b/packages/migrations/src/scripts/5.39.6/001/ddb-es/Migration.ts @@ -0,0 +1,97 @@ +import { Logger } from "@webiny/logger"; +import { SegmentProcessor } from "./SegmentProcessor"; +import { + disableElasticsearchIndexing, + esListIndexes, + fetchOriginalElasticsearchSettings, + restoreOriginalElasticsearchSettings +} from "~/utils"; +import { createElasticsearchClient } from "@webiny/api-elasticsearch"; + +interface SegmentProcessorParams { + region: string; + primaryDynamoDbTable: string; + ddbEsTable: string; + elasticsearchEndpoint: string; + totalSegments: number; + logger: Logger; +} + +export class Migration { + private readonly region: string; + private readonly primaryDynamoDbTable: string; + private readonly ddbEsTable: string; + private readonly elasticsearchEndpoint: string; + private readonly totalSegments: number; + private readonly logger: Logger; + + constructor(params: SegmentProcessorParams) { + this.region = params.region; + this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbEsTable = params.ddbEsTable; + this.elasticsearchEndpoint = params.elasticsearchEndpoint; + this.totalSegments = params.totalSegments; + this.logger = params.logger; + } + + async execute() { + const scanProcessesPromises = []; + + const start = Date.now(); + const getDuration = () => { + return (Date.now() - start) / 1000; + }; + + // Disable indexing for HCMS Elasticsearch index. + const elasticsearchClient = createElasticsearchClient({ + endpoint: `https://${this.elasticsearchEndpoint}` + }); + + const indexes = await esListIndexes({ elasticsearchClient, match: "-headless-cms-" }); + const indexSettings: Record = {}; + for (const indexName of indexes) { + this.logger.trace(`Disabling indexing for Elasticsearch index "${indexName}"...`); + indexSettings[indexName] = await fetchOriginalElasticsearchSettings({ + elasticsearchClient, + index: indexName, + logger: this.logger + }); + + await disableElasticsearchIndexing({ + elasticsearchClient, + index: indexName, + logger: this.logger + }); + } + + this.logger.trace("Proceeding with the migration..."); + + for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { + const segmentPrefix = `[segment index ${segmentIndex}]`; + this.logger.trace(`${segmentPrefix} Scanning primary DynamoDB table...`); + + const segmentProcessor = new SegmentProcessor({ + segmentIndex, + totalSegments: this.totalSegments, + region: this.region, + primaryDynamoDbTable: this.primaryDynamoDbTable, + ddbEsTable: this.ddbEsTable, + elasticsearchEndpoint: this.elasticsearchEndpoint, + logger: this.logger + }); + + scanProcessesPromises.push(segmentProcessor.execute()); + } + + await Promise.all(scanProcessesPromises); + + this.logger.trace("Restoring original Elasticsearch settings..."); + await restoreOriginalElasticsearchSettings({ + elasticsearchClient, + indexSettings, + logger: this.logger + }); + + this.logger.trace(`5.39.6-001 migration completed in ${getDuration()}s.`); + } +} diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts b/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts index 01d11a8ebc9..f98b23f7560 100644 --- a/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts +++ b/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts @@ -1,51 +1,35 @@ +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { Migration } from "./Migration"; import { createPinoLogger, getLogLevel } from "@webiny/logger"; import pinoPretty from "pino-pretty"; -import { SegmentProcessor } from "./SegmentProcessor"; -const DDB_SCAN_SEGMENTS_COUNT = 12; -const REGION = "eu-central-1"; -const PRIMARY_DDB_TABLE_NAME = "wby-webiny-8546414"; -const DDB_ES_TABLE_NAME = "wby-webiny-es-afefe0e"; -const ELASTICSEARCH_ENDPOINT = - "search-wby-webiny-js-84c5cef-qlecptwfzpymdjizfjbljziczu.eu-central-1.es.amazonaws.com"; +const argv = yargs(hideBin(process.argv)) + .options({ + region: { type: "string", demandOption: true }, + primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + elasticsearchEndpoint: { type: "string", demandOption: true }, + segments: { type: "number", demandOption: true } + }) + .parseSync(); (async () => { - const parallelScanPromises = []; - const logger = createPinoLogger( { level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") }, - pinoPretty({ - ignore: "pid,hostname" - }) + pinoPretty({ ignore: "pid,hostname" }) ); - const start = Date.now(); - const getDuration = () => { - return (Date.now() - start) / 1000; - } - - logger.trace(`Starting 5.39.6-001 migration...`); - logger.trace(`Using segments count: ${DDB_SCAN_SEGMENTS_COUNT}`); - - for (let segmentIndex = 0; segmentIndex < DDB_SCAN_SEGMENTS_COUNT; segmentIndex++) { - const segmentPrefix = `[segment index ${segmentIndex}]`; - logger.trace(`${segmentPrefix} Scanning primary DynamoDB table...`); - - const segmentProcessor = new SegmentProcessor({ - region: REGION, - segmentIndex, - totalSegments: DDB_SCAN_SEGMENTS_COUNT, - logger, - primaryDynamoDbTable: PRIMARY_DDB_TABLE_NAME, - ddbEsTable: DDB_ES_TABLE_NAME, - elasticsearchEndpoint: ELASTICSEARCH_ENDPOINT - }); - parallelScanPromises.push(segmentProcessor.execute()); - } - - await Promise.all(parallelScanPromises); + const migration = new Migration({ + totalSegments: argv.segments, + region: argv.region, + primaryDynamoDbTable: argv.primaryDynamoDbTable, + ddbEsTable: argv.ddbEsTable, + elasticsearchEndpoint: argv.elasticsearchEndpoint, + logger + }); - logger.trace(`5.39.6-001 migration completed in ${getDuration()}s.`); + await migration.execute(); })(); diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts index 36dbb40cf69..30062767964 100644 --- a/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts @@ -62,6 +62,8 @@ interface MigrationStatus { lastEvaluatedKey: LastEvaluatedKey; iterationsCount: number; recordsScanned: number; + recordsUpdated: number; + recordsSkipped: number; indexes: { [index: string]: IndexSettings | null; }; @@ -78,6 +80,8 @@ const createInitialCheckpoint = (): MigrationStatus => { lastEvaluatedKey: null, iterationsCount: 0, recordsScanned: 0, + recordsUpdated: 0, + recordsSkipped: 0, indexes: {} }; }; @@ -95,7 +99,7 @@ const createInitialCheckpoint = (): MigrationStatus => { const documentClient = getDocumentClient(); const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${process.env.ELASTIC_SEARCH_ENDPOINT}` + endpoint: `https://${argv.elasticsearchEndpoint}` }); const primaryTable = createTable({ @@ -133,8 +137,8 @@ const createInitialCheckpoint = (): MigrationStatus => { status.recordsScanned += result.items.length; logger.trace(`Analyzing ${result.items.length} record(s)...`); - const ddbItems: BatchWriteItem[] = []; - const ddbEsItems: BatchWriteItem[] = []; + const ddbItemsToBatchWrite: BatchWriteItem[] = []; + const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; const ddbEsGetItems: Record = {}; const fallbackDateTime = new Date().toISOString(); @@ -148,6 +152,7 @@ const createInitialCheckpoint = (): MigrationStatus => { hasAllNonNullableValues(item); if (isFullyMigrated) { + status.recordsSkipped++; continue; } @@ -171,11 +176,11 @@ const createInitialCheckpoint = (): MigrationStatus => { status.indexes[index] = settings; // and then set not to index - await disableElasticsearchIndexing({ - elasticsearchClient: elasticsearchClient, - index, - logger - }); + // await disableElasticsearchIndexing({ + // elasticsearchClient: elasticsearchClient, + // index, + // logger + // }); } // 1. Check if the data migration was ever performed. If not, let's perform it. @@ -232,7 +237,9 @@ const createInitialCheckpoint = (): MigrationStatus => { } } - ddbItems.push(ddbEntryEntity.putBatch(item)); + status.recordsUpdated++; + + ddbItemsToBatchWrite.push(ddbEntryEntity.putBatch(item)); /** * Prepare the loading of DynamoDB Elasticsearch part of the records. @@ -254,95 +261,97 @@ const createInitialCheckpoint = (): MigrationStatus => { } } - /** - * Get all the records from DynamoDB Elasticsearch. - */ - const ddbEsRecords = await batchReadAll({ - table: ddbEsEntryEntity.table, - items: Object.values(ddbEsGetItems) - }); - - for (const ddbEsRecord of ddbEsRecords) { - const decompressedData = await getDecompressedData(ddbEsRecord.data); - if (!decompressedData) { - logger.trace( - `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` - ); - continue; - } - - // 1. Check if the data migration was ever performed. If not, let's perform it. - if (!isMigratedEntry(decompressedData)) { - // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. - const createdOn = await getOldestRevisionCreatedOn({ - entry: { ...decompressedData, PK: ddbEsRecord.PK }, - entryEntity: ddbEntryEntity - }); - - const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ - entry: { ...decompressedData, PK: ddbEsRecord.PK }, - entryEntity: ddbEntryEntity - }); + if (Object.keys(ddbEsGetItems).length === 0) { + /** + * Get all the records from DynamoDB Elasticsearch. + */ + const ddbEsRecords = await batchReadAll({ + table: ddbEsEntryEntity.table, + items: Object.values(ddbEsGetItems) + }); - assignNewMetaFields(decompressedData, { - createdOn, - ...firstLastPublishedOnByFields - }); - } + for (const ddbEsRecord of ddbEsRecords) { + const decompressedData = await getDecompressedData(ddbEsRecord.data); + if (!decompressedData) { + logger.trace( + `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` + ); + continue; + } - // 2. Ensure new non-nullable meta fields have a value and nothing is missing. - if (!hasAllNonNullableValues(decompressedData)) { - logger.trace( - [ - `[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields`, - `(${decompressedData.modelId}/${decompressedData.id}).` - ].join(" ") - ); + // 1. Check if the data migration was ever performed. If not, let's perform it. + if (!isMigratedEntry(decompressedData)) { + // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. + const createdOn = await getOldestRevisionCreatedOn({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: ddbEntryEntity + }); - try { - const fallbackIdentity = await getFallbackIdentity({ - entity: ddbEntryEntity, - tenant: decompressedData.tenant + const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: ddbEntryEntity }); - ensureAllNonNullableValues(decompressedData, { - dateTime: fallbackDateTime, - identity: fallbackIdentity + assignNewMetaFields(decompressedData, { + createdOn, + ...firstLastPublishedOnByFields }); + } + // 2. Ensure new non-nullable meta fields have a value and nothing is missing. + if (!hasAllNonNullableValues(decompressedData)) { logger.trace( [ - `[DDB-ES Table] Successfully ensured all non-nullable meta fields`, - `have values (${decompressedData.modelId}/${decompressedData.id}).`, - "Will be saving the changes soon." - ].join(" ") - ); - } catch (e) { - logger.error( - [ - "[DDB-ES Table] Failed to ensure all non-nullable meta fields have values", - `(${decompressedData.modelId}/${decompressedData.id}): ${e.message}` + `[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields`, + `(${decompressedData.modelId}/${decompressedData.id}).` ].join(" ") ); + + try { + const fallbackIdentity = await getFallbackIdentity({ + entity: ddbEntryEntity, + tenant: decompressedData.tenant + }); + + ensureAllNonNullableValues(decompressedData, { + dateTime: fallbackDateTime, + identity: fallbackIdentity + }); + + logger.trace( + [ + `[DDB-ES Table] Successfully ensured all non-nullable meta fields`, + `have values (${decompressedData.modelId}/${decompressedData.id}).`, + "Will be saving the changes soon." + ].join(" ") + ); + } catch (e) { + logger.error( + [ + "[DDB-ES Table] Failed to ensure all non-nullable meta fields have values", + `(${decompressedData.modelId}/${decompressedData.id}): ${e.message}` + ].join(" ") + ); + } } - } - const compressedData = await getCompressedData(decompressedData); + const compressedData = await getCompressedData(decompressedData); - ddbEsItems.push( - ddbEsEntryEntity.putBatch({ - ...ddbEsRecord, - data: compressedData - }) - ); + ddbEsItemsToBatchWrite.push( + ddbEsEntryEntity.putBatch({ + ...ddbEsRecord, + data: compressedData + }) + ); + } } - if (ddbItems.length) { + if (ddbItemsToBatchWrite.length) { // Store data in primary DynamoDB table. const execute = () => { return batchWriteAll({ table: ddbEntryEntity.table, - items: ddbItems + items: ddbItemsToBatchWrite }); }; @@ -355,25 +364,26 @@ const createInitialCheckpoint = (): MigrationStatus => { } }); - // Store data in DDB-ES DynamoDB table. - const executeDdbEs = () => { - return batchWriteAll({ - table: ddbEsEntryEntity.table, - items: ddbEsItems + if (ddbEsItemsToBatchWrite.length) { + // Store data in DDB-ES DynamoDB table. + const executeDdbEs = () => { + return batchWriteAll({ + table: ddbEsEntryEntity.table, + items: ddbEsItemsToBatchWrite + }); + }; + + logger.trace(`Storing records in DDB-ES DynamoDB table...`); + await executeWithRetry(executeDdbEs, { + onFailedAttempt: error => { + logger.error( + `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` + ); + } }); - }; - - logger.trace(`Storing records in DDB-ES DynamoDB table...`); - await executeWithRetry(executeDdbEs, { - onFailedAttempt: error => { - logger.error( - `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); + } } - // Update checkpoint after every batch. let lastEvaluatedKey: LastEvaluatedKey = true; if (result.lastEvaluatedKey) { @@ -391,5 +401,5 @@ const createInitialCheckpoint = (): MigrationStatus => { } ); - logger.trace(status) + logger.trace(status); })(); diff --git a/packages/migrations/src/utils/elasticsearch/esListIndexes.ts b/packages/migrations/src/utils/elasticsearch/esListIndexes.ts new file mode 100644 index 00000000000..b5aaaf15e03 --- /dev/null +++ b/packages/migrations/src/utils/elasticsearch/esListIndexes.ts @@ -0,0 +1,25 @@ +import { Client } from "@elastic/elasticsearch"; + +export interface ListIndexesParams { + elasticsearchClient: Client; + match?: string; +} + +type IndicesApiResponse = Array>; + +export const esListIndexes = async (params: ListIndexesParams): Promise => { + const { elasticsearchClient } = params; + + const response = await elasticsearchClient.cat.indices({ + format: "json" + }); + + const listOfIndexes = response.body.map(item => item.index); + + const match = params.match; + if (match) { + return listOfIndexes.filter(index => index.includes(match)); + } + + return listOfIndexes; +}; diff --git a/packages/migrations/src/utils/elasticsearch/index.ts b/packages/migrations/src/utils/elasticsearch/index.ts index e2c58d4628f..ff9fc8a1caf 100644 --- a/packages/migrations/src/utils/elasticsearch/index.ts +++ b/packages/migrations/src/utils/elasticsearch/index.ts @@ -3,6 +3,7 @@ export * from "./esFindOne"; export * from "./esGetIndexExist"; export * from "./esGetIndexName"; export * from "./esGetIndexSettings"; +export * from "./esListIndexes"; export * from "./esPutIndexSettings"; export * from "./esQueryAllWithCallback"; export * from "./esQueryAll"; diff --git a/yarn.lock b/yarn.lock index 24c4d6951c9..f068b909a7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10839,6 +10839,13 @@ __metadata: languageName: node linkType: hard +"@sec-ant/readable-stream@npm:^0.4.1": + version: 0.4.1 + resolution: "@sec-ant/readable-stream@npm:0.4.1" + checksum: eb56f72a70995f725269f1c1c206d6dbeb090e88413b1302a456c600041175a7a484c2f0172454f7bed65a8ab95ffed7647d8ad03e6c23b1e3bbc9845f78cd17 + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.25.16": version: 0.25.24 resolution: "@sinclair/typebox@npm:0.25.24" @@ -10860,6 +10867,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/merge-streams@npm:^4.0.0": + version: 4.0.0 + resolution: "@sindresorhus/merge-streams@npm:4.0.0" + checksum: 5759d31dfd822999bbe3ddcf72d4b15dc3d99ea51dd5b3210888f3348234eaff0f44bc999bef6b3c328daeb34e862a63b2c4abe5590acec541f93bc6fa016c9d + languageName: node + linkType: hard + "@sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.1": version: 1.8.6 resolution: "@sinonjs/commons@npm:1.8.6" @@ -13190,6 +13204,15 @@ __metadata: languageName: node linkType: hard +"@types/execa@npm:^2.0.0": + version: 2.0.0 + resolution: "@types/execa@npm:2.0.0" + dependencies: + execa: "*" + checksum: 7c01bd5b0dfd87055548a9cd5290620b11853d385b0adfbf12674edd3322016d6198fde4c80bd0047f2b93424de4e4e299a93bcbe9ec227379d4bc4e906ebdd0 + languageName: node + linkType: hard + "@types/extract-zip@npm:^1.6.2": version: 1.6.2 resolution: "@types/extract-zip@npm:1.6.2" @@ -18413,6 +18436,7 @@ __metadata: resolution: "@webiny/migrations@workspace:packages/migrations" dependencies: "@elastic/elasticsearch": 7.12.0 + "@types/execa": ^2.0.0 "@webiny/api-elasticsearch": 0.0.0 "@webiny/api-headless-cms": 0.0.0 "@webiny/api-headless-cms-ddb-es": 0.0.0 @@ -27500,6 +27524,26 @@ __metadata: languageName: node linkType: hard +"execa@npm:*": + version: 9.1.0 + resolution: "execa@npm:9.1.0" + dependencies: + "@sindresorhus/merge-streams": ^4.0.0 + cross-spawn: ^7.0.3 + figures: ^6.1.0 + get-stream: ^9.0.0 + human-signals: ^7.0.0 + is-plain-obj: ^4.1.0 + is-stream: ^4.0.1 + npm-run-path: ^5.2.0 + pretty-ms: ^9.0.0 + signal-exit: ^4.1.0 + strip-final-newline: ^4.0.0 + yoctocolors: ^2.0.0 + checksum: 3807e5e4a00e117ee5bc85b1860e21ee763de48b0436a14f170342702b5fbb287f432e6418a10072f9b32bd59dfa367fd038431ba9e025c0697a971e8aaa80fc + languageName: node + linkType: hard + "execa@npm:4.1.0": version: 4.1.0 resolution: "execa@npm:4.1.0" @@ -28237,6 +28281,15 @@ __metadata: languageName: node linkType: hard +"figures@npm:^6.1.0": + version: 6.1.0 + resolution: "figures@npm:6.1.0" + dependencies: + is-unicode-supported: ^2.0.0 + checksum: 35c81239d4fa40b75c2c7c010833b0bc8861c27187e4c9388fca1d9731103ec9989b70ee3b664ef426ddd9abe02ec5f4fd973424aa8c6fd3ea5d3bf57a2d01b4 + languageName: node + linkType: hard + "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -29334,6 +29387,16 @@ __metadata: languageName: node linkType: hard +"get-stream@npm:^9.0.0": + version: 9.0.1 + resolution: "get-stream@npm:9.0.1" + dependencies: + "@sec-ant/readable-stream": ^0.4.1 + is-stream: ^4.0.1 + checksum: 631df71d7bd60a7f373094d3c352e2ce412b82d30b1b0ec562e5a4aced976173a4cc0dabef019050e1aceaffb1f0e086349ab3d14377b0b7280510bd75bd3e1e + languageName: node + linkType: hard + "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -30777,6 +30840,13 @@ __metadata: languageName: node linkType: hard +"human-signals@npm:^7.0.0": + version: 7.0.0 + resolution: "human-signals@npm:7.0.0" + checksum: 5e05a7dbb6d021371ddb854c58b19aa372cc616b34e8eec0d27098d699be0571e29b2b98869053d898badb9594b7ed5058642660b04fb1e41b7bd1f83e472d16 + languageName: node + linkType: hard + "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -31968,6 +32038,13 @@ __metadata: languageName: node linkType: hard +"is-plain-obj@npm:^4.1.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 6dc45da70d04a81f35c9310971e78a6a3c7a63547ef782e3a07ee3674695081b6ca4e977fbb8efc48dae3375e0b34558d2bcd722aec9bddfa2d7db5b041be8ce + languageName: node + linkType: hard + "is-plain-object@npm:5.0.0, is-plain-object@npm:^5.0.0": version: 5.0.0 resolution: "is-plain-object@npm:5.0.0" @@ -32096,6 +32173,13 @@ __metadata: languageName: node linkType: hard +"is-stream@npm:^4.0.1": + version: 4.0.1 + resolution: "is-stream@npm:4.0.1" + checksum: cbea3f1fc271b21ceb228819d0c12a0965a02b57f39423925f99530b4eb86935235f258f06310b67cd02b2d10b49e9a0998f5ececf110ab7d3760bae4055ad23 + languageName: node + linkType: hard + "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -32150,6 +32234,13 @@ __metadata: languageName: node linkType: hard +"is-unicode-supported@npm:^2.0.0": + version: 2.0.0 + resolution: "is-unicode-supported@npm:2.0.0" + checksum: 000b80639dedaf59a385f1c0a57f97a4d1435e0723716f24cc19ad94253a7a0a9f838bdc9ac49b10a29ac93b01f52ae9b2ed358a8876caf1eb74d73b4ede92b2 + languageName: node + linkType: hard + "is-utf8@npm:^0.2.0": version: 0.2.1 resolution: "is-utf8@npm:0.2.1" @@ -36641,6 +36732,15 @@ __metadata: languageName: node linkType: hard +"npm-run-path@npm:^5.2.0": + version: 5.3.0 + resolution: "npm-run-path@npm:5.3.0" + dependencies: + path-key: ^4.0.0 + checksum: ae8e7a89da9594fb9c308f6555c73f618152340dcaae423e5fb3620026fefbec463618a8b761920382d666fa7a2d8d240b6fe320e8a6cdd54dc3687e2b659d25 + languageName: node + linkType: hard + "npm-which@npm:^3.0.1": version: 3.0.1 resolution: "npm-which@npm:3.0.1" @@ -37693,6 +37793,13 @@ __metadata: languageName: node linkType: hard +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 673c801d9f957ff79962d71ed5a24850163f4181a90dd30c4e3666b3a804f53b77f1f0556792e8b2adbb5d58757907d1aa51d7d7dc75997c2a56d72937cbc8b7 + languageName: node + linkType: hard + "parse-passwd@npm:^1.0.0": version: 1.0.0 resolution: "parse-passwd@npm:1.0.0" @@ -37860,6 +37967,13 @@ __metadata: languageName: node linkType: hard +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 + languageName: node + linkType: hard + "path-parse@npm:^1.0.6, path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" @@ -39449,6 +39563,15 @@ __metadata: languageName: node linkType: hard +"pretty-ms@npm:^9.0.0": + version: 9.0.0 + resolution: "pretty-ms@npm:9.0.0" + dependencies: + parse-ms: ^4.0.0 + checksum: 072b17547e09cb232e8e4c7be0281e256b6d8acd18dfb2fdd715d50330d1689fdaa877f53cf90c62ed419ef842f0f5fb94a2cd8ed1aa6d7608ad48834219435d + languageName: node + linkType: hard + "pretty-time@npm:^1.1.0": version: 1.1.0 resolution: "pretty-time@npm:1.1.0" @@ -43102,7 +43225,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^4.0.1": +"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": version: 4.1.0 resolution: "signal-exit@npm:4.1.0" checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 @@ -44255,6 +44378,13 @@ __metadata: languageName: node linkType: hard +"strip-final-newline@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-final-newline@npm:4.0.0" + checksum: b5fe48f695d74863153a3b3155220e6e9bf51f4447832998c8edec38e6559b3af87a9fe5ac0df95570a78a26f5fa91701358842eab3c15480e27980b154a145f + languageName: node + linkType: hard + "strip-indent@npm:^1.0.1": version: 1.0.1 resolution: "strip-indent@npm:1.0.1" @@ -47712,6 +47842,13 @@ __metadata: languageName: node linkType: hard +"yoctocolors@npm:^2.0.0": + version: 2.0.2 + resolution: "yoctocolors@npm:2.0.2" + checksum: cac20504b5fc954ff117e3a3fbde09db8ac0807bba59e68c5c08f3a43173ef46ccb1853b15b37bd96d0d8187bc444627f160fee7e5aede0b421382cf379d2438 + languageName: node + linkType: hard + "zen-observable-ts@npm:0.8.19": version: 0.8.19 resolution: "zen-observable-ts@npm:0.8.19" From 53fccf7e6ee7dd867e3058bcc64239adf99550b9 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 23 May 2024 13:27:46 +0200 Subject: [PATCH 10/56] fix: create a migration script that can be run manually --- .../5.39.0/001/utils/isMigratedEntry.ts | 2 +- .../5.39.6/001/ddb-es/Migration.ts | 0 .../5.39.6/001/ddb-es/SegmentProcessor.ts | 0 .../5.39.6/001/ddb-es/bin.ts} | 1 + .../5.39.6/001/ddb-es/worker.ts | 100 ++++++++---------- 5 files changed, 46 insertions(+), 57 deletions(-) rename packages/migrations/src/{scripts => migrations}/5.39.6/001/ddb-es/Migration.ts (100%) rename packages/migrations/src/{scripts => migrations}/5.39.6/001/ddb-es/SegmentProcessor.ts (100%) rename packages/migrations/src/{scripts/5.39.6/001/ddb-es/index.ts => migrations/5.39.6/001/ddb-es/bin.ts} (98%) rename packages/migrations/src/{scripts => migrations}/5.39.6/001/ddb-es/worker.ts (86%) diff --git a/packages/migrations/src/migrations/5.39.0/001/utils/isMigratedEntry.ts b/packages/migrations/src/migrations/5.39.0/001/utils/isMigratedEntry.ts index 7cdd89245e7..961b8011c53 100644 --- a/packages/migrations/src/migrations/5.39.0/001/utils/isMigratedEntry.ts +++ b/packages/migrations/src/migrations/5.39.0/001/utils/isMigratedEntry.ts @@ -1,5 +1,5 @@ import { CmsEntry } from "../types"; export const isMigratedEntry = (entry: CmsEntry) => { - return "revisionCreatedOn" in entry; + return "revisionCreatedOn" in entry && entry.revisionCreatedOn; }; diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/Migration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts similarity index 100% rename from packages/migrations/src/scripts/5.39.6/001/ddb-es/Migration.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts similarity index 100% rename from packages/migrations/src/scripts/5.39.6/001/ddb-es/SegmentProcessor.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts similarity index 98% rename from packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts index f98b23f7560..63a7ae62ae4 100644 --- a/packages/migrations/src/scripts/5.39.6/001/ddb-es/index.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node import yargs from "yargs/yargs"; import { hideBin } from "yargs/helpers"; import { Migration } from "./Migration"; diff --git a/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts similarity index 86% rename from packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index 30062767964..e42a6da993e 100644 --- a/packages/migrations/src/scripts/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -26,12 +26,11 @@ import { BatchReadItem, batchWriteAll, BatchWriteItem, - ddbScanWithCallback, - disableElasticsearchIndexing, - esGetIndexName, - fetchOriginalElasticsearchSettings + ddbScanWithCallback } from "~/utils"; import pinoPretty from "pino-pretty"; +import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; +import { ElasticsearchCatHealthStatus } from "@webiny/api-elasticsearch/operations/types"; const argv = yargs(hideBin(process.argv)) .options({ @@ -53,20 +52,12 @@ interface LastEvaluatedKeyObject { type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; -interface IndexSettings { - number_of_replicas: number; - refresh_interval: `${number}s`; -} - interface MigrationStatus { lastEvaluatedKey: LastEvaluatedKey; iterationsCount: number; recordsScanned: number; recordsUpdated: number; recordsSkipped: number; - indexes: { - [index: string]: IndexSettings | null; - }; } interface DynamoDbElasticsearchRecord { @@ -75,14 +66,13 @@ interface DynamoDbElasticsearchRecord { data: string; } -const createInitialCheckpoint = (): MigrationStatus => { +const createInitialStatus = (): MigrationStatus => { return { lastEvaluatedKey: null, iterationsCount: 0, recordsScanned: 0, recordsUpdated: 0, - recordsSkipped: 0, - indexes: {} + recordsSkipped: 0 }; }; @@ -114,7 +104,16 @@ const createInitialCheckpoint = (): MigrationStatus => { const ddbEntryEntity = createDdbEntryEntity(primaryTable); const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); - const status = createInitialCheckpoint(); + const status = createInitialStatus(); + + // TODO: make these configurable outside of the script. + const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { + minStatus: ElasticsearchCatHealthStatus.Yellow, + maxProcessorPercent: 75, + maxRamPercent: 100, + maxWaitingTime: 60, + waitingTimeStep: 5 + }); await ddbScanWithCallback( { @@ -136,10 +135,10 @@ const createInitialCheckpoint = (): MigrationStatus => { status.iterationsCount++; status.recordsScanned += result.items.length; - logger.trace(`Analyzing ${result.items.length} record(s)...`); + logger.trace(`Reading ${result.items.length} record(s)...`); const ddbItemsToBatchWrite: BatchWriteItem[] = []; const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; - const ddbEsGetItems: Record = {}; + const ddbEsItemsToBatchRead: Record = {}; const fallbackDateTime = new Date().toISOString(); @@ -156,33 +155,6 @@ const createInitialCheckpoint = (): MigrationStatus => { continue; } - const index = esGetIndexName({ - tenant: item.tenant, - locale: item.locale, - type: item.modelId, - isHeadlessCmsModel: true - }); - - // Check ES index settings. - if (!status.indexes[index]) { - // We need to fetch the index settings first - const settings = await fetchOriginalElasticsearchSettings({ - index, - logger, - elasticsearchClient: elasticsearchClient - }); - - // ... add it to the checkpoint... - status.indexes[index] = settings; - - // and then set not to index - // await disableElasticsearchIndexing({ - // elasticsearchClient: elasticsearchClient, - // index, - // logger - // }); - } - // 1. Check if the data migration was ever performed. If not, let's perform it. if (!isMigratedEntry(item)) { // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. @@ -237,37 +209,38 @@ const createInitialCheckpoint = (): MigrationStatus => { } } - status.recordsUpdated++; - ddbItemsToBatchWrite.push(ddbEntryEntity.putBatch(item)); /** * Prepare the loading of DynamoDB Elasticsearch part of the records. */ - if (ddbEsGetItems[`${item.entryId}:L`]) { + + const ddbEsLatestRecordKey = `${item.entryId}:L`; + if (ddbEsItemsToBatchRead[ddbEsLatestRecordKey]) { continue; } - ddbEsGetItems[`${item.entryId}:L`] = ddbEsEntryEntity.getBatch({ + ddbEsItemsToBatchRead[ddbEsLatestRecordKey] = ddbEsEntryEntity.getBatch({ PK: item.PK, SK: "L" }); + const ddbEsPublishedRecordKey = `${item.entryId}:P`; if (item.status === "published" || !!item.locked) { - ddbEsGetItems[`${item.entryId}:P`] = ddbEsEntryEntity.getBatch({ + ddbEsItemsToBatchRead[ddbEsPublishedRecordKey] = ddbEsEntryEntity.getBatch({ PK: item.PK, SK: "P" }); } } - if (Object.keys(ddbEsGetItems).length === 0) { + if (Object.keys(ddbEsItemsToBatchRead).length > 0) { /** * Get all the records from DynamoDB Elasticsearch. */ const ddbEsRecords = await batchReadAll({ table: ddbEsEntryEntity.table, - items: Object.values(ddbEsGetItems) + items: Object.values(ddbEsItemsToBatchRead) }); for (const ddbEsRecord of ddbEsRecords) { @@ -355,16 +328,30 @@ const createInitialCheckpoint = (): MigrationStatus => { }); }; - logger.trace(`Storing records in primary DynamoDB table...`); + logger.trace( + `Storing ${ddbItemsToBatchWrite.length} record(s) in primary DynamoDB table...` + ); await executeWithRetry(execute, { onFailedAttempt: error => { - logger.error( + logger.warn( `Batch write attempt #${error.attemptNumber} failed: ${error.message}` ); } }); if (ddbEsItemsToBatchWrite.length) { + logger.trace( + `Storing ${ddbEsItemsToBatchWrite.length} record(s) in DDB-ES DynamoDB table...` + ); + await waitUntilHealthy.wait({ + async onUnhealthy(params) { + logger.warn( + `Cluster is unhealthy. Waiting for the cluster to become healthy...`, + params + ); + } + }); + // Store data in DDB-ES DynamoDB table. const executeDdbEs = () => { return batchWriteAll({ @@ -373,15 +360,16 @@ const createInitialCheckpoint = (): MigrationStatus => { }); }; - logger.trace(`Storing records in DDB-ES DynamoDB table...`); await executeWithRetry(executeDdbEs, { onFailedAttempt: error => { - logger.error( + logger.warn( `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` ); } }); } + + status.recordsUpdated += ddbItemsToBatchWrite.length; } // Update checkpoint after every batch. From 067cb0c285d622a11ae4c2ed0c03c778f6a40ae0 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 23 May 2024 13:29:43 +0200 Subject: [PATCH 11/56] fix: add `elasticsearchDynamoToElasticLambdaName` --- packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts b/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts index 576b7c0b749..11d574d8e60 100644 --- a/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts +++ b/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts @@ -254,7 +254,8 @@ export const ElasticSearch = createAppModule({ elasticsearchDomainArn: domain.output.arn, elasticsearchDomainEndpoint: domain.output.endpoint, elasticsearchDynamodbTableArn: table.output.arn, - elasticsearchDynamodbTableName: table.output.name + elasticsearchDynamodbTableName: table.output.name, + elasticsearchDynamoToElasticLambdaName: lambda.output.name }); return { From 3cd14fdb26f30d8572e68366af1be16ea4088ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Thu, 23 May 2024 14:10:57 +0200 Subject: [PATCH 12/56] fix(api-elasticsearch): provide reason for waiting healthy cluster --- .../__tests__/utils/waitUntilHealthy.test.ts | 64 +++++++++++-------- .../api-elasticsearch/src/operations/index.ts | 1 + .../api-elasticsearch/src/operations/types.ts | 4 +- packages/api-elasticsearch/src/utils/index.ts | 1 + .../waitUntilHealthy/WaitUntilHealthy.ts | 61 ++++++++++++++---- .../src/utils/waitUntilHealthy/index.ts | 2 + .../migrations/5.39.6/001/ddb-es/worker.ts | 10 +-- 7 files changed, 98 insertions(+), 45 deletions(-) diff --git a/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts b/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts index f3f173b0ea3..fa719081861 100644 --- a/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts +++ b/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts @@ -1,6 +1,6 @@ import { createWaitUntilHealthy } from "~/utils/waitUntilHealthy"; import { createElasticsearchClient } from "@webiny/project-utils/testing/elasticsearch/createClient"; -import { ElasticsearchCatHealthStatus } from "~/operations/types"; +import { ElasticsearchCatCluterHealthStatus } from "~/operations/types"; import { UnhealthyClusterError } from "~/utils/waitUntilHealthy/UnhealthyClusterError"; import { WaitingHealthyClusterAbortedError } from "~/utils/waitUntilHealthy/WaitingHealthyClusterAbortedError"; @@ -9,11 +9,25 @@ describe("wait until healthy", () => { it("should wait until the cluster is healthy - single run", async () => { const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, maxProcessorPercent: 101, + maxRamPercent: 101, maxWaitingTime: 30, - waitingTimeStep: 5, - maxRamPercent: 101 + waitingTimeStep: 5 + }); + + const { runs, runningTime } = await waitUntilHealthy.wait(); + + expect(runs).toEqual(1); + expect(runningTime).toBeLessThan(30000); + }); + + it("should wait until the cluster is healthy - no max memory defined", async () => { + const waitUntilHealthy = createWaitUntilHealthy(client, { + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, + maxProcessorPercent: 101, + maxWaitingTime: 30, + waitingTimeStep: 5 }); const { runs, runningTime } = await waitUntilHealthy.wait(); @@ -25,11 +39,11 @@ describe("wait until healthy", () => { it("should wait until the cluster is health - processor - max waiting time hit", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, maxProcessorPercent: 1, + maxRamPercent: 99, maxWaitingTime: 3, - waitingTimeStep: 1, - maxRamPercent: 99 + waitingTimeStep: 1 }); try { @@ -43,11 +57,11 @@ describe("wait until healthy", () => { it("should wait until the cluster is health - memory - max waiting time hit", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, maxProcessorPercent: 99, + maxRamPercent: 1, maxWaitingTime: 3, - waitingTimeStep: 1, - maxRamPercent: 1 + waitingTimeStep: 1 }); try { @@ -62,11 +76,11 @@ describe("wait until healthy", () => { it("should trigger onUnhealthy callback - once", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, maxProcessorPercent: 1, + maxRamPercent: 1, maxWaitingTime: 1, - waitingTimeStep: 3, - maxRamPercent: 1 + waitingTimeStep: 3 }); const onUnhealthy = jest.fn(); @@ -88,11 +102,11 @@ describe("wait until healthy", () => { it("should trigger onUnhealthy callback - multiple times", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, maxProcessorPercent: 1, + maxRamPercent: 1, maxWaitingTime: 3, - waitingTimeStep: 1, - maxRamPercent: 1 + waitingTimeStep: 1 }); const onUnhealthy = jest.fn(); @@ -114,11 +128,11 @@ describe("wait until healthy", () => { it("should trigger onTimeout callback - once", async () => { expect.assertions(3); const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, maxProcessorPercent: 1, + maxRamPercent: 1, maxWaitingTime: 3, - waitingTimeStep: 1, - maxRamPercent: 1 + waitingTimeStep: 1 }); const onUnhealthy = jest.fn(); @@ -145,11 +159,11 @@ describe("wait until healthy", () => { it("should trigger abort even before the checks start", async () => { expect.assertions(3); const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, maxProcessorPercent: 1, + maxRamPercent: 1, maxWaitingTime: 1, - waitingTimeStep: 3, - maxRamPercent: 1 + waitingTimeStep: 3 }); waitUntilHealthy.abort(); @@ -179,11 +193,11 @@ describe("wait until healthy", () => { it("should trigger abort in onUnhealthy callback", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minStatus: ElasticsearchCatHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, maxProcessorPercent: 1, + maxRamPercent: 1, maxWaitingTime: 1, - waitingTimeStep: 3, - maxRamPercent: 1 + waitingTimeStep: 3 }); const onUnhealthy = jest.fn(); diff --git a/packages/api-elasticsearch/src/operations/index.ts b/packages/api-elasticsearch/src/operations/index.ts index c0d0520fb51..4a8a803a831 100644 --- a/packages/api-elasticsearch/src/operations/index.ts +++ b/packages/api-elasticsearch/src/operations/index.ts @@ -1,2 +1,3 @@ export * from "./ElasticsearchCatHealth"; export * from "./ElasticsearchCatNodes"; +export * from "./types"; diff --git a/packages/api-elasticsearch/src/operations/types.ts b/packages/api-elasticsearch/src/operations/types.ts index cfc8decc94c..114ed9788fc 100644 --- a/packages/api-elasticsearch/src/operations/types.ts +++ b/packages/api-elasticsearch/src/operations/types.ts @@ -1,4 +1,4 @@ -export enum ElasticsearchCatHealthStatus { +export enum ElasticsearchCatCluterHealthStatus { Green = "green", Yellow = "yellow", Red = "red" @@ -8,7 +8,7 @@ export interface IElasticsearchCatHealthResponse { epoch: number; timestamp: `${number}:${number}:${number}`; cluster: string; - status: ElasticsearchCatHealthStatus; + status: ElasticsearchCatCluterHealthStatus; "node.total": `${number}`; "node.data": `${number}`; shards: `${number}`; diff --git a/packages/api-elasticsearch/src/utils/index.ts b/packages/api-elasticsearch/src/utils/index.ts index 14d0e3eae28..88768cb32ba 100644 --- a/packages/api-elasticsearch/src/utils/index.ts +++ b/packages/api-elasticsearch/src/utils/index.ts @@ -1 +1,2 @@ +export * from "./waitUntilHealthy"; export * from "./createIndex"; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts index f8bef386cfe..8796b6f8d9f 100644 --- a/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts @@ -1,17 +1,33 @@ import { Client } from "~/client"; import { ElasticsearchCatHealth } from "~/operations/ElasticsearchCatHealth"; import { ElasticsearchCatNodes } from "~/operations/ElasticsearchCatNodes"; -import { ElasticsearchCatHealthStatus, IElasticsearchCatNodesResponse } from "~/operations/types"; +import { + ElasticsearchCatCluterHealthStatus, + IElasticsearchCatNodesResponse +} from "~/operations/types"; import { UnhealthyClusterError } from "~/utils/waitUntilHealthy/UnhealthyClusterError"; import { WaitingHealthyClusterAbortedError } from "./WaitingHealthyClusterAbortedError"; const WAITING_TIME_STEP = 10; +export type ShouldWaitProcessor = "processor"; +export type ShouldWaitMemory = "memory"; +export type ShouldWaitClusterHealthStatus = "clusterHealthStatus"; +export type ShouldNotWait = false; + +export type ShouldWaitReason = + | ShouldWaitProcessor + | ShouldWaitMemory + | ShouldWaitClusterHealthStatus + | ShouldNotWait; + export interface IWaitUntilHealthyParams { /** * Minimum status allowed, otherwise the cluster is considered unhealthy. */ - minStatus: ElasticsearchCatHealthStatus.Green | ElasticsearchCatHealthStatus.Yellow; + minClusterHealthStatus: + | ElasticsearchCatCluterHealthStatus.Green + | ElasticsearchCatCluterHealthStatus.Yellow; /** * Maximum processor percent allowed, otherwise the cluster is considered unhealthy. */ @@ -19,7 +35,7 @@ export interface IWaitUntilHealthyParams { /** * Maximum RAM percent allowed, otherwise the cluster is considered unhealthy. */ - maxRamPercent: number; + maxRamPercent?: number; /** * Maximum time to wait in seconds. * This is to prevent infinite waiting in case the cluster never becomes healthy. @@ -38,6 +54,7 @@ export interface IWaitOptionsOnUnhealthyParams { mustEndAt: Date; waitingTimeStep: number; runs: number; + shouldWaitReason: ShouldWaitReason; } export interface IWaitOptionsOnTimeoutParams { @@ -45,6 +62,7 @@ export interface IWaitOptionsOnTimeoutParams { mustEndAt: Date; waitingTimeStep: number; runs: number; + shouldWaitReason: ShouldWaitReason; } export interface IWaitOptions { @@ -91,13 +109,15 @@ class WaitUntilHealthy { const mustEndAt = new Date(startedAt.getTime() + this.options.maxWaitingTime * 1000); const waitingTimeStep = this.options.waitingTimeStep || WAITING_TIME_STEP; let runs = 1; - while (await this.shouldWait()) { + let shouldWaitReason: ShouldWaitReason; + while ((shouldWaitReason = await this.shouldWait())) { if (new Date() >= mustEndAt) { if (options?.onTimeout) { await options.onTimeout({ startedAt, mustEndAt, waitingTimeStep, + shouldWaitReason, runs }); } @@ -107,6 +127,7 @@ class WaitUntilHealthy { startedAt, mustEndAt, waitingTimeStep, + shouldWaitReason, runs }); } @@ -130,22 +151,34 @@ class WaitUntilHealthy { }; } - private async shouldWait(): Promise { + private async shouldWait(): Promise { const health = await this.catHealth.getHealth(); const nodes = await this.catNodes.getNodes(); - const status = this.transformStatus(health.status); - if (status > this.transformStatus(this.options.minStatus)) { - return true; + const clusterHealthStatus = this.transformClusterHealthStatus(health.status); + if ( + clusterHealthStatus > + this.transformClusterHealthStatus(this.options.minClusterHealthStatus) + ) { + return "clusterHealthStatus"; } const processorPercent = this.getProcessorPercent(nodes); if (processorPercent > this.options.maxProcessorPercent) { - return true; + return "processor"; + } + /** + * Possibly no max ram definition? + */ + if (this.options.maxRamPercent === undefined) { + return false; } const ramPercent = this.getRamPercent(nodes); - return ramPercent > this.options.maxRamPercent; + if (ramPercent > this.options.maxRamPercent) { + return "memory"; + } + return false; } private getProcessorPercent(nodes: IElasticsearchCatNodesResponse): number { @@ -162,13 +195,13 @@ class WaitUntilHealthy { return total / nodes.length; } - private transformStatus(status: ElasticsearchCatHealthStatus): number { + private transformClusterHealthStatus(status: ElasticsearchCatCluterHealthStatus): number { switch (status) { - case ElasticsearchCatHealthStatus.Green: + case ElasticsearchCatCluterHealthStatus.Green: return 1; - case ElasticsearchCatHealthStatus.Yellow: + case ElasticsearchCatCluterHealthStatus.Yellow: return 2; - case ElasticsearchCatHealthStatus.Red: + case ElasticsearchCatCluterHealthStatus.Red: return 3; default: return 99; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts index b260b1e9f80..70890365bf9 100644 --- a/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts @@ -1 +1,3 @@ export * from "./WaitUntilHealthy"; +export * from "./UnhealthyClusterError"; +export * from "./WaitUntilHealthy"; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index e42a6da993e..8338ea001a2 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -29,8 +29,10 @@ import { ddbScanWithCallback } from "~/utils"; import pinoPretty from "pino-pretty"; -import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import { ElasticsearchCatHealthStatus } from "@webiny/api-elasticsearch/operations/types"; +import { + createWaitUntilHealthy, + ElasticsearchCatCluterHealthStatus +} from "@webiny/api-elasticsearch"; const argv = yargs(hideBin(process.argv)) .options({ @@ -108,9 +110,9 @@ const createInitialStatus = (): MigrationStatus => { // TODO: make these configurable outside of the script. const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { - minStatus: ElasticsearchCatHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, maxProcessorPercent: 75, - maxRamPercent: 100, + //maxRamPercent: 100, maxWaitingTime: 60, waitingTimeStep: 5 }); From 0542ec497bff3dd52bbad84f3644cc33483b6cc9 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 24 May 2024 05:46:27 +0200 Subject: [PATCH 13/56] fix: create a migration script that can be run manually --- .../migrations/5.39.6/001/ddb-es/Migration.ts | 19 +- .../5.39.6/001/ddb-es/SegmentProcessor.ts | 4 - .../src/migrations/5.39.6/001/ddb-es/types.ts | 6 + .../DeleteAllCmsEntries.ts | 61 ++++++ .../deleteAllCmsEntries/SegmentProcessor.ts | 52 +++++ .../ddb-es/utils/deleteAllCmsEntries/bin.ts | 36 ++++ .../utils/deleteAllCmsEntries/worker.ts | 197 ++++++++++++++++++ .../migrations/5.39.6/001/ddb-es/worker.ts | 10 +- 8 files changed, 372 insertions(+), 13 deletions(-) create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts index c08e283b5e4..48fab0d1a75 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts @@ -7,6 +7,8 @@ import { restoreOriginalElasticsearchSettings } from "~/utils"; import { createElasticsearchClient } from "@webiny/api-elasticsearch"; +import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; +import { ElasticsearchCatHealthStatus } from "@webiny/api-elasticsearch/operations/types"; interface SegmentProcessorParams { region: string; @@ -47,6 +49,20 @@ export class Migration { endpoint: `https://${this.elasticsearchEndpoint}` }); + // TODO: make these configurable outside of the script. + + this.logger.trace("Checking Elasticsearch health status..."); + const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { + minStatus: ElasticsearchCatHealthStatus.Yellow, + maxProcessorPercent: 75, + maxRamPercent: 100, + maxWaitingTime: 60, + waitingTimeStep: 5 + }); + this.logger.trace("Elasticsearch is healthy."); + + await waitUntilHealthy.wait(); + const indexes = await esListIndexes({ elasticsearchClient, match: "-headless-cms-" }); const indexSettings: Record = {}; for (const indexName of indexes) { @@ -67,9 +83,6 @@ export class Migration { this.logger.trace("Proceeding with the migration..."); for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { - const segmentPrefix = `[segment index ${segmentIndex}]`; - this.logger.trace(`${segmentPrefix} Scanning primary DynamoDB table...`); - const segmentProcessor = new SegmentProcessor({ segmentIndex, totalSegments: this.totalSegments, diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts index e645b6a1004..ee3d66da107 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts @@ -1,4 +1,3 @@ -import { Logger } from "@webiny/logger"; import execa from "execa"; import path from "path"; @@ -9,7 +8,6 @@ interface SegmentProcessorParams { elasticsearchEndpoint: string; segmentIndex: number; totalSegments: number; - logger: Logger; } export class SegmentProcessor { @@ -19,7 +17,6 @@ export class SegmentProcessor { private readonly elasticsearchEndpoint: string; private readonly segmentIndex: number; private readonly totalSegments: number; - private readonly logger: Logger; constructor(params: SegmentProcessorParams) { this.region = params.region; @@ -28,7 +25,6 @@ export class SegmentProcessor { this.elasticsearchEndpoint = params.elasticsearchEndpoint; this.segmentIndex = params.segmentIndex; this.totalSegments = params.totalSegments; - this.logger = params.logger; } execute() { diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts new file mode 100644 index 00000000000..fba079287fd --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts @@ -0,0 +1,6 @@ +export interface SegmentProcessorStats { + iterationsCount: number; + recordsScanned: number; + recordsUpdated: number; + recordsSkipped: number; +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts new file mode 100644 index 00000000000..c7209c2ff33 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts @@ -0,0 +1,61 @@ +import { Logger } from "@webiny/logger"; +import { SegmentProcessor } from "./SegmentProcessor"; +import { createElasticsearchClient } from "@webiny/api-elasticsearch"; + +interface SegmentProcessorParams { + region: string; + primaryDynamoDbTable: string; + ddbEsTable: string; + elasticsearchEndpoint: string; + totalSegments: number; + logger: Logger; +} + +export class DeleteAllCmsEntries { + private readonly region: string; + private readonly primaryDynamoDbTable: string; + private readonly ddbEsTable: string; + private readonly elasticsearchEndpoint: string; + private readonly totalSegments: number; + private readonly logger: Logger; + + constructor(params: SegmentProcessorParams) { + this.region = params.region; + this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbEsTable = params.ddbEsTable; + this.elasticsearchEndpoint = params.elasticsearchEndpoint; + this.totalSegments = params.totalSegments; + this.logger = params.logger; + } + + async execute() { + const scanProcessesPromises = []; + + const start = Date.now(); + const getDuration = () => { + return (Date.now() - start) / 1000; + }; + + // Disable indexing for HCMS Elasticsearch index. + const elasticsearchClient = createElasticsearchClient({ + endpoint: `https://${this.elasticsearchEndpoint}` + }); + + for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { + const segmentProcessor = new SegmentProcessor({ + segmentIndex, + totalSegments: this.totalSegments, + region: this.region, + primaryDynamoDbTable: this.primaryDynamoDbTable, + ddbEsTable: this.ddbEsTable, + elasticsearchEndpoint: this.elasticsearchEndpoint + }); + + scanProcessesPromises.push(segmentProcessor.execute()); + } + + await Promise.all(scanProcessesPromises); + + this.logger.trace(`All CMS entries have been deleted. Took: ${getDuration()}s`); + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts new file mode 100644 index 00000000000..fe591b1a5bc --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts @@ -0,0 +1,52 @@ +import execa from "execa"; +import path from "path"; + +interface SegmentProcessorParams { + region: string; + primaryDynamoDbTable: string; + ddbEsTable: string; + elasticsearchEndpoint: string; + segmentIndex: number; + totalSegments: number; +} + +export class SegmentProcessor { + private readonly region: string; + private readonly primaryDynamoDbTable: string; + private readonly ddbEsTable: string; + private readonly elasticsearchEndpoint: string; + private readonly segmentIndex: number; + private readonly totalSegments: number; + + constructor(params: SegmentProcessorParams) { + this.region = params.region; + this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbEsTable = params.ddbEsTable; + this.elasticsearchEndpoint = params.elasticsearchEndpoint; + this.segmentIndex = params.segmentIndex; + this.totalSegments = params.totalSegments; + } + + async execute() { + return execa( + "node", + [ + path.join(__dirname, "worker"), + "--region", + this.region, + "--primaryDynamoDbTable", + this.primaryDynamoDbTable, + "--ddbEsTable", + this.ddbEsTable, + "--segmentIndex", + String(this.segmentIndex), + "--totalSegments", + String(this.totalSegments) + ], + { + stdio: "inherit", + env: process.env + } + ) + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts new file mode 100644 index 00000000000..975ab03680f --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts @@ -0,0 +1,36 @@ +#!/usr/bin/env node +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { DeleteAllCmsEntries } from "./DeleteAllCmsEntries"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; + +const argv = yargs(hideBin(process.argv)) + .options({ + region: { type: "string", demandOption: true }, + primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + elasticsearchEndpoint: { type: "string", demandOption: true }, + segments: { type: "number", demandOption: true } + }) + .parseSync(); + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const deleteAllCmsEntries = new DeleteAllCmsEntries({ + totalSegments: argv.segments, + region: argv.region, + primaryDynamoDbTable: argv.primaryDynamoDbTable, + ddbEsTable: argv.ddbEsTable, + elasticsearchEndpoint: argv.elasticsearchEndpoint, + logger + }); + + await deleteAllCmsEntries.execute(); +})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts new file mode 100644 index 00000000000..60dbc19e5f9 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts @@ -0,0 +1,197 @@ +import { executeWithRetry } from "@webiny/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import { createTable } from "@webiny/data-migration"; +import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { CmsEntry } from "~/migrations/5.39.0/001/types"; +import { + createDdbEntryEntity, + createDdbEsEntryEntity +} from "~/migrations/5.39.0/001/entities/createEntryEntity"; +import { batchWriteAll, BatchWriteItem, ddbScanWithCallback } from "~/utils"; +import pinoPretty from "pino-pretty"; + +const argv = yargs(hideBin(process.argv)) + .options({ + region: { type: "string", demandOption: true }, + primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + segmentIndex: { type: "number", demandOption: true }, + totalSegments: { type: "number", demandOption: true } + }) + .parseSync(); + +interface LastEvaluatedKeyObject { + PK: string; + SK: string; + GSI1_PK: string; + GSI1_SK: string; +} + +type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; + +interface MigrationStatus { + lastEvaluatedKey: LastEvaluatedKey; + iterationsCount: number; + recordsScanned: number; + recordsUpdated: number; + recordsSkipped: number; +} + +const createInitialStatus = (): MigrationStatus => { + return { + lastEvaluatedKey: null, + iterationsCount: 0, + recordsScanned: 0, + recordsUpdated: 0, + recordsSkipped: 0 + }; +}; + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), + msgPrefix: `[segment #${argv.segmentIndex}] ` + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const documentClient = getDocumentClient(); + + const primaryTable = createTable({ + name: argv.primaryDynamoDbTable, + documentClient + }); + const dynamoToEsTable = createTable({ + name: argv.ddbEsTable, + documentClient + }); + + const ddbEntryEntity = createDdbEntryEntity(primaryTable); + const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); + + const status = createInitialStatus(); + + await ddbScanWithCallback( + { + entity: ddbEntryEntity, + options: { + segment: argv.segmentIndex, + segments: argv.totalSegments, + filters: [ + { + attr: "_et", + eq: "CmsEntries" + } + ], + startKey: status.lastEvaluatedKey || undefined, + limit: 100 + } + }, + async result => { + status.iterationsCount++; + status.recordsScanned += result.items.length; + + logger.trace(`Reading ${result.items.length} record(s)...`); + const ddbItemsToBatchDelete: BatchWriteItem[] = []; + const ddbEsItemsToBatchDelete: BatchWriteItem[] = []; + const ddbEsItemsToPutIntoBatchDelete: Record = {}; + + for (const item of result.items) { + ddbItemsToBatchDelete.push(ddbEntryEntity.deleteBatch(item)); + + /** + * Prepare the loading of DynamoDB Elasticsearch part of the records. + */ + + const ddbEsLatestRecordKey = `${item.entryId}:L`; + if (ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey]) { + continue; + } + + ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey] = { + PK: item.PK, + SK: "L" + }; + + const ddbEsPublishedRecordKey = `${item.entryId}:P`; + if (item.status === "published" || !!item.locked) { + ddbEsItemsToPutIntoBatchDelete[ddbEsPublishedRecordKey] = { + PK: item.PK, + SK: "P" + }; + } + } + + if (Object.keys(ddbEsItemsToPutIntoBatchDelete).length > 0) { + Object.values(ddbEsItemsToPutIntoBatchDelete).forEach((item) => { + ddbEsItemsToBatchDelete.push(ddbEsEntryEntity.deleteBatch(item)); + }); + } + + if (ddbItemsToBatchDelete.length) { + // Store data in primary DynamoDB table. + const execute = () => { + return batchWriteAll({ + table: ddbEntryEntity.table, + items: ddbItemsToBatchDelete, + }); + }; + + logger.trace( + `Deleting ${ddbItemsToBatchDelete.length} record(s) in primary DynamoDB table...` + ); + await executeWithRetry(execute, { + onFailedAttempt: error => { + logger.warn( + `Batch delete attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + + if (ddbEsItemsToBatchDelete.length) { + logger.trace( + `Deleting ${ddbEsItemsToBatchDelete.length} record(s) in DDB-ES DynamoDB table...` + ); + + // Store data in DDB-ES DynamoDB table. + const executeDdbEs = () => { + return batchWriteAll({ + table: ddbEsEntryEntity.table, + items: ddbEsItemsToBatchDelete + }); + }; + + await executeWithRetry(executeDdbEs, { + onFailedAttempt: error => { + logger.warn( + `[DDB-ES Table] Batch delete attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + } + + status.recordsUpdated += ddbItemsToBatchDelete.length; + } + + // Update checkpoint after every batch. + let lastEvaluatedKey: LastEvaluatedKey = true; + if (result.lastEvaluatedKey) { + lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; + } + + status.lastEvaluatedKey = lastEvaluatedKey; + + if (lastEvaluatedKey === true) { + return false; + } + + // Continue further scanning. + return true; + } + ); + + logger.trace({ status }, "Segment processing completed."); +})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index e42a6da993e..4d0d5b2d7da 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -28,9 +28,9 @@ import { BatchWriteItem, ddbScanWithCallback } from "~/utils"; -import pinoPretty from "pino-pretty"; import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; import { ElasticsearchCatHealthStatus } from "@webiny/api-elasticsearch/operations/types"; +import pinoPretty from "pino-pretty"; const argv = yargs(hideBin(process.argv)) .options({ @@ -80,11 +80,9 @@ const createInitialStatus = (): MigrationStatus => { const logger = createPinoLogger( { level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), - msgPrefix: `[segment index ${argv.segmentIndex}] ` + msgPrefix: `[segment #${argv.segmentIndex}] ` }, - pinoPretty({ - ignore: "pid,hostname" - }) + pinoPretty({ ignore: "pid,hostname" }) ); const documentClient = getDocumentClient(); @@ -389,5 +387,5 @@ const createInitialStatus = (): MigrationStatus => { } ); - logger.trace(status); + logger.trace({ status }, "Segment processing completed."); })(); From 195535e8ac309e66ca23d9744b47d1a95b592336 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 24 May 2024 09:48:47 +0200 Subject: [PATCH 14/56] fix: create a migration script that can be run manually --- .../migrations/5.39.6/001/ddb-es/Migration.ts | 48 ++++++++-------- .../5.39.6/001/ddb-es/SegmentProcessor.ts | 43 ++++++++------ .../src/migrations/5.39.6/001/ddb-es/bin.ts | 56 ++++++++++++++++--- .../src/migrations/5.39.6/001/ddb-es/types.ts | 6 -- .../src/migrations/5.39.6/001/ddb-es/utils.ts | 14 +++++ .../DeleteAllCmsEntries.ts | 24 ++------ .../deleteAllCmsEntries/SegmentProcessor.ts | 18 ++---- .../ddb-es/utils/deleteAllCmsEntries/bin.ts | 8 +-- .../utils/deleteAllCmsEntries/worker.ts | 5 +- .../migrations/5.39.6/001/ddb-es/worker.ts | 34 ++++++----- 10 files changed, 148 insertions(+), 108 deletions(-) delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts index 48fab0d1a75..9c246ec4996 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts @@ -8,32 +8,41 @@ import { } from "~/utils"; import { createElasticsearchClient } from "@webiny/api-elasticsearch"; import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import { ElasticsearchCatHealthStatus } from "@webiny/api-elasticsearch/operations/types"; +import { + DEFAULT_ES_HEALTH_CHECKS_PARAMS, + EsHealthChecksParams +} from "~/migrations/5.39.6/001/ddb-es/utils"; interface SegmentProcessorParams { - region: string; - primaryDynamoDbTable: string; + ddbTable: string; ddbEsTable: string; - elasticsearchEndpoint: string; + esEndpoint: string; totalSegments: number; logger: Logger; + + // Elasticsearch health check options. + esHealthChecks?: Partial; } export class Migration { - private readonly region: string; - private readonly primaryDynamoDbTable: string; + private readonly ddbTable: string; private readonly ddbEsTable: string; - private readonly elasticsearchEndpoint: string; + private readonly esEndpoint: string; private readonly totalSegments: number; private readonly logger: Logger; + private readonly esHealthChecks: EsHealthChecksParams; + constructor(params: SegmentProcessorParams) { - this.region = params.region; - this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbTable = params.ddbTable; this.ddbEsTable = params.ddbEsTable; - this.elasticsearchEndpoint = params.elasticsearchEndpoint; + this.esEndpoint = params.esEndpoint; this.totalSegments = params.totalSegments; this.logger = params.logger; + this.esHealthChecks = { + ...DEFAULT_ES_HEALTH_CHECKS_PARAMS, + ...params.esHealthChecks + }; } async execute() { @@ -46,19 +55,11 @@ export class Migration { // Disable indexing for HCMS Elasticsearch index. const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${this.elasticsearchEndpoint}` + endpoint: `https://${this.esEndpoint}` }); - // TODO: make these configurable outside of the script. - this.logger.trace("Checking Elasticsearch health status..."); - const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { - minStatus: ElasticsearchCatHealthStatus.Yellow, - maxProcessorPercent: 75, - maxRamPercent: 100, - maxWaitingTime: 60, - waitingTimeStep: 5 - }); + const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, this.esHealthChecks); this.logger.trace("Elasticsearch is healthy."); await waitUntilHealthy.wait(); @@ -86,11 +87,10 @@ export class Migration { const segmentProcessor = new SegmentProcessor({ segmentIndex, totalSegments: this.totalSegments, - region: this.region, - primaryDynamoDbTable: this.primaryDynamoDbTable, + ddbTable: this.ddbTable, ddbEsTable: this.ddbEsTable, - elasticsearchEndpoint: this.elasticsearchEndpoint, - logger: this.logger + esEndpoint: this.esEndpoint, + esHealthChecks: this.esHealthChecks }); scanProcessesPromises.push(segmentProcessor.execute()); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts index ee3d66da107..3526aac2ce0 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts @@ -1,30 +1,31 @@ import execa from "execa"; import path from "path"; +import {EsHealthChecksParams} from "~/migrations/5.39.6/001/ddb-es/utils"; interface SegmentProcessorParams { - region: string; - primaryDynamoDbTable: string; + ddbTable: string; ddbEsTable: string; - elasticsearchEndpoint: string; + esEndpoint: string; segmentIndex: number; totalSegments: number; + esHealthChecks: EsHealthChecksParams; } export class SegmentProcessor { - private readonly region: string; - private readonly primaryDynamoDbTable: string; + private readonly ddbTable: string; private readonly ddbEsTable: string; - private readonly elasticsearchEndpoint: string; + private readonly esEndpoint: string; private readonly segmentIndex: number; private readonly totalSegments: number; + private readonly esHealthChecks: EsHealthChecksParams; constructor(params: SegmentProcessorParams) { - this.region = params.region; - this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbTable = params.ddbTable; this.ddbEsTable = params.ddbEsTable; - this.elasticsearchEndpoint = params.elasticsearchEndpoint; + this.esEndpoint = params.esEndpoint; this.segmentIndex = params.segmentIndex; this.totalSegments = params.totalSegments; + this.esHealthChecks = params.esHealthChecks; } execute() { @@ -32,18 +33,28 @@ export class SegmentProcessor { "node", [ path.join(__dirname, "worker"), - "--region", - this.region, - "--primaryDynamoDbTable", - this.primaryDynamoDbTable, + "--ddbTable", + this.ddbTable, "--ddbEsTable", this.ddbEsTable, - "--elasticsearchEndpoint", - this.elasticsearchEndpoint, + "--esEndpoint", + this.esEndpoint, "--segmentIndex", String(this.segmentIndex), "--totalSegments", - String(this.totalSegments) + String(this.totalSegments), + + // Elasticsearch health check options. + "--esHealthMinClusterHealthStatus", + this.esHealthChecks.minClusterHealthStatus, + "--esHealthMaxProcessorPercent", + String(this.esHealthChecks.maxProcessorPercent), + "--esHealthMaxRamPercent", + String(this.esHealthChecks.maxRamPercent), + "--esHealthMaxWaitingTime", + String(this.esHealthChecks.maxWaitingTime), + "--esHealthWaitingTimeStep", + String(this.esHealthChecks.waitingTimeStep) ], { stdio: "inherit", diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts index 63a7ae62ae4..5a3d0049b58 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts @@ -4,14 +4,49 @@ import { hideBin } from "yargs/helpers"; import { Migration } from "./Migration"; import { createPinoLogger, getLogLevel } from "@webiny/logger"; import pinoPretty from "pino-pretty"; +import { + DEFAULT_ES_HEALTH_CHECKS_PARAMS, + EsHealthChecksParams +} from "~/migrations/5.39.6/001/ddb-es/utils"; const argv = yargs(hideBin(process.argv)) .options({ - region: { type: "string", demandOption: true }, - primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbTable: { type: "string", demandOption: true }, ddbEsTable: { type: "string", demandOption: true }, - elasticsearchEndpoint: { type: "string", demandOption: true }, - segments: { type: "number", demandOption: true } + esEndpoint: { type: "string", demandOption: true }, + segments: { type: "number", demandOption: true }, + + // Elasticsearch health check options. + esHealthMinClusterHealthStatus: { + type: "string", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.minClusterHealthStatus, + description: `Minimum cluster health status to wait for before proceeding with the migration.` + }, + esHealthMaxProcessorPercent: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxProcessorPercent, + description: `Maximum CPU usage percentage to wait for before proceeding with the migration.` + }, + esHealthMaxRamPercent: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxRamPercent, + description: `Maximum RAM usage percentage to wait for before proceeding with the migration.` + }, + esHealthMaxWaitingTime: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxWaitingTime, + description: `Maximum time to wait (seconds) for before proceeding with the migration.` + }, + esHealthWaitingTimeStep: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.waitingTimeStep, + description: `Time step (seconds) to wait before checking Elasticsearch health status again.` + } }) .parseSync(); @@ -25,10 +60,17 @@ const argv = yargs(hideBin(process.argv)) const migration = new Migration({ totalSegments: argv.segments, - region: argv.region, - primaryDynamoDbTable: argv.primaryDynamoDbTable, + ddbTable: argv.ddbTable, ddbEsTable: argv.ddbEsTable, - elasticsearchEndpoint: argv.elasticsearchEndpoint, + esEndpoint: argv.esEndpoint, + esHealthChecks: { + minClusterHealthStatus: + argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], + maxProcessorPercent: argv.esHealthMaxProcessorPercent, + maxRamPercent: argv.esHealthMaxRamPercent, + maxWaitingTime: argv.esHealthMaxWaitingTime, + waitingTimeStep: argv.esHealthWaitingTimeStep + }, logger }); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts deleted file mode 100644 index fba079287fd..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface SegmentProcessorStats { - iterationsCount: number; - recordsScanned: number; - recordsUpdated: number; - recordsSkipped: number; -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts new file mode 100644 index 00000000000..0fe29aec3fb --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts @@ -0,0 +1,14 @@ +import { + ElasticsearchCatCluterHealthStatus, + IWaitUntilHealthyParams +} from "@webiny/api-elasticsearch"; + +export type EsHealthChecksParams = Required; + +export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { + minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, + maxProcessorPercent: 80, + maxRamPercent: 100, + maxWaitingTime: 90, + waitingTimeStep: 3 +}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts index c7209c2ff33..7d05ac4e85b 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts @@ -1,29 +1,22 @@ import { Logger } from "@webiny/logger"; import { SegmentProcessor } from "./SegmentProcessor"; -import { createElasticsearchClient } from "@webiny/api-elasticsearch"; interface SegmentProcessorParams { - region: string; - primaryDynamoDbTable: string; + ddbTable: string; ddbEsTable: string; - elasticsearchEndpoint: string; totalSegments: number; logger: Logger; } export class DeleteAllCmsEntries { - private readonly region: string; - private readonly primaryDynamoDbTable: string; + private readonly ddbTable: string; private readonly ddbEsTable: string; - private readonly elasticsearchEndpoint: string; private readonly totalSegments: number; private readonly logger: Logger; constructor(params: SegmentProcessorParams) { - this.region = params.region; - this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbTable = params.ddbTable; this.ddbEsTable = params.ddbEsTable; - this.elasticsearchEndpoint = params.elasticsearchEndpoint; this.totalSegments = params.totalSegments; this.logger = params.logger; } @@ -36,19 +29,12 @@ export class DeleteAllCmsEntries { return (Date.now() - start) / 1000; }; - // Disable indexing for HCMS Elasticsearch index. - const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${this.elasticsearchEndpoint}` - }); - for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { const segmentProcessor = new SegmentProcessor({ segmentIndex, totalSegments: this.totalSegments, - region: this.region, - primaryDynamoDbTable: this.primaryDynamoDbTable, - ddbEsTable: this.ddbEsTable, - elasticsearchEndpoint: this.elasticsearchEndpoint + ddbTable: this.ddbTable, + ddbEsTable: this.ddbEsTable }); scanProcessesPromises.push(segmentProcessor.execute()); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts index fe591b1a5bc..a8dada8f631 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts @@ -2,27 +2,21 @@ import execa from "execa"; import path from "path"; interface SegmentProcessorParams { - region: string; - primaryDynamoDbTable: string; + ddbTable: string; ddbEsTable: string; - elasticsearchEndpoint: string; segmentIndex: number; totalSegments: number; } export class SegmentProcessor { - private readonly region: string; - private readonly primaryDynamoDbTable: string; + private readonly ddbTable: string; private readonly ddbEsTable: string; - private readonly elasticsearchEndpoint: string; private readonly segmentIndex: number; private readonly totalSegments: number; constructor(params: SegmentProcessorParams) { - this.region = params.region; - this.primaryDynamoDbTable = params.primaryDynamoDbTable; + this.ddbTable = params.ddbTable; this.ddbEsTable = params.ddbEsTable; - this.elasticsearchEndpoint = params.elasticsearchEndpoint; this.segmentIndex = params.segmentIndex; this.totalSegments = params.totalSegments; } @@ -32,10 +26,8 @@ export class SegmentProcessor { "node", [ path.join(__dirname, "worker"), - "--region", - this.region, - "--primaryDynamoDbTable", - this.primaryDynamoDbTable, + "--ddbTable", + this.ddbTable, "--ddbEsTable", this.ddbEsTable, "--segmentIndex", diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts index 975ab03680f..344ec0adba3 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts @@ -7,10 +7,8 @@ import pinoPretty from "pino-pretty"; const argv = yargs(hideBin(process.argv)) .options({ - region: { type: "string", demandOption: true }, - primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbTable: { type: "string", demandOption: true }, ddbEsTable: { type: "string", demandOption: true }, - elasticsearchEndpoint: { type: "string", demandOption: true }, segments: { type: "number", demandOption: true } }) .parseSync(); @@ -25,10 +23,8 @@ const argv = yargs(hideBin(process.argv)) const deleteAllCmsEntries = new DeleteAllCmsEntries({ totalSegments: argv.segments, - region: argv.region, - primaryDynamoDbTable: argv.primaryDynamoDbTable, + ddbTable: argv.ddbTable, ddbEsTable: argv.ddbEsTable, - elasticsearchEndpoint: argv.elasticsearchEndpoint, logger }); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts index 60dbc19e5f9..57863c11f36 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts @@ -14,8 +14,7 @@ import pinoPretty from "pino-pretty"; const argv = yargs(hideBin(process.argv)) .options({ - region: { type: "string", demandOption: true }, - primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbTable: { type: "string", demandOption: true }, ddbEsTable: { type: "string", demandOption: true }, segmentIndex: { type: "number", demandOption: true }, totalSegments: { type: "number", demandOption: true } @@ -61,7 +60,7 @@ const createInitialStatus = (): MigrationStatus => { const documentClient = getDocumentClient(); const primaryTable = createTable({ - name: argv.primaryDynamoDbTable, + name: argv.ddbTable, documentClient }); const dynamoToEsTable = createTable({ diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index 4d0d5b2d7da..08aba503b9e 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -29,17 +29,23 @@ import { ddbScanWithCallback } from "~/utils"; import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import { ElasticsearchCatHealthStatus } from "@webiny/api-elasticsearch/operations/types"; import pinoPretty from "pino-pretty"; +import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; const argv = yargs(hideBin(process.argv)) .options({ - region: { type: "string", demandOption: true }, - primaryDynamoDbTable: { type: "string", demandOption: true }, + ddbTable: { type: "string", demandOption: true }, ddbEsTable: { type: "string", demandOption: true }, - elasticsearchEndpoint: { type: "string", demandOption: true }, + esEndpoint: { type: "string", demandOption: true }, segmentIndex: { type: "number", demandOption: true }, - totalSegments: { type: "number", demandOption: true } + totalSegments: { type: "number", demandOption: true }, + + // Elasticsearch health check options. + esHealthMinClusterHealthStatus: { type: "string", demandOption: true }, + esHealthMaxProcessorPercent: { type: "number", demandOption: true }, + esHealthMaxRamPercent: { type: "number", demandOption: true }, + esHealthMaxWaitingTime: { type: "number", demandOption: true }, + esHealthWaitingTimeStep: { type: "number", demandOption: true } }) .parseSync(); @@ -87,11 +93,11 @@ const createInitialStatus = (): MigrationStatus => { const documentClient = getDocumentClient(); const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${argv.elasticsearchEndpoint}` + endpoint: `https://${argv.esEndpoint}` }); const primaryTable = createTable({ - name: argv.primaryDynamoDbTable, + name: argv.ddbTable, documentClient }); const dynamoToEsTable = createTable({ @@ -104,13 +110,13 @@ const createInitialStatus = (): MigrationStatus => { const status = createInitialStatus(); - // TODO: make these configurable outside of the script. const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { - minStatus: ElasticsearchCatHealthStatus.Yellow, - maxProcessorPercent: 75, - maxRamPercent: 100, - maxWaitingTime: 60, - waitingTimeStep: 5 + minClusterHealthStatus: + argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], + maxProcessorPercent: argv.esHealthMaxProcessorPercent, + maxRamPercent: argv.esHealthMaxRamPercent, + maxWaitingTime: argv.esHealthMaxWaitingTime, + waitingTimeStep: argv.esHealthWaitingTimeStep }); await ddbScanWithCallback( @@ -344,7 +350,7 @@ const createInitialStatus = (): MigrationStatus => { await waitUntilHealthy.wait({ async onUnhealthy(params) { logger.warn( - `Cluster is unhealthy. Waiting for the cluster to become healthy...`, + `Cluster is unhealthy (${params.shouldWaitReason}). Waiting for the cluster to become healthy...`, params ); } From 48a90d34ad6f5a7e6d6354b91de3396bc253a5b4 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 24 May 2024 14:05:32 +0200 Subject: [PATCH 15/56] fix: create a migration script that can be run manually --- .../migrations/5.39.6/001/ddb-es/Migration.ts | 85 +++++++++++++++-- .../5.39.6/001/ddb-es/SegmentProcessor.ts | 7 +- ...teMetaFieldsDataMigrationDeploymentHook.ts | 91 +++++++++++++++++++ .../src/migrations/5.39.6/001/ddb-es/utils.ts | 4 +- .../migrations/5.39.6/001/ddb-es/worker.ts | 50 +++++++--- 5 files changed, 211 insertions(+), 26 deletions(-) create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts index 9c246ec4996..04b83485792 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts @@ -12,8 +12,12 @@ import { DEFAULT_ES_HEALTH_CHECKS_PARAMS, EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; +import path from "path"; +import os from "os"; +import fs from "fs"; +import glob from "fast-glob"; -interface SegmentProcessorParams { +export interface MetaFieldsMigrationParams { ddbTable: string; ddbEsTable: string; esEndpoint: string; @@ -25,6 +29,7 @@ interface SegmentProcessorParams { } export class Migration { + private readonly runId: string; private readonly ddbTable: string; private readonly ddbEsTable: string; private readonly esEndpoint: string; @@ -33,7 +38,8 @@ export class Migration { private readonly esHealthChecks: EsHealthChecksParams; - constructor(params: SegmentProcessorParams) { + constructor(params: MetaFieldsMigrationParams) { + this.runId = String(new Date().getTime()); this.ddbTable = params.ddbTable; this.ddbEsTable = params.ddbEsTable; this.esEndpoint = params.esEndpoint; @@ -53,21 +59,32 @@ export class Migration { return (Date.now() - start) / 1000; }; - // Disable indexing for HCMS Elasticsearch index. + this.logger.info("Starting 5.39.6-001 meta fields data migration..."); + this.logger.info( + { + ddbTable: this.ddbTable, + ddbEsTable: this.ddbEsTable, + esEndpoint: this.esEndpoint, + totalSegments: this.totalSegments, + esHealthChecks: this.esHealthChecks + }, + "Received the following parameters:" + ); + const elasticsearchClient = createElasticsearchClient({ endpoint: `https://${this.esEndpoint}` }); - this.logger.trace("Checking Elasticsearch health status..."); + this.logger.info("Checking Elasticsearch health status..."); const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, this.esHealthChecks); - this.logger.trace("Elasticsearch is healthy."); + this.logger.info("Elasticsearch is healthy."); await waitUntilHealthy.wait(); const indexes = await esListIndexes({ elasticsearchClient, match: "-headless-cms-" }); const indexSettings: Record = {}; for (const indexName of indexes) { - this.logger.trace(`Disabling indexing for Elasticsearch index "${indexName}"...`); + this.logger.info(`Disabling indexing for Elasticsearch index "${indexName}"...`); indexSettings[indexName] = await fetchOriginalElasticsearchSettings({ elasticsearchClient, index: indexName, @@ -81,11 +98,12 @@ export class Migration { }); } - this.logger.trace("Proceeding with the migration..."); + this.logger.info("Proceeding with the migration..."); for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { const segmentProcessor = new SegmentProcessor({ segmentIndex, + runId: this.runId, totalSegments: this.totalSegments, ddbTable: this.ddbTable, ddbEsTable: this.ddbEsTable, @@ -98,13 +116,62 @@ export class Migration { await Promise.all(scanProcessesPromises); - this.logger.trace("Restoring original Elasticsearch settings..."); + this.logger.info("Restoring original Elasticsearch settings..."); await restoreOriginalElasticsearchSettings({ elasticsearchClient, indexSettings, logger: this.logger }); - this.logger.trace(`5.39.6-001 migration completed in ${getDuration()}s.`); + const duration = getDuration(); + this.logger.info(`5.39.6-001 migration completed in ${duration}s, here are the results...`); + + // Wait for 1 second. + await new Promise(resolve => setTimeout(resolve, 1000)); + + this.logger.info( + { + totalSegments: this.totalSegments, + esHealthChecks: this.esHealthChecks + }, + "The migration was performed with the following following parameters:" + ); + + // Pickup all log files and print a summary of the migration. + const logFilePaths = await glob( + path.join(os.tmpdir(), `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}-*.log`) + ); + + const migrationStats = { + iterationsCount: 0, + avgIterationDuration: 0, + recordsScanned: 0, + avgRecordsScannedPerIteration: 0, + recordsScannedPerSecond: 0, + recordsUpdated: 0, + recordsSkipped: 0 + }; + + for (const logFilePath of logFilePaths) { + const logFileContent = fs.readFileSync(logFilePath, "utf-8"); + const logFile = JSON.parse(logFileContent); + + migrationStats.iterationsCount += logFile.iterationsCount; + migrationStats.recordsScanned += logFile.recordsScanned; + migrationStats.recordsUpdated += logFile.recordsUpdated; + migrationStats.recordsSkipped += logFile.recordsSkipped; + } + + migrationStats.avgIterationDuration = duration / migrationStats.iterationsCount; + + migrationStats.avgRecordsScannedPerIteration = + migrationStats.recordsScanned / migrationStats.iterationsCount; + + migrationStats.recordsScannedPerSecond = migrationStats.recordsScanned / duration; + + this.logger.info( + migrationStats, + `Migration summary (based on ${logFilePaths.length} generated logs):` + ); } } diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts index 3526aac2ce0..7199d35cf3b 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts @@ -1,8 +1,9 @@ import execa from "execa"; import path from "path"; -import {EsHealthChecksParams} from "~/migrations/5.39.6/001/ddb-es/utils"; +import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; interface SegmentProcessorParams { + runId: string; ddbTable: string; ddbEsTable: string; esEndpoint: string; @@ -12,6 +13,7 @@ interface SegmentProcessorParams { } export class SegmentProcessor { + private readonly runId: string; private readonly ddbTable: string; private readonly ddbEsTable: string; private readonly esEndpoint: string; @@ -20,6 +22,7 @@ export class SegmentProcessor { private readonly esHealthChecks: EsHealthChecksParams; constructor(params: SegmentProcessorParams) { + this.runId = params.runId; this.ddbTable = params.ddbTable; this.ddbEsTable = params.ddbEsTable; this.esEndpoint = params.esEndpoint; @@ -33,6 +36,8 @@ export class SegmentProcessor { "node", [ path.join(__dirname, "worker"), + "--runId", + this.runId, "--ddbTable", this.ddbTable, "--ddbEsTable", diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts new file mode 100644 index 00000000000..ba2c0900205 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts @@ -0,0 +1,91 @@ +import { CliContext } from "@webiny/cli/types"; +import { getStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; +import { MetaFieldsMigrationParams, Migration } from "~/migrations/5.39.6/001/ddb-es/Migration"; + +interface CoreOutput { + primaryDynamodbTableName: string; + elasticsearchDynamodbTableName: string; + elasticsearchDomainEndpoint: string; +} + +const REQUIRED_AWS_ENV_VARS = [ + "AWS_REGION", + "AWS_ACCESS_KEY_ID", + "AWS_SECRET_ACCESS_KEY", + "AWS_SESSION_TOKEN" +]; + +const ensureAwsEnvVars = () => { + const missingAwsEnvVars = []; + for (const variable of REQUIRED_AWS_ENV_VARS) { + if (!process.env[variable]) { + missingAwsEnvVars.push(variable); + } + } + + if (missingAwsEnvVars.length > 0) { + throw new Error( + `Cannot run 5.39.6 meta fields data migration. Missing required environment variables: ${missingAwsEnvVars.join( + ", " + )}.` + ); + } +}; + +/** + * Creates an after-deployment hook that triggers the meta fields data migration. + * @param params + */ +export const createMetaFieldsDataMigrationDeploymentHook = ( + params: Pick +) => { + return { + type: "hook-after-deploy", + name: "hook-after-deploy-api-run-5-39-6-meta-fields-data-migrations", + async hook({ inputs, env, projectApplication }: Record, context: CliContext) { + // Only run migrations for `api` app + if (projectApplication.id !== "api") { + return; + } + + // No need to run migrations if we're doing a preview. + if (inputs.preview) { + return; + } + + if (process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS !== "true") { + context.info( + `Skipping meta fields data migration. Set %s to %s to enable.`, + "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", + "true" + ); + return; + } + + ensureAwsEnvVars(); + + const coreOutput = getStackOutput({ folder: "apps/core", env }); + + context.info("Executing 5.39.6-001 meta fields data migration..."); + + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const migration = new Migration({ + ddbTable: coreOutput.primaryDynamodbTableName, + ddbEsTable: coreOutput.elasticsearchDynamodbTableName, + esEndpoint: coreOutput.elasticsearchDomainEndpoint, + ...params, + logger + }); + + await migration.execute(); + } + }; +}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts index 0fe29aec3fb..08d64058d51 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts @@ -7,8 +7,8 @@ export type EsHealthChecksParams = Required; export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, - maxProcessorPercent: 80, + maxProcessorPercent: 90, maxRamPercent: 100, maxWaitingTime: 90, - waitingTimeStep: 3 + waitingTimeStep: 2 }; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index 08aba503b9e..2ca18bf3b2b 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -31,9 +31,13 @@ import { import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; import pinoPretty from "pino-pretty"; import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; +import path from "path"; +import os from "os"; +import fs from "fs"; const argv = yargs(hideBin(process.argv)) .options({ + runId: { type: "string", demandOption: true }, ddbTable: { type: "string", demandOption: true }, ddbEsTable: { type: "string", demandOption: true }, esEndpoint: { type: "string", demandOption: true }, @@ -60,10 +64,12 @@ type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; interface MigrationStatus { lastEvaluatedKey: LastEvaluatedKey; - iterationsCount: number; - recordsScanned: number; - recordsUpdated: number; - recordsSkipped: number; + stats: { + iterationsCount: number; + recordsScanned: number; + recordsUpdated: number; + recordsSkipped: number; + }; } interface DynamoDbElasticsearchRecord { @@ -75,10 +81,12 @@ interface DynamoDbElasticsearchRecord { const createInitialStatus = (): MigrationStatus => { return { lastEvaluatedKey: null, - iterationsCount: 0, - recordsScanned: 0, - recordsUpdated: 0, - recordsSkipped: 0 + stats: { + iterationsCount: 0, + recordsScanned: 0, + recordsUpdated: 0, + recordsSkipped: 0 + } }; }; @@ -136,10 +144,14 @@ const createInitialStatus = (): MigrationStatus => { } }, async result => { - status.iterationsCount++; - status.recordsScanned += result.items.length; + status.stats.iterationsCount++; + status.stats.recordsScanned += result.items.length; + + if (status.stats.iterationsCount % 5 === 0) { + // We log every 5th iteration. + logger.trace(`[iteration #${status.stats.iterationsCount}] Reading ${result.items.length} record(s)...`); + } - logger.trace(`Reading ${result.items.length} record(s)...`); const ddbItemsToBatchWrite: BatchWriteItem[] = []; const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; const ddbEsItemsToBatchRead: Record = {}; @@ -155,7 +167,7 @@ const createInitialStatus = (): MigrationStatus => { hasAllNonNullableValues(item); if (isFullyMigrated) { - status.recordsSkipped++; + status.stats.recordsSkipped++; continue; } @@ -373,7 +385,7 @@ const createInitialStatus = (): MigrationStatus => { }); } - status.recordsUpdated += ddbItemsToBatchWrite.length; + status.stats.recordsUpdated += ddbItemsToBatchWrite.length; } // Update checkpoint after every batch. @@ -393,5 +405,15 @@ const createInitialStatus = (): MigrationStatus => { } ); - logger.trace({ status }, "Segment processing completed."); + // Store status in tmp file. + logger.trace({ status }, "Segment processing completed. Saving status to tmp file..."); + const logFilePath = path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${argv.runId}-${argv.segmentIndex}.log` + ); + + // Save segment processing stats to a file. + fs.writeFileSync(logFilePath, JSON.stringify(status.stats, null, 2)); + + logger.trace(`Segment processing stats saved in ${logFilePath}.`); })(); From 3e1eb41c7956bdbbc5f03555d3b2c6a1d4999770 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 24 May 2024 14:10:07 +0200 Subject: [PATCH 16/56] fix: update deps --- packages/migrations/package.json | 6 +++++- .../src/migrations/5.39.6/001/ddb-es/Migration.ts | 5 ++++- .../ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts | 2 +- .../5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts | 4 ++-- .../migrations/src/migrations/5.39.6/001/ddb-es/worker.ts | 4 +++- yarn.lock | 4 ++++ 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 21eb15150de..d9fb975aa62 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -10,6 +10,7 @@ "@elastic/elasticsearch": "7.12.0", "@webiny/api-elasticsearch": "0.0.0", "@webiny/aws-sdk": "0.0.0", + "@webiny/cli-plugin-deploy-pulumi": "0.0.0", "@webiny/data-migration": "0.0.0", "@webiny/db-dynamodb": "0.0.0", "@webiny/error": "0.0.0", @@ -17,9 +18,12 @@ "@webiny/logger": "0.0.0", "@webiny/utils": "0.0.0", "execa": "^5.0.0", + "fast-glob": "^3.2.7", "jsonpack": "^1.1.5", "lodash": "^4.17.21", - "pluralize": "^8.0.0" + "pino-pretty": "^9.4.0", + "pluralize": "^8.0.0", + "yargs": "^17.4.0" }, "publishConfig": { "access": "public", diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts index 04b83485792..2aa386d813e 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts @@ -139,7 +139,10 @@ export class Migration { // Pickup all log files and print a summary of the migration. const logFilePaths = await glob( - path.join(os.tmpdir(), `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}-*.log`) + path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}-*.log` + ) ); const migrationStats = { diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts index a8dada8f631..783a32c886f 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts @@ -39,6 +39,6 @@ export class SegmentProcessor { stdio: "inherit", env: process.env } - ) + ); } } diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts index 57863c11f36..06815f6681e 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts @@ -125,7 +125,7 @@ const createInitialStatus = (): MigrationStatus => { } if (Object.keys(ddbEsItemsToPutIntoBatchDelete).length > 0) { - Object.values(ddbEsItemsToPutIntoBatchDelete).forEach((item) => { + Object.values(ddbEsItemsToPutIntoBatchDelete).forEach(item => { ddbEsItemsToBatchDelete.push(ddbEsEntryEntity.deleteBatch(item)); }); } @@ -135,7 +135,7 @@ const createInitialStatus = (): MigrationStatus => { const execute = () => { return batchWriteAll({ table: ddbEntryEntity.table, - items: ddbItemsToBatchDelete, + items: ddbItemsToBatchDelete }); }; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index 2ca18bf3b2b..bbc13c15970 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -149,7 +149,9 @@ const createInitialStatus = (): MigrationStatus => { if (status.stats.iterationsCount % 5 === 0) { // We log every 5th iteration. - logger.trace(`[iteration #${status.stats.iterationsCount}] Reading ${result.items.length} record(s)...`); + logger.trace( + `[iteration #${status.stats.iterationsCount}] Reading ${result.items.length} record(s)...` + ); } const ddbItemsToBatchWrite: BatchWriteItem[] = []; diff --git a/yarn.lock b/yarn.lock index f068b909a7e..45cde35899f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18442,6 +18442,7 @@ __metadata: "@webiny/api-headless-cms-ddb-es": 0.0.0 "@webiny/aws-sdk": 0.0.0 "@webiny/cli": 0.0.0 + "@webiny/cli-plugin-deploy-pulumi": 0.0.0 "@webiny/data-migration": 0.0.0 "@webiny/db-dynamodb": 0.0.0 "@webiny/error": 0.0.0 @@ -18453,12 +18454,15 @@ __metadata: "@webiny/utils": 0.0.0 elastic-ts: ^0.8.0 execa: ^5.0.0 + fast-glob: ^3.2.7 jest-dynalite: ^3.2.0 jsonpack: ^1.1.5 lodash: ^4.17.21 + pino-pretty: ^9.4.0 pluralize: ^8.0.0 ttypescript: ^1.5.13 typescript: 4.7.4 + yargs: ^17.4.0 languageName: unknown linkType: soft From 284101d32fc87ce5d04f172b7e95096a0257a6a8 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 24 May 2024 14:11:28 +0200 Subject: [PATCH 17/56] fix: rename class --- .../001/ddb-es/{Migration.ts => MetaFieldsMigration.ts} | 2 +- packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts | 4 ++-- .../001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{Migration.ts => MetaFieldsMigration.ts} (99%) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts similarity index 99% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts index 2aa386d813e..b83a93a973a 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/Migration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts @@ -28,7 +28,7 @@ export interface MetaFieldsMigrationParams { esHealthChecks?: Partial; } -export class Migration { +export class MetaFieldsMigration { private readonly runId: string; private readonly ddbTable: string; private readonly ddbEsTable: string; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts index 5a3d0049b58..f70fc2efe4d 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts @@ -1,7 +1,7 @@ #!/usr/bin/env node import yargs from "yargs/yargs"; import { hideBin } from "yargs/helpers"; -import { Migration } from "./Migration"; +import { MetaFieldsMigration } from "./MetaFieldsMigration"; import { createPinoLogger, getLogLevel } from "@webiny/logger"; import pinoPretty from "pino-pretty"; import { @@ -58,7 +58,7 @@ const argv = yargs(hideBin(process.argv)) pinoPretty({ ignore: "pid,hostname" }) ); - const migration = new Migration({ + const migration = new MetaFieldsMigration({ totalSegments: argv.segments, ddbTable: argv.ddbTable, ddbEsTable: argv.ddbEsTable, diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts index ba2c0900205..57ff4fbafd2 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts @@ -2,7 +2,7 @@ import { CliContext } from "@webiny/cli/types"; import { getStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils"; import { createPinoLogger, getLogLevel } from "@webiny/logger"; import pinoPretty from "pino-pretty"; -import { MetaFieldsMigrationParams, Migration } from "~/migrations/5.39.6/001/ddb-es/Migration"; +import { MetaFieldsMigrationParams, MetaFieldsMigration } from "~/migrations/5.39.6/001/ddb-es/MetaFieldsMigration"; interface CoreOutput { primaryDynamodbTableName: string; @@ -77,7 +77,7 @@ export const createMetaFieldsDataMigrationDeploymentHook = ( pinoPretty({ ignore: "pid,hostname" }) ); - const migration = new Migration({ + const migration = new MetaFieldsMigration({ ddbTable: coreOutput.primaryDynamodbTableName, ddbEsTable: coreOutput.elasticsearchDynamodbTableName, esEndpoint: coreOutput.elasticsearchDomainEndpoint, From 6f7b9d499fb9fe87fddc4aefcb7b98c46462d2b9 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 24 May 2024 14:17:53 +0200 Subject: [PATCH 18/56] fix: rename class --- .../ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts index 57ff4fbafd2..7d2374cb712 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts @@ -2,7 +2,10 @@ import { CliContext } from "@webiny/cli/types"; import { getStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils"; import { createPinoLogger, getLogLevel } from "@webiny/logger"; import pinoPretty from "pino-pretty"; -import { MetaFieldsMigrationParams, MetaFieldsMigration } from "~/migrations/5.39.6/001/ddb-es/MetaFieldsMigration"; +import { + MetaFieldsMigrationParams, + MetaFieldsMigration +} from "~/migrations/5.39.6/001/ddb-es/MetaFieldsMigration"; interface CoreOutput { primaryDynamodbTableName: string; From 3aafac3dea1678496b2200bfb304db464ff4ecef Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 24 May 2024 15:09:22 +0200 Subject: [PATCH 19/56] fix: remove testing script --- .../DeleteAllCmsEntries.ts | 47 ----- .../deleteAllCmsEntries/SegmentProcessor.ts | 44 ---- .../ddb-es/utils/deleteAllCmsEntries/bin.ts | 32 --- .../utils/deleteAllCmsEntries/worker.ts | 196 ------------------ 4 files changed, 319 deletions(-) delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts deleted file mode 100644 index 7d05ac4e85b..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Logger } from "@webiny/logger"; -import { SegmentProcessor } from "./SegmentProcessor"; - -interface SegmentProcessorParams { - ddbTable: string; - ddbEsTable: string; - totalSegments: number; - logger: Logger; -} - -export class DeleteAllCmsEntries { - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly totalSegments: number; - private readonly logger: Logger; - - constructor(params: SegmentProcessorParams) { - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.totalSegments = params.totalSegments; - this.logger = params.logger; - } - - async execute() { - const scanProcessesPromises = []; - - const start = Date.now(); - const getDuration = () => { - return (Date.now() - start) / 1000; - }; - - for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { - const segmentProcessor = new SegmentProcessor({ - segmentIndex, - totalSegments: this.totalSegments, - ddbTable: this.ddbTable, - ddbEsTable: this.ddbEsTable - }); - - scanProcessesPromises.push(segmentProcessor.execute()); - } - - await Promise.all(scanProcessesPromises); - - this.logger.trace(`All CMS entries have been deleted. Took: ${getDuration()}s`); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts deleted file mode 100644 index 783a32c886f..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts +++ /dev/null @@ -1,44 +0,0 @@ -import execa from "execa"; -import path from "path"; - -interface SegmentProcessorParams { - ddbTable: string; - ddbEsTable: string; - segmentIndex: number; - totalSegments: number; -} - -export class SegmentProcessor { - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly segmentIndex: number; - private readonly totalSegments: number; - - constructor(params: SegmentProcessorParams) { - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.segmentIndex = params.segmentIndex; - this.totalSegments = params.totalSegments; - } - - async execute() { - return execa( - "node", - [ - path.join(__dirname, "worker"), - "--ddbTable", - this.ddbTable, - "--ddbEsTable", - this.ddbEsTable, - "--segmentIndex", - String(this.segmentIndex), - "--totalSegments", - String(this.totalSegments) - ], - { - stdio: "inherit", - env: process.env - } - ); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts deleted file mode 100644 index 344ec0adba3..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { DeleteAllCmsEntries } from "./DeleteAllCmsEntries"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import pinoPretty from "pino-pretty"; - -const argv = yargs(hideBin(process.argv)) - .options({ - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - segments: { type: "number", demandOption: true } - }) - .parseSync(); - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const deleteAllCmsEntries = new DeleteAllCmsEntries({ - totalSegments: argv.segments, - ddbTable: argv.ddbTable, - ddbEsTable: argv.ddbEsTable, - logger - }); - - await deleteAllCmsEntries.execute(); -})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts deleted file mode 100644 index 06815f6681e..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts +++ /dev/null @@ -1,196 +0,0 @@ -import { executeWithRetry } from "@webiny/utils"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import { createTable } from "@webiny/data-migration"; -import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { CmsEntry } from "~/migrations/5.39.0/001/types"; -import { - createDdbEntryEntity, - createDdbEsEntryEntity -} from "~/migrations/5.39.0/001/entities/createEntryEntity"; -import { batchWriteAll, BatchWriteItem, ddbScanWithCallback } from "~/utils"; -import pinoPretty from "pino-pretty"; - -const argv = yargs(hideBin(process.argv)) - .options({ - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - segmentIndex: { type: "number", demandOption: true }, - totalSegments: { type: "number", demandOption: true } - }) - .parseSync(); - -interface LastEvaluatedKeyObject { - PK: string; - SK: string; - GSI1_PK: string; - GSI1_SK: string; -} - -type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; - -interface MigrationStatus { - lastEvaluatedKey: LastEvaluatedKey; - iterationsCount: number; - recordsScanned: number; - recordsUpdated: number; - recordsSkipped: number; -} - -const createInitialStatus = (): MigrationStatus => { - return { - lastEvaluatedKey: null, - iterationsCount: 0, - recordsScanned: 0, - recordsUpdated: 0, - recordsSkipped: 0 - }; -}; - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), - msgPrefix: `[segment #${argv.segmentIndex}] ` - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const documentClient = getDocumentClient(); - - const primaryTable = createTable({ - name: argv.ddbTable, - documentClient - }); - const dynamoToEsTable = createTable({ - name: argv.ddbEsTable, - documentClient - }); - - const ddbEntryEntity = createDdbEntryEntity(primaryTable); - const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); - - const status = createInitialStatus(); - - await ddbScanWithCallback( - { - entity: ddbEntryEntity, - options: { - segment: argv.segmentIndex, - segments: argv.totalSegments, - filters: [ - { - attr: "_et", - eq: "CmsEntries" - } - ], - startKey: status.lastEvaluatedKey || undefined, - limit: 100 - } - }, - async result => { - status.iterationsCount++; - status.recordsScanned += result.items.length; - - logger.trace(`Reading ${result.items.length} record(s)...`); - const ddbItemsToBatchDelete: BatchWriteItem[] = []; - const ddbEsItemsToBatchDelete: BatchWriteItem[] = []; - const ddbEsItemsToPutIntoBatchDelete: Record = {}; - - for (const item of result.items) { - ddbItemsToBatchDelete.push(ddbEntryEntity.deleteBatch(item)); - - /** - * Prepare the loading of DynamoDB Elasticsearch part of the records. - */ - - const ddbEsLatestRecordKey = `${item.entryId}:L`; - if (ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey]) { - continue; - } - - ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey] = { - PK: item.PK, - SK: "L" - }; - - const ddbEsPublishedRecordKey = `${item.entryId}:P`; - if (item.status === "published" || !!item.locked) { - ddbEsItemsToPutIntoBatchDelete[ddbEsPublishedRecordKey] = { - PK: item.PK, - SK: "P" - }; - } - } - - if (Object.keys(ddbEsItemsToPutIntoBatchDelete).length > 0) { - Object.values(ddbEsItemsToPutIntoBatchDelete).forEach(item => { - ddbEsItemsToBatchDelete.push(ddbEsEntryEntity.deleteBatch(item)); - }); - } - - if (ddbItemsToBatchDelete.length) { - // Store data in primary DynamoDB table. - const execute = () => { - return batchWriteAll({ - table: ddbEntryEntity.table, - items: ddbItemsToBatchDelete - }); - }; - - logger.trace( - `Deleting ${ddbItemsToBatchDelete.length} record(s) in primary DynamoDB table...` - ); - await executeWithRetry(execute, { - onFailedAttempt: error => { - logger.warn( - `Batch delete attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - - if (ddbEsItemsToBatchDelete.length) { - logger.trace( - `Deleting ${ddbEsItemsToBatchDelete.length} record(s) in DDB-ES DynamoDB table...` - ); - - // Store data in DDB-ES DynamoDB table. - const executeDdbEs = () => { - return batchWriteAll({ - table: ddbEsEntryEntity.table, - items: ddbEsItemsToBatchDelete - }); - }; - - await executeWithRetry(executeDdbEs, { - onFailedAttempt: error => { - logger.warn( - `[DDB-ES Table] Batch delete attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - } - - status.recordsUpdated += ddbItemsToBatchDelete.length; - } - - // Update checkpoint after every batch. - let lastEvaluatedKey: LastEvaluatedKey = true; - if (result.lastEvaluatedKey) { - lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; - } - - status.lastEvaluatedKey = lastEvaluatedKey; - - if (lastEvaluatedKey === true) { - return false; - } - - // Continue further scanning. - return true; - } - ); - - logger.trace({ status }, "Segment processing completed."); -})(); From 9463bb969872b21e4fb9832fb000457ab7ff720b Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 29 May 2024 11:46:43 +0200 Subject: [PATCH 20/56] chore: temporary push delete script --- .../DeleteAllCmsEntries.ts | 47 +++++ .../deleteAllCmsEntries/SegmentProcessor.ts | 44 ++++ .../ddb-es/utils/deleteAllCmsEntries/bin.ts | 32 +++ .../utils/deleteAllCmsEntries/worker.ts | 196 ++++++++++++++++++ 4 files changed, 319 insertions(+) create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts new file mode 100644 index 00000000000..7d05ac4e85b --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts @@ -0,0 +1,47 @@ +import { Logger } from "@webiny/logger"; +import { SegmentProcessor } from "./SegmentProcessor"; + +interface SegmentProcessorParams { + ddbTable: string; + ddbEsTable: string; + totalSegments: number; + logger: Logger; +} + +export class DeleteAllCmsEntries { + private readonly ddbTable: string; + private readonly ddbEsTable: string; + private readonly totalSegments: number; + private readonly logger: Logger; + + constructor(params: SegmentProcessorParams) { + this.ddbTable = params.ddbTable; + this.ddbEsTable = params.ddbEsTable; + this.totalSegments = params.totalSegments; + this.logger = params.logger; + } + + async execute() { + const scanProcessesPromises = []; + + const start = Date.now(); + const getDuration = () => { + return (Date.now() - start) / 1000; + }; + + for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { + const segmentProcessor = new SegmentProcessor({ + segmentIndex, + totalSegments: this.totalSegments, + ddbTable: this.ddbTable, + ddbEsTable: this.ddbEsTable + }); + + scanProcessesPromises.push(segmentProcessor.execute()); + } + + await Promise.all(scanProcessesPromises); + + this.logger.trace(`All CMS entries have been deleted. Took: ${getDuration()}s`); + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts new file mode 100644 index 00000000000..783a32c886f --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts @@ -0,0 +1,44 @@ +import execa from "execa"; +import path from "path"; + +interface SegmentProcessorParams { + ddbTable: string; + ddbEsTable: string; + segmentIndex: number; + totalSegments: number; +} + +export class SegmentProcessor { + private readonly ddbTable: string; + private readonly ddbEsTable: string; + private readonly segmentIndex: number; + private readonly totalSegments: number; + + constructor(params: SegmentProcessorParams) { + this.ddbTable = params.ddbTable; + this.ddbEsTable = params.ddbEsTable; + this.segmentIndex = params.segmentIndex; + this.totalSegments = params.totalSegments; + } + + async execute() { + return execa( + "node", + [ + path.join(__dirname, "worker"), + "--ddbTable", + this.ddbTable, + "--ddbEsTable", + this.ddbEsTable, + "--segmentIndex", + String(this.segmentIndex), + "--totalSegments", + String(this.totalSegments) + ], + { + stdio: "inherit", + env: process.env + } + ); + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts new file mode 100644 index 00000000000..344ec0adba3 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts @@ -0,0 +1,32 @@ +#!/usr/bin/env node +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { DeleteAllCmsEntries } from "./DeleteAllCmsEntries"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; + +const argv = yargs(hideBin(process.argv)) + .options({ + ddbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + segments: { type: "number", demandOption: true } + }) + .parseSync(); + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const deleteAllCmsEntries = new DeleteAllCmsEntries({ + totalSegments: argv.segments, + ddbTable: argv.ddbTable, + ddbEsTable: argv.ddbEsTable, + logger + }); + + await deleteAllCmsEntries.execute(); +})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts new file mode 100644 index 00000000000..06815f6681e --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts @@ -0,0 +1,196 @@ +import { executeWithRetry } from "@webiny/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import { createTable } from "@webiny/data-migration"; +import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { CmsEntry } from "~/migrations/5.39.0/001/types"; +import { + createDdbEntryEntity, + createDdbEsEntryEntity +} from "~/migrations/5.39.0/001/entities/createEntryEntity"; +import { batchWriteAll, BatchWriteItem, ddbScanWithCallback } from "~/utils"; +import pinoPretty from "pino-pretty"; + +const argv = yargs(hideBin(process.argv)) + .options({ + ddbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + segmentIndex: { type: "number", demandOption: true }, + totalSegments: { type: "number", demandOption: true } + }) + .parseSync(); + +interface LastEvaluatedKeyObject { + PK: string; + SK: string; + GSI1_PK: string; + GSI1_SK: string; +} + +type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; + +interface MigrationStatus { + lastEvaluatedKey: LastEvaluatedKey; + iterationsCount: number; + recordsScanned: number; + recordsUpdated: number; + recordsSkipped: number; +} + +const createInitialStatus = (): MigrationStatus => { + return { + lastEvaluatedKey: null, + iterationsCount: 0, + recordsScanned: 0, + recordsUpdated: 0, + recordsSkipped: 0 + }; +}; + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), + msgPrefix: `[segment #${argv.segmentIndex}] ` + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const documentClient = getDocumentClient(); + + const primaryTable = createTable({ + name: argv.ddbTable, + documentClient + }); + const dynamoToEsTable = createTable({ + name: argv.ddbEsTable, + documentClient + }); + + const ddbEntryEntity = createDdbEntryEntity(primaryTable); + const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); + + const status = createInitialStatus(); + + await ddbScanWithCallback( + { + entity: ddbEntryEntity, + options: { + segment: argv.segmentIndex, + segments: argv.totalSegments, + filters: [ + { + attr: "_et", + eq: "CmsEntries" + } + ], + startKey: status.lastEvaluatedKey || undefined, + limit: 100 + } + }, + async result => { + status.iterationsCount++; + status.recordsScanned += result.items.length; + + logger.trace(`Reading ${result.items.length} record(s)...`); + const ddbItemsToBatchDelete: BatchWriteItem[] = []; + const ddbEsItemsToBatchDelete: BatchWriteItem[] = []; + const ddbEsItemsToPutIntoBatchDelete: Record = {}; + + for (const item of result.items) { + ddbItemsToBatchDelete.push(ddbEntryEntity.deleteBatch(item)); + + /** + * Prepare the loading of DynamoDB Elasticsearch part of the records. + */ + + const ddbEsLatestRecordKey = `${item.entryId}:L`; + if (ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey]) { + continue; + } + + ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey] = { + PK: item.PK, + SK: "L" + }; + + const ddbEsPublishedRecordKey = `${item.entryId}:P`; + if (item.status === "published" || !!item.locked) { + ddbEsItemsToPutIntoBatchDelete[ddbEsPublishedRecordKey] = { + PK: item.PK, + SK: "P" + }; + } + } + + if (Object.keys(ddbEsItemsToPutIntoBatchDelete).length > 0) { + Object.values(ddbEsItemsToPutIntoBatchDelete).forEach(item => { + ddbEsItemsToBatchDelete.push(ddbEsEntryEntity.deleteBatch(item)); + }); + } + + if (ddbItemsToBatchDelete.length) { + // Store data in primary DynamoDB table. + const execute = () => { + return batchWriteAll({ + table: ddbEntryEntity.table, + items: ddbItemsToBatchDelete + }); + }; + + logger.trace( + `Deleting ${ddbItemsToBatchDelete.length} record(s) in primary DynamoDB table...` + ); + await executeWithRetry(execute, { + onFailedAttempt: error => { + logger.warn( + `Batch delete attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + + if (ddbEsItemsToBatchDelete.length) { + logger.trace( + `Deleting ${ddbEsItemsToBatchDelete.length} record(s) in DDB-ES DynamoDB table...` + ); + + // Store data in DDB-ES DynamoDB table. + const executeDdbEs = () => { + return batchWriteAll({ + table: ddbEsEntryEntity.table, + items: ddbEsItemsToBatchDelete + }); + }; + + await executeWithRetry(executeDdbEs, { + onFailedAttempt: error => { + logger.warn( + `[DDB-ES Table] Batch delete attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + } + + status.recordsUpdated += ddbItemsToBatchDelete.length; + } + + // Update checkpoint after every batch. + let lastEvaluatedKey: LastEvaluatedKey = true; + if (result.lastEvaluatedKey) { + lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; + } + + status.lastEvaluatedKey = lastEvaluatedKey; + + if (lastEvaluatedKey === true) { + return false; + } + + // Continue further scanning. + return true; + } + ); + + logger.trace({ status }, "Segment processing completed."); +})(); From 5b63430866406a06386a4991c9c13f1696ca5209 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 29 May 2024 13:59:52 +0200 Subject: [PATCH 21/56] chore: add ES health checks stats --- .../5.39.6/001/ddb-es/MetaFieldsMigration.ts | 35 ++++++++++++++++++- .../migrations/5.39.6/001/ddb-es/worker.ts | 29 +++++++++++++-- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts index b83a93a973a..ebc6da923ef 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts @@ -152,7 +152,12 @@ export class MetaFieldsMigration { avgRecordsScannedPerIteration: 0, recordsScannedPerSecond: 0, recordsUpdated: 0, - recordsSkipped: 0 + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} as Record + } }; for (const logFilePath of logFilePaths) { @@ -163,6 +168,24 @@ export class MetaFieldsMigration { migrationStats.recordsScanned += logFile.recordsScanned; migrationStats.recordsUpdated += logFile.recordsUpdated; migrationStats.recordsSkipped += logFile.recordsSkipped; + + migrationStats.esHealthChecks.timeSpentWaiting += + logFile.esHealthChecks.timeSpentWaiting; + migrationStats.esHealthChecks.checksCount += logFile.esHealthChecks.checksCount; + + for (const unhealthyReasonType in logFile.esHealthChecks.unhealthyReasons) { + if (!logFile.esHealthChecks.unhealthyReasons.hasOwnProperty(unhealthyReasonType)) { + continue; + } + + if (!migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType]) { + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] = + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } + + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] += + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } } migrationStats.avgIterationDuration = duration / migrationStats.iterationsCount; @@ -176,5 +199,15 @@ export class MetaFieldsMigration { migrationStats, `Migration summary (based on ${logFilePaths.length} generated logs):` ); + + const logFilePath = path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}.log` + ); + + // Save segment processing stats to a file. + fs.writeFileSync(logFilePath, JSON.stringify(migrationStats, null, 2)); + this.logger.trace(`Migration summary saved to "${logFilePath}".`); + } } diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index bbc13c15970..4973ea0c86b 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -69,6 +69,13 @@ interface MigrationStatus { recordsScanned: number; recordsUpdated: number; recordsSkipped: number; + esHealthChecks: { + timeSpentWaiting: number; + checksCount: number; + unhealthyReasons: { + [key: string]: number; + }; + }; }; } @@ -85,7 +92,12 @@ const createInitialStatus = (): MigrationStatus => { iterationsCount: 0, recordsScanned: 0, recordsUpdated: 0, - recordsSkipped: 0 + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} + } } }; }; @@ -361,15 +373,26 @@ const createInitialStatus = (): MigrationStatus => { logger.trace( `Storing ${ddbEsItemsToBatchWrite.length} record(s) in DDB-ES DynamoDB table...` ); - await waitUntilHealthy.wait({ + const results = await waitUntilHealthy.wait({ async onUnhealthy(params) { + const shouldWaitReason = params.shouldWaitReason || "unknown"; + logger.warn( - `Cluster is unhealthy (${params.shouldWaitReason}). Waiting for the cluster to become healthy...`, + `Cluster is unhealthy (${shouldWaitReason}). Waiting for the cluster to become healthy...`, params ); + + if (status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]) { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]++; + } else { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason] = 1; + } } }); + status.stats.esHealthChecks.checksCount++; + status.stats.esHealthChecks.timeSpentWaiting += results.runningTime; + // Store data in DDB-ES DynamoDB table. const executeDdbEs = () => { return batchWriteAll({ From ed4a7dd824faddff863a47167f0d3054e43cff64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Mon, 3 Jun 2024 14:09:57 +0200 Subject: [PATCH 22/56] fix(api-headless-cms): mock data generator (#4147) --- packages/api-background-tasks-es/package.json | 1 + packages/api-background-tasks-es/src/index.ts | 4 +- .../tsconfig.build.json | 1 + .../api-background-tasks-es/tsconfig.json | 3 + packages/api-background-tasks-os/package.json | 1 + packages/api-background-tasks-os/src/index.ts | 4 +- .../tsconfig.build.json | 1 + .../api-background-tasks-os/tsconfig.json | 3 + .../src/NotEnoughRemainingTimeError.ts | 3 + .../src/index.ts | 328 +- .../__tests__/utils/waitUntilHealthy.test.ts | 20 +- packages/api-elasticsearch/src/client.ts | 2 +- .../api-elasticsearch/src/operations/types.ts | 4 +- packages/api-elasticsearch/src/utils/index.ts | 1 + .../waitUntilHealthy/WaitUntilHealthy.ts | 93 +- .../src/utils/waitUntilHealthy/index.ts | 3 + .../reason/ClusterHealthReason.ts | 27 + .../utils/waitUntilHealthy/reason/IReason.ts | 4 + .../waitUntilHealthy/reason/MemoryReason.ts | 24 + .../reason/ProcessorReason.ts | 24 + .../utils/waitUntilHealthy/reason/index.ts | 3 + .../api-headless-cms-es-tasks/.babelrc.js | 1 + packages/api-headless-cms-es-tasks/LICENSE | 21 + packages/api-headless-cms-es-tasks/README.md | 15 + .../__tests__/context/helpers.ts | 90 + .../__tests__/context/plugins.ts | 107 + .../__tests__/context/tenancySecurity.ts | 102 + .../__tests__/context/useHandler.ts | 51 + .../__tests__/graphql/examples.graphql | 68 + .../MockDataManager/calculateAmounts.test.ts | 155 + .../MockDataManager/calculateSeconds.test.ts | 63 + .../tasks/mockDataCreatorTask.test.ts | 63 + .../tasks/mockDataManagerTask.test.ts | 65 + .../api-headless-cms-es-tasks/jest.setup.js | 12 + .../api-headless-cms-es-tasks/package.json | 49 + .../api-headless-cms-es-tasks/src/index.ts | 10 + .../tasks/MockDataCreator/MockDataCreator.ts | 109 + .../src/tasks/MockDataCreator/mockData.ts | 1361 ++++ .../src/tasks/MockDataCreator/types.ts | 8 + .../tasks/MockDataManager/MockDataManager.ts | 115 + .../tasks/MockDataManager/calculateAmounts.ts | 73 + .../tasks/MockDataManager/calculateSeconds.ts | 15 + .../src/tasks/MockDataManager/constants.ts | 1 + .../MockDataManager/createModelAndGroup.ts | 44 + .../src/tasks/MockDataManager/group.ts | 11 + .../src/tasks/MockDataManager/model.ts | 5549 +++++++++++++++++ .../src/tasks/MockDataManager/types.ts | 12 + .../src/tasks/createMockDataCreatorTask.ts | 30 + .../src/tasks/createMockDataManagerTask.ts | 58 + .../api-headless-cms-es-tasks/src/types.ts | 7 + .../src/utils/disableIndexing.ts | 31 + .../src/utils/enableIndexing.ts | 29 + .../src/utils/index.ts | 2 + .../tsconfig.build.json | 27 + .../api-headless-cms-es-tasks/tsconfig.json | 58 + .../webiny.config.js | 8 + .../storageOperations/entries.test.ts | 6 +- packages/api-headless-cms/src/types.ts | 4 +- packages/create-webiny-project/package.json | 2 +- packages/handler-aws/src/index.ts | 2 + packages/handler-aws/src/utils/index.ts | 2 + .../src/utils/timer/CustomTimer.ts | 14 + .../src/utils}/timer/Timer.ts | 8 + .../src/utils}/timer/abstractions/ITimer.ts | 4 + .../src/utils}/timer/factory.ts | 2 +- .../src/utils}/timer/index.ts | 0 .../5.39.6/001/ddb-es/MetaFieldsMigration.ts | 1 - .../src/migrations/5.39.6/001/ddb-es/utils.ts | 4 +- .../migrations/5.39.6/001/ddb-es/worker.ts | 12 +- packages/project-utils/testing/tasks/index.ts | 1 + .../tasks/mockTaskTriggerTransportPlugin.ts | 24 + .../project-utils/testing/tasks/runner.ts | 4 +- .../src/apps/core/CoreElasticSearch.ts | 7 +- .../src/apps/core/CoreOpenSearch.ts | 7 +- .../__tests__/runner/taskRunnerAbort.test.ts | 2 +- .../__tests__/runner/taskRunnerCreate.test.ts | 2 +- .../runner/taskRunnerErrorFailedState.test.ts | 2 +- .../taskRunnerErrorSuccessState.test.ts | 2 +- .../runner/taskRunnerSuccess.test.ts | 2 +- .../runner/taskRunnerTaskNotFound.test.ts | 2 +- .../EventBridgeEventTransportPlugin.ts} | 46 +- packages/tasks/src/crud/trigger.tasks.ts | 21 +- packages/tasks/src/handler/index.ts | 2 +- .../src/plugins/TaskTriggerTransportPlugin.ts | 24 + packages/tasks/src/plugins/index.ts | 1 + packages/tasks/src/runner/TaskControl.ts | 2 + packages/tasks/src/runner/TaskRunner.ts | 13 +- packages/tasks/src/timer/CustomTimer.ts | 21 - .../tasks/src/transport/createTransport.ts | 34 + .../tasks/src/utils/getObjectProperties.ts | 3 + yarn.lock | 42 +- 91 files changed, 9051 insertions(+), 248 deletions(-) create mode 100644 packages/api-dynamodb-to-elasticsearch/src/NotEnoughRemainingTimeError.ts create mode 100644 packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ClusterHealthReason.ts create mode 100644 packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/IReason.ts create mode 100644 packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/MemoryReason.ts create mode 100644 packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ProcessorReason.ts create mode 100644 packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/index.ts create mode 100644 packages/api-headless-cms-es-tasks/.babelrc.js create mode 100644 packages/api-headless-cms-es-tasks/LICENSE create mode 100644 packages/api-headless-cms-es-tasks/README.md create mode 100644 packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts create mode 100644 packages/api-headless-cms-es-tasks/__tests__/context/plugins.ts create mode 100644 packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts create mode 100644 packages/api-headless-cms-es-tasks/__tests__/context/useHandler.ts create mode 100644 packages/api-headless-cms-es-tasks/__tests__/graphql/examples.graphql create mode 100644 packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateAmounts.test.ts create mode 100644 packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateSeconds.test.ts create mode 100644 packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts create mode 100644 packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataManagerTask.test.ts create mode 100644 packages/api-headless-cms-es-tasks/jest.setup.js create mode 100644 packages/api-headless-cms-es-tasks/package.json create mode 100644 packages/api-headless-cms-es-tasks/src/index.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/MockDataCreator.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/mockData.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/types.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/MockDataManager.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateAmounts.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateSeconds.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/constants.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/group.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/model.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/types.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/createMockDataCreatorTask.ts create mode 100644 packages/api-headless-cms-es-tasks/src/tasks/createMockDataManagerTask.ts create mode 100644 packages/api-headless-cms-es-tasks/src/types.ts create mode 100644 packages/api-headless-cms-es-tasks/src/utils/disableIndexing.ts create mode 100644 packages/api-headless-cms-es-tasks/src/utils/enableIndexing.ts create mode 100644 packages/api-headless-cms-es-tasks/src/utils/index.ts create mode 100644 packages/api-headless-cms-es-tasks/tsconfig.build.json create mode 100644 packages/api-headless-cms-es-tasks/tsconfig.json create mode 100644 packages/api-headless-cms-es-tasks/webiny.config.js create mode 100644 packages/handler-aws/src/utils/index.ts create mode 100644 packages/handler-aws/src/utils/timer/CustomTimer.ts rename packages/{tasks/src => handler-aws/src/utils}/timer/Timer.ts (63%) rename packages/{tasks/src => handler-aws/src/utils}/timer/abstractions/ITimer.ts (58%) rename packages/{tasks/src => handler-aws/src/utils}/timer/factory.ts (91%) rename packages/{tasks/src => handler-aws/src/utils}/timer/index.ts (100%) create mode 100644 packages/project-utils/testing/tasks/mockTaskTriggerTransportPlugin.ts rename packages/tasks/src/crud/{EventBridgeEventTransport.ts => transport/EventBridgeEventTransportPlugin.ts} (56%) create mode 100644 packages/tasks/src/plugins/TaskTriggerTransportPlugin.ts create mode 100644 packages/tasks/src/plugins/index.ts delete mode 100644 packages/tasks/src/timer/CustomTimer.ts create mode 100644 packages/tasks/src/transport/createTransport.ts diff --git a/packages/api-background-tasks-es/package.json b/packages/api-background-tasks-es/package.json index 9d2077656a5..cf917979443 100644 --- a/packages/api-background-tasks-es/package.json +++ b/packages/api-background-tasks-es/package.json @@ -11,6 +11,7 @@ "license": "MIT", "dependencies": { "@webiny/api-elasticsearch-tasks": "0.0.0", + "@webiny/api-headless-cms-es-tasks": "0.0.0", "@webiny/plugins": "0.0.0", "@webiny/tasks": "0.0.0" }, diff --git a/packages/api-background-tasks-es/src/index.ts b/packages/api-background-tasks-es/src/index.ts index 5e7808ab75d..cdc92f823d0 100644 --- a/packages/api-background-tasks-es/src/index.ts +++ b/packages/api-background-tasks-es/src/index.ts @@ -1,11 +1,13 @@ import { Plugin } from "@webiny/plugins/types"; import { createBackgroundTaskGraphQL, createBackgroundTaskContext } from "@webiny/tasks"; import { createElasticsearchBackgroundTasks } from "@webiny/api-elasticsearch-tasks"; +import { createHeadlessCmsEsTasks } from "@webiny/api-headless-cms-es-tasks"; export const createBackgroundTasks = (): Plugin[] => { return [ ...createBackgroundTaskContext(), ...createBackgroundTaskGraphQL(), - ...createElasticsearchBackgroundTasks() + ...createElasticsearchBackgroundTasks(), + ...createHeadlessCmsEsTasks() ]; }; diff --git a/packages/api-background-tasks-es/tsconfig.build.json b/packages/api-background-tasks-es/tsconfig.build.json index a24fe8b6152..4bb5a0db92b 100644 --- a/packages/api-background-tasks-es/tsconfig.build.json +++ b/packages/api-background-tasks-es/tsconfig.build.json @@ -3,6 +3,7 @@ "include": ["src"], "references": [ { "path": "../api-elasticsearch-tasks/tsconfig.build.json" }, + { "path": "../api-headless-cms-es-tasks/tsconfig.build.json" }, { "path": "../plugins/tsconfig.build.json" }, { "path": "../tasks/tsconfig.build.json" } ], diff --git a/packages/api-background-tasks-es/tsconfig.json b/packages/api-background-tasks-es/tsconfig.json index b98d9beebb2..57fb6ce012b 100644 --- a/packages/api-background-tasks-es/tsconfig.json +++ b/packages/api-background-tasks-es/tsconfig.json @@ -3,6 +3,7 @@ "include": ["src", "__tests__"], "references": [ { "path": "../api-elasticsearch-tasks" }, + { "path": "../api-headless-cms-es-tasks" }, { "path": "../plugins" }, { "path": "../tasks" } ], @@ -15,6 +16,8 @@ "~tests/*": ["./__tests__/*"], "@webiny/api-elasticsearch-tasks/*": ["../api-elasticsearch-tasks/src/*"], "@webiny/api-elasticsearch-tasks": ["../api-elasticsearch-tasks/src"], + "@webiny/api-headless-cms-es-tasks/*": ["../api-headless-cms-es-tasks/src/*"], + "@webiny/api-headless-cms-es-tasks": ["../api-headless-cms-es-tasks/src"], "@webiny/plugins/*": ["../plugins/src/*"], "@webiny/plugins": ["../plugins/src"], "@webiny/tasks/*": ["../tasks/src/*"], diff --git a/packages/api-background-tasks-os/package.json b/packages/api-background-tasks-os/package.json index 83a3f5b8c06..31cbbbc1400 100644 --- a/packages/api-background-tasks-os/package.json +++ b/packages/api-background-tasks-os/package.json @@ -11,6 +11,7 @@ "license": "MIT", "dependencies": { "@webiny/api-elasticsearch-tasks": "0.0.0", + "@webiny/api-headless-cms-es-tasks": "0.0.0", "@webiny/plugins": "0.0.0", "@webiny/tasks": "0.0.0" }, diff --git a/packages/api-background-tasks-os/src/index.ts b/packages/api-background-tasks-os/src/index.ts index 5e7808ab75d..cdc92f823d0 100644 --- a/packages/api-background-tasks-os/src/index.ts +++ b/packages/api-background-tasks-os/src/index.ts @@ -1,11 +1,13 @@ import { Plugin } from "@webiny/plugins/types"; import { createBackgroundTaskGraphQL, createBackgroundTaskContext } from "@webiny/tasks"; import { createElasticsearchBackgroundTasks } from "@webiny/api-elasticsearch-tasks"; +import { createHeadlessCmsEsTasks } from "@webiny/api-headless-cms-es-tasks"; export const createBackgroundTasks = (): Plugin[] => { return [ ...createBackgroundTaskContext(), ...createBackgroundTaskGraphQL(), - ...createElasticsearchBackgroundTasks() + ...createElasticsearchBackgroundTasks(), + ...createHeadlessCmsEsTasks() ]; }; diff --git a/packages/api-background-tasks-os/tsconfig.build.json b/packages/api-background-tasks-os/tsconfig.build.json index a24fe8b6152..4bb5a0db92b 100644 --- a/packages/api-background-tasks-os/tsconfig.build.json +++ b/packages/api-background-tasks-os/tsconfig.build.json @@ -3,6 +3,7 @@ "include": ["src"], "references": [ { "path": "../api-elasticsearch-tasks/tsconfig.build.json" }, + { "path": "../api-headless-cms-es-tasks/tsconfig.build.json" }, { "path": "../plugins/tsconfig.build.json" }, { "path": "../tasks/tsconfig.build.json" } ], diff --git a/packages/api-background-tasks-os/tsconfig.json b/packages/api-background-tasks-os/tsconfig.json index b98d9beebb2..57fb6ce012b 100644 --- a/packages/api-background-tasks-os/tsconfig.json +++ b/packages/api-background-tasks-os/tsconfig.json @@ -3,6 +3,7 @@ "include": ["src", "__tests__"], "references": [ { "path": "../api-elasticsearch-tasks" }, + { "path": "../api-headless-cms-es-tasks" }, { "path": "../plugins" }, { "path": "../tasks" } ], @@ -15,6 +16,8 @@ "~tests/*": ["./__tests__/*"], "@webiny/api-elasticsearch-tasks/*": ["../api-elasticsearch-tasks/src/*"], "@webiny/api-elasticsearch-tasks": ["../api-elasticsearch-tasks/src"], + "@webiny/api-headless-cms-es-tasks/*": ["../api-headless-cms-es-tasks/src/*"], + "@webiny/api-headless-cms-es-tasks": ["../api-headless-cms-es-tasks/src"], "@webiny/plugins/*": ["../plugins/src/*"], "@webiny/plugins": ["../plugins/src"], "@webiny/tasks/*": ["../tasks/src/*"], diff --git a/packages/api-dynamodb-to-elasticsearch/src/NotEnoughRemainingTimeError.ts b/packages/api-dynamodb-to-elasticsearch/src/NotEnoughRemainingTimeError.ts new file mode 100644 index 00000000000..1aaef7d8dd2 --- /dev/null +++ b/packages/api-dynamodb-to-elasticsearch/src/NotEnoughRemainingTimeError.ts @@ -0,0 +1,3 @@ +import { WebinyError } from "@webiny/error"; + +export class NotEnoughRemainingTimeError extends WebinyError {} diff --git a/packages/api-dynamodb-to-elasticsearch/src/index.ts b/packages/api-dynamodb-to-elasticsearch/src/index.ts index 477bf769cc5..61ad3c97895 100644 --- a/packages/api-dynamodb-to-elasticsearch/src/index.ts +++ b/packages/api-dynamodb-to-elasticsearch/src/index.ts @@ -1,9 +1,16 @@ import WebinyError from "@webiny/error"; import { AttributeValue, unmarshall as baseUnmarshall } from "@webiny/aws-sdk/client-dynamodb"; -import { decompress } from "@webiny/api-elasticsearch"; +import { + createWaitUntilHealthy, + decompress, + UnhealthyClusterError, + WaitingHealthyClusterAbortedError +} from "@webiny/api-elasticsearch"; import { ApiResponse, ElasticsearchContext } from "@webiny/api-elasticsearch/types"; -import { createDynamoDBEventHandler } from "@webiny/handler-aws"; +import { createDynamoDBEventHandler, timerFactory } from "@webiny/handler-aws"; +import { ElasticsearchCatClusterHealthStatus } from "@webiny/api-elasticsearch/operations/types"; import pRetry from "p-retry"; +import { NotEnoughRemainingTimeError } from "./NotEnoughRemainingTimeError"; enum Operations { INSERT = "INSERT", @@ -39,15 +46,6 @@ const getError = (item: BulkOperationsResponseBodyItem): string | null => { return reason; }; -const getNumberEnvVariable = (name: string, def: number): number => { - const input = process.env[name]; - const value = Number(input); - if (value > 0) { - return value; - } - return def; -}; - const checkErrors = (result?: ApiResponse): void => { if (!result || !result.body || !result.body.items) { return; @@ -67,6 +65,22 @@ const checkErrors = (result?: ApiResponse): void => } }; +const getNumberEnvVariable = (name: string, def: number): number => { + const input = process.env[name]; + const value = Number(input); + if (isNaN(value)) { + return def; + } else if (value <= 0) { + return def; + } + return value; +}; + +const MAX_PROCESSOR_PERCENT = getNumberEnvVariable( + "MAX_ES_PROCESSOR", + process.env.NODE_ENV === "test" ? 101 : 98 +); + interface RecordDynamoDbImage { data: Record; ignore?: boolean; @@ -85,108 +99,182 @@ const unmarshall = (value?: Record): T | undefined => return baseUnmarshall(value) as T; }; +const minRemainingSecondsToTimeout = 120; + +/** + * Also, we need to set the maximum running time for the Lambda Function. + * https://github.com/webiny/webiny-js/blob/f7352d418da2b5ae0b781376be46785aa7ac6ae0/packages/pulumi-aws/src/apps/core/CoreOpenSearch.ts#L232 + * https://github.com/webiny/webiny-js/blob/f7352d418da2b5ae0b781376be46785aa7ac6ae0/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts#L218 + */ +const MAX_RUNNING_TIME = 900; + export const createEventHandler = () => { - return createDynamoDBEventHandler(async ({ event, context: ctx }) => { + return createDynamoDBEventHandler(async ({ event, context: ctx, lambdaContext }) => { + const timer = timerFactory(lambdaContext); const context = ctx as unknown as ElasticsearchContext; if (!context.elasticsearch) { console.error("Missing elasticsearch definition on context."); return null; } - /** - * Wrap the code we need to run into the function, so it can be called within itself. - */ - const execute = async (): Promise => { - const operations = []; + const operations: Record[] = []; - for (const record of event.Records) { - const dynamodb = record.dynamodb; - if (!dynamodb) { - continue; - } + const operationIdList: string[] = []; + + for (const record of event.Records) { + const dynamodb = record.dynamodb; + if (!dynamodb) { + continue; + } + /** + * TODO: figure out correct types + */ + // @ts-expect-error + const newImage = unmarshall(dynamodb.NewImage); + + // Note that with the `REMOVE` event, there is no `NewImage` property. Which means, + // if the `newImage` is `undefined`, we are dealing with a `REMOVE` event and we still + // need to process it. + if (newImage && newImage.ignore === true) { + continue; + } + /** + * TODO: figure out correct types + */ + // @ts-expect-error + const keys = unmarshall(dynamodb.Keys); + if (!keys?.PK || !keys.SK) { + continue; + } + const _id = `${keys.PK}:${keys.SK}`; + /** + * TODO: figure out correct types + */ + // @ts-expect-error + const oldImage = unmarshall(dynamodb.OldImage); + const operation = record.eventName; + + /** + * On operations other than REMOVE we decompress the data and store it into the Elasticsearch. + * No need to try to decompress if operation is REMOVE since there is no data sent into that operation. + */ + let data: any = undefined; + if (newImage && operation !== Operations.REMOVE) { /** - * TODO: figure out correct types + * We must decompress the data that is going into the Elasticsearch. */ - // @ts-expect-error - const newImage = unmarshall(dynamodb.NewImage); - - // Note that with the `REMOVE` event, there is no `NewImage` property. Which means, - // if the `newImage` is `undefined`, we are dealing with a `REMOVE` event and we still - // need to process it. - if (newImage && newImage.ignore === true) { - continue; - } + data = await decompress(context.plugins, newImage.data); /** - * TODO: figure out correct types + * No point in writing null or undefined data into the Elasticsearch. + * This might happen on some error while decompressing. We will log it. + * + * Data should NEVER be null or undefined in the Elasticsearch DynamoDB table, unless it is a delete operations. + * If it is - it is a bug. */ - // @ts-expect-error - const keys = unmarshall(dynamodb.Keys); - if (!keys?.PK || !keys.SK) { + if (data === undefined || data === null) { + console.error( + `Could not get decompressed data, skipping ES operation "${operation}", ID ${_id}` + ); continue; } - const _id = `${keys.PK}:${keys.SK}`; - /** - * TODO: figure out correct types - */ - // @ts-expect-error - const oldImage = unmarshall(dynamodb.OldImage); - const operation = record.eventName; + } - /** - * On operations other than REMOVE we decompress the data and store it into the Elasticsearch. - * No need to try to decompress if operation is REMOVE since there is no data sent into that operation. - */ - let data: any = undefined; - if (newImage && operation !== Operations.REMOVE) { - /** - * We must decompress the data that is going into the Elasticsearch. - */ - data = await decompress(context.plugins, newImage.data); - /** - * No point in writing null or undefined data into the Elasticsearch. - * This might happen on some error while decompressing. We will log it. - * - * Data should NEVER be null or undefined in the Elasticsearch DynamoDB table, unless it is a delete operations. - * If it is - it is a bug. - */ - if (data === undefined || data === null) { - console.error( - `Could not get decompressed data, skipping ES operation "${operation}", ID ${_id}` + operationIdList.push(_id); + + switch (record.eventName) { + case Operations.INSERT: + case Operations.MODIFY: + if (newImage) { + operations.push( + { + index: { + _id, + _index: newImage.index + } + }, + data ); - continue; } - } - - switch (record.eventName) { - case Operations.INSERT: - case Operations.MODIFY: - if (newImage) { - operations.push( - { - index: { - _id, - _index: newImage.index - } - }, - data - ); + break; + case Operations.REMOVE: + operations.push({ + delete: { + _id, + _index: oldImage?.index || "unknown" } - break; - case Operations.REMOVE: - operations.push({ - delete: { - _id, - _index: oldImage?.index || "unknown" - } - }); - break; - default: - break; - } + }); + break; + default: + break; } + } + /** + * No need to do anything if there are no operations. + */ + if (operations.length === 0) { + return null; + } + /** + * Wrap the code we need to run into the function, so it can be called within itself. + */ + const execute = async (): Promise => { + const remainingTime = timer.getRemainingSeconds(); + const runningTime = MAX_RUNNING_TIME - remainingTime; + const maxWaitingTime = MAX_RUNNING_TIME - 90 - remainingTime; - if (!operations.length) { - return; + if (process.env.DEBUG === "true") { + console.debug( + `The Lambda is already running for ${runningTime}s. Setting Health Check max waiting time: ${maxWaitingTime}s` + ); + } + + const healthCheck = createWaitUntilHealthy(context.elasticsearch, { + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, + waitingTimeStep: 30, + maxProcessorPercent: MAX_PROCESSOR_PERCENT, + maxWaitingTime + }); + + try { + await healthCheck.wait({ + async onUnhealthy({ + startedAt, + runs, + mustEndAt, + waitingTimeStep, + waitingReason + }) { + console.debug(`Cluster is unhealthy on run #${runs}.`, { + startedAt, + mustEndAt, + waitingTimeStep, + waitingReason + }); + }, + async onTimeout({ + startedAt, + runs, + waitingTimeStep, + mustEndAt, + waitingReason + }) { + console.error(`Cluster health check timeout on run #${runs}.`, { + startedAt, + mustEndAt, + waitingTimeStep, + waitingReason + }); + } + }); + } catch (ex) { + if ( + ex instanceof UnhealthyClusterError || + ex instanceof WaitingHealthyClusterAbortedError + ) { + throw ex; + } + console.error(`Cluster health check failed.`, ex); + throw ex; } try { @@ -195,13 +283,21 @@ export const createEventHandler = () => { }); checkErrors(res); } catch (error) { - if (process.env.DEBUG === "true") { - const meta = error?.meta || {}; - delete meta["meta"]; - console.error("Bulk error", JSON.stringify(error, null, 2)); + if (process.env.DEBUG !== "true") { + throw error; } + const meta = error?.meta || {}; + delete meta["meta"]; + console.error("Bulk error", JSON.stringify(error, null, 2)); throw error; } + if (process.env.DEBUG !== "true") { + return; + } + console.info( + `Transferred ${operations.length / 2} record operations to Elasticsearch.` + ); + console.log(operationIdList); }; const maxRetryTime = getNumberEnvVariable( @@ -218,22 +314,30 @@ export const createEventHandler = () => { 30000 ); - await pRetry(execute, { - maxRetryTime, - retries, - minTimeout, - maxTimeout, - onFailedAttempt: error => { - /** - * We will only log attempts which are after 3/4 of total attempts. - */ - if (error.attemptNumber < retries * 0.75) { - return; + try { + await pRetry(execute, { + maxRetryTime, + retries, + minTimeout, + maxTimeout, + onFailedAttempt: error => { + if (timer.getRemainingSeconds() < minRemainingSecondsToTimeout) { + throw new NotEnoughRemainingTimeError(error); + } + /** + * We will only log attempts which are after 3/4 of total attempts. + */ + if (error.attemptNumber < retries * 0.75) { + return; + } + console.error(`Attempt #${error.attemptNumber} failed.`); + console.error(error); } - console.error(`Attempt #${error.attemptNumber} failed.`); - console.error(error.message); - } - }); + }); + } catch (ex) { + // TODO implement storing of failed operations + throw ex; + } return null; }); diff --git a/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts b/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts index fa719081861..d9666fe5efd 100644 --- a/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts +++ b/packages/api-elasticsearch/__tests__/utils/waitUntilHealthy.test.ts @@ -1,6 +1,6 @@ import { createWaitUntilHealthy } from "~/utils/waitUntilHealthy"; import { createElasticsearchClient } from "@webiny/project-utils/testing/elasticsearch/createClient"; -import { ElasticsearchCatCluterHealthStatus } from "~/operations/types"; +import { ElasticsearchCatClusterHealthStatus } from "~/operations/types"; import { UnhealthyClusterError } from "~/utils/waitUntilHealthy/UnhealthyClusterError"; import { WaitingHealthyClusterAbortedError } from "~/utils/waitUntilHealthy/WaitingHealthyClusterAbortedError"; @@ -9,7 +9,7 @@ describe("wait until healthy", () => { it("should wait until the cluster is healthy - single run", async () => { const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, maxProcessorPercent: 101, maxRamPercent: 101, maxWaitingTime: 30, @@ -24,7 +24,7 @@ describe("wait until healthy", () => { it("should wait until the cluster is healthy - no max memory defined", async () => { const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, maxProcessorPercent: 101, maxWaitingTime: 30, waitingTimeStep: 5 @@ -39,7 +39,7 @@ describe("wait until healthy", () => { it("should wait until the cluster is health - processor - max waiting time hit", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, maxProcessorPercent: 1, maxRamPercent: 99, maxWaitingTime: 3, @@ -57,7 +57,7 @@ describe("wait until healthy", () => { it("should wait until the cluster is health - memory - max waiting time hit", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, maxProcessorPercent: 99, maxRamPercent: 1, maxWaitingTime: 3, @@ -76,7 +76,7 @@ describe("wait until healthy", () => { it("should trigger onUnhealthy callback - once", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Green, maxProcessorPercent: 1, maxRamPercent: 1, maxWaitingTime: 1, @@ -102,7 +102,7 @@ describe("wait until healthy", () => { it("should trigger onUnhealthy callback - multiple times", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Green, maxProcessorPercent: 1, maxRamPercent: 1, maxWaitingTime: 3, @@ -128,7 +128,7 @@ describe("wait until healthy", () => { it("should trigger onTimeout callback - once", async () => { expect.assertions(3); const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Green, maxProcessorPercent: 1, maxRamPercent: 1, maxWaitingTime: 3, @@ -159,7 +159,7 @@ describe("wait until healthy", () => { it("should trigger abort even before the checks start", async () => { expect.assertions(3); const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Green, maxProcessorPercent: 1, maxRamPercent: 1, maxWaitingTime: 1, @@ -193,7 +193,7 @@ describe("wait until healthy", () => { it("should trigger abort in onUnhealthy callback", async () => { expect.assertions(2); const waitUntilHealthy = createWaitUntilHealthy(client, { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Green, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Green, maxProcessorPercent: 1, maxRamPercent: 1, maxWaitingTime: 1, diff --git a/packages/api-elasticsearch/src/client.ts b/packages/api-elasticsearch/src/client.ts index ef8ba161140..73b84e1a3ce 100644 --- a/packages/api-elasticsearch/src/client.ts +++ b/packages/api-elasticsearch/src/client.ts @@ -72,7 +72,7 @@ export const createElasticsearchClient = (options: ElasticsearchClientOptions): ...rest, auth: undefined }; - console.log({ + console.error({ ...data }); throw new WebinyError( diff --git a/packages/api-elasticsearch/src/operations/types.ts b/packages/api-elasticsearch/src/operations/types.ts index 114ed9788fc..6c2abc67c39 100644 --- a/packages/api-elasticsearch/src/operations/types.ts +++ b/packages/api-elasticsearch/src/operations/types.ts @@ -1,4 +1,4 @@ -export enum ElasticsearchCatCluterHealthStatus { +export enum ElasticsearchCatClusterHealthStatus { Green = "green", Yellow = "yellow", Red = "red" @@ -8,7 +8,7 @@ export interface IElasticsearchCatHealthResponse { epoch: number; timestamp: `${number}:${number}:${number}`; cluster: string; - status: ElasticsearchCatCluterHealthStatus; + status: ElasticsearchCatClusterHealthStatus; "node.total": `${number}`; "node.data": `${number}`; shards: `${number}`; diff --git a/packages/api-elasticsearch/src/utils/index.ts b/packages/api-elasticsearch/src/utils/index.ts index 88768cb32ba..fb384855b13 100644 --- a/packages/api-elasticsearch/src/utils/index.ts +++ b/packages/api-elasticsearch/src/utils/index.ts @@ -1,2 +1,3 @@ export * from "./waitUntilHealthy"; export * from "./createIndex"; +export * from "./waitUntilHealthy"; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts index 8796b6f8d9f..93475f45cec 100644 --- a/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/WaitUntilHealthy.ts @@ -2,32 +2,32 @@ import { Client } from "~/client"; import { ElasticsearchCatHealth } from "~/operations/ElasticsearchCatHealth"; import { ElasticsearchCatNodes } from "~/operations/ElasticsearchCatNodes"; import { - ElasticsearchCatCluterHealthStatus, + ElasticsearchCatClusterHealthStatus, + IElasticsearchCatHealthResponse, IElasticsearchCatNodesResponse } from "~/operations/types"; import { UnhealthyClusterError } from "~/utils/waitUntilHealthy/UnhealthyClusterError"; +import { + ClusterHealthReason, + createClusterHealthStatusReason, + createMemoryReason, + createProcessorReason, + MemoryReason, + ProcessorReason +} from "./reason"; import { WaitingHealthyClusterAbortedError } from "./WaitingHealthyClusterAbortedError"; const WAITING_TIME_STEP = 10; -export type ShouldWaitProcessor = "processor"; -export type ShouldWaitMemory = "memory"; -export type ShouldWaitClusterHealthStatus = "clusterHealthStatus"; -export type ShouldNotWait = false; - -export type ShouldWaitReason = - | ShouldWaitProcessor - | ShouldWaitMemory - | ShouldWaitClusterHealthStatus - | ShouldNotWait; +export type WaitingReason = ProcessorReason | MemoryReason | ClusterHealthReason; export interface IWaitUntilHealthyParams { /** * Minimum status allowed, otherwise the cluster is considered unhealthy. */ minClusterHealthStatus: - | ElasticsearchCatCluterHealthStatus.Green - | ElasticsearchCatCluterHealthStatus.Yellow; + | ElasticsearchCatClusterHealthStatus.Green + | ElasticsearchCatClusterHealthStatus.Yellow; /** * Maximum processor percent allowed, otherwise the cluster is considered unhealthy. */ @@ -54,7 +54,7 @@ export interface IWaitOptionsOnUnhealthyParams { mustEndAt: Date; waitingTimeStep: number; runs: number; - shouldWaitReason: ShouldWaitReason; + waitingReason: WaitingReason; } export interface IWaitOptionsOnTimeoutParams { @@ -62,7 +62,7 @@ export interface IWaitOptionsOnTimeoutParams { mustEndAt: Date; waitingTimeStep: number; runs: number; - shouldWaitReason: ShouldWaitReason; + waitingReason: WaitingReason; } export interface IWaitOptions { @@ -109,15 +109,15 @@ class WaitUntilHealthy { const mustEndAt = new Date(startedAt.getTime() + this.options.maxWaitingTime * 1000); const waitingTimeStep = this.options.waitingTimeStep || WAITING_TIME_STEP; let runs = 1; - let shouldWaitReason: ShouldWaitReason; - while ((shouldWaitReason = await this.shouldWait())) { + let waitingReason: WaitingReason | false; + while ((waitingReason = await this.shouldWait())) { if (new Date() >= mustEndAt) { if (options?.onTimeout) { await options.onTimeout({ startedAt, mustEndAt, waitingTimeStep, - shouldWaitReason, + waitingReason, runs }); } @@ -127,7 +127,7 @@ class WaitUntilHealthy { startedAt, mustEndAt, waitingTimeStep, - shouldWaitReason, + waitingReason, runs }); } @@ -151,21 +151,45 @@ class WaitUntilHealthy { }; } - private async shouldWait(): Promise { - const health = await this.catHealth.getHealth(); - const nodes = await this.catNodes.getNodes(); + private async shouldWait(): Promise { + let health: IElasticsearchCatHealthResponse; + let nodes: IElasticsearchCatNodesResponse; + try { + health = await this.catHealth.getHealth(); + } catch (ex) { + return createClusterHealthStatusReason({ + description: ex.message, + minimum: this.options.minClusterHealthStatus, + current: ElasticsearchCatClusterHealthStatus.Red + }); + } + try { + nodes = await this.catNodes.getNodes(); + } catch (ex) { + return createClusterHealthStatusReason({ + description: ex.message, + minimum: this.options.minClusterHealthStatus, + current: ElasticsearchCatClusterHealthStatus.Red + }); + } const clusterHealthStatus = this.transformClusterHealthStatus(health.status); - if ( - clusterHealthStatus > - this.transformClusterHealthStatus(this.options.minClusterHealthStatus) - ) { - return "clusterHealthStatus"; + const minClusterHealthStatus = this.transformClusterHealthStatus( + this.options.minClusterHealthStatus + ); + if (clusterHealthStatus > minClusterHealthStatus) { + return createClusterHealthStatusReason({ + minimum: this.options.minClusterHealthStatus, + current: health.status + }); } const processorPercent = this.getProcessorPercent(nodes); if (processorPercent > this.options.maxProcessorPercent) { - return "processor"; + return createProcessorReason({ + maximum: this.options.maxProcessorPercent, + current: processorPercent + }); } /** * Possibly no max ram definition? @@ -176,7 +200,10 @@ class WaitUntilHealthy { const ramPercent = this.getRamPercent(nodes); if (ramPercent > this.options.maxRamPercent) { - return "memory"; + return createMemoryReason({ + maximum: this.options.maxRamPercent, + current: ramPercent + }); } return false; } @@ -195,13 +222,13 @@ class WaitUntilHealthy { return total / nodes.length; } - private transformClusterHealthStatus(status: ElasticsearchCatCluterHealthStatus): number { + private transformClusterHealthStatus(status: ElasticsearchCatClusterHealthStatus): number { switch (status) { - case ElasticsearchCatCluterHealthStatus.Green: + case ElasticsearchCatClusterHealthStatus.Green: return 1; - case ElasticsearchCatCluterHealthStatus.Yellow: + case ElasticsearchCatClusterHealthStatus.Yellow: return 2; - case ElasticsearchCatCluterHealthStatus.Red: + case ElasticsearchCatClusterHealthStatus.Red: return 3; default: return 99; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts index 70890365bf9..0d8016d6417 100644 --- a/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/index.ts @@ -1,3 +1,6 @@ +export * from "./WaitingHealthyClusterAbortedError"; +export * from "./UnhealthyClusterError"; export * from "./WaitUntilHealthy"; export * from "./UnhealthyClusterError"; export * from "./WaitUntilHealthy"; +export * from "./reason"; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ClusterHealthReason.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ClusterHealthReason.ts new file mode 100644 index 00000000000..60861210ff6 --- /dev/null +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ClusterHealthReason.ts @@ -0,0 +1,27 @@ +import { ElasticsearchCatClusterHealthStatus } from "~/operations"; +import { IReason } from "~/utils/waitUntilHealthy/reason/IReason"; + +export interface IClusterHealthReasonParams { + minimum: ElasticsearchCatClusterHealthStatus; + current: ElasticsearchCatClusterHealthStatus; + description?: string; +} + +export class ClusterHealthReason implements IReason { + public readonly name = "clusterHealth"; + public readonly minimum: ElasticsearchCatClusterHealthStatus; + public readonly current: ElasticsearchCatClusterHealthStatus; + public readonly description?: string; + + public constructor(params: IClusterHealthReasonParams) { + this.minimum = params.minimum; + this.current = params.current; + this.description = params.description; + } +} + +export const createClusterHealthStatusReason = ( + params: IClusterHealthReasonParams +): ClusterHealthReason => { + return new ClusterHealthReason(params); +}; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/IReason.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/IReason.ts new file mode 100644 index 00000000000..8677ad4d856 --- /dev/null +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/IReason.ts @@ -0,0 +1,4 @@ +export interface IReason { + name: string; + description?: string; +} diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/MemoryReason.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/MemoryReason.ts new file mode 100644 index 00000000000..c02edf8fcca --- /dev/null +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/MemoryReason.ts @@ -0,0 +1,24 @@ +import { IReason } from "~/utils/waitUntilHealthy/reason/IReason"; + +export interface IMemoryReasonParams { + maximum: number; + current: number; + description?: string; +} + +export class MemoryReason implements IReason { + public readonly name = "memory"; + public readonly maximum: number; + public readonly current: number; + public readonly description?: string; + + public constructor(params: IMemoryReasonParams) { + this.maximum = params.maximum; + this.current = params.current; + this.description = params.description; + } +} + +export const createMemoryReason = (params: IMemoryReasonParams): MemoryReason => { + return new MemoryReason(params); +}; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ProcessorReason.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ProcessorReason.ts new file mode 100644 index 00000000000..880fc65695f --- /dev/null +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/ProcessorReason.ts @@ -0,0 +1,24 @@ +import { IReason } from "~/utils/waitUntilHealthy/reason/IReason"; + +export interface IProcessorReasonParams { + maximum: number; + current: number; + description?: string; +} + +export class ProcessorReason implements IReason { + public readonly name = "processor"; + public readonly maximum: number; + public readonly current: number; + public readonly description?: string; + + public constructor(params: IProcessorReasonParams) { + this.maximum = params.maximum; + this.current = params.current; + this.description = params.description; + } +} + +export const createProcessorReason = (params: IProcessorReasonParams): ProcessorReason => { + return new ProcessorReason(params); +}; diff --git a/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/index.ts b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/index.ts new file mode 100644 index 00000000000..3e9ab4f7fb6 --- /dev/null +++ b/packages/api-elasticsearch/src/utils/waitUntilHealthy/reason/index.ts @@ -0,0 +1,3 @@ +export * from "./ClusterHealthReason"; +export * from "./MemoryReason"; +export * from "./ProcessorReason"; diff --git a/packages/api-headless-cms-es-tasks/.babelrc.js b/packages/api-headless-cms-es-tasks/.babelrc.js new file mode 100644 index 00000000000..9da7674cb52 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/.babelrc.js @@ -0,0 +1 @@ +module.exports = require("@webiny/project-utils").createBabelConfigForNode({ path: __dirname }); diff --git a/packages/api-headless-cms-es-tasks/LICENSE b/packages/api-headless-cms-es-tasks/LICENSE new file mode 100644 index 00000000000..f772d04d4db --- /dev/null +++ b/packages/api-headless-cms-es-tasks/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Webiny + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/api-headless-cms-es-tasks/README.md b/packages/api-headless-cms-es-tasks/README.md new file mode 100644 index 00000000000..c266143a38c --- /dev/null +++ b/packages/api-headless-cms-es-tasks/README.md @@ -0,0 +1,15 @@ +# @webiny/api-headless-cms-tasks +[![](https://img.shields.io/npm/dw/@webiny/api-headless-cms-tasks.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-tasks) +[![](https://img.shields.io/npm/v/@webiny/api-headless-cms-tasks.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-tasks) +[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) + +## Install +``` +npm install --save @webiny/api-headless-cms-tasks +``` + +Or if you prefer yarn: +``` +yarn add @webiny/api-headless-cms-tasks +``` diff --git a/packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts b/packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts new file mode 100644 index 00000000000..7cbae8e31cf --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts @@ -0,0 +1,90 @@ +import { SecurityIdentity } from "@webiny/api-security/types"; +import { ContextPlugin } from "@webiny/api"; +import { CmsContext } from "~/types"; + +export interface PermissionsArg { + name: string; + locales?: string[]; + rwd?: string; + pw?: string; + own?: boolean; +} + +export const identity = { + id: "id-12345678", + displayName: "John Doe", + type: "admin" +}; + +const getSecurityIdentity = () => { + return identity; +}; + +export const createPermissions = (permissions?: PermissionsArg[]): PermissionsArg[] => { + if (permissions) { + return permissions; + } + return [ + { + name: "cms.settings" + }, + { + name: "cms.contentModel", + rwd: "rwd" + }, + { + name: "cms.contentModelGroup", + rwd: "rwd" + }, + { + name: "cms.contentEntry", + rwd: "rwd", + pw: "rcpu" + }, + { + name: "cms.endpoint.read" + }, + { + name: "cms.endpoint.manage" + }, + { + name: "cms.endpoint.preview" + }, + { + name: "content.i18n", + locales: ["en-US", "de-DE"] + } + ]; +}; + +export const createIdentity = (identity?: SecurityIdentity) => { + if (!identity) { + return getSecurityIdentity(); + } + return identity; +}; + +export const createDummyLocales = () => { + return new ContextPlugin(async context => { + const { i18n, security } = context; + + await security.authenticate(""); + + await security.withoutAuthorization(async () => { + const [items] = await i18n.locales.listLocales({ + where: {} + }); + if (items.length > 0) { + return; + } + await i18n.locales.createLocale({ + code: "en-US", + default: true + }); + await i18n.locales.createLocale({ + code: "de-DE", + default: true + }); + }); + }); +}; diff --git a/packages/api-headless-cms-es-tasks/__tests__/context/plugins.ts b/packages/api-headless-cms-es-tasks/__tests__/context/plugins.ts new file mode 100644 index 00000000000..9526cb78e3e --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/context/plugins.ts @@ -0,0 +1,107 @@ +import apiKeyAuthentication from "@webiny/api-security/plugins/apiKeyAuthentication"; +import apiKeyAuthorization from "@webiny/api-security/plugins/apiKeyAuthorization"; +import i18nContext from "@webiny/api-i18n/graphql/context"; +import graphQLHandlerPlugins from "@webiny/handler-graphql"; +import { createHeadlessCmsContext, createHeadlessCmsGraphQL } from "@webiny/api-headless-cms"; +import { createWcpContext } from "@webiny/api-wcp"; +import { createTenancyAndSecurity } from "./tenancySecurity"; +import { createDummyLocales, createPermissions, PermissionsArg } from "./helpers"; +import { ApiKey, SecurityIdentity } from "@webiny/api-security/types"; +import { ContextPlugin } from "@webiny/api"; +import { Context } from "~/types"; +import { mockLocalesPlugins } from "@webiny/api-i18n/graphql/testing"; +import { Plugin, PluginCollection } from "@webiny/plugins/types"; +import { getStorageOps } from "@webiny/project-utils/testing/environment"; +import { createBackgroundTaskContext } from "@webiny/tasks"; +import { HeadlessCmsStorageOperations } from "@webiny/api-headless-cms/types"; +import { createHeadlessCmsEsTasks } from "~/index"; +import { createMockTaskTriggerTransportPlugin } from "@webiny/project-utils/testing/tasks/mockTaskTriggerTransportPlugin"; + +export interface CreateHandlerCoreParams { + setupTenancyAndSecurityGraphQL?: boolean; + permissions?: PermissionsArg[]; + identity?: SecurityIdentity; + topPlugins?: Plugin | Plugin[] | Plugin[][] | PluginCollection; + plugins?: Plugin | Plugin[] | Plugin[][] | PluginCollection; + bottomPlugins?: Plugin | Plugin[] | Plugin[][] | PluginCollection; + path?: `manage/${string}-${string}}` | `read/${string}-${string}}` | string; +} + +export const createHandlerCore = (params: CreateHandlerCoreParams = {}) => { + const tenant = { + id: "root", + name: "Root", + parent: null + }; + const { + permissions, + identity, + plugins = [], + topPlugins = [], + bottomPlugins = [], + setupTenancyAndSecurityGraphQL + } = params; + + const cmsStorage = getStorageOps("cms"); + const i18nStorage = getStorageOps("i18n"); + + return { + storageOperations: cmsStorage.storageOperations, + tenant, + plugins: [ + topPlugins, + createWcpContext(), + ...cmsStorage.plugins, + ...createTenancyAndSecurity({ + setupGraphQL: setupTenancyAndSecurityGraphQL, + permissions: createPermissions(permissions), + identity + }), + { + type: "context", + name: "context-security-tenant", + async apply(context) { + context.security.getApiKeyByToken = async ( + token: string + ): Promise => { + if (!token || token !== "aToken") { + return null; + } + const apiKey = "a1234567890"; + return { + id: apiKey, + name: apiKey, + tenant: tenant.id, + permissions: identity?.permissions || [], + token, + createdBy: { + id: "test", + displayName: "test", + type: "admin" + }, + description: "test", + createdOn: new Date().toISOString(), + webinyVersion: context.WEBINY_VERSION + }; + }; + } + } as ContextPlugin, + apiKeyAuthentication({ identityType: "api-key" }), + apiKeyAuthorization({ identityType: "api-key" }), + i18nContext(), + i18nStorage.storageOperations, + createDummyLocales(), + mockLocalesPlugins(), + createHeadlessCmsContext({ + storageOperations: cmsStorage.storageOperations + }), + createBackgroundTaskContext(), + createHeadlessCmsGraphQL(), + plugins, + graphQLHandlerPlugins(), + createHeadlessCmsEsTasks(), + createMockTaskTriggerTransportPlugin(), + bottomPlugins + ] + }; +}; diff --git a/packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts b/packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts new file mode 100644 index 00000000000..1b4a213eecd --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts @@ -0,0 +1,102 @@ +import { Plugin } from "@webiny/plugins/Plugin"; +import { createTenancyContext, createTenancyGraphQL } from "@webiny/api-tenancy"; +import { createSecurityContext, createSecurityGraphQL } from "@webiny/api-security"; +import { + SecurityIdentity, + SecurityPermission, + SecurityStorageOperations +} from "@webiny/api-security/types"; +import { ContextPlugin } from "@webiny/api"; +import { BeforeHandlerPlugin } from "@webiny/handler"; +import { CmsContext } from "~/types"; +import { getStorageOps } from "@webiny/project-utils/testing/environment"; +import { TenancyStorageOperations, Tenant } from "@webiny/api-tenancy/types"; + +interface Config { + setupGraphQL?: boolean; + permissions: SecurityPermission[]; + identity?: SecurityIdentity | null; +} + +export const defaultIdentity: SecurityIdentity = { + id: "id-12345678", + type: "admin", + displayName: "John Doe" +}; + +export const createTenancyAndSecurity = ({ + setupGraphQL, + permissions, + identity +}: Config): Plugin[] => { + const tenancyStorage = getStorageOps("tenancy"); + const securityStorage = getStorageOps("security"); + + return [ + createTenancyContext({ storageOperations: tenancyStorage.storageOperations }), + setupGraphQL ? createTenancyGraphQL() : null, + createSecurityContext({ storageOperations: securityStorage.storageOperations }), + setupGraphQL ? createSecurityGraphQL() : null, + new ContextPlugin(async context => { + await context.tenancy.createTenant({ + id: "root", + name: "Root", + parent: "", + description: "Root tenant", + tags: [] + }); + + await context.tenancy.createTenant({ + id: "webiny", + name: "Webiny", + parent: "", + description: "Webiny tenant", + tags: [] + }); + + await context.tenancy.createTenant({ + id: "dev", + name: "Dev", + parent: "", + description: "Dev tenant", + tags: [] + }); + + await context.tenancy.createTenant({ + id: "sales", + name: "Sales", + parent: "", + description: "Sales tenant", + tags: [] + }); + }), + new ContextPlugin(async context => { + context.tenancy.setCurrentTenant({ + id: "root", + name: "Root", + webinyVersion: context.WEBINY_VERSION + } as unknown as Tenant); + + context.security.addAuthenticator(async () => { + return identity || defaultIdentity; + }); + + context.security.addAuthorizer(async () => { + const { headers = {} } = context.request || {}; + if (headers["authorization"]) { + return null; + } + + return permissions || [{ name: "*" }]; + }); + }), + new BeforeHandlerPlugin(context => { + const { headers = {} } = context.request || {}; + if (headers["authorization"]) { + return context.security.authenticate(headers["authorization"]); + } + + return context.security.authenticate(""); + }) + ].filter(Boolean) as Plugin[]; +}; diff --git a/packages/api-headless-cms-es-tasks/__tests__/context/useHandler.ts b/packages/api-headless-cms-es-tasks/__tests__/context/useHandler.ts new file mode 100644 index 00000000000..a7d92dd89d7 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/context/useHandler.ts @@ -0,0 +1,51 @@ +import { createHandlerCore, CreateHandlerCoreParams } from "./plugins"; +import { createRawEventHandler, createRawHandler } from "@webiny/handler-aws"; +import { Context } from "~/types"; +import { defaultIdentity } from "./tenancySecurity"; +import { LambdaContext } from "@webiny/handler-aws/types"; +import { getElasticsearchClient } from "@webiny/project-utils/testing/elasticsearch"; + +interface CmsHandlerEvent { + path: string; + headers: { + ["x-tenant"]: string; + [key: string]: string; + }; +} + +type Params = CreateHandlerCoreParams; +export const useHandler = (params: Params = {}) => { + const core = createHandlerCore(params); + + const plugins = [...core.plugins].concat([ + createRawEventHandler(async ({ context }) => { + return context; + }) + ]); + + const handler = createRawHandler({ + plugins, + debug: process.env.DEBUG === "true" + }); + + const { elasticsearchClient } = getElasticsearchClient({ name: "api-headless-cms-ddb-es" }); + + return { + plugins, + identity: params.identity || defaultIdentity, + tenant: core.tenant, + elasticsearch: elasticsearchClient, + handler: (input?: CmsHandlerEvent) => { + const payload: CmsHandlerEvent = { + path: "/cms/manage/en-US", + headers: { + "x-webiny-cms-endpoint": "manage", + "x-webiny-cms-locale": "en-US", + "x-tenant": "root" + }, + ...input + }; + return handler(payload, {} as LambdaContext); + } + }; +}; diff --git a/packages/api-headless-cms-es-tasks/__tests__/graphql/examples.graphql b/packages/api-headless-cms-es-tasks/__tests__/graphql/examples.graphql new file mode 100644 index 00000000000..11f142f5a17 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/graphql/examples.graphql @@ -0,0 +1,68 @@ +mutation StartMockDataGenerator { + backgroundTasks { + triggerTask(definition: "mockDataManager", input: { + modelId: "cars", + amount: 10000 + }) { + data { + id + } + error { + message + code + data + } + } + } +} + + +mutation AbortMockDataGenerator { + backgroundTasks { + abortTask(id: "YOUR_TASK_ID") { + data { + id + } + error { + message + code + data + } + } + } +} + + +query GetMockDataGenerator { + backgroundTasks { + getTask(id: "YOUR_TASK_ID") { + data { + id + taskStatus + } + error { + message + code + data + } + } + } +} + +query ListChildMockDataCreators { + backgroundTasks { + listTasks(where: { + parentId: "YOUR_TASK_ID" + }) { + data { + id + taskStatus + } + error { + message + code + data + } + } + } +} diff --git a/packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateAmounts.test.ts b/packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateAmounts.test.ts new file mode 100644 index 00000000000..dc6a7147f0a --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateAmounts.test.ts @@ -0,0 +1,155 @@ +import { calculateAmounts } from "~/tasks/MockDataManager/calculateAmounts"; + +describe("calculateAmounts", () => { + it.skip("should properly calculate the amount of tasks and records - 50", async () => { + const values = calculateAmounts(50); + + expect(values).toEqual({ + amountOfTasks: 1, + amountOfRecords: 50 + }); + }); + it.skip("should properly calculate the amount of tasks and records - 100", async () => { + const values = calculateAmounts(100); + + expect(values).toEqual({ + amountOfTasks: 1, + amountOfRecords: 100 + }); + }); + it.skip("should properly calculate the amount of tasks and records - 249", async () => { + const values = calculateAmounts(249); + + expect(values).toEqual({ + amountOfTasks: 1, + amountOfRecords: 249 + }); + }); + it.skip("should properly calculate the amount of tasks and records - 251", async () => { + const values = calculateAmounts(251); + + expect(values).toEqual({ + amountOfTasks: 1, + amountOfRecords: 251 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 500", async () => { + const values = calculateAmounts(500); + + expect(values).toEqual({ + amountOfTasks: 1, + amountOfRecords: 500 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 999", async () => { + const values = calculateAmounts(999); + + expect(values).toEqual({ + amountOfTasks: 1, + amountOfRecords: 999 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 9999", async () => { + const values = calculateAmounts(9999); + + expect(values).toEqual({ + amountOfTasks: 5, + amountOfRecords: 2000 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 10001", async () => { + const values = calculateAmounts(10001); + + expect(values).toEqual({ + amountOfTasks: 5, + amountOfRecords: 2000 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 25001", async () => { + const values = calculateAmounts(25001); + + expect(values).toEqual({ + amountOfTasks: 5, + amountOfRecords: 5000 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 250000", async () => { + const values = calculateAmounts(250000); + + expect(values).toEqual({ + amountOfTasks: 10, + amountOfRecords: 25000 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 990000", async () => { + const values = calculateAmounts(990000); + + expect(values).toEqual({ + amountOfTasks: 50, + amountOfRecords: 19800 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 2900000", async () => { + const values = calculateAmounts(2900000); + + expect(values).toEqual({ + amountOfTasks: 100, + amountOfRecords: 29000 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 3100000", async () => { + const values = calculateAmounts(3100000); + + expect(values).toEqual({ + amountOfTasks: 100, + amountOfRecords: 31000 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 5100000", async () => { + const values = calculateAmounts(5100000); + + expect(values).toEqual({ + amountOfTasks: 200, + amountOfRecords: 25500 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 10000000", async () => { + const values = calculateAmounts(10000000); + + expect(values).toEqual({ + amountOfTasks: 200, + amountOfRecords: 50000 + }); + }); + + it.skip("should properly calculate the amount of tasks and records - 10000001", async () => { + expect.assertions(1); + + try { + calculateAmounts(10000001); + } catch (ex) { + expect(ex.message).toBe(`No valid value found - input value is too large: 10000001.`); + } + }); + + it.skip("should properly calculate the amount of tasks and records - 50000000", async () => { + expect.assertions(1); + + try { + calculateAmounts(50000000); + } catch (ex) { + expect(ex.message).toBe(`No valid value found - input value is too large: 50000000.`); + } + }); +}); diff --git a/packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateSeconds.test.ts b/packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateSeconds.test.ts new file mode 100644 index 00000000000..a053f162cae --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/tasks/MockDataManager/calculateSeconds.test.ts @@ -0,0 +1,63 @@ +import { calculateSeconds } from "~/tasks/MockDataManager/calculateSeconds"; + +describe("calculate seconds to wait for task based on amount of records", () => { + it("should properly calculate the amount of seconds - 5", async () => { + const values = calculateSeconds(5); + + expect(values).toBe(15); + }); + + it("should properly calculate the amount of seconds - 10", async () => { + const values = calculateSeconds(10); + + expect(values).toBe(15); + }); + + it("should properly calculate the amount of seconds - 14", async () => { + const values = calculateSeconds(14); + + expect(values).toBe(15); + }); + + it("should properly calculate the amount of seconds - 16", async () => { + const values = calculateSeconds(16); + + expect(values).toBe(15); + }); + + it("should properly calculate the amount of seconds - 50", async () => { + const values = calculateSeconds(50); + + expect(values).toBe(15); + }); + + it("should properly calculate the amount of seconds - 100", async () => { + const values = calculateSeconds(100); + + expect(values).toBe(25); + }); + + it("should properly calculate the amount of seconds - 200", async () => { + const values = calculateSeconds(200); + + expect(values).toBe(50); + }); + + it("should properly calculate the amount of seconds - 300", async () => { + const values = calculateSeconds(300); + + expect(values).toBe(75); + }); + + it("should properly calculate the amount of seconds - 400", async () => { + const values = calculateSeconds(400); + + expect(values).toBe(90); + }); + + it("should properly calculate the amount of seconds - 500", async () => { + const values = calculateSeconds(500); + + expect(values).toBe(90); + }); +}); diff --git a/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts new file mode 100644 index 00000000000..5cef6129d41 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts @@ -0,0 +1,63 @@ +import { useHandler } from "~tests/context/useHandler"; +import { createRunner } from "@webiny/project-utils/testing/tasks"; +import { Context } from "~/types"; +import { IMockDataCreatorInput, IMockDataCreatorOutput } from "~/tasks/MockDataCreator/types"; +import { + createMockDataCreatorTask, + MOCK_DATA_CREATOR_TASK_ID +} from "~/tasks/createMockDataCreatorTask"; +import { TaskResponseStatus } from "@webiny/tasks"; +import { + createModelAndGroup, + ICreateModelAndGroupResultSuccess +} from "~/tasks/MockDataManager/createModelAndGroup"; +import { CARS_MODEL_ID } from "~/tasks/MockDataManager/constants"; +import { disableIndexing, enableIndexing } from "~/utils"; + +describe("mock data creator task", () => { + it("should create a mock data creator task", async () => { + const { handler } = useHandler(); + + const context = await handler(); + + const modelAndGroupResult = (await createModelAndGroup({ + context, + modelId: CARS_MODEL_ID + })) as ICreateModelAndGroupResultSuccess; + expect(modelAndGroupResult).not.toBeInstanceOf(String); + + await disableIndexing({ + client: context.elasticsearch, + model: modelAndGroupResult.model + }); + + const task = await context.tasks.createTask({ + definitionId: MOCK_DATA_CREATOR_TASK_ID, + name: "Testing of a Mock Data Creator Task", + input: { + createdAmount: 0, + totalAmount: 100 + } + }); + + const runner = createRunner({ + context, + task: createMockDataCreatorTask() + }); + + const result = await runner({ + webinyTaskId: task.id, + tenant: "root", + locale: "en-US" + }); + + await enableIndexing({ + client: context.elasticsearch, + model: modelAndGroupResult.model + }); + + expect(result).toMatchObject({ + status: TaskResponseStatus.DONE + }); + }); +}); diff --git a/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataManagerTask.test.ts b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataManagerTask.test.ts new file mode 100644 index 00000000000..1748d555b84 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataManagerTask.test.ts @@ -0,0 +1,65 @@ +import { + MOCK_DATA_MANAGER_TASK_ID, + createMockDataManagerTask +} from "~/tasks/createMockDataManagerTask"; +import { useHandler } from "~tests/context/useHandler"; +import { createRunner } from "@webiny/project-utils/testing/tasks"; +import { Context, IMockDataManagerInput, IMockDataManagerOutput } from "~/types"; +import { TaskResponseStatus } from "@webiny/tasks"; +import { CARS_MODEL_ID } from "~/tasks/MockDataManager/constants"; + +describe("mock data manager task", () => { + it("should create a mock data manager task", async () => { + const { handler } = useHandler(); + + const context = await handler(); + + const task = await context.tasks.createTask({ + definitionId: MOCK_DATA_MANAGER_TASK_ID, + name: "Testing of a Mock Data Manager Task", + input: { + modelId: CARS_MODEL_ID, + amount: 1 + } + }); + + const runner = createRunner({ + context, + task: createMockDataManagerTask() + }); + + const result = await runner({ + webinyTaskId: task.id, + tenant: "root", + locale: "en-US" + }); + + expect(result).toMatchObject({ + status: TaskResponseStatus.CONTINUE, + wait: 15, + input: { + amount: 1, + seconds: 15, + amountOfTasks: 1, + amountOfRecords: 1 + } + }); + + const childTasks = await context.tasks.listTasks({ + where: { + parentId: task.id + }, + limit: 10000 + }); + expect(childTasks).toMatchObject({ + items: [ + { + name: "Mock Data Creator Task #1 of 1" + } + ], + meta: { + totalCount: 1 + } + }); + }); +}); diff --git a/packages/api-headless-cms-es-tasks/jest.setup.js b/packages/api-headless-cms-es-tasks/jest.setup.js new file mode 100644 index 00000000000..07ca953f954 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/jest.setup.js @@ -0,0 +1,12 @@ +const base = require("../../jest.config.base"); +const presets = require("@webiny/project-utils/testing/presets")( + ["@webiny/api-admin-users", "storage-operations"], + ["@webiny/api-headless-cms", "storage-operations"], + ["@webiny/api-i18n", "storage-operations"], + ["@webiny/api-security", "storage-operations"], + ["@webiny/api-tenancy", "storage-operations"] +); + +module.exports = { + ...base({ path: __dirname }, presets) +}; diff --git a/packages/api-headless-cms-es-tasks/package.json b/packages/api-headless-cms-es-tasks/package.json new file mode 100644 index 00000000000..c9dfebabcbf --- /dev/null +++ b/packages/api-headless-cms-es-tasks/package.json @@ -0,0 +1,49 @@ +{ + "name": "@webiny/api-headless-cms-es-tasks", + "version": "0.0.0", + "main": "index.js", + "description": "Elasticsearch Background tasks for Webiny Headless CMS", + "keywords": [ + "api-headless-cms-es-tasks:base" + ], + "repository": { + "type": "git", + "url": "https://github.com/webiny/webiny-js.git", + "directory": "packages/api-headless-cms-es-tasks" + }, + "license": "MIT", + "dependencies": { + "@webiny/api-elasticsearch": "0.0.0", + "@webiny/api-headless-cms": "0.0.0", + "@webiny/api-headless-cms-ddb-es": "0.0.0", + "@webiny/handler": "0.0.0", + "@webiny/handler-aws": "0.0.0", + "@webiny/tasks": "0.0.0", + "@webiny/utils": "0.0.0" + }, + "devDependencies": { + "@babel/cli": "^7.22.6", + "@babel/core": "^7.22.8", + "@babel/preset-env": "^7.22.7", + "@faker-js/faker": "^8.4.1", + "@webiny/api": "0.0.0", + "@webiny/api-i18n": "0.0.0", + "@webiny/api-security": "0.0.0", + "@webiny/api-tenancy": "0.0.0", + "@webiny/api-wcp": "0.0.0", + "@webiny/cli": "0.0.0", + "@webiny/handler-graphql": "0.0.0", + "@webiny/plugins": "0.0.0", + "@webiny/project-utils": "0.0.0", + "ttypescript": "^1.5.13", + "typescript": "^4.7.4" + }, + "scripts": { + "build": "yarn webiny run build", + "watch": "yarn webiny run watch" + }, + "publishConfig": { + "access": "public", + "directory": "dist" + } +} diff --git a/packages/api-headless-cms-es-tasks/src/index.ts b/packages/api-headless-cms-es-tasks/src/index.ts new file mode 100644 index 00000000000..3901b078ae0 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/index.ts @@ -0,0 +1,10 @@ +import { createMockDataManagerTask } from "~/tasks/createMockDataManagerTask"; +import { createMockDataCreatorTask } from "~/tasks/createMockDataCreatorTask"; + +export * from "./tasks/createMockDataManagerTask"; +export * from "./tasks/createMockDataCreatorTask"; + +export const createHeadlessCmsEsTasks = () => [ + createMockDataManagerTask(), + createMockDataCreatorTask() +]; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/MockDataCreator.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/MockDataCreator.ts new file mode 100644 index 00000000000..885deaee757 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/MockDataCreator.ts @@ -0,0 +1,109 @@ +import { ITaskResponseResult, ITaskRunParams } from "@webiny/tasks"; +import { IMockDataCreatorInput, IMockDataCreatorOutput } from "./types"; +import { CmsModelManager } from "@webiny/api-headless-cms/types"; +import { mockData } from "./mockData"; +import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; +import { Context } from "~/types"; +import { ElasticsearchCatClusterHealthStatus } from "@webiny/api-elasticsearch/operations/types"; +import { mdbid } from "@webiny/utils"; + +export class MockDataCreator< + C extends Context, + I extends IMockDataCreatorInput, + O extends IMockDataCreatorOutput +> { + public async execute(params: ITaskRunParams): Promise> { + const { context, isAborted, input, response, isCloseToTimeout } = params; + + if (isAborted()) { + return response.aborted(); + } else if (isCloseToTimeout()) { + return response.continue({ + ...input + }); + } + + let manager: CmsModelManager; + try { + manager = await context.cms.getEntryManager("cars"); + } catch (ex) { + return response.error(ex); + } + + const healthCheck = createWaitUntilHealthy(context.elasticsearch, { + waitingTimeStep: 20, + maxWaitingTime: 150, + maxProcessorPercent: 80, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, + maxRamPercent: 101 + }); + + let createdAmount = input.createdAmount; + + for (; createdAmount < input.totalAmount; createdAmount++) { + if (isAborted()) { + return response.aborted(); + } else if (isCloseToTimeout()) { + return response.continue({ + ...input, + createdAmount + }); + } + if (createdAmount % 50 === 0) { + try { + await healthCheck.wait({ + async onUnhealthy({ + waitingTimeStep, + startedAt, + mustEndAt, + runs, + waitingReason + }) { + console.warn(`Cluster is unhealthy on run #${runs}.`, { + startedAt, + mustEndAt, + waitingTimeStep, + waitingReason + }); + }, + async onTimeout({ + waitingTimeStep, + startedAt, + mustEndAt, + runs, + waitingReason + }) { + console.warn(`Cluster health check timed out on run #${runs}.`, { + startedAt, + mustEndAt, + waitingTimeStep, + waitingReason + }); + } + }); + } catch (ex) { + return response.continue( + { + ...input, + createdAmount + }, + { + seconds: 30 + } + ); + } + } + const taskId = params.store.getTask().id; + try { + await manager.create({ + id: `${taskId}${mdbid()}`, + ...mockData + }); + } catch (ex) { + return response.error(ex); + } + } + + return params.response.done(`Created ${input.totalAmount} records.`); + } +} diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/mockData.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/mockData.ts new file mode 100644 index 00000000000..861386928ec --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/mockData.ts @@ -0,0 +1,1361 @@ +import { ROOT_FOLDER } from "@webiny/api-headless-cms/constants"; + +const text = + "orem ipsum dolor sit amet, consectetur adipiscing elit. Sed augue justo, tempor vel aliquet id, sodales ut est. Morbi sodales lacus lacinia justo molestie, a vulputate ligula ornare. Cras commodo augue sed suscipit auctor. Mauris dapibus vulputate nibh, ultrices porta risus ullamcorper in. Praesent iaculis faucibus tellus, eget egestas mauris ultrices in. Ut dapibus felis id tincidunt tempor. Cras imperdiet lectus et mollis facilisis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur vitae nulla ut quam cursus viverra ac sed felis. Cras eget nulla nunc. Phasellus facilisis ante in velit tincidunt posuere. Aenean a cursus ex. In a accumsan metus. Nullam faucibus sapien ac pulvinar volutpat. Sed varius sem quis libero pharetra ullamcorper."; + +const paragraph = (): string => { + return text; +}; + +const paragraphs = (length = 1): string => { + return Array.from({ length }) + .map(() => paragraph()) + .join("\n"); +}; + +const createMockData = () => { + return { + wbyAco_location: { + folderId: ROOT_FOLDER + }, + standardTires: "P235/75R15 BSW", + newUsedBg: "USED", + ymmMaxPriceRange: 23810, + carsEditorialRating: null, + priceRangeSlug: "under-20000", + specifications: { + specGvwr: "5,150 lb", + stdMpgWithUnits: "16/22 mpg", + specHorsepower: "185@5,600", + driveTrain: "4WD", + rearShoulderRoom: "N/A", + specTonnage: "N/A", + vehicleClass: "Compact Pickup 4WD", + cylinderConfiguration: "In-line", + seatingCapacity: "3/3", + specWidth: "68.6 in", + transmissionType: "Manual", + frontShoulderRoom: "57.1 in", + heroValue1: "16/22", + numberOfCylinders: "4", + specWheelase: "111.3 in", + rearLegroom: "N/A", + fuelCapacity: "19.0", + engineType: "Gas", + rearHeadroom: "N/A", + groundClearance: "7.9 in", + payloadCapacity: "1,535 lb", + specHeight: "67.6 in", + stdEpaMpg: "16/22", + curbWeight: "3,615 lb", + specTorque: "190@2,800", + heroLabel1: "MPG", + frontLegroom: "42.2 in", + drivingRange: "361 miles", + specLength: "192.4 in", + fuelType: "Unleaded Regular", + engineName: "4-Cyl, 2.9 Liter", + cargoCapacity: "N/A", + transmissionName: "5 Speed Manual w/Overdrive", + frontHeadroom: "39.6 in", + towingCapacity: "4,000 lb" + }, + carsVehicle: "Chevrolet-Colorado-2007-LS 4WD Regular Cab", + marketingImage: null, + priceRangeText: "Under $20K", + baseVehicle: 0, + carsUid: 756335, + bodyTypeText: "Trucks", + slugBodyType: "truck", + carsMakePageShow: 0, + slugYearMakeModel: "2007/chevrolet/colorado", + safetyRatings: { + nhtsaRatingFrontDriver: "4", + nhtsaRatingRollover: "4", + nhtsaRatingFrontPassenger: "4", + iihsBestPick: "0", + nhtsaRatingRearSide: "No Data", + iihsOverallSideCrash: "N/R", + nhtsaRatingOverall: "N/R", + nhtsaRatingFrontSide: "4", + iihsFrontModerateOverlap: "N/R", + iihsFrontSmallOverlap: "N/R", + iihsRearCrash: "N/R", + iihsRoofStrength: "N/R" + }, + bodyStyle: "Truck", + slugMake: "chevrolet", + bodyType: "Truck", + secondaryBodyTypeOrder: null, + ymmLowestPriceRange: 14085, + cpoComparison: { + cpoMake: "Chevrolet", + cpoYear: 2007, + cpoTotalMonthly: null, + usedMonthly: null, + usedMaintenanceRepairs: null, + vehicleRating: "N/A", + cpoMaintenanceRepairs: null, + usedCarTrim: "LS 4WD Regular Cab", + usedTotalMonthly: null, + modelName: "Colorado", + cpoPrice: "N/R", + usedCarPrice: null, + cpoMonthly: null + }, + secondaryBodyType: null, + slugHybridElectricCategory: null, + featuredImage: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-angular-front.png", + featuresIntellicar: { + driveCategory: [ + { + categorySequenceNmb: 10, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Drivetrain, 4WD", + availability: "Std" + } + ], + mirrorsCategory: [ + { + categorySequenceNmb: 16, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Dual Manual", + availability: "Std" + } + ], + suspensionCategory: [ + { + categorySequenceNmb: 25, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Springs, Front, 2755-lb Cap", + availability: "Std" + }, + { + categorySequenceNmb: 25, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Springs, Rear, 2900-lb Cap", + availability: "Std" + }, + { + categorySequenceNmb: 25, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Stabilizer Bar, Front", + availability: "Std" + } + ], + soundCategory: [ + { + categorySequenceNmb: 22, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Radio, AM/FM Stereo", + availability: "Std" + }, + { + categorySequenceNmb: 22, + includesNote: null, + invoice: 361.05, + sequenceNmb: 1, + retail: 435, + name: " Radio, AM/FM Stereo w/CD & MP3", + availability: "Opt" + } + ], + engineCategory: [ + { + categorySequenceNmb: 2, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Engine: 4-Cyl, 2.9 Liter", + availability: "Std" + }, + { + categorySequenceNmb: 2, + includesNote: null, + invoice: 830, + sequenceNmb: 1, + retail: 1000, + name: " Engine: 5-Cyl, 3.7 Liter", + availability: "Opt" + } + ], + packageCategory: [ + { + categorySequenceNmb: 1, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Option Pkg", + availability: "Std" + }, + { + categorySequenceNmb: 1, + includesNote: " INCLUDES: [**W] Vinyl Seat Trim", + invoice: 141.75, + sequenceNmb: 1, + retail: 150, + name: " Option Pkg, Work Truck", + availability: "Opt" + }, + { + categorySequenceNmb: 1, + includesNote: paragraphs(1), + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Street Pack", + availability: "Opt" + }, + { + categorySequenceNmb: 1, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Suspension Pkg, Standard", + availability: "Std" + } + ], + otherCategory: [], + paintCategory: [ + { + categorySequenceNmb: 19, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Solid", + availability: "Std" + } + ], + specialFeesCreditsOptionsCategory: [ + { + categorySequenceNmb: 23, + includesNote: null, + invoice: 50, + sequenceNmb: 1, + retail: 0, + name: " New Jersey Surcharge", + availability: "Opt" + }, + { + categorySequenceNmb: 23, + includesNote: null, + invoice: -50, + sequenceNmb: 1, + retail: 0, + name: " New Jersey Surcharge Refund", + availability: "Opt" + } + ], + transmissionCategory: [ + { + categorySequenceNmb: 3, + includesNote: null, + invoice: 908.85, + sequenceNmb: 1, + retail: 1095, + name: " 4 Speed Automatic w/Overdrive", + availability: "Opt" + }, + { + categorySequenceNmb: 3, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " 5 Speed Manual w/Overdrive", + availability: "Std" + } + ], + interiorCategory: [ + { + categorySequenceNmb: 13, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Cargo Mat Delete", + availability: "Std" + }, + { + categorySequenceNmb: 13, + includesNote: " ", + invoice: 58.1, + sequenceNmb: 1, + retail: 70, + name: " Carpeting", + availability: "Opt" + }, + { + categorySequenceNmb: 13, + includesNote: null, + invoice: 20.75, + sequenceNmb: 1, + retail: 25, + name: " Floor Mats, Vinyl", + availability: "Opt" + } + ], + convenienceCategory: [ + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Air Conditioning, Manual", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: " ", + invoice: 601.75, + sequenceNmb: 1, + retail: 725, + name: " Cargo Cover, Hard", + availability: "Opt" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 211.65, + sequenceNmb: 1, + retail: 255, + name: " Cargo Cover, Soft", + availability: "Opt" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Clock, Digital (w/Radio)", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Cupholders, (2)", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Driver's Information Center", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Headlamp Control, Automatic", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Mirror, RH Visor Vanity", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Power Outlets, (2)", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Speed Control", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Steering Wheel, Tilt", + availability: "Std" + }, + { + categorySequenceNmb: 9, + includesNote: null, + invoice: 145.25, + sequenceNmb: 1, + retail: 175, + name: " Window, Sliding Rear", + availability: "Opt" + } + ], + topColorCategory: [], + safetyCategory: [ + { + categorySequenceNmb: 20, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Lights, Daytime Running", + availability: "Std" + }, + { + categorySequenceNmb: 20, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Restraint System, Dual Front Air Bag", + availability: "Std" + }, + { + categorySequenceNmb: 20, + includesNote: null, + invoice: 327.85, + sequenceNmb: 1, + retail: 395, + name: " Restraint System, F&R Head Curtain Air Bag", + availability: "Opt" + }, + { + categorySequenceNmb: 20, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Tire Pressure Monitor", + availability: "Std" + }, + { + categorySequenceNmb: 20, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " W/S Wipers, Intermittent", + availability: "Std" + } + ], + truckBedsCategory: [], + lightingCategory: [], + bodyCategory: [ + { + categorySequenceNmb: 7, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Body, Fleetside", + availability: "Std" + } + ], + engineeringCategory: [ + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " 5150-lb GVWR", + availability: "N/C" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Alternator, 125-Amp", + availability: "Std" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Axle Ratio, 3.73", + availability: "Std" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Axle, Front, 2753-lb Cap", + availability: "Std" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 244.85, + sequenceNmb: 1, + retail: 295, + name: " Axle, Locking Rear", + availability: "Opt" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Axle, Rear, 2900-lb Cap", + availability: "Std" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Battery, HD 690-cca", + availability: "Std" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Fuel Tank, 19.0 Gal Cap", + availability: "Std" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 41.5, + sequenceNmb: 1, + retail: 50, + name: " Heater, Engine Block", + availability: "Opt" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Tachometer", + availability: "Std" + }, + { + categorySequenceNmb: 11, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Transfer Case, Electronic Insta-Trac", + availability: "Std" + } + ], + brakesCategory: [ + { + categorySequenceNmb: 8, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Power Disc/Drum with 4 Wheel ABS", + availability: "Std" + } + ], + exteriorColorCategory: [ + { + categorySequenceNmb: 4, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Birch Silver", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Black", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Deep Ruby", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Granite Blue", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Imperial Blue", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Pace Blue", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Summit White", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Sunburst Orange", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Victory Red", + availability: "N/C" + }, + { + categorySequenceNmb: 4, + includesNote: null, + invoice: 136.95, + sequenceNmb: 1, + retail: 165, + name: " Yellow", + availability: "Opt" + } + ], + noteCategory: [], + tiresCategory: [ + { + categorySequenceNmb: 26, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " P225/75R15 BSW", + availability: "N/C" + }, + { + categorySequenceNmb: 26, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " P235/75R15 BSW", + availability: "Std" + }, + { + categorySequenceNmb: 26, + includesNote: null, + invoice: 78.85, + sequenceNmb: 1, + retail: 95, + name: " Spare Tire, Conventional", + availability: "Opt" + }, + { + categorySequenceNmb: 26, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Spare Tire, Limited Use", + availability: "Std" + } + ], + mandatoryCategory: [ + { + categorySequenceNmb: 15, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Emission Equipment Override, CA/MA/ME/NY/VT", + availability: "N/C" + }, + { + categorySequenceNmb: 15, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Emission Equipment Override, Federal", + availability: "N/C" + }, + { + categorySequenceNmb: 15, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Emission Equipment, California", + availability: "N/C" + }, + { + categorySequenceNmb: 15, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Emission Equipment, Federal", + availability: "N/C" + }, + { + categorySequenceNmb: 15, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Emission Equipment, MA/ME/NY/VT", + availability: "N/C" + } + ], + steeringCategory: [ + { + categorySequenceNmb: 24, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Steering, Power", + availability: "Std" + } + ], + interiorColorCategory: [ + { + categorySequenceNmb: 5, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Medium Pewter", + availability: "N/C" + } + ], + towingCategory: [ + { + categorySequenceNmb: 27, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Towing Cap, 4000-lb Max (When Properly Equipped)", + availability: "Std" + }, + { + categorySequenceNmb: 27, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Trailer Harness", + availability: "Std" + }, + { + categorySequenceNmb: 27, + includesNote: " INCLUDES: Trailer Harness", + invoice: 224.1, + sequenceNmb: 1, + retail: 270, + name: " Trailer Hitch", + availability: "Opt" + }, + { + categorySequenceNmb: 27, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Trailer Hitch Delete", + availability: "Std" + } + ], + wheelsCategory: [], + exteriorCategory: [ + { + categorySequenceNmb: 12, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Bracket, Front License Plate", + availability: "N/C" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Bumpers, Chrome F&R w/Rear Step", + availability: "Std" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 62.25, + sequenceNmb: 1, + retail: 75, + name: " Glass, Deep Tinted", + availability: "Opt" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Grille Surround, Dark Smoke Gray", + availability: "Std" + }, + { + categorySequenceNmb: 12, + includesNote: " ", + invoice: 83, + sequenceNmb: 1, + retail: 100, + name: " Moldings, Body Side", + availability: "Opt" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 170.15, + sequenceNmb: 1, + retail: 205, + name: paragraph(), + availability: "Opt" + }, + { + categorySequenceNmb: 12, + includesNote: " ", + invoice: 112.05, + sequenceNmb: 1, + retail: 135, + name: " Pickup Box Protectors, Top Rail", + availability: "Opt" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 311.25, + sequenceNmb: 1, + retail: 375, + name: " Running Boards", + availability: "Opt" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 332, + sequenceNmb: 1, + retail: 400, + name: paragraph(), + availability: "Opt" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Skid Plate, Front Underbody Shield", + availability: "Std" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 83, + sequenceNmb: 1, + retail: 100, + name: " Tailgate Edge Protector", + availability: "Opt" + }, + { + categorySequenceNmb: 12, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: paragraph(), + availability: "Std" + } + ], + seatsCategory: [ + { + categorySequenceNmb: 21, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Seat Trim, Cloth ", + availability: "Std" + }, + { + categorySequenceNmb: 21, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Seat Trim, Cloth **D", + availability: "N/C" + }, + { + categorySequenceNmb: 21, + includesNote: null, + invoice: 0, + sequenceNmb: 2, + retail: 0, + name: " Seat Trim, Cloth **D", + availability: "N/C" + }, + { + categorySequenceNmb: 21, + includesNote: " ", + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Seat Trim, Vinyl", + availability: "N/C" + }, + { + categorySequenceNmb: 21, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Seat, Split Bench ", + availability: "Std" + }, + { + categorySequenceNmb: 21, + includesNote: null, + invoice: 0, + sequenceNmb: 1, + retail: 0, + name: " Seat, Split Bench AM6", + availability: "N/C" + }, + { + categorySequenceNmb: 21, + includesNote: null, + invoice: 0, + sequenceNmb: 2, + retail: 0, + name: " Seat, Split Bench AM6", + availability: "N/C" + } + ] + }, + vehicleRankingClass: [], + slugMakeModel: null, + secondaryBodyTypeText: null, + latestYear: 0, + ownershipCosts: { + depreciationTotal: "N/A", + total5YearOcCostLessHybrid: null, + total5YearOcCost: "N/A", + valueRating: "N/A", + repairsTotal: "N/A", + hybridTax: "N/A", + stateFeesTotal: "N/A", + fuelTotal: "N/A", + maintenanceTotal: "N/A", + similarVehicles: null, + financingTotal: "N/A", + difference5YearCost: null, + insuranceTotal: "N/A" + }, + carsMake: "Chevrolet", + carsYear: 2007, + slugModelName: "colorado", + mainCategory: "Utility/Offroad", + vehicleStatus: 1, + vehicleNmb: 19335, + slugDieselCategory: null, + warranty: { + roadsideWarrantyMonths: null, + fullWarrantyMiles: "36,000", + powertrainWarrantyMiles: "100,000", + corrosionWarrantyMonths: "72", + powertrainWarrantyMonths: "60", + corrosionWarrantyMiles: "100,000", + maintenanceWarrantyMonths: "None", + fullWarrantyMonths: "36", + maintenanceWarrantyMiles: "None", + roadsideWarrantyMiles: "N/A" + }, + makeDiscontinued: 0, + slugSubcategory: "midsize-pickup", + makeIcon: "chevrolet.png", + slugSecondaryBodyType: null, + makeFeaturedImage: "chevy.jpg", + carsRebates: [], + pricing: { + pMsrpValue: "17485.00", + pExcellentRetailValue: null, + pFmpOrCrvLabel: "Clean Retail Value", + pMsrp: 17485, + pTotalTargetPrice: 0, + pTargetPrice: 0, + pGasGuzzlerTax: 0, + pMsrpLabel: "Original MSRP", + pNewMonthly: 0, + pAverageSalesTaxAndFees: 0, + pCpoPrice: "N/R", + pFmpOrCrvValue: "N/A", + pInvoice: 16523.33, + pTargetRebate: 0, + pEffectiveOn: "2007-03-26T00:00:00.000Z", + pDestination: 685 + }, + recalls: [ + { + recallsPotaff: 3227, + correctiveAction: paragraphs(2), + yearText: 2007, + rcDate: "2006-08-11T00:00:00.000Z", + mfgText: "GENERAL MOTORS CORP.", + makeText: "CHEVROLET", + modelText: "COLORADO", + consequenceDefect: paragraphs(2), + descDefect: paragraphs(3), + recallsCampNumber: "06V307000", + recallId: 63244, + compName: "WHEELS:RIM " + }, + { + recallsPotaff: 42540, + correctiveAction: paragraphs(1), + yearText: 2007, + rcDate: "2009-05-11T00:00:00.000Z", + mfgText: "DOPE, INC.", + makeText: "CHEVROLET", + modelText: "S10", + consequenceDefect: paragraph(), + descDefect: paragraphs(4), + recallsCampNumber: "09E025000", + recallId: 102448, + compName: "EXTERIOR LIGHTING:HEADLIGHTS" + }, + { + recallsPotaff: 185903, + correctiveAction: paragraphs(4), + yearText: 2007, + rcDate: "2009-07-29T00:00:00.000Z", + mfgText: "GENERAL MOTORS CORP.", + makeText: "CHEVROLET", + modelText: "COLORADO", + consequenceDefect: paragraphs(2), + descDefect: paragraphs(2), + recallsCampNumber: "09V310000", + recallId: 102549, + compName: "EXTERIOR LIGHTING:BRAKE LIGHTS:SWITCH" + }, + { + recallsPotaff: 192676, + correctiveAction: paragraphs(2), + yearText: 2007, + rcDate: "2010-11-18T00:00:00.000Z", + mfgText: "GENERAL MOTORS CORP.", + makeText: "CHEVROLET", + modelText: "COLORADO", + consequenceDefect: paragraphs(6), + descDefect: paragraphs(2), + recallsCampNumber: "10V575000", + recallId: 121363, + compName: "CHILD SEAT" + } + ], + cpoProgram: { + cpoWarrantyBbnc: paragraph(), + cpoInspectionPoint: "172", + cpoWebsite: "https://www.gmcertified.com", + cpoAdditionalBenefits: paragraphs(2), + cpoAgeMileage: paragraph(), + cpoName: "Chevrolet/Buick/GMC Certified Pre-Owned Vehicles", + cpoLease: "No", + cpoCustomerServiceNumber: "(866) 694-6546", + cpoInspectionScore: 99, + cpoWarranty: paragraphs(2), + cpoReturnExchange: "3-day/150-mile Vehicle Exchange Program", + cpoFinancing: "Yes", + cpoWarrantyExtended: "Yes", + cpoHistoryReport: 1, + cpoParticipation: "3,400 dealerships enrolled (94% of available dealerships)", + cpoProgramOverview: paragraphs(6), + cpoWarrantyDeductible: "No", + cpoWarrantyTransferable: "Yes", + cpoRoadside: paragraph() + }, + priceRangeValue: 1, + dieselCategory: null, + carsPricePageShow: 0, + combinedPrice: 18170, + carsSubcategory: "Midsize Pickup", + hubs: [ + { + hubsImage: "epa.svg", + hubsText: "16 / 22 mpg", + makeModelHub: 1, + hubsName: "Fuel Economy" + }, + { + hubsImage: "engine.svg", + hubsText: "185@5,600", + makeModelHub: 2, + hubsName: "Horsepower" + }, + { + hubsImage: "torque.svg", + hubsText: "190@2,800", + makeModelHub: 3, + hubsName: "Torque" + }, + { + hubsImage: null, + hubsText: null, + makeModelHub: 4, + hubsName: null + } + ], + carsDiscontinued: 0, + updatedOn: "2024-01-08T17:09:18.000Z", + retainedValue: "N/A", + carMatchCustomRankings: [], + carsModelName: "Colorado", + makeThumbnailUrl: "https://mocks.webiny.com/chevrolet.png", + slugBodystyle: "truck", + slugMainCategory: "utilityoffroad", + powertrains: [ + { + ptCityMpg: 15, + ptHwyMpg: 21, + ptHorseower: 185 + }, + { + ptCityMpg: 15, + ptHwyMpg: 21, + ptHorseower: 242 + }, + { + ptCityMpg: 16, + ptHwyMpg: 22, + ptHorseower: 185 + } + ], + trimName: "LS 4WD Regular Cab", + carsCombinedEpaMpg: 18.7, + releaseType: "Complete", + ymmPriceRange: "$14,085 - $23,810", + seoText: { + seoContent: paragraphs(5), + seoTitle: "Chevrolet Trucks", + seoType: "truck" + }, + slugTrimName: "ls-4wd-regular-cab", + oemUrl: "www.chevrolet.com", + propertyType: "Standard", + bodyTypeOrder: 3, + horsePowerVal: 185, + images: [ + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-angular-front.png", + imageAngle: "angular front", + imageOrder: 1, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-angular-rear.png", + imageAngle: "angular rear", + imageOrder: 2, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-dashboard.png", + imageAngle: "dashboard", + imageOrder: 3, + imageType: "interior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-side-view.png", + imageAngle: "side view", + imageOrder: 4, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-wheel-cap.png", + imageAngle: "wheel cap", + imageOrder: 5, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-front-view.png", + imageAngle: "front view", + imageOrder: 6, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-rear-view.png", + imageAngle: "rear view", + imageOrder: 7, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-steering-wheel.png", + imageAngle: "steering wheel", + imageOrder: 8, + imageType: "interior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-instrument-cluster.png", + imageAngle: "instrument cluster", + imageOrder: 9, + imageType: "interior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-front-seat.png", + imageAngle: "front seat", + imageOrder: 11, + imageType: "interior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-rear-seat.png", + imageAngle: "rear seat", + imageOrder: 12, + imageType: "interior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-instrument-panel.png", + imageAngle: "instrument panel", + imageOrder: 13, + imageType: "interior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-grille.png", + imageAngle: "grille", + imageOrder: 15, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-headlight.png", + imageAngle: "headlight", + imageOrder: 16, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-taillight.png", + imageAngle: paragraph(), + imageOrder: 17, + imageType: "exterior" + }, + { + imageUrl: "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-doors.png", + imageAngle: "doors", + imageOrder: 18, + imageType: "exterior" + }, + { + imageUrl: "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-trunk.png", + imageAngle: "trunk", + imageOrder: 19, + imageType: "exterior" + }, + { + imageUrl: + "https://mocks.webiny.com/2007-chevrolet-colorado-ls-2wd-truck-door-controls.png", + imageAngle: paragraph(), + imageOrder: 22, + imageType: "interior" + } + ], + hybridElectricCategory: null, + manufacturerCd: "CT15403" + }; +}; + +export const mockData = createMockData(); diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/types.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/types.ts new file mode 100644 index 00000000000..7219fe4ae01 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataCreator/types.ts @@ -0,0 +1,8 @@ +import { ITaskResponseDoneResultOutput } from "@webiny/tasks"; + +export interface IMockDataCreatorInput { + totalAmount: number; + createdAmount: number; +} + +export type IMockDataCreatorOutput = ITaskResponseDoneResultOutput; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/MockDataManager.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/MockDataManager.ts new file mode 100644 index 00000000000..e0857e5696b --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/MockDataManager.ts @@ -0,0 +1,115 @@ +import { ITask, ITaskResponseResult, ITaskRunParams, TaskDataStatus } from "@webiny/tasks"; +import { IMockDataManagerInput, IMockDataManagerOutput } from "~/tasks/MockDataManager/types"; +import { calculateAmounts } from "./calculateAmounts"; +import { IMockDataCreatorInput } from "~/tasks/MockDataCreator/types"; +import { calculateSeconds, WAIT_MAX_SECONDS } from "./calculateSeconds"; +import { MOCK_DATA_CREATOR_TASK_ID } from "~/tasks/createMockDataCreatorTask"; +import { createModelAndGroup } from "~/tasks/MockDataManager/createModelAndGroup"; +import { Context } from "~/types"; +import { disableIndexing, enableIndexing } from "~/utils"; + +export class MockDataManager< + C extends Context, + I extends IMockDataManagerInput, + O extends IMockDataManagerOutput +> { + public async execute(params: ITaskRunParams): Promise> { + const { context, isAborted, input, response, trigger, store } = params; + + const taskId = store.getTask().id; + if (isAborted()) { + await this.abortChildTasks(context, taskId); + return response.aborted(); + } else if (input.seconds) { + const items = await this.listChildTasksNotDone(context, taskId); + + /** + * If there are still running creator tasks, we need to wait a bit more. + */ + if (items.length > 0) { + return response.continue( + { + ...input + }, + { + seconds: input.seconds || WAIT_MAX_SECONDS + } + ); + } + /** + * If there are no running tasks, we can enable indexing and finish the manager task. + */ + await enableIndexing({ + client: context.elasticsearch, + model: { + modelId: input.modelId, + tenant: "root", + locale: "en-US" + } + }); + return response.done(); + } + + const result = await createModelAndGroup({ + context, + modelId: input.modelId, + overwrite: input.overwrite + }); + if (typeof result === "string") { + return response.done(result); + } + + await disableIndexing({ + model: result.model, + client: context.elasticsearch + }); + + const { amountOfTasks, amountOfRecords } = calculateAmounts(input.amount); + + const seconds = calculateSeconds(amountOfRecords); + + for (let current = 0; current < amountOfTasks; current++) { + await trigger({ + definition: MOCK_DATA_CREATOR_TASK_ID, + input: { + totalAmount: amountOfRecords, + createdAmount: 0 + }, + name: `Mock Data Creator Task #${current + 1} of ${amountOfTasks}` + }); + } + + return response.continue( + { + ...input, + seconds, + amountOfTasks, + amountOfRecords + }, + { + seconds + } + ); + } + + private async listChildTasksNotDone(context: Context, id: string): Promise { + const { items } = await context.tasks.listTasks({ + where: { + parentId: id, + taskStatus_in: [TaskDataStatus.PENDING, TaskDataStatus.RUNNING] + }, + limit: 10000 + }); + return items; + } + + private async abortChildTasks(context: Context, id: string): Promise { + const items = await this.listChildTasksNotDone(context, id); + for (const item of items) { + await context.tasks.abort({ + id: item.id, + message: "Aborted by parent task." + }); + } + } +} diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateAmounts.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateAmounts.ts new file mode 100644 index 00000000000..b85d8b2451e --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateAmounts.ts @@ -0,0 +1,73 @@ +interface ICalculateAmounts { + amountOfTasks: number; + amountOfRecords: number; +} + +interface IMaxRecordsPerTask { + amount: number; + percentagePerTask: number; +} + +const constrains: IMaxRecordsPerTask[] = [ + { + amount: 50, + percentagePerTask: 100 + }, + { + amount: 1000, + percentagePerTask: 50 + }, + { + amount: 100000, + percentagePerTask: 20 + } + // { + // amount: 50000, + // percentagePerTask: 10 + // }, + // { + // amount: 750000, + // percentagePerTask: 10 + // }, + // { + // amount: 1000000, + // percentagePerTask: 2 + // }, + // { + // amount: 5000000, + // percentagePerTask: 1 + // }, + // { + // amount: 10000000, + // percentagePerTask: 0.5 + // } +]; + +const findValue = (input: number): IMaxRecordsPerTask => { + for (const value of constrains) { + if (input <= value.amount) { + return value; + } + } + throw new Error(`No valid value found - input value is too large: ${input}.`); +}; + +export const calculateAmounts = (input: number): ICalculateAmounts => { + const values = findValue(input); + + const { percentagePerTask } = values; + /** + * Do not ask... + */ + const amountOfRecords = + percentagePerTask < 100 + ? Math.round(parseFloat(String(input / (100 / percentagePerTask)))) + : input; + + const amountOfTasks = Math.ceil(100 / percentagePerTask); + + return { + amountOfRecords, + amountOfTasks + }; +}; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateSeconds.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateSeconds.ts new file mode 100644 index 00000000000..9cb44fcd2fa --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/calculateSeconds.ts @@ -0,0 +1,15 @@ +const recordsPerSecond = 4; +export const WAIT_MIN_SECONDS = 15; +export const WAIT_MAX_SECONDS = 90; + +export const calculateSeconds = (records: number): number => { + const seconds = Math.ceil(records / recordsPerSecond); + if (seconds > WAIT_MAX_SECONDS) { + return WAIT_MAX_SECONDS; + } else if (seconds < WAIT_MIN_SECONDS) { + return WAIT_MIN_SECONDS; + } else if (seconds > 0) { + return seconds; + } + return WAIT_MAX_SECONDS; +}; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/constants.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/constants.ts new file mode 100644 index 00000000000..bb8925e8a72 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/constants.ts @@ -0,0 +1 @@ +export const CARS_MODEL_ID = "cars"; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts new file mode 100644 index 00000000000..9deec219480 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts @@ -0,0 +1,44 @@ +import { CmsGroup, CmsModel } from "@webiny/api-headless-cms/types"; +import { Context } from "~/types"; +import { createGroupData } from "./group"; +import { createCarsModel } from "./model"; + +interface ICreateModelAndGroupParams { + context: Context; + modelId: string; + overwrite?: boolean; +} +export interface ICreateModelAndGroupResultSuccess { + group: CmsGroup; + model: CmsModel; +} +export type ICreateModelAndGroupResult = string | ICreateModelAndGroupResultSuccess; + +export const createModelAndGroup = async ( + params: ICreateModelAndGroupParams +): Promise => { + const { context, modelId, overwrite = false } = params; + /** + * First we need to check if the model already exists in the database. If not, we need to create it. + */ + let model = (await context.cms.listModels()).find(m => m.modelId === modelId); + let group: CmsGroup | undefined; + if (model && !overwrite) { + return `Model "${modelId}" already exists.`; + } else if (!model) { + group = (await context.cms.listGroups()).find(group => group.slug === "mocks"); + if (!group) { + const groupData = createGroupData(); + group = await context.cms.createGroup(groupData); + } + /** + * Possibly we need to create the model. + */ + const carsModel = createCarsModel(group); + model = await context.cms.createModel(carsModel); + } + return { + group: group as CmsGroup, + model: model as CmsModel + }; +}; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/group.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/group.ts new file mode 100644 index 00000000000..78fbea800f2 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/group.ts @@ -0,0 +1,11 @@ +import { CmsGroupCreateInput } from "@webiny/api-headless-cms/types"; + +export const createGroupData = (): CmsGroupCreateInput => { + return { + id: "mocks", + icon: "fas/star", + name: "Mocks", + description: "A group for mock models", + slug: "mocks" + }; +}; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/model.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/model.ts new file mode 100644 index 00000000000..823c6c1a555 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/model.ts @@ -0,0 +1,5549 @@ +import { CmsModelCreateInput } from "@webiny/api-headless-cms/types"; +import { CmsGroup } from "@webiny/api-headless-cms/types"; +import { CARS_MODEL_ID } from "./constants"; + +export const createCarsModel = (group: CmsGroup): CmsModelCreateInput => { + return { + name: "Cars", + modelId: CARS_MODEL_ID, + singularApiName: "Cars", + pluralApiName: "Cars", + description: "Cars Data Model", + group: group.id, + fields: [ + { + id: "carsVehicle", + fieldId: "carsVehicle", + type: "text", + label: "Vehicle", + helpText: "Make Model Year and Trim", + renderer: { + name: "text-input" + }, + validation: [ + { + name: "required", + message: "Value is required." + } + ] + }, + { + id: "vehicleNmb", + fieldId: "vehicleNmb", + type: "number", + label: "VehicleNumber", + helpText: "A unique vehicle number", + renderer: { + name: "number-input" + }, + validation: [ + { + name: "required", + message: "Value is required." + } + ] + }, + { + id: "carsYear", + fieldId: "carsYear", + type: "number", + label: "Year", + renderer: { + name: "number-input" + } + }, + { + id: "carsMake", + fieldId: "carsMake", + type: "text", + label: "Make", + renderer: { + name: "text-input" + } + }, + { + id: "carsModelName", + fieldId: "carsModelName", + type: "text", + label: "ModelName", + renderer: { + name: "text-input" + } + }, + { + id: "trimName", + fieldId: "trimName", + type: "text", + label: "TrimName", + multipleValues: false, + renderer: { + name: "text-input" + } + }, + { + id: "bodyStyle", + fieldId: "bodyStyle", + multipleValues: false, + type: "text", + label: "BodyStyle", + renderer: { + name: "text-input" + } + }, + { + id: "manufacturerCd", + fieldId: "manufacturerCd", + type: "text", + label: "Manufacturer Code", + renderer: { + name: "text-input" + } + }, + { + id: "releaseType", + fieldId: "releaseType", + type: "text", + label: "ReleaseType (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "newUsedBg", + fieldId: "newUsedBg", + type: "text", + label: "NewUsedBg (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "carsUid", + fieldId: "carsUid", + type: "number", + label: "UID", + renderer: { + name: "number-input" + } + }, + { + id: "carsDiscontinued", + fieldId: "carsDiscontinued", + type: "number", + label: "Discontinued", + renderer: { + name: "number-input" + } + }, + { + id: "slugMake", + fieldId: "slugMake", + type: "text", + label: "Slug Make", + renderer: { + name: "text-input" + } + }, + { + id: "slugModelName", + fieldId: "slugModelName", + type: "text", + label: "SlugModelName", + renderer: { + name: "text-input" + } + }, + { + id: "slugTrimName", + fieldId: "slugTrimName", + type: "text", + label: "SlugTrimName (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugBodystyle", + fieldId: "slugBodystyle", + type: "text", + label: "SlugBodystyle (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "makeFeaturedImage", + fieldId: "makeFeaturedImage", + type: "text", + label: "MakeFeaturedImage (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "makeIcon", + fieldId: "makeIcon", + type: "text", + label: "MakeIcon (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "makeDiscontinued", + fieldId: "makeDiscontinued", + type: "number", + label: "Make Discontinued", + renderer: { + name: "number-input" + } + }, + { + id: "baseVehicle", + fieldId: "baseVehicle", + type: "number", + label: "BaseVehicle (non-jato)", + renderer: { + name: "number-input" + }, + helpText: "This is a Required Field." + }, + { + id: "oemUrl", + fieldId: "oemUrl", + type: "text", + label: "OemUrl (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "carsSubcategory", + fieldId: "carsSubcategory", + type: "text", + label: "Subcategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugSubcategory", + fieldId: "slugSubcategory", + type: "text", + label: "SlugSubcategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "mainCategory", + fieldId: "mainCategory", + type: "text", + label: "MainCategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugMainCategory", + fieldId: "slugMainCategory", + type: "text", + label: "SlugMainCategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "hybridElectricCategory", + fieldId: "hybridElectricCategory", + type: "text", + label: "HybridElectricCategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugHybridElectricCategory", + fieldId: "slugHybridElectricCategory", + type: "text", + label: "SlugHybridElectricCategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "dieselCategory", + fieldId: "dieselCategory", + type: "text", + label: "DieselCategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugDieselCategory", + fieldId: "slugDieselCategory", + type: "text", + label: "SlugDieselCategory (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "updatedOn", + fieldId: "updatedOn", + type: "text", + label: "UpdatedOn", + renderer: { + name: "text-input" + } + }, + { + id: "vehicleStatus", + fieldId: "vehicleStatus", + type: "number", + label: "VehicleStatus (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "featuredImage", + fieldId: "featuredImage", + type: "text", + label: "FeaturedImage (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "propertyType", + fieldId: "propertyType", + type: "text", + label: "PropertyType (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "marketingImage", + fieldId: "marketingImage", + type: "text", + label: "MarketingImage (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "priceRangeValue", + fieldId: "priceRangeValue", + type: "number", + label: "PriceRangeValue (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "priceRangeText", + fieldId: "priceRangeText", + type: "text", + label: "PriceRangeText (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "ymmPriceRange", + fieldId: "ymmPriceRange", + type: "text", + label: "YMMPriceRange (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "bodyType", + fieldId: "bodyType", + type: "text", + label: "BodyType (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "bodyTypeText", + fieldId: "bodyTypeText", + type: "text", + label: "BodyType Text (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugBodyType", + fieldId: "slugBodyType", + type: "text", + label: "SlugBodyType (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "bodyTypeOrder", + fieldId: "bodyTypeOrder", + type: "number", + label: "BodyTypeOrder (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "secondaryBodyType", + fieldId: "secondaryBodyType", + type: "text", + label: "SecondaryBodyType (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "secondaryBodyTypeText", + fieldId: "secondaryBodyTypeText", + type: "text", + label: "SecondaryBodyTypeText (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugSecondaryBodyType", + fieldId: "slugSecondaryBodyType", + type: "text", + label: "SlugSecondaryBodyType (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "secondaryBodyTypeOrder", + fieldId: "secondaryBodyTypeOrder", + type: "number", + label: "SecondaryBodyTypeOrder (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "priceRangeSlug", + fieldId: "priceRangeSlug", + type: "text", + label: "PriceRangeSlug (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "latestYear", + fieldId: "latestYear", + type: "number", + label: "LatestYear (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "ymmLowestPriceRange", + fieldId: "ymmLowestPriceRange", + type: "number", + label: "YMMLowestPriceRange (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "ymmMaxPriceRange", + fieldId: "ymmMaxPriceRange", + type: "number", + label: "YMMMaxPriceRange (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "makeThumbnailUrl", + fieldId: "makeThumbnailUrl", + type: "text", + label: "MakeThumbnailUrl (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "combinedPrice", + fieldId: "combinedPrice", + type: "number", + label: "CombinedPrice (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "carsCombinedEpaMpg", + fieldId: "carsCombinedEpaMpg", + type: "number", + label: "CombinedEpaMPG (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "horsePowerVal", + fieldId: "horsePowerVal", + type: "number", + label: "HorsePowerVal (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "slugMakeModel", + fieldId: "slugMakeModel", + type: "text", + label: "SlugMakeModel (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "slugYearMakeModel", + fieldId: "slugYearMakeModel", + type: "text", + label: "SlugYearMakeModel (non-jato)", + renderer: { + name: "text-input" + }, + helpText: "This is a Required Field." + }, + { + id: "retainedValue", + fieldId: "retainedValue", + type: "text", + label: "RetainedValue (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "standardTires", + fieldId: "standardTires", + type: "text", + label: "StandardTires (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "carsMakePageShow", + fieldId: "carsMakePageShow", + type: "number", + label: "Make Page Show (non-jato)", + renderer: { + name: "number-input" + }, + helpText: "This is a Required Field." + }, + { + id: "carsPricePageShow", + fieldId: "carsPricePageShow", + type: "number", + label: "PriceRange Page Show (non-jato)", + renderer: { + name: "number-input" + }, + helpText: "This is a Required Field." + }, + { + id: "carsEditorialRating", + fieldId: "editorialRating", + type: "number", + label: "Editorial Rating (non-jato)", + renderer: { + name: "number-input" + } + }, + { + id: "specifications", + fieldId: "specifications", + type: "object", + label: "Specifications", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["seatingCapacity", "specWidth", "specLength", "driveTrain"], + ["specHeight", "specWheelase", "frontHeadroom"], + ["rearHeadroom", "frontShoulderRoom", "rearShoulderRoom"], + ["frontLegroom", "rearLegroom", "groundClearance"], + ["curbWeight", "cargoCapacity", "specGvwr"], + ["engineName", "specHorsepower", "specTonnage"], + ["specTorque", "fuelType", "fuelCapacity", "stdEpaMpg"], + ["transmissionName", "transmissionType", "towingCapacity"], + ["drivingRange", "cylinderConfiguration", "numberOfCylinders"], + ["stdMpgWithUnits", "heroLabel1", "heroValue1"], + ["payloadCapacity", "vehicleClass", "engineType"] + ], + fields: [ + { + id: "driveTrain", + fieldId: "driveTrain", + multipleValues: false, + type: "text", + label: "Drivetrain", + renderer: { + name: "text-input" + } + }, + { + id: "seatingCapacity", + fieldId: "seatingCapacity", + multipleValues: false, + type: "text", + label: "SeatingCapacity", + renderer: { + name: "text-input" + } + }, + { + id: "specWidth", + fieldId: "specWidth", + multipleValues: false, + type: "text", + label: "Width", + renderer: { + name: "text-input" + } + }, + { + id: "specLength", + fieldId: "specLength", + multipleValues: false, + type: "text", + label: "Length", + renderer: { + name: "text-input" + } + }, + { + id: "specHeight", + fieldId: "specHeight", + multipleValues: false, + type: "text", + label: "Height", + renderer: { + name: "text-input" + } + }, + { + id: "specWheelase", + fieldId: "specWheelbase", + type: "text", + multipleValues: false, + label: "Wheelbase", + renderer: { + name: "text-input" + } + }, + { + id: "frontHeadroom", + fieldId: "frontHeadroom", + type: "text", + multipleValues: false, + label: "FrontHeadroom", + renderer: { + name: "text-input" + } + }, + { + id: "rearHeadroom", + fieldId: "rearHeadroom", + type: "text", + multipleValues: false, + label: "RearHeadroom", + renderer: { + name: "text-input" + } + }, + { + id: "frontShoulderRoom", + fieldId: "frontShoulderRoom", + type: "text", + multipleValues: false, + label: "FrontShoulderRoom", + renderer: { + name: "text-input" + } + }, + { + id: "rearShoulderRoom", + fieldId: "rearShoulderRoom", + type: "text", + multipleValues: false, + label: "RearShoulderRoom", + renderer: { + name: "text-input" + } + }, + { + id: "frontLegroom", + fieldId: "frontLegroom", + type: "text", + multipleValues: false, + label: "FrontLegroom", + renderer: { + name: "text-input" + } + }, + { + id: "rearLegroom", + fieldId: "rearLegroom", + type: "text", + multipleValues: false, + label: "RearLegroom", + renderer: { + name: "text-input" + } + }, + { + id: "groundClearance", + fieldId: "groundClearance", + type: "text", + multipleValues: false, + label: "GroundClearance", + renderer: { + name: "text-input" + } + }, + { + id: "curbWeight", + fieldId: "curbWeight", + type: "text", + multipleValues: false, + label: "CurbWeight", + renderer: { + name: "text-input" + } + }, + { + id: "cargoCapacity", + fieldId: "cargoCapacity", + type: "text", + multipleValues: false, + label: "CargoCapacity", + renderer: { + name: "text-input" + } + }, + { + id: "specGvwr", + fieldId: "specGvwr", + type: "text", + multipleValues: false, + label: "GVWR", + renderer: { + name: "text-input" + } + }, + { + id: "payloadCapacity", + fieldId: "payloadCapacity", + type: "text", + multipleValues: false, + label: "PayloadCapacity", + renderer: { + name: "text-input" + } + }, + { + id: "towingCapacity", + fieldId: "towingCapacity", + type: "text", + multipleValues: false, + label: "TowingCapacity", + renderer: { + name: "text-input" + } + }, + { + id: "engineName", + fieldId: "engineName", + type: "text", + multipleValues: false, + label: "EngineName", + renderer: { + name: "text-input" + } + }, + { + id: "specHorsepower", + fieldId: "specHorsepower", + type: "text", + multipleValues: false, + label: "Horsepower", + renderer: { + name: "text-input" + } + }, + { + id: "specTorque", + fieldId: "specTorque", + type: "text", + multipleValues: false, + label: "Torque", + renderer: { + name: "text-input" + } + }, + { + id: "fuelType", + fieldId: "fuelType", + multipleValues: false, + type: "text", + label: "FuelType", + renderer: { + name: "text-input" + } + }, + { + id: "fuelCapacity", + fieldId: "fuelCapacity", + multipleValues: false, + type: "text", + label: "FuelCapacity (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "stdEpaMpg", + fieldId: "stdEpaMpg", + type: "text", + multipleValues: false, + label: "StdEpaMpg", + renderer: { + name: "text-input" + }, + helpText: "This is a Required Field." + }, + { + id: "transmissionName", + fieldId: "transmissionName", + type: "text", + multipleValues: false, + label: "TransmissionName", + renderer: { + name: "text-input" + } + }, + { + id: "transmissionType", + fieldId: "transmissionType", + type: "text", + multipleValues: false, + label: "TransmissionType", + renderer: { + name: "text-input" + } + }, + { + id: "drivingRange", + fieldId: "drivingRange", + type: "text", + multipleValues: false, + label: "DrivingRange", + renderer: { + name: "text-input" + } + }, + { + id: "cylinderConfiguration", + fieldId: "cylinderConfiguration", + type: "text", + multipleValues: false, + label: "CylinderConfiguration", + renderer: { + name: "text-input" + } + }, + { + id: "numberOfCylinders", + fieldId: "numberOfCylinders", + type: "text", + multipleValues: false, + label: "NumberOfCylinders", + renderer: { + name: "text-input" + } + }, + { + id: "specTonnage", + fieldId: "specTonnage", + type: "text", + multipleValues: false, + label: "Tonnage (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "stdMpgWithUnits", + fieldId: "stdMpgWithUnits", + type: "text", + multipleValues: false, + label: "StdMpg With Units (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "heroLabel1", + fieldId: "heroLabel1", + type: "text", + multipleValues: false, + label: "Hero Label1 (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "heroValue1", + fieldId: "heroValue1", + type: "text", + multipleValues: false, + label: "Hero Value1 (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "vehicleClass", + fieldId: "vehicleClass", + type: "text", + multipleValues: false, + label: "VehicleClass (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "engineType", + fieldId: "engineType", + type: "text", + multipleValues: false, + label: "Engine Type (Non-Jato)", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "powertrains", + fieldId: "powertrains", + multipleValues: true, + label: "Powertrains (Non-Jato)", + renderer: { + name: "objects-accordion" + }, + type: "object", + settings: { + layout: [["ptHorseower", "ptCityMpg", "ptHwyMpg"]], + fields: [ + { + id: "ptHorseower", + fieldId: "ptHorseower", + type: "number", + multipleValues: false, + label: "Horsepower", + renderer: { + name: "number-input" + } + }, + { + id: "ptCityMpg", + fieldId: "ptCityMpg", + type: "number", + multipleValues: false, + label: "CityMpg", + renderer: { + name: "number-input" + } + }, + { + id: "ptHwyMpg", + fieldId: "ptHwyMpg", + type: "number", + multipleValues: false, + label: "HwyMpg", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "warranty", + fieldId: "warranty", + type: "object", + label: "Warranty", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["fullWarrantyMiles", "fullWarrantyMonths", "powertrainWarrantyMiles"], + [ + "powertrainWarrantyMonths", + "maintenanceWarrantyMiles", + "maintenanceWarrantyMonths" + ], + ["roadsideWarrantyMiles", "roadsideWarrantyMonths"], + ["corrosionWarrantyMiles", "corrosionWarrantyMonths"] + ], + fields: [ + { + id: "fullWarrantyMiles", + fieldId: "fullWarrantyMiles", + type: "text", + multipleValues: false, + label: "FullWarrantyMiles", + renderer: { + name: "text-input" + } + }, + { + id: "fullWarrantyMonths", + fieldId: "fullWarrantyMonths", + type: "text", + multipleValues: false, + label: "FullWarrantyMonths", + renderer: { + name: "text-input" + } + }, + { + id: "powertrainWarrantyMiles", + fieldId: "powertrainWarrantyMiles", + type: "text", + multipleValues: false, + label: "PowertrainWarrantyMiles", + renderer: { + name: "text-input" + } + }, + { + id: "powertrainWarrantyMonths", + fieldId: "powertrainWarrantyMonths", + type: "text", + multipleValues: false, + label: "PowertrainWarrantyMonths", + renderer: { + name: "text-input" + } + }, + { + id: "maintenanceWarrantyMiles", + fieldId: "maintenanceWarrantyMiles", + type: "text", + multipleValues: false, + label: "MaintenanceWarrantyMiles (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "maintenanceWarrantyMonths", + fieldId: "maintenanceWarrantyMonths", + type: "text", + multipleValues: false, + label: "MaintenanceWarrantyMonths (non-jato)", + renderer: { + name: "text-input" + } + }, + { + id: "roadsideWarrantyMiles", + fieldId: "roadsideWarrantyMiles", + type: "text", + multipleValues: false, + label: "RoadsideWarrantyMiles", + renderer: { + name: "text-input" + } + }, + { + id: "roadsideWarrantyMonths", + fieldId: "roadsideWarrantyMonths", + type: "text", + multipleValues: false, + label: "RoadsideWarrantyMonths", + renderer: { + name: "text-input" + } + }, + { + id: "corrosionWarrantyMiles", + fieldId: "corrosionWarrantyMiles", + type: "text", + multipleValues: false, + label: "CorrosionWarrantyMiles", + renderer: { + name: "text-input" + } + }, + { + id: "corrosionWarrantyMonths", + fieldId: "corrosionWarrantyMonths", + type: "text", + multipleValues: false, + label: "CorrosionWarrantyMonths", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "pricing", + fieldId: "pricing", + type: "object", + label: "Pricing", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["pInvoice", "pMsrp", "pDestination"], + ["pEffectiveOn", "pTargetPrice", "pTotalTargetPrice"], + ["pAverageSalesTaxAndFees", "pGasGuzzlerTax", "pTargetRebate"], + ["pNewMonthly", "pCpoPrice", "pExcellentRetailValue"], + ["pMsrpLabel", "pMsrpValue", "pFmpOrCrvLabel"], + ["pFmpOrCrvValue"] + ], + fields: [ + { + id: "pInvoice", + fieldId: "pInvoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "pMsrp", + fieldId: "pMsrp", + type: "number", + multipleValues: false, + label: "MSRP", + renderer: { + name: "number-input" + } + }, + { + id: "pDestination", + fieldId: "pDestination", + type: "number", + multipleValues: false, + label: "Destination", + renderer: { + name: "number-input" + } + }, + { + id: "pEffectiveOn", + fieldId: "pEffectiveOn", + type: "text", + multipleValues: false, + label: "PriceEffectiveOn", + renderer: { + name: "text-input" + } + }, + { + id: "pTargetPrice", + fieldId: "pTargetPrice", + type: "number", + multipleValues: false, + label: "Target Price(Non-Jato)", + renderer: { + name: "number-input" + } + }, + { + id: "pTotalTargetPrice", + fieldId: "pTotalTargetPrice", + type: "number", + multipleValues: false, + label: "Total TargetPrice(Non-Jato)", + renderer: { + name: "number-input" + } + }, + { + id: "pAverageSalesTaxAndFees", + fieldId: "pAverageSalesTaxAndFees", + type: "number", + multipleValues: false, + label: "AverageSalesTaxAndFees(Non-Jato)", + renderer: { + name: "number-input" + } + }, + { + id: "pGasGuzzlerTax", + fieldId: "pGasGuzzlerTax", + type: "number", + multipleValues: false, + label: "GasGuzzlerTax(Non-Jato)", + renderer: { + name: "number-input" + } + }, + { + id: "pTargetRebate", + fieldId: "pTargetRebate", + type: "number", + multipleValues: false, + label: "Target Rebate(Non-Jato)", + renderer: { + name: "number-input" + } + }, + { + id: "pNewMonthly", + fieldId: "pNewMonthly", + type: "number", + multipleValues: false, + label: "NewMonthly(Non-Jato)", + renderer: { + name: "number-input" + } + }, + { + id: "pCpoPrice", + fieldId: "pCpoPrice", + type: "text", + multipleValues: false, + label: "CpoPrice(Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "pExcellentRetailValue", + fieldId: "pExcellentRetailValue", + type: "number", + multipleValues: false, + label: "ExcellentRetailValue(Non-Jato)", + renderer: { + name: "number-input" + } + }, + { + id: "pMsrpLabel", + fieldId: "pMsrpLabel", + type: "text", + multipleValues: false, + label: "MsrpLabel(Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "pMsrpValue", + fieldId: "pMsrpValue", + type: "text", + multipleValues: false, + label: "MsrpValue(Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "pFmpOrCrvLabel", + fieldId: "pFmpOrCrvLabel", + type: "text", + multipleValues: false, + label: "FmpOrCrvLabel(Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "pFmpOrCrvValue", + fieldId: "pFmpOrCrvValue", + type: "text", + multipleValues: false, + label: "FmpOrCrvValue(Non-Jato)", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "safetyRatings", + fieldId: "safetyRatings", + type: "object", + label: "SafetyRatings", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["nhtsaRatingOverall", "nhtsaRatingRollover", "nhtsaRatingFrontDriver"], + [ + "nhtsaRatingFrontPassenger", + "nhtsaRatingFrontSide", + "nhtsaRatingRearSide" + ], + ["iihsFrontModerateOverlap", "iihsOverallSideCrash", "iihsBestPick"], + ["iihsRearCrash", "iihsRoofStrength", "iihsFrontSmallOverlap"] + ], + fields: [ + { + id: "nhtsaRatingOverall", + fieldId: "nhtsaRatingOverall", + type: "text", + multipleValues: false, + label: "NhtsaRatingOverall", + renderer: { + name: "text-input" + } + }, + { + id: "nhtsaRatingRollover", + fieldId: "nhtsaRatingRollover", + type: "text", + multipleValues: false, + label: "NhtsaRatingRollover", + renderer: { + name: "text-input" + } + }, + { + id: "nhtsaRatingFrontDriver", + fieldId: "nhtsaRatingFrontDriver", + type: "text", + multipleValues: false, + label: "NhtsaRatingFrontDriver (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "nhtsaRatingFrontPassenger", + fieldId: "nhtsaRatingFrontPassenger", + type: "text", + multipleValues: false, + label: "NhtsaRatingFrontPassenger (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "nhtsaRatingFrontSide", + fieldId: "nhtsaRatingFrontSide", + type: "text", + multipleValues: false, + label: "NhtsaRatingFrontSide (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "nhtsaRatingRearSide", + fieldId: "nhtsaRatingRearSide", + type: "text", + multipleValues: false, + label: "NhtsaRatingRearSide (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "iihsFrontModerateOverlap", + fieldId: "iihsFrontModerateOverlap", + type: "text", + multipleValues: false, + label: "IihsFrontModerateOverlap (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "iihsOverallSideCrash", + fieldId: "iihsOverallSideCrash", + type: "text", + multipleValues: false, + label: "IihsOverallSideCrash (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "iihsBestPick", + fieldId: "iihsBestPick", + type: "text", + multipleValues: false, + label: "IihsBestPick (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "iihsRearCrash", + fieldId: "iihsRearCrash", + type: "text", + multipleValues: false, + label: "IihsRearCrash (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "iihsRoofStrength", + fieldId: "iihsRoofStrength", + type: "text", + multipleValues: false, + label: "IihsRoofStrength (Non-Jato)", + renderer: { + name: "text-input" + } + }, + { + id: "iihsFrontSmallOverlap", + fieldId: "iihsFrontSmallOverlap", + type: "text", + multipleValues: false, + label: "IihsFrontSmallOverlap (Non-Jato)", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "ownershipCosts", + fieldId: "ownershipCosts", + type: "object", + label: "Ownership Costs (Non-Jato)", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["depreciationTotal", "financingTotal", "insuranceTotal"], + ["stateFeesTotal", "fuelTotal", "maintenanceTotal"], + ["repairsTotal", "total5YearOcCost", "total5YearOcCostLessHybrid"], + ["similarVehicles", "difference5YearCost", "hybridTax"], + ["valueRating"] + ], + fields: [ + { + id: "depreciationTotal", + fieldId: "depreciationTotal", + type: "text", + multipleValues: false, + label: "DepreciationTotal", + renderer: { + name: "text-input" + } + }, + { + id: "financingTotal", + fieldId: "financingTotal", + type: "text", + multipleValues: false, + label: "FinancingTotal", + renderer: { + name: "text-input" + } + }, + { + id: "insuranceTotal", + fieldId: "insuranceTotal", + type: "text", + multipleValues: false, + label: "InsuranceTotal", + renderer: { + name: "text-input" + } + }, + { + id: "stateFeesTotal", + fieldId: "stateFeesTotal", + type: "text", + multipleValues: false, + label: "StateFeesTotal", + renderer: { + name: "text-input" + } + }, + { + id: "fuelTotal", + fieldId: "fuelTotal", + type: "text", + multipleValues: false, + label: "FuelTotal", + renderer: { + name: "text-input" + } + }, + { + id: "maintenanceTotal", + fieldId: "maintenanceTotal", + type: "text", + multipleValues: false, + label: "MaintenanceTotal", + renderer: { + name: "text-input" + } + }, + { + id: "repairsTotal", + fieldId: "repairsTotal", + type: "text", + multipleValues: false, + label: "RepairsTotal", + renderer: { + name: "text-input" + } + }, + { + id: "total5YearOcCost", + fieldId: "total5YearOcCost", + type: "text", + multipleValues: false, + label: "Total5YearOcCost", + renderer: { + name: "text-input" + } + }, + { + id: "total5YearOcCostLessHybrid", + fieldId: "total5YearOcCostLessHybrid", + type: "number", + multipleValues: false, + label: "Total5YearOcCostLessHybrid", + renderer: { + name: "number-input" + } + }, + { + id: "similarVehicles", + fieldId: "similarVehicles", + type: "number", + multipleValues: false, + label: "SimilarVehicles", + renderer: { + name: "number-input" + } + }, + { + id: "difference5YearCost", + fieldId: "difference5YearCost", + type: "number", + multipleValues: false, + label: "Difference5YearCost", + renderer: { + name: "number-input" + } + }, + { + id: "hybridTax", + fieldId: "hybridTax", + type: "text", + multipleValues: false, + label: "HybridTax", + renderer: { + name: "text-input" + } + }, + { + id: "valueRating", + fieldId: "valueRating", + type: "text", + multipleValues: false, + label: "ValueRating", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "cpoComparison", + fieldId: "cpoComparison", + type: "object", + label: "CPOComparison (Non-Jato)", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["usedMonthly", "cpoMonthly", "usedMaintenanceRepairs"], + ["cpoMaintenanceRepairs", "usedTotalMonthly", "cpoTotalMonthly"], + ["cpoYear", "cpoMake", "modelName"], + ["usedCarTrim", "cpoPrice", "usedCarPrice"], + ["vehicleRating"] + ], + fields: [ + { + id: "usedMonthly", + fieldId: "usedMonthly", + type: "number", + multipleValues: false, + label: "UsedMonthly", + renderer: { + name: "number-input" + } + }, + { + id: "cpoMonthly", + fieldId: "cpoMonthly", + type: "number", + multipleValues: false, + label: "CPOMonthly", + renderer: { + name: "number-input" + } + }, + { + id: "usedMaintenanceRepairs", + fieldId: "usedMaintenanceRepairs", + type: "number", + multipleValues: false, + label: "UsedMaintenanceRepairs", + renderer: { + name: "number-input" + } + }, + { + id: "cpoMaintenanceRepairs", + fieldId: "cpoMaintenanceRepairs", + type: "number", + multipleValues: false, + label: "CPOMaintenanceRepairs", + renderer: { + name: "number-input" + } + }, + { + id: "usedTotalMonthly", + fieldId: "usedTotalMonthly", + type: "number", + multipleValues: false, + label: "UsedTotalMonthly", + renderer: { + name: "number-input" + } + }, + { + id: "cpoTotalMonthly", + fieldId: "cpoTotalMonthly", + type: "number", + multipleValues: false, + label: "CPOTotalMonthly", + renderer: { + name: "number-input" + } + }, + { + id: "cpoYear", + fieldId: "cpoYear", + type: "number", + multipleValues: false, + label: "Year", + renderer: { + name: "number-input" + } + }, + { + id: "cpoMake", + fieldId: "cpoMake", + type: "text", + multipleValues: false, + label: "Make", + renderer: { + name: "text-input" + } + }, + { + id: "modelName", + fieldId: "modelName", + type: "text", + multipleValues: false, + label: "ModelName", + renderer: { + name: "text-input" + } + }, + { + id: "usedCarTrim", + fieldId: "usedCarTrim", + type: "text", + multipleValues: false, + label: "UsedCarTrim", + renderer: { + name: "text-input" + } + }, + { + id: "cpoPrice", + fieldId: "cpoPrice", + type: "text", + multipleValues: false, + label: "CPOPrice", + renderer: { + name: "text-input" + } + }, + { + id: "usedCarPrice", + fieldId: "usedCarPrice", + type: "number", + multipleValues: false, + label: "UsedCarPrice", + renderer: { + name: "number-input" + } + }, + { + id: "vehicleRating", + fieldId: "vehicleRating", + type: "text", + multipleValues: false, + label: "VehicleRating", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "historicalMotortrendScores", + fieldId: "historicalMotortrendScores", + type: "object", + label: "HistoricalMotortrendScores (Non-Jato)", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["vrPerformance", "toolTipPerformance"], + ["overallScore", "toolTipOverallScore"], + ["fuelEconomy", "toolTipFuelEconomy"], + ["techInnovation", "toolTipTechInnovation"], + ["vrValue", "toolTipValue"] + ], + fields: [ + { + id: "vrPerformance", + fieldId: "vrPerformance", + type: "number", + multipleValues: false, + label: "Performance", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipPerformance", + fieldId: "toolTipPerformance", + type: "text", + multipleValues: false, + label: "ToolTipPerformance", + renderer: { + name: "text-input" + } + }, + { + id: "overallScore", + fieldId: "overallScore", + type: "number", + multipleValues: false, + label: "OverallScore", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipOverallScore", + fieldId: "toolTipOverallScore", + type: "text", + multipleValues: false, + label: "ToolTipOverallScore", + renderer: { + name: "text-input" + } + }, + { + id: "fuelEconomy", + fieldId: "fuelEconomy", + type: "number", + multipleValues: false, + label: "fuelEconomy", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipFuelEconomy", + fieldId: "toolTipFuelEconomy", + type: "text", + multipleValues: false, + label: "toolTipFuelEconomy", + renderer: { + name: "text-input" + } + }, + { + id: "techInnovation", + fieldId: "techInnovation", + type: "number", + multipleValues: false, + label: "techInnovation", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipTechInnovation", + fieldId: "toolTipTechInnovation", + type: "text", + multipleValues: false, + label: "toolTipTechInnovation", + renderer: { + name: "text-input" + } + }, + { + id: "vrValue", + fieldId: "vrValue", + type: "number", + multipleValues: false, + label: "Value", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipValue", + fieldId: "toolTipValue", + type: "text", + multipleValues: false, + label: "toolTipValue", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "recalls", + fieldId: "recalls", + multipleValues: true, + label: "Recalls (Non-Jato)", + renderer: { + name: "objects-accordion" + }, + type: "object", + settings: { + layout: [ + ["recallId", "recallsCampNumber"], + ["makeText", "modelText", "yearText", "compName"], + ["mfgText", "recallsPotaff", "rcDate"], + ["descDefect", "consequenceDefect", "correctiveAction"] + ], + fields: [ + { + id: "recallId", + fieldId: "recallId", + type: "number", + multipleValues: false, + label: "RecallID", + renderer: { + name: "number-input" + } + }, + { + id: "recallsCampNumber", + fieldId: "recallsCampNumber", + type: "text", + multipleValues: false, + label: "Campno", + renderer: { + name: "text-input" + } + }, + { + id: "makeText", + fieldId: "makeText", + type: "text", + multipleValues: false, + label: "Maketxt", + renderer: { + name: "text-input" + } + }, + { + id: "modelText", + fieldId: "modelText", + type: "text", + multipleValues: false, + label: "Modeltxt", + renderer: { + name: "text-input" + } + }, + { + id: "yearText", + fieldId: "yearText", + type: "number", + multipleValues: false, + label: "Yeartxt", + renderer: { + name: "number-input" + } + }, + { + id: "compName", + fieldId: "compName", + type: "text", + multipleValues: false, + label: "Compname", + renderer: { + name: "text-input" + } + }, + { + id: "mfgText", + fieldId: "mfgText", + type: "text", + multipleValues: false, + label: "Mfgtxt", + renderer: { + name: "text-input" + } + }, + { + id: "recallsPotaff", + fieldId: "recallsPotaff", + type: "number", + multipleValues: false, + label: "Potaff", + renderer: { + name: "number-input" + } + }, + { + id: "rcDate", + fieldId: "rcDate", + type: "text", + multipleValues: false, + label: "Rcdate", + renderer: { + name: "text-input" + } + }, + { + id: "descDefect", + fieldId: "descDefect", + type: "text", + multipleValues: false, + label: "DescDefect", + renderer: { + name: "text-input" + } + }, + { + id: "consequenceDefect", + fieldId: "consequenceDefect", + type: "text", + multipleValues: false, + label: "ConsequenceDefect", + renderer: { + name: "text-input" + } + }, + { + id: "correctiveAction", + fieldId: "correctiveAction", + type: "text", + multipleValues: false, + label: "CorrectiveAction", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "carsRebates", + fieldId: "carsRebates", + multipleValues: true, + label: "Rebates (Non-Jato)", + renderer: { + name: "objects-accordion" + }, + type: "object", + settings: { + layout: [ + ["rebatesLow", "rebatesHigh", "rebateText"], + ["nationallyAvailable", "rebatesDescription", "rebatesExpDate"] + ], + fields: [ + { + id: "rebatesExpDate", + fieldId: "rebatesExpDate", + type: "text", + multipleValues: false, + label: "ExpDate", + renderer: { + name: "text-input" + } + }, + { + id: "rebatesLow", + fieldId: "rebatesLow", + type: "number", + multipleValues: false, + label: "Low", + renderer: { + name: "number-input" + } + }, + { + id: "rebatesHigh", + fieldId: "rebatesHigh", + type: "number", + multipleValues: false, + label: "High", + renderer: { + name: "number-input" + } + }, + { + id: "rebateText", + fieldId: "rebateText", + type: "text", + multipleValues: false, + label: "RebateText", + renderer: { + name: "text-input" + } + }, + { + id: "nationallyAvailable", + fieldId: "nationallyAvailable", + type: "number", + multipleValues: false, + label: "Nationally Available", + renderer: { + name: "number-input" + } + }, + { + id: "rebatesDescription", + fieldId: "rebatesDescription", + type: "text", + multipleValues: false, + label: "Description", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "cpoProgram", + fieldId: "cpoProgram", + type: "object", + label: "CpoProgram (Non-Jato)", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["cpoName", "cpoInspectionPoint", "cpoInspectionScore"], + ["cpoAgeMileage", "cpoWarranty", "cpoWarrantyDeductible"], + ["cpoWarrantyBbnc", "cpoWarrantyTransferable", "cpoWarrantyExtended"], + ["cpoRoadside", "cpoReturnExchange", "cpoFinancing"], + ["cpoLease", "cpoWebsite", "cpoCustomerServiceNumber"], + ["cpoParticipation", "cpoHistoryReport", "cpoAdditionalBenefits"], + ["cpoProgramOverview"] + ], + fields: [ + { + id: "cpoName", + fieldId: "cpoName", + type: "text", + multipleValues: false, + label: "CpoName", + renderer: { + name: "text-input" + } + }, + { + id: "cpoInspectionPoint", + fieldId: "cpoInspectionPoint", + type: "text", + multipleValues: false, + label: "CPOInspectionPoint", + renderer: { + name: "text-input" + } + }, + { + id: "cpoInspectionScore", + fieldId: "cpoInspectionScore", + type: "number", + multipleValues: false, + label: "CPOInspectionScore", + renderer: { + name: "number-input" + } + }, + { + id: "cpoAgeMileage", + fieldId: "cpoAgeMileage", + type: "text", + multipleValues: false, + label: "CPOAgeMileage", + renderer: { + name: "text-input" + } + }, + { + id: "cpoWarranty", + fieldId: "cpoWarranty", + type: "text", + multipleValues: false, + label: "CPOWarranty", + renderer: { + name: "text-input" + } + }, + { + id: "cpoWarrantyDeductible", + fieldId: "cpoWarrantyDeductible", + type: "text", + multipleValues: false, + label: "CPOWarrantyDeductible", + renderer: { + name: "text-input" + } + }, + { + id: "cpoWarrantyBbnc", + fieldId: "cpoWarrantyBbnc", + type: "text", + multipleValues: false, + label: "CPOWarrantyBbnc", + renderer: { + name: "text-input" + } + }, + { + id: "cpoWarrantyTransferable", + fieldId: "cpoWarrantyTransferable", + type: "text", + multipleValues: false, + label: "CPOWarrantyTransferable", + renderer: { + name: "text-input" + } + }, + { + id: "cpoWarrantyExtended", + fieldId: "cpoWarrantyExtended", + type: "text", + multipleValues: false, + label: "CPOWarrantyExtended", + renderer: { + name: "text-input" + } + }, + { + id: "cpoRoadside", + fieldId: "cpoRoadside", + type: "text", + multipleValues: false, + label: "CPORoadside", + renderer: { + name: "text-input" + } + }, + { + id: "cpoReturnExchange", + fieldId: "cpoReturnExchange", + type: "text", + multipleValues: false, + label: "CPOReturnExchange", + renderer: { + name: "text-input" + } + }, + { + id: "cpoFinancing", + fieldId: "cpoFinancing", + type: "text", + multipleValues: false, + label: "CPOFinancing", + renderer: { + name: "text-input" + } + }, + { + id: "cpoLease", + fieldId: "cpoLease", + type: "text", + multipleValues: false, + label: "CPOLease", + renderer: { + name: "text-input" + } + }, + { + id: "cpoWebsite", + fieldId: "cpoWebsite", + type: "text", + multipleValues: false, + label: "CPOWebsite", + renderer: { + name: "text-input" + } + }, + { + id: "cpoCustomerServiceNumber", + fieldId: "cpoCustomerServiceNumber", + type: "text", + multipleValues: false, + label: "CPOCustomerServiceNumber", + renderer: { + name: "text-input" + } + }, + { + id: "cpoParticipation", + fieldId: "cpoParticipation", + type: "text", + multipleValues: false, + label: "CPOParticipation", + renderer: { + name: "text-input" + } + }, + { + id: "cpoHistoryReport", + fieldId: "cpoHistoryReport", + type: "number", + multipleValues: false, + label: "CPOHistoryReport", + renderer: { + name: "number-input" + } + }, + { + id: "cpoAdditionalBenefits", + fieldId: "cpoAdditionalBenefits", + type: "text", + multipleValues: false, + label: "CPOAdditionalBenefits", + renderer: { + name: "text-input" + } + }, + { + id: "cpoProgramOverview", + fieldId: "cpoProgramOverview", + type: "text", + multipleValues: false, + label: "CPOProgramOverview", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "realmpg", + fieldId: "realmpg", + type: "object", + label: "RealMpg (Non-Jato)", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["realmpgAverageMpg", "realmpgAverageMpgCity", "realmpgAverageMpgHwy"] + ], + fields: [ + { + id: "realmpgAverageMpg", + fieldId: "realmpgAverageMpg", + type: "number", + multipleValues: false, + label: "RealmpgAverageMpg", + renderer: { + name: "number-input" + } + }, + { + id: "realmpgAverageMpgCity", + fieldId: "realmpgAverageMpgCity", + type: "number", + multipleValues: false, + label: "RealmpgAverageMpgCity", + renderer: { + name: "number-input" + } + }, + { + id: "realmpgAverageMpgHwy", + fieldId: "realmpgAverageMpgHwy", + type: "number", + multipleValues: false, + label: "RealmpgAverageMpgHwy", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "hubs", + fieldId: "hubs", + multipleValues: true, + label: "Hubs (Non-Jato)", + renderer: { + name: "objects-accordion" + }, + type: "object", + settings: { + layout: [["hubsImage", "makeModelHub", "hubsName", "hubsText"]], + fields: [ + { + id: "hubsImage", + fieldId: "hubsImage", + type: "text", + multipleValues: false, + label: "Image", + renderer: { + name: "text-input" + } + }, + { + id: "makeModelHub", + fieldId: "makeModelHub", + type: "number", + multipleValues: false, + label: "MakeModelHub", + renderer: { + name: "number-input" + } + }, + { + id: "hubsName", + fieldId: "hubsName", + type: "text", + multipleValues: false, + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "hubsText", + fieldId: "hubsText", + type: "text", + multipleValues: false, + label: "Text", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "seoText", + fieldId: "seoText", + type: "object", + label: "Seo", + renderer: { + name: "object-accordion" + }, + settings: { + layout: [["seoType", "seoTitle"], ["seoContent"]], + fields: [ + { + id: "seoType", + fieldId: "seoType", + multipleValues: false, + type: "text", + label: "Type", + renderer: { + name: "text-input" + } + }, + { + id: "seoTitle", + fieldId: "seoTitle", + multipleValues: false, + type: "text", + label: "Title", + renderer: { + name: "text-input" + } + }, + { + id: "seoContent", + fieldId: "seoContent", + multipleValues: false, + type: "text", + label: "Content", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "images", + fieldId: "images", + multipleValues: true, + label: "Images (Non-Jato)", + renderer: { + name: "objects-accordion" + }, + type: "object", + settings: { + layout: [["imageUrl"], ["imageAngle", "imageType", "imageOrder"]], + fields: [ + { + id: "imageUrl", + fieldId: "imageUrl", + type: "text", + label: "Image Url", + renderer: { + name: "text-input" + }, + helpText: "This is a Required Field." + }, + { + id: "imageAngle", + fieldId: "imageAngle", + type: "text", + helpText: "can be front or rear...etc", + label: "Image Angle", + renderer: { + name: "text-input" + } + }, + { + id: "imageType", + fieldId: "imageType", + type: "text", + helpText: "can be exterior or interior", + label: "Image Type", + renderer: { + name: "text-input" + } + }, + { + id: "imageOrder", + fieldId: "imageOrder", + type: "number", + helpText: "can be use for display order", + label: "Image Order", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "featuresIntellicar", + fieldId: "featuresIntellicar", + type: "object", + label: "Features(Non-Jato)", + multipleValues: false, + renderer: { + name: "object-accordion" + }, + settings: { + layout: [ + ["packageCategory"], + ["engineCategory"], + ["transmissionCategory"], + ["exteriorColorCategory"], + ["interiorColorCategory"], + ["topColorCategory"], + ["bodyCategory"], + ["brakesCategory"], + ["convenienceCategory"], + ["driveCategory"], + ["engineeringCategory"], + ["exteriorCategory"], + ["interiorCategory"], + ["lightingCategory"], + ["mandatoryCategory"], + ["mirrorsCategory"], + ["noteCategory"], + ["otherCategory"], + ["paintCategory"], + ["safetyCategory"], + ["seatsCategory"], + ["soundCategory"], + ["specialFeesCreditsOptionsCategory"], + ["steeringCategory"], + ["suspensionCategory"], + ["tiresCategory"], + ["towingCategory"], + ["truckBedsCategory"], + ["wheelsCategory"] + ], + fields: [ + { + id: "packageCategory", + fieldId: "packageCategory", + type: "object", + label: "PACKAGE", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "engineCategory", + fieldId: "engineCategory", + type: "object", + label: "ENGINE", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "SequenceNmb", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "transmissionCategory", + fieldId: "transmissionCategory", + type: "object", + label: "TRANSMISSION", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "exteriorColorCategory", + fieldId: "exteriorColorCategory", + type: "object", + label: "EXTERIOR COLOR", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "interiorColorCategory", + fieldId: "interiorColorCategory", + type: "object", + label: "INTERIOR COLOR", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "topColorCategory", + fieldId: "topColorCategory", + type: "object", + label: "TOP COLOR", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "bodyCategory", + fieldId: "bodyCategory", + type: "object", + label: "BODY", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "brakesCategory", + fieldId: "brakesCategory", + type: "object", + label: "BRAKES", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "convenienceCategory", + fieldId: "convenienceCategory", + type: "object", + label: "CONVENIENCE", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "driveCategory", + fieldId: "driveCategory", + type: "object", + label: "DRIVE", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "engineeringCategory", + fieldId: "engineeringCategory", + type: "object", + label: "ENGINEERING", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "exteriorCategory", + fieldId: "exteriorCategory", + type: "object", + label: "EXTERIOR", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "interiorCategory", + fieldId: "interiorCategory", + type: "object", + label: "INTERIOR", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "lightingCategory", + fieldId: "lightingCategory", + type: "object", + label: "LIGHTING", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "mandatoryCategory", + fieldId: "mandatoryCategory", + type: "object", + label: "MANDATORY", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "mirrorsCategory", + fieldId: "mirrorsCategory", + type: "object", + label: "MIRRORS", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "noteCategory", + fieldId: "noteCategory", + type: "object", + label: "NOTE", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "otherCategory", + fieldId: "otherCategory", + type: "object", + label: "OTHER", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "paintCategory", + fieldId: "paintCategory", + type: "object", + label: "PAINT", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "safetyCategory", + fieldId: "safetyCategory", + type: "object", + label: "SAFETY", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "seatsCategory", + fieldId: "seatsCategory", + type: "object", + label: "SEATS", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "soundCategory", + fieldId: "soundCategory", + type: "object", + label: "SOUND", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "specialFeesCreditsOptionsCategory", + fieldId: "specialFeesCreditsOptionsCategory", + type: "object", + label: "SPECIAL FEES CREDITS OPTIONS", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "steeringCategory", + fieldId: "steeringCategory", + type: "object", + label: "STEERING", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "suspensionCategory", + fieldId: "suspensionCategory", + type: "object", + label: "SUSPENSION", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "tiresCategory", + fieldId: "tiresCategory", + type: "object", + label: "TIRES", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "towingCategory", + fieldId: "towingCategory", + type: "object", + label: "TOWING", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "truckBedsCategory", + fieldId: "truckBedsCategory", + type: "object", + label: "TRUCK BEDS", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + }, + { + id: "wheelsCategory", + fieldId: "wheelsCategory", + type: "object", + label: "WHEELS", + multipleValues: true, + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["name", "availability", "invoice"], + ["includesNote", "retail"], + ["sequenceNmb", "categorySequenceNmb"] + ], + fields: [ + { + id: "name", + fieldId: "name", + type: "text", + label: "Name", + renderer: { + name: "text-input" + } + }, + { + id: "availability", + fieldId: "availability", + type: "text", + label: "Availability", + renderer: { + name: "text-input" + } + }, + { + id: "invoice", + fieldId: "invoice", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "includesNote", + fieldId: "includesNote", + type: "text", + label: "IncludesNote", + renderer: { + name: "text-input" + } + }, + { + id: "retail", + fieldId: "retail", + type: "number", + multipleValues: false, + label: "Retail", + renderer: { + name: "number-input" + } + }, + { + id: "sequenceNmb", + fieldId: "sequenceNmb", + type: "number", + multipleValues: false, + label: "Invoice", + renderer: { + name: "number-input" + } + }, + { + id: "categorySequenceNmb", + fieldId: "categorySequenceNmb", + type: "number", + multipleValues: false, + label: "CategorySequenceNmb", + renderer: { + name: "number-input" + } + } + ] + } + } + ] + } + }, + { + id: "vehicleRankingClass", + fieldId: "vehicleRankingClass", + type: "object", + multipleValues: true, + label: "Motortrend Scores (Non-Jato)", + renderer: { + name: "objects-accordion" + }, + settings: { + layout: [ + ["classTitle", "classSlugRedirect", "classPosition"], + ["rankClass", "slugClassTitle", "associatedBody"], + ["vrcSubclass", "subclassTitle", "vrcSubclassPosition"], + ["vrPerformance", "toolTipPerformance"], + ["overallScore", "toolTipOverallScore"], + ["fuelEconomy", "toolTipFuelEconomy"], + ["techInnovation", "toolTipTechInnovation"], + ["vrValue", "toolTipValue"], + ["vrcClassThumbnailUrl", "vrcClassThumbnailRolloverUrl"], + ["vrcIsMakeBodyStyleVehicleShow", "vrcIsRankShow", "vrcIsVehicleShow"], + ["vrcRankWithinSubclass", "vrcRankInSubclassText"], + ["vrcTopRankingTrophyImage"] + ], + fields: [ + { + id: "classTitle", + fieldId: "classTitle", + type: "text", + label: "ClassTitle", + renderer: { + name: "text-input" + }, + helpText: "This is a Required Field." + }, + { + id: "classSlugRedirect", + fieldId: "classSlugRedirect", + type: "text", + label: "ClassSlugRedirect", + renderer: { + name: "text-input" + } + }, + { + id: "associatedBody", + fieldId: "associatedBody", + type: "number", + label: "AssociatedBody", + renderer: { + name: "number-input" + } + }, + { + id: "classPosition", + fieldId: "classPosition", + type: "number", + label: "ClassPosition", + renderer: { + name: "number-input" + } + }, + { + id: "rankClass", + fieldId: "rankClass", + type: "text", + label: "RankClass", + renderer: { + name: "text-input" + } + }, + { + id: "slugClassTitle", + fieldId: "slugClassTitle", + type: "text", + label: "SlugClassTitle", + renderer: { + name: "text-input" + }, + helpText: "This is a Required Field." + }, + { + id: "subclassTitle", + fieldId: "subclassTitle", + type: "text", + label: "SubclassTitle", + renderer: { + name: "text-input" + }, + helpText: "This is a Required Field." + }, + { + id: "vrPerformance", + fieldId: "vrPerformance", + type: "number", + label: "Performance", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipPerformance", + fieldId: "toolTipPerformance", + type: "text", + label: "ToolTipPerformance", + renderer: { + name: "text-input" + } + }, + { + id: "overallScore", + fieldId: "overallScore", + type: "number", + label: "OverallScore", + renderer: { + name: "number-input" + }, + helpText: "This is a Required Field." + }, + { + id: "toolTipOverallScore", + fieldId: "toolTipOverallScore", + type: "text", + label: "ToolTipOverallScore", + renderer: { + name: "text-input" + } + }, + { + id: "fuelEconomy", + fieldId: "fuelEconomy", + type: "number", + label: "fuelEconomy", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipFuelEconomy", + fieldId: "toolTipFuelEconomy", + type: "text", + label: "toolTipFuelEconomy", + renderer: { + name: "text-input" + } + }, + { + id: "techInnovation", + fieldId: "techInnovation", + type: "number", + label: "techInnovation", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipTechInnovation", + fieldId: "toolTipTechInnovation", + type: "text", + label: "toolTipTechInnovation", + renderer: { + name: "text-input" + } + }, + { + id: "vrValue", + fieldId: "vrValue", + type: "number", + label: "Value", + renderer: { + name: "number-input" + } + }, + { + id: "toolTipValue", + fieldId: "toolTipValue", + type: "text", + label: "toolTipValue", + renderer: { + name: "text-input" + } + }, + { + id: "vrcClassThumbnailRolloverUrl", + fieldId: "classThumbnailRolloverUrl", + type: "text", + label: "Class ThumbnailRolloverUrl", + renderer: { + name: "text-input" + } + }, + { + id: "vrcClassThumbnailUrl", + fieldId: "classThumbnailUrl", + type: "text", + label: "Class ThumbnailUrl", + renderer: { + name: "text-input" + } + }, + { + id: "vrcIsMakeBodyStyleVehicleShow", + fieldId: "isMakeBodyStyleVehicleShow", + type: "number", + label: "Is MakeBodyStyle VehicleShow", + renderer: { + name: "number-input" + } + }, + { + id: "vrcIsRankShow", + fieldId: "isRankShow", + type: "number", + label: "Is RankShow", + renderer: { + name: "number-input" + }, + helpText: "This is a Required Field." + }, + { + id: "vrcIsVehicleShow", + fieldId: "isVehicleShow", + type: "number", + label: "Is VehicleShow", + renderer: { + name: "number-input" + }, + helpText: "This is a Required Field." + }, + { + id: "vrcRankInSubclassText", + fieldId: "rankInSubclassText", + type: "text", + label: "RankIn SubclassText", + renderer: { + name: "text-input" + } + }, + { + id: "vrcRankWithinSubclass", + fieldId: "rankWithinSubclass", + type: "number", + label: "RankWithin Subclass", + renderer: { + name: "number-input" + }, + helpText: "This is a Required Field." + }, + { + id: "vrcSubclass", + fieldId: "subclass", + type: "text", + label: "subclass", + renderer: { + name: "text-input" + } + }, + { + id: "vrcSubclassPosition", + fieldId: "subclassPosition", + type: "number", + label: "Subclass Position", + renderer: { + name: "number-input" + } + }, + { + id: "vrcTopRankingTrophyImage", + fieldId: "topRankingTrophyImage", + type: "text", + label: "TopRanking Trophy Image", + renderer: { + name: "text-input" + } + } + ] + } + }, + { + id: "carMatchCustomRankings", + fieldId: "carMatchCustomRankings", + multipleValues: true, + label: "carMatchCustomRankings (Non-Jato)", + renderer: { + name: "objects-accordion" + }, + type: "object", + settings: { + layout: [ + ["carMatchBody", "carMatchSeats", "carMatchLuxury"], + ["carMatchGreen", "carMatchOffroad", "carMatchBudget"], + ["carMatchPriority", "carMatchEstimated", "totalPercentage"], + ["seatingCapacity", "carMatchHorsepower", "winnerDescription"], + ["priceRange", "carMatchMpg", "carMatchUUID"], + ["rankWithinSubclass", "carMatchSubClassTitle"] + ], + fields: [ + { + id: "carMatchBody", + fieldId: "carMatchBody", + type: "text", + multipleValues: false, + label: "Body", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchSeats", + fieldId: "carMatchSeats", + type: "text", + multipleValues: false, + label: "Seats", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchLuxury", + fieldId: "carMatchLuxury", + type: "text", + multipleValues: false, + label: "Luxury", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchGreen", + fieldId: "carMatchGreen", + type: "text", + multipleValues: false, + label: "Green", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchOffroad", + fieldId: "carMatchOffroad", + type: "text", + multipleValues: false, + label: "Offroad", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchBudget", + fieldId: "carMatchBudget", + type: "text", + multipleValues: false, + label: "Budget", + renderer: { + name: "text-input" + } + }, + { + id: "totalPercentage", + fieldId: "totalPercentage", + type: "number", + multipleValues: false, + label: "TotalPercentage", + renderer: { + name: "number-input" + } + }, + { + id: "carMatchPriority", + fieldId: "carMatchPriority", + type: "number", + multipleValues: false, + label: "Priority", + renderer: { + name: "number-input" + } + }, + { + id: "carMatchEstimated", + fieldId: "carMatchEstimated", + type: "number", + multipleValues: false, + label: "Estimated", + renderer: { + name: "number-input" + } + }, + { + id: "priceRange", + fieldId: "priceRange", + type: "text", + multipleValues: false, + label: "PriceRange", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchMpg", + fieldId: "carMatchMpg", + type: "text", + multipleValues: false, + label: "Mpg", + renderer: { + name: "text-input" + } + }, + { + id: "seatingCapacity", + fieldId: "seatingCapacity", + type: "text", + multipleValues: false, + label: "SeatingCapacity", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchHorsepower", + fieldId: "carMatchHorsepower", + type: "text", + multipleValues: false, + label: "horsepower", + renderer: { + name: "text-input" + } + }, + { + id: "winnerDescription", + fieldId: "winnerDescription", + type: "text", + multipleValues: false, + label: "WinnerDescription", + renderer: { + name: "text-input" + } + }, + { + id: "rankWithinSubclass", + fieldId: "rankWithinSubclass", + type: "number", + multipleValues: false, + label: "RankWithinSubclass", + renderer: { + name: "number-input" + } + }, + { + id: "carMatchSubClassTitle", + fieldId: "carMatchSubClassTitle", + type: "text", + multipleValues: false, + label: "SubClassTitle", + renderer: { + name: "text-input" + } + }, + { + id: "carMatchUUID", + fieldId: "carMatchUUID", + type: "number", + label: "UUID (PermaLinkID)", + renderer: { + name: "number-input" + } + } + ] + } + } + ], + layout: [ + ["carsVehicle"], + ["bodyStyle", "carsMakePageShow", "carsPricePageShow"], + ["vehicleNmb", "carsUid", "trimName", "carsDiscontinued"], + ["carsMake", "carsModelName", "carsYear"], + ["slugMake", "slugModelName", "slugTrimName"], + ["baseVehicle", "releaseType", "newUsedBg"], + ["manufacturerCd", "slugBodystyle", "makeFeaturedImage"], + ["makeIcon", "makeDiscontinued", "oemUrl"], + ["carsSubcategory", "slugSubcategory", "mainCategory"], + ["slugMainCategory", "hybridElectricCategory", "slugHybridElectricCategory"], + ["dieselCategory", "slugDieselCategory", "updatedOn"], + ["vehicleStatus", "featuredImage", "priceRangeText"], + ["propertyType", "marketingImage", "priceRangeValue"], + ["ymmPriceRange", "priceRangeSlug", "latestYear"], + ["ymmLowestPriceRange", "ymmMaxPriceRange", "makeThumbnailUrl"], + ["combinedPrice", "carsCombinedEpaMpg", "horsePowerVal"], + ["slugMakeModel", "slugYearMakeModel", "retainedValue", "standardTires"], + ["bodyTypeOrder", "bodyType", "bodyTypeText", "slugBodyType"], + [ + "secondaryBodyTypeOrder", + "secondaryBodyType", + "secondaryBodyTypeText", + "slugSecondaryBodyType" + ], + ["carsEditorialRating"], + ["specifications"], + ["powertrains"], + ["warranty"], + ["pricing"], + ["safetyRatings"], + ["ownershipCosts"], + ["cpoComparison"], + ["carsRebates"], + ["historicalMotortrendScores"], + ["recalls"], + ["cpoProgram"], + ["realmpg"], + ["hubs"], + ["featuresIntellicar"], + ["seoText"], + ["images"], + ["vehicleRankingClass"], + ["carMatchCustomRankings"] + ], + titleFieldId: "carsVehicle" + }; +}; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/types.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/types.ts new file mode 100644 index 00000000000..37a24aa42d2 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/types.ts @@ -0,0 +1,12 @@ +import { ITaskResponseDoneResultOutput } from "@webiny/tasks"; + +export interface IMockDataManagerInput { + modelId: string; + amount: number; + seconds?: number; + amountOfTasks?: number; + amountOfRecords?: number; + overwrite?: boolean; +} + +export type IMockDataManagerOutput = ITaskResponseDoneResultOutput; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/createMockDataCreatorTask.ts b/packages/api-headless-cms-es-tasks/src/tasks/createMockDataCreatorTask.ts new file mode 100644 index 00000000000..9af62b64c2b --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/createMockDataCreatorTask.ts @@ -0,0 +1,30 @@ +import { createTaskDefinition } from "@webiny/tasks"; +import { Context } from "~/types"; +import { IMockDataCreatorInput, IMockDataCreatorOutput } from "~/tasks/MockDataCreator/types"; + +export const MOCK_DATA_CREATOR_TASK_ID = "mockDataCreator"; + +export const createMockDataCreatorTask = () => { + return createTaskDefinition({ + id: MOCK_DATA_CREATOR_TASK_ID, + title: "Mock Data Creator", + maxIterations: 500, + async run(params) { + const { MockDataCreator } = await import( + /* webpackChunkName: "MockDataCreator" */ "./MockDataCreator/MockDataCreator" + ); + + const carsMock = new MockDataCreator< + Context, + IMockDataCreatorInput, + IMockDataCreatorOutput + >(); + + try { + return await carsMock.execute(params); + } catch (ex) { + return params.response.error(ex); + } + } + }); +}; diff --git a/packages/api-headless-cms-es-tasks/src/tasks/createMockDataManagerTask.ts b/packages/api-headless-cms-es-tasks/src/tasks/createMockDataManagerTask.ts new file mode 100644 index 00000000000..c40e1230f2f --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/tasks/createMockDataManagerTask.ts @@ -0,0 +1,58 @@ +import { createTaskDefinition } from "@webiny/tasks"; +import { Context } from "~/types"; +import { IMockDataManagerInput, IMockDataManagerOutput } from "~/tasks/MockDataManager/types"; +import { CARS_MODEL_ID } from "~/tasks/MockDataManager/constants"; +import { enableIndexing } from "~/utils"; + +export const MOCK_DATA_MANAGER_TASK_ID = "mockDataManager"; + +export const createMockDataManagerTask = () => { + return createTaskDefinition({ + id: MOCK_DATA_MANAGER_TASK_ID, + title: "Mock Data Manager", + maxIterations: 500, + async run(params) { + const { MockDataManager } = await import( + /* webpackChunkName: "MockDataManager" */ "./MockDataManager/MockDataManager" + ); + + const carsMock = new MockDataManager< + Context, + IMockDataManagerInput, + IMockDataManagerOutput + >(); + + try { + return await carsMock.execute({ + ...params, + input: { + ...params.input, + modelId: CARS_MODEL_ID + } + }); + } catch (ex) { + return params.response.error(ex); + } + }, + async onError({ context }) { + await enableIndexing({ + client: context.elasticsearch, + model: { + modelId: CARS_MODEL_ID, + tenant: "root", + locale: "en-US" + } + }); + }, + async onAbort({ context }) { + await enableIndexing({ + client: context.elasticsearch, + model: { + modelId: CARS_MODEL_ID, + tenant: "root", + locale: "en-US" + } + }); + } + }); +}; diff --git a/packages/api-headless-cms-es-tasks/src/types.ts b/packages/api-headless-cms-es-tasks/src/types.ts new file mode 100644 index 00000000000..b4a2496a5cf --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/types.ts @@ -0,0 +1,7 @@ +import { ElasticsearchContext } from "@webiny/api-elasticsearch/types"; +import { CmsContext } from "@webiny/api-headless-cms/types"; +import { Context as TasksContext } from "@webiny/tasks/types"; + +export * from "./tasks/MockDataManager/types"; + +export interface Context extends CmsContext, ElasticsearchContext, TasksContext {} diff --git a/packages/api-headless-cms-es-tasks/src/utils/disableIndexing.ts b/packages/api-headless-cms-es-tasks/src/utils/disableIndexing.ts new file mode 100644 index 00000000000..2dd54d762ed --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/utils/disableIndexing.ts @@ -0,0 +1,31 @@ +import { Client } from "@webiny/api-elasticsearch"; +import { configurations } from "@webiny/api-headless-cms-ddb-es/configurations"; +import { CmsModel } from "@webiny/api-headless-cms/types"; + +export interface IDisableIndexingParams { + client: Client; + model: Pick; +} + +export const disableIndexing = async (params: IDisableIndexingParams) => { + const { client, model } = params; + + const { index } = configurations.es({ + model + }); + + try { + await client.indices.putSettings({ + index, + body: { + index: { + number_of_replicas: 0, + refresh_interval: "-1" + } + } + }); + } catch (ex) { + console.error(ex); + throw ex; + } +}; diff --git a/packages/api-headless-cms-es-tasks/src/utils/enableIndexing.ts b/packages/api-headless-cms-es-tasks/src/utils/enableIndexing.ts new file mode 100644 index 00000000000..0f7fc18f40f --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/utils/enableIndexing.ts @@ -0,0 +1,29 @@ +import { Client } from "@webiny/api-elasticsearch"; +import { CmsModel } from "@webiny/api-headless-cms/types"; +import { configurations } from "@webiny/api-headless-cms-ddb-es/configurations"; + +interface IEnableIndexingParams { + client: Client; + model: Pick; +} + +export const enableIndexing = async (params: IEnableIndexingParams) => { + const { client, model } = params; + const { index } = configurations.es({ + model + }); + try { + await client.indices.putSettings({ + index, + body: { + index: { + number_of_replicas: 1, + refresh_interval: "1s" + } + } + }); + } catch (ex) { + console.error(ex); + throw ex; + } +}; diff --git a/packages/api-headless-cms-es-tasks/src/utils/index.ts b/packages/api-headless-cms-es-tasks/src/utils/index.ts new file mode 100644 index 00000000000..894f15614b6 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/utils/index.ts @@ -0,0 +1,2 @@ +export * from "./disableIndexing"; +export * from "./enableIndexing"; diff --git a/packages/api-headless-cms-es-tasks/tsconfig.build.json b/packages/api-headless-cms-es-tasks/tsconfig.build.json new file mode 100644 index 00000000000..0d40af37eb7 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/tsconfig.build.json @@ -0,0 +1,27 @@ +{ + "extends": "../../tsconfig.build.json", + "include": ["src"], + "references": [ + { "path": "../api-elasticsearch/tsconfig.build.json" }, + { "path": "../api-headless-cms/tsconfig.build.json" }, + { "path": "../api-headless-cms-ddb-es/tsconfig.build.json" }, + { "path": "../handler/tsconfig.build.json" }, + { "path": "../handler-aws/tsconfig.build.json" }, + { "path": "../tasks/tsconfig.build.json" }, + { "path": "../utils/tsconfig.build.json" }, + { "path": "../api/tsconfig.build.json" }, + { "path": "../api-i18n/tsconfig.build.json" }, + { "path": "../api-security/tsconfig.build.json" }, + { "path": "../api-tenancy/tsconfig.build.json" }, + { "path": "../api-wcp/tsconfig.build.json" }, + { "path": "../handler-graphql/tsconfig.build.json" }, + { "path": "../plugins/tsconfig.build.json" } + ], + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist", + "declarationDir": "./dist", + "paths": { "~/*": ["./src/*"], "~tests/*": ["./__tests__/*"] }, + "baseUrl": "." + } +} diff --git a/packages/api-headless-cms-es-tasks/tsconfig.json b/packages/api-headless-cms-es-tasks/tsconfig.json new file mode 100644 index 00000000000..bd40482808c --- /dev/null +++ b/packages/api-headless-cms-es-tasks/tsconfig.json @@ -0,0 +1,58 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src", "__tests__"], + "references": [ + { "path": "../api-elasticsearch" }, + { "path": "../api-headless-cms" }, + { "path": "../api-headless-cms-ddb-es" }, + { "path": "../handler" }, + { "path": "../handler-aws" }, + { "path": "../tasks" }, + { "path": "../utils" }, + { "path": "../api" }, + { "path": "../api-i18n" }, + { "path": "../api-security" }, + { "path": "../api-tenancy" }, + { "path": "../api-wcp" }, + { "path": "../handler-graphql" }, + { "path": "../plugins" } + ], + "compilerOptions": { + "rootDirs": ["./src", "./__tests__"], + "outDir": "./dist", + "declarationDir": "./dist", + "paths": { + "~/*": ["./src/*"], + "~tests/*": ["./__tests__/*"], + "@webiny/api-elasticsearch/*": ["../api-elasticsearch/src/*"], + "@webiny/api-elasticsearch": ["../api-elasticsearch/src"], + "@webiny/api-headless-cms/*": ["../api-headless-cms/src/*"], + "@webiny/api-headless-cms": ["../api-headless-cms/src"], + "@webiny/api-headless-cms-ddb-es/*": ["../api-headless-cms-ddb-es/src/*"], + "@webiny/api-headless-cms-ddb-es": ["../api-headless-cms-ddb-es/src"], + "@webiny/handler/*": ["../handler/src/*"], + "@webiny/handler": ["../handler/src"], + "@webiny/handler-aws/*": ["../handler-aws/src/*"], + "@webiny/handler-aws": ["../handler-aws/src"], + "@webiny/tasks/*": ["../tasks/src/*"], + "@webiny/tasks": ["../tasks/src"], + "@webiny/utils/*": ["../utils/src/*"], + "@webiny/utils": ["../utils/src"], + "@webiny/api/*": ["../api/src/*"], + "@webiny/api": ["../api/src"], + "@webiny/api-i18n/*": ["../api-i18n/src/*"], + "@webiny/api-i18n": ["../api-i18n/src"], + "@webiny/api-security/*": ["../api-security/src/*"], + "@webiny/api-security": ["../api-security/src"], + "@webiny/api-tenancy/*": ["../api-tenancy/src/*"], + "@webiny/api-tenancy": ["../api-tenancy/src"], + "@webiny/api-wcp/*": ["../api-wcp/src/*"], + "@webiny/api-wcp": ["../api-wcp/src"], + "@webiny/handler-graphql/*": ["../handler-graphql/src/*"], + "@webiny/handler-graphql": ["../handler-graphql/src"], + "@webiny/plugins/*": ["../plugins/src/*"], + "@webiny/plugins": ["../plugins/src"] + }, + "baseUrl": "." + } +} diff --git a/packages/api-headless-cms-es-tasks/webiny.config.js b/packages/api-headless-cms-es-tasks/webiny.config.js new file mode 100644 index 00000000000..6dff86766c9 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/webiny.config.js @@ -0,0 +1,8 @@ +const { createWatchPackage, createBuildPackage } = require("@webiny/project-utils"); + +module.exports = { + commands: { + build: createBuildPackage({ cwd: __dirname }), + watch: createWatchPackage({ cwd: __dirname }) + } +}; diff --git a/packages/api-headless-cms/__tests__/storageOperations/entries.test.ts b/packages/api-headless-cms/__tests__/storageOperations/entries.test.ts index 19869e681d2..bfab26d276f 100644 --- a/packages/api-headless-cms/__tests__/storageOperations/entries.test.ts +++ b/packages/api-headless-cms/__tests__/storageOperations/entries.test.ts @@ -2,7 +2,7 @@ import { createPersonEntries, createPersonModel, deletePersonModel } from "./hel import { useGraphQLHandler } from "../testHelpers/useGraphQLHandler"; import { CmsContext } from "~/types"; -jest.setTimeout(60000); +jest.setTimeout(90000); describe("Entries storage operations", () => { const { storageOperations, plugins } = useGraphQLHandler({ @@ -34,7 +34,7 @@ describe("Entries storage operations", () => { it("getRevisions - should get revisions of all the entries", async () => { const personModel = createPersonModel(); - const amount = 102; + const amount = 45; const results = await createPersonEntries({ amount, storageOperations, @@ -115,7 +115,7 @@ describe("Entries storage operations", () => { it("getByIds - should get all entries by id list", async () => { const personModel = createPersonModel(); - const amount = 202; + const amount = 51; const results = await createPersonEntries({ amount, storageOperations, diff --git a/packages/api-headless-cms/src/types.ts b/packages/api-headless-cms/src/types.ts index ad290d7ecda..28a88320fc7 100644 --- a/packages/api-headless-cms/src/types.ts +++ b/packages/api-headless-cms/src/types.ts @@ -1776,8 +1776,10 @@ export interface CmsModelUpdateDirectParams { export interface CmsModelContext { /** * Get a single content model. + * + * @throws NotFoundError */ - getModel: (modelId: string) => Promise; + getModel: (modelId: string) => Promise; /** * Get all content models. */ diff --git a/packages/create-webiny-project/package.json b/packages/create-webiny-project/package.json index cd5165b16d2..91b1784b6f8 100644 --- a/packages/create-webiny-project/package.json +++ b/packages/create-webiny-project/package.json @@ -23,7 +23,7 @@ "load-json-file": "6.2.0", "node-fetch": "^2.6.1", "os": "0.1.1", - "p-retry": "^4.6.0", + "p-retry": "^4.6.2", "rimraf": "3.0.2", "semver": "^7.3.5", "uuid": "8.3.2", diff --git a/packages/handler-aws/src/index.ts b/packages/handler-aws/src/index.ts index 6e6e4f3f26a..678d117bf37 100644 --- a/packages/handler-aws/src/index.ts +++ b/packages/handler-aws/src/index.ts @@ -5,6 +5,8 @@ import "./sqs/register"; import "./eventBridge/register"; import "./sns/register"; +export * from "./utils"; + /** * API Gateway */ diff --git a/packages/handler-aws/src/utils/index.ts b/packages/handler-aws/src/utils/index.ts new file mode 100644 index 00000000000..74b6b0f97f3 --- /dev/null +++ b/packages/handler-aws/src/utils/index.ts @@ -0,0 +1,2 @@ +export * from "./composedHandler"; +export * from "./timer"; diff --git a/packages/handler-aws/src/utils/timer/CustomTimer.ts b/packages/handler-aws/src/utils/timer/CustomTimer.ts new file mode 100644 index 00000000000..55f59105817 --- /dev/null +++ b/packages/handler-aws/src/utils/timer/CustomTimer.ts @@ -0,0 +1,14 @@ +const MAX_RUNNING_MINUTES = 14; +const MAX_RUNNING_MILLISECONDS = MAX_RUNNING_MINUTES * 60 * 1000; + +export class CustomTimer { + private readonly startTime: number; + + public constructor() { + this.startTime = Date.now(); + } + + public getRemainingMilliseconds(): number { + return this.startTime + MAX_RUNNING_MILLISECONDS - Date.now(); // 14 minutes + } +} diff --git a/packages/tasks/src/timer/Timer.ts b/packages/handler-aws/src/utils/timer/Timer.ts similarity index 63% rename from packages/tasks/src/timer/Timer.ts rename to packages/handler-aws/src/utils/timer/Timer.ts index 8603cd0c968..f77543cf3f3 100644 --- a/packages/tasks/src/timer/Timer.ts +++ b/packages/handler-aws/src/utils/timer/Timer.ts @@ -13,4 +13,12 @@ export class Timer implements ITimer { public getRemainingMilliseconds(): number { return this.cb(); } + + public getRemainingSeconds(): number { + const result = this.cb(); + if (result > 0) { + return Math.floor(result / 1000); + } + return 0; + } } diff --git a/packages/tasks/src/timer/abstractions/ITimer.ts b/packages/handler-aws/src/utils/timer/abstractions/ITimer.ts similarity index 58% rename from packages/tasks/src/timer/abstractions/ITimer.ts rename to packages/handler-aws/src/utils/timer/abstractions/ITimer.ts index 6bc13211380..5fbe93039f5 100644 --- a/packages/tasks/src/timer/abstractions/ITimer.ts +++ b/packages/handler-aws/src/utils/timer/abstractions/ITimer.ts @@ -3,4 +3,8 @@ export interface ITimer { * Return value must be in milliseconds. */ getRemainingMilliseconds(): number; + /** + * Return value must be in seconds. + */ + getRemainingSeconds(): number; } diff --git a/packages/tasks/src/timer/factory.ts b/packages/handler-aws/src/utils/timer/factory.ts similarity index 91% rename from packages/tasks/src/timer/factory.ts rename to packages/handler-aws/src/utils/timer/factory.ts index b6de1c94a43..c2034a1634d 100644 --- a/packages/tasks/src/timer/factory.ts +++ b/packages/handler-aws/src/utils/timer/factory.ts @@ -1,4 +1,4 @@ -import { ITimer } from "~/timer/abstractions/ITimer"; +import { ITimer } from "./abstractions/ITimer"; import { CustomTimer } from "./CustomTimer"; import { Context as LambdaContext } from "aws-lambda/handler"; import { Timer } from "./Timer"; diff --git a/packages/tasks/src/timer/index.ts b/packages/handler-aws/src/utils/timer/index.ts similarity index 100% rename from packages/tasks/src/timer/index.ts rename to packages/handler-aws/src/utils/timer/index.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts index ebc6da923ef..9545e5d6055 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts @@ -208,6 +208,5 @@ export class MetaFieldsMigration { // Save segment processing stats to a file. fs.writeFileSync(logFilePath, JSON.stringify(migrationStats, null, 2)); this.logger.trace(`Migration summary saved to "${logFilePath}".`); - } } diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts index 08d64058d51..20ac331144c 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts @@ -1,12 +1,12 @@ import { - ElasticsearchCatCluterHealthStatus, + ElasticsearchCatClusterHealthStatus, IWaitUntilHealthyParams } from "@webiny/api-elasticsearch"; export type EsHealthChecksParams = Required; export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { - minClusterHealthStatus: ElasticsearchCatCluterHealthStatus.Yellow, + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, maxProcessorPercent: 90, maxRamPercent: 100, maxWaitingTime: 90, diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index 4973ea0c86b..ced634651a4 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -375,17 +375,19 @@ const createInitialStatus = (): MigrationStatus => { ); const results = await waitUntilHealthy.wait({ async onUnhealthy(params) { - const shouldWaitReason = params.shouldWaitReason || "unknown"; + const waitingReason = params.waitingReason; logger.warn( - `Cluster is unhealthy (${shouldWaitReason}). Waiting for the cluster to become healthy...`, + `Cluster is unhealthy (${waitingReason.name}). Waiting for the cluster to become healthy...`, params ); - if (status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]) { - status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]++; + if (status.stats.esHealthChecks.unhealthyReasons[waitingReason.name]) { + status.stats.esHealthChecks.unhealthyReasons[waitingReason.name]++; } else { - status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason] = 1; + status.stats.esHealthChecks.unhealthyReasons[ + waitingReason.name + ] = 1; } } }); diff --git a/packages/project-utils/testing/tasks/index.ts b/packages/project-utils/testing/tasks/index.ts index bd2b893ccbf..8b7cf82e661 100644 --- a/packages/project-utils/testing/tasks/index.ts +++ b/packages/project-utils/testing/tasks/index.ts @@ -1 +1,2 @@ export * from "./runner"; +export * from "./mockTaskTriggerTransportPlugin"; diff --git a/packages/project-utils/testing/tasks/mockTaskTriggerTransportPlugin.ts b/packages/project-utils/testing/tasks/mockTaskTriggerTransportPlugin.ts new file mode 100644 index 00000000000..6665bd4e49d --- /dev/null +++ b/packages/project-utils/testing/tasks/mockTaskTriggerTransportPlugin.ts @@ -0,0 +1,24 @@ +import { + ITaskTriggerTransport, + TaskTriggerTransportPlugin +} from "@webiny/tasks/plugins/TaskTriggerTransportPlugin"; + +class MockTaskTriggerTransportPlugin extends TaskTriggerTransportPlugin { + public override name = "tasks.mockTaskTriggerTransport"; + + override createTransport(): ITaskTriggerTransport { + return { + async send() { + return { + Entries: [], + $metadata: {}, + FailedEntryCount: 0 + }; + } + }; + } +} + +export const createMockTaskTriggerTransportPlugin = () => { + return [new MockTaskTriggerTransportPlugin()]; +}; diff --git a/packages/project-utils/testing/tasks/runner.ts b/packages/project-utils/testing/tasks/runner.ts index cee4ea8aede..614f5c480b8 100644 --- a/packages/project-utils/testing/tasks/runner.ts +++ b/packages/project-utils/testing/tasks/runner.ts @@ -6,8 +6,9 @@ import { ITaskResponseDoneResultOutput } from "@webiny/tasks/types"; import { TaskRunner } from "@webiny/tasks/runner"; -import { timerFactory } from "@webiny/tasks/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; import { TaskEventValidation } from "@webiny/tasks/runner/TaskEventValidation"; +import { createMockTaskTriggerTransportPlugin } from "./mockTaskTriggerTransportPlugin"; export interface CreateRunnerParams< C extends Context = Context, @@ -26,6 +27,7 @@ export const createRunner = < >( params: CreateRunnerParams ) => { + params.context.plugins.register(createMockTaskTriggerTransportPlugin()); const runner = new TaskRunner( params.context, timerFactory({ diff --git a/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts b/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts index 11d574d8e60..751419bfd48 100644 --- a/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts +++ b/packages/pulumi-aws/src/apps/core/CoreElasticSearch.ts @@ -215,8 +215,8 @@ export const ElasticSearch = createAppModule({ role: role.output.arn, runtime: LAMBDA_RUNTIME, handler: "handler.handler", - timeout: 600, - memorySize: 512, + timeout: 900, + memorySize: 1024, environment: { variables: { DEBUG: String(process.env.DEBUG), @@ -245,7 +245,7 @@ export const ElasticSearch = createAppModule({ functionName: lambda.output.arn, startingPosition: "LATEST", maximumRetryAttempts: 3, - batchSize: 200, + batchSize: 50, maximumBatchingWindowInSeconds: 1 } }); @@ -287,6 +287,7 @@ function getDynamoDbToElasticLambdaPolicy( Sid: "PermissionForES", Effect: "Allow", Action: [ + "es:ESHttpGet", "es:ESHttpDelete", "es:ESHttpPatch", "es:ESHttpPost", diff --git a/packages/pulumi-aws/src/apps/core/CoreOpenSearch.ts b/packages/pulumi-aws/src/apps/core/CoreOpenSearch.ts index fd84e97b01d..6eb5d402c94 100644 --- a/packages/pulumi-aws/src/apps/core/CoreOpenSearch.ts +++ b/packages/pulumi-aws/src/apps/core/CoreOpenSearch.ts @@ -229,8 +229,8 @@ export const OpenSearch = createAppModule({ role: role.output.arn, runtime: LAMBDA_RUNTIME, handler: "handler.handler", - timeout: 600, - memorySize: 512, + timeout: 900, + memorySize: 1024, environment: { variables: { DEBUG: String(process.env.DEBUG), @@ -259,7 +259,7 @@ export const OpenSearch = createAppModule({ functionName: lambda.output.arn, startingPosition: "LATEST", maximumRetryAttempts: 3, - batchSize: 200, + batchSize: 50, maximumBatchingWindowInSeconds: 1 } }); @@ -300,6 +300,7 @@ function getDynamoDbToElasticLambdaPolicy( Sid: "PermissionForES", Effect: "Allow", Action: [ + "es:ESHttpGet", "es:ESHttpDelete", "es:ESHttpPatch", "es:ESHttpPost", diff --git a/packages/tasks/__tests__/runner/taskRunnerAbort.test.ts b/packages/tasks/__tests__/runner/taskRunnerAbort.test.ts index ff27e72fc4c..de66e4ad863 100644 --- a/packages/tasks/__tests__/runner/taskRunnerAbort.test.ts +++ b/packages/tasks/__tests__/runner/taskRunnerAbort.test.ts @@ -3,7 +3,7 @@ import { createMockEvent } from "~tests/mocks"; import { ResponseAbortedResult } from "~/response"; import { createLiveContextFactory } from "~tests/live"; import { taskDefinition } from "~tests/runner/taskDefinition"; -import { timerFactory } from "~/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; import { TaskEventValidation } from "~/runner/TaskEventValidation"; describe("task runner abort", () => { diff --git a/packages/tasks/__tests__/runner/taskRunnerCreate.test.ts b/packages/tasks/__tests__/runner/taskRunnerCreate.test.ts index 8b9296eb1fe..cb2da41b3d1 100644 --- a/packages/tasks/__tests__/runner/taskRunnerCreate.test.ts +++ b/packages/tasks/__tests__/runner/taskRunnerCreate.test.ts @@ -1,7 +1,7 @@ import { TaskRunner } from "~/runner"; import { createLiveContextFactory } from "~tests/live"; import { taskDefinition } from "~tests/runner/taskDefinition"; -import { timerFactory } from "~/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; import { TaskEventValidation } from "~/runner/TaskEventValidation"; describe("task runner create", () => { diff --git a/packages/tasks/__tests__/runner/taskRunnerErrorFailedState.test.ts b/packages/tasks/__tests__/runner/taskRunnerErrorFailedState.test.ts index d25d53316cb..cc91343a758 100644 --- a/packages/tasks/__tests__/runner/taskRunnerErrorFailedState.test.ts +++ b/packages/tasks/__tests__/runner/taskRunnerErrorFailedState.test.ts @@ -4,7 +4,7 @@ import { ResponseErrorResult } from "~/response"; import { TaskDataStatus } from "~/types"; import { createLiveContextFactory } from "~tests/live"; import { taskDefinition } from "~tests/runner/taskDefinition"; -import { timerFactory } from "~/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; import { TaskEventValidation } from "~/runner/TaskEventValidation"; describe("task runner error in failed state", () => { diff --git a/packages/tasks/__tests__/runner/taskRunnerErrorSuccessState.test.ts b/packages/tasks/__tests__/runner/taskRunnerErrorSuccessState.test.ts index 80cfa60ca4a..9849514144f 100644 --- a/packages/tasks/__tests__/runner/taskRunnerErrorSuccessState.test.ts +++ b/packages/tasks/__tests__/runner/taskRunnerErrorSuccessState.test.ts @@ -4,7 +4,7 @@ import { ResponseErrorResult } from "~/response"; import { TaskDataStatus } from "~/types"; import { createLiveContextFactory } from "~tests/live"; import { taskDefinition } from "~tests/runner/taskDefinition"; -import { timerFactory } from "~/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; import { TaskEventValidation } from "~/runner/TaskEventValidation"; describe("task runner error in success state", () => { diff --git a/packages/tasks/__tests__/runner/taskRunnerSuccess.test.ts b/packages/tasks/__tests__/runner/taskRunnerSuccess.test.ts index 6955d663338..2704d4325d4 100644 --- a/packages/tasks/__tests__/runner/taskRunnerSuccess.test.ts +++ b/packages/tasks/__tests__/runner/taskRunnerSuccess.test.ts @@ -5,7 +5,7 @@ import { TaskDataStatus } from "~/types"; import { createLiveContextFactory } from "~tests/live"; import { taskDefinition } from "~tests/runner/taskDefinition"; import { TaskEventValidation } from "~/runner/TaskEventValidation"; -import { timerFactory } from "~/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; describe("task runner trigger and end successfully", () => { const contextFactory = createLiveContextFactory({ diff --git a/packages/tasks/__tests__/runner/taskRunnerTaskNotFound.test.ts b/packages/tasks/__tests__/runner/taskRunnerTaskNotFound.test.ts index e943b16c746..bcc5da7b309 100644 --- a/packages/tasks/__tests__/runner/taskRunnerTaskNotFound.test.ts +++ b/packages/tasks/__tests__/runner/taskRunnerTaskNotFound.test.ts @@ -3,7 +3,7 @@ import { createMockEvent } from "~tests/mocks"; import { ResponseErrorResult } from "~/response"; import { createLiveContextFactory } from "~tests/live"; import { taskDefinition } from "~tests/runner/taskDefinition"; -import { timerFactory } from "~/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; import { TaskEventValidation } from "~/runner/TaskEventValidation"; describe("task runner task not found", () => { diff --git a/packages/tasks/src/crud/EventBridgeEventTransport.ts b/packages/tasks/src/crud/transport/EventBridgeEventTransportPlugin.ts similarity index 56% rename from packages/tasks/src/crud/EventBridgeEventTransport.ts rename to packages/tasks/src/crud/transport/EventBridgeEventTransportPlugin.ts index bf9777ac952..76defe367c5 100644 --- a/packages/tasks/src/crud/EventBridgeEventTransport.ts +++ b/packages/tasks/src/crud/transport/EventBridgeEventTransportPlugin.ts @@ -1,31 +1,26 @@ -import WebinyError from "@webiny/error"; import { - EventBridgeClient, - PutEventsCommand, - PutEventsCommandOutput -} from "@webiny/aws-sdk/client-eventbridge"; -import { ITask, ITaskConfig } from "~/types"; -import { ITaskEventInput } from "~/handler/types"; + ITaskTriggerTransport, + ITaskTriggerTransportPluginParams, + PutEventsCommandOutput, + TaskTriggerTransportPlugin +} from "~/plugins"; +import { Context, ITask, ITaskConfig, ITaskEventInput } from "~/types"; +import { EventBridgeClient, PutEventsCommand } from "@webiny/aws-sdk/client-eventbridge"; +import { WebinyError } from "@webiny/error"; -export { PutEventsCommandOutput }; - -export interface IEventBridgeEventTransportParams { - config: ITaskConfig; - getTenant: () => string; - getLocale: () => string; -} - -export class EventBridgeEventTransport { +class EventBridgeEventTransport implements ITaskTriggerTransport { + protected readonly context: Context; + protected readonly config: ITaskConfig; + protected readonly getTenant: () => string; + protected readonly getLocale: () => string; private readonly client: EventBridgeClient; - private readonly eventBusName: string; - private readonly getTenant: () => string; - private readonly getLocale: () => string; - public constructor(params: IEventBridgeEventTransportParams) { + public constructor(params: ITaskTriggerTransportPluginParams) { this.client = new EventBridgeClient({ region: process.env.AWS_REGION }); - this.eventBusName = params.config.eventBusName; + this.context = params.context; + this.config = params.config; this.getTenant = params.getTenant; this.getLocale = params.getLocale; } @@ -50,7 +45,7 @@ export class EventBridgeEventTransport { Entries: [ { Source: "webiny-api-tasks", - EventBusName: this.eventBusName, + EventBusName: this.config.eventBusName, DetailType: "WebinyBackgroundTask", Detail: JSON.stringify(event) } @@ -70,3 +65,10 @@ export class EventBridgeEventTransport { } } } + +export class EventBridgeEventTransportPlugin extends TaskTriggerTransportPlugin { + public override name = "task.eventBridgeEventTransport"; + public createTransport(params: ITaskTriggerTransportPluginParams): ITaskTriggerTransport { + return new EventBridgeEventTransport(params); + } +} diff --git a/packages/tasks/src/crud/trigger.tasks.ts b/packages/tasks/src/crud/trigger.tasks.ts index 77c28be5ff5..45e36ee60db 100644 --- a/packages/tasks/src/crud/trigger.tasks.ts +++ b/packages/tasks/src/crud/trigger.tasks.ts @@ -10,10 +10,12 @@ import { ITaskLogItemType, ITasksContextTriggerObject, ITaskTriggerParams, + PutEventsCommandOutput, TaskDataStatus } from "~/types"; import { NotFoundError } from "@webiny/handler-graphql"; -import { EventBridgeEventTransport, PutEventsCommandOutput } from "./EventBridgeEventTransport"; +import { createTransport } from "~/transport/createTransport"; +import { EventBridgeEventTransportPlugin } from "~/crud/transport/EventBridgeEventTransportPlugin"; const MAX_DELAY_DAYS = 355; const MAX_DELAY_SECONDS = MAX_DELAY_DAYS * 24 * 60 * 60; @@ -43,16 +45,11 @@ export const createTriggerTasksCrud = ( context: Context, config: ITaskConfig ): ITasksContextTriggerObject => { - const getTenant = (): string => { - return context.tenancy.getCurrentTenant().id; - }; - const getLocale = (): string => { - return context.cms.getLocale().code; - }; - const eventBridgeEventTransport = new EventBridgeEventTransport({ - config, - getTenant, - getLocale + context.plugins.register(new EventBridgeEventTransportPlugin()); + + const transport = createTransport({ + context, + config }); return { @@ -85,7 +82,7 @@ export const createTriggerTasksCrud = ( let event: PutEventsCommandOutput | null = null; try { - event = await eventBridgeEventTransport.send(task, delay); + event = await transport.send(task, delay); if (!event) { throw new WebinyError( diff --git a/packages/tasks/src/handler/index.ts b/packages/tasks/src/handler/index.ts index 8cfb97b8c2f..ffb26daade9 100644 --- a/packages/tasks/src/handler/index.ts +++ b/packages/tasks/src/handler/index.ts @@ -8,7 +8,7 @@ import { Context, TaskResponseStatus } from "~/types"; import { ITaskRawEvent } from "~/handler/types"; import { TaskRunner } from "~/runner"; import WebinyError from "@webiny/error"; -import { timerFactory } from "~/timer"; +import { timerFactory } from "@webiny/handler-aws/utils"; import { TaskEventValidation } from "~/runner/TaskEventValidation"; export interface HandlerCallable { diff --git a/packages/tasks/src/plugins/TaskTriggerTransportPlugin.ts b/packages/tasks/src/plugins/TaskTriggerTransportPlugin.ts new file mode 100644 index 00000000000..33ecbbc2923 --- /dev/null +++ b/packages/tasks/src/plugins/TaskTriggerTransportPlugin.ts @@ -0,0 +1,24 @@ +import { Plugin } from "@webiny/plugins"; +import { Context, ITask, ITaskConfig } from "~/types"; +import { PutEventsCommandOutput } from "@webiny/aws-sdk/client-eventbridge"; + +export { PutEventsCommandOutput }; + +export interface ITaskTriggerTransportPluginParams { + context: Context; + config: ITaskConfig; + getTenant(): string; + getLocale(): string; +} + +export interface ITaskTriggerTransport { + send(task: Pick, delay: number): Promise; +} + +export abstract class TaskTriggerTransportPlugin extends Plugin { + public static override readonly type: string = "tasks.taskTriggerTransport"; + + public abstract createTransport( + params: ITaskTriggerTransportPluginParams + ): ITaskTriggerTransport; +} diff --git a/packages/tasks/src/plugins/index.ts b/packages/tasks/src/plugins/index.ts new file mode 100644 index 00000000000..bcd15a83e5a --- /dev/null +++ b/packages/tasks/src/plugins/index.ts @@ -0,0 +1 @@ +export * from "./TaskTriggerTransportPlugin"; diff --git a/packages/tasks/src/runner/TaskControl.ts b/packages/tasks/src/runner/TaskControl.ts index 1590739b972..ef8241c1a64 100644 --- a/packages/tasks/src/runner/TaskControl.ts +++ b/packages/tasks/src/runner/TaskControl.ts @@ -111,6 +111,8 @@ export class TaskControl implements ITaskControl { } try { + this.context.security.setIdentity(task.createdBy); + const result = await manager.run(definition); await this.runEvents(result, definition, task); diff --git a/packages/tasks/src/runner/TaskRunner.ts b/packages/tasks/src/runner/TaskRunner.ts index 12092ef7ebc..00446353e81 100644 --- a/packages/tasks/src/runner/TaskRunner.ts +++ b/packages/tasks/src/runner/TaskRunner.ts @@ -1,11 +1,11 @@ import { ITaskEvent, ITaskRawEvent } from "~/handler/types"; import { ITaskEventValidation, ITaskRunner } from "./abstractions"; import { Context } from "~/types"; -import { Response } from "~/response"; +import { Response, ResponseErrorResult } from "~/response"; import { TaskControl } from "./TaskControl"; import { IResponseResult } from "~/response/abstractions"; import { getErrorProperties } from "~/utils/getErrorProperties"; -import { ITimer } from "~/timer"; +import { ITimer } from "@webiny/handler-aws/utils"; const transformMinutesIntoMilliseconds = (minutes: number) => { return minutes * 60000; @@ -67,8 +67,15 @@ export class TaskRunner implements ITaskRunner { const control = new TaskControl(this, response, this.context); try { - return await control.run(event); + const result = await control.run(event); + if (result instanceof ResponseErrorResult === false) { + return result; + } + console.error(result); + return result; } catch (ex) { + console.error(`Failed to execute task "${event.webinyTaskId}".`); + console.error(ex); return response.error({ error: getErrorProperties(ex) }); diff --git a/packages/tasks/src/timer/CustomTimer.ts b/packages/tasks/src/timer/CustomTimer.ts deleted file mode 100644 index 00d12473475..00000000000 --- a/packages/tasks/src/timer/CustomTimer.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ITimer } from "~/timer/abstractions/ITimer"; - -const MAX_RUNNING_MINUTES = 14; -const MAX_RUNNING_MILLISECONDS = MAX_RUNNING_MINUTES * 60 * 1000; - -export class CustomTimer implements ITimer { - private readonly startTime: number; - - public constructor() { - this.startTime = Date.now(); - } - - public getRemainingMilliseconds(): number { - const result = this.startTime + MAX_RUNNING_MILLISECONDS - Date.now(); // 14 minutes - console.log( - "It looks like the Lambda Context getRemainingTimeInMillis does not exist. Mocked remaining time:", - result - ); - return result; - } -} diff --git a/packages/tasks/src/transport/createTransport.ts b/packages/tasks/src/transport/createTransport.ts new file mode 100644 index 00000000000..f7be33941d3 --- /dev/null +++ b/packages/tasks/src/transport/createTransport.ts @@ -0,0 +1,34 @@ +import { Context, ITaskConfig } from "~/types"; +import { ITaskTriggerTransport, TaskTriggerTransportPlugin } from "~/plugins"; +import { WebinyError } from "@webiny/error"; + +export interface ICreateTransport { + context: Context; + config: ITaskConfig; +} + +export const createTransport = (params: ICreateTransport): ITaskTriggerTransport => { + const plugins = params.context.plugins.byType( + TaskTriggerTransportPlugin.type + ); + const [plugin] = plugins; + if (!plugin) { + throw new WebinyError("Missing TaskTriggerTransportPlugin.", "PLUGIN_ERROR", { + type: TaskTriggerTransportPlugin.type + }); + } + + const getTenant = (): string => { + return params.context.tenancy.getCurrentTenant().id; + }; + const getLocale = (): string => { + return params.context.cms.getLocale().code; + }; + + return plugin.createTransport({ + context: params.context, + config: params.config, + getTenant, + getLocale + }); +}; diff --git a/packages/tasks/src/utils/getObjectProperties.ts b/packages/tasks/src/utils/getObjectProperties.ts index 5e080afcea6..9e5a55900ac 100644 --- a/packages/tasks/src/utils/getObjectProperties.ts +++ b/packages/tasks/src/utils/getObjectProperties.ts @@ -10,6 +10,9 @@ export const getObjectProperties = (input: unknown): T => { return {} as unknown as T; } return Object.getOwnPropertyNames(input).reduce((acc, key) => { + if (key === "stack") { + return acc; + } acc[key as keyof T] = (input as unknown as T)[key as keyof T]; return acc; }, {} as T) as unknown as T; diff --git a/yarn.lock b/yarn.lock index 45cde35899f..aea5c7bab93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6644,6 +6644,13 @@ __metadata: languageName: node linkType: hard +"@faker-js/faker@npm:^8.4.1": + version: 8.4.1 + resolution: "@faker-js/faker@npm:8.4.1" + checksum: d802d531f8929562715adc279cfec763c9a4bc596ec67b0ce43fd0ae61b285d2b0eec6f1f4aa852452a63721a842fe7e81926dce7bd92acca94b01e2a1f55f5a + languageName: node + linkType: hard + "@fastify/accept-negotiator@npm:^1.0.0": version: 1.1.0 resolution: "@fastify/accept-negotiator@npm:1.1.0" @@ -14972,6 +14979,7 @@ __metadata: "@babel/cli": ^7.22.6 "@babel/core": ^7.22.8 "@webiny/api-elasticsearch-tasks": 0.0.0 + "@webiny/api-headless-cms-es-tasks": 0.0.0 "@webiny/cli": 0.0.0 "@webiny/plugins": 0.0.0 "@webiny/project-utils": 0.0.0 @@ -14989,6 +14997,7 @@ __metadata: "@babel/cli": ^7.22.6 "@babel/core": ^7.22.8 "@webiny/api-elasticsearch-tasks": 0.0.0 + "@webiny/api-headless-cms-es-tasks": 0.0.0 "@webiny/cli": 0.0.0 "@webiny/plugins": 0.0.0 "@webiny/project-utils": 0.0.0 @@ -15379,6 +15388,35 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-headless-cms-es-tasks@0.0.0, @webiny/api-headless-cms-es-tasks@workspace:packages/api-headless-cms-es-tasks": + version: 0.0.0-use.local + resolution: "@webiny/api-headless-cms-es-tasks@workspace:packages/api-headless-cms-es-tasks" + dependencies: + "@babel/cli": ^7.22.6 + "@babel/core": ^7.22.8 + "@babel/preset-env": ^7.22.7 + "@faker-js/faker": ^8.4.1 + "@webiny/api": 0.0.0 + "@webiny/api-elasticsearch": 0.0.0 + "@webiny/api-headless-cms": 0.0.0 + "@webiny/api-headless-cms-ddb-es": 0.0.0 + "@webiny/api-i18n": 0.0.0 + "@webiny/api-security": 0.0.0 + "@webiny/api-tenancy": 0.0.0 + "@webiny/api-wcp": 0.0.0 + "@webiny/cli": 0.0.0 + "@webiny/handler": 0.0.0 + "@webiny/handler-aws": 0.0.0 + "@webiny/handler-graphql": 0.0.0 + "@webiny/plugins": 0.0.0 + "@webiny/project-utils": 0.0.0 + "@webiny/tasks": 0.0.0 + "@webiny/utils": 0.0.0 + ttypescript: ^1.5.13 + typescript: ^4.7.4 + languageName: unknown + linkType: soft + "@webiny/api-headless-cms@0.0.0, @webiny/api-headless-cms@workspace:packages/api-headless-cms": version: 0.0.0-use.local resolution: "@webiny/api-headless-cms@workspace:packages/api-headless-cms" @@ -24239,7 +24277,7 @@ __metadata: load-json-file: 6.2.0 node-fetch: ^2.6.1 os: 0.1.1 - p-retry: ^4.6.0 + p-retry: ^4.6.2 rimraf: 3.0.2 semver: ^7.3.5 uuid: 8.3.2 @@ -37557,7 +37595,7 @@ __metadata: languageName: node linkType: hard -"p-retry@npm:^4.5.0, p-retry@npm:^4.6.0, p-retry@npm:^4.6.2": +"p-retry@npm:^4.5.0, p-retry@npm:^4.6.2": version: 4.6.2 resolution: "p-retry@npm:4.6.2" dependencies: From 887d1ff1aa0610a33dac1f9bf6a705bde3f37512 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Mon, 3 Jun 2024 16:00:46 +0200 Subject: [PATCH 23/56] chore: add ES health checks stats --- .../5.39.6/001/ddb-es/MetaFieldsMigration.ts | 35 +- .../migrations/5.39.6/001/ddb-es/worker.ts | 29 +- yarn.lock | 1444 ++++++++++++++--- 3 files changed, 1312 insertions(+), 196 deletions(-) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts index b83a93a973a..ebc6da923ef 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts @@ -152,7 +152,12 @@ export class MetaFieldsMigration { avgRecordsScannedPerIteration: 0, recordsScannedPerSecond: 0, recordsUpdated: 0, - recordsSkipped: 0 + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} as Record + } }; for (const logFilePath of logFilePaths) { @@ -163,6 +168,24 @@ export class MetaFieldsMigration { migrationStats.recordsScanned += logFile.recordsScanned; migrationStats.recordsUpdated += logFile.recordsUpdated; migrationStats.recordsSkipped += logFile.recordsSkipped; + + migrationStats.esHealthChecks.timeSpentWaiting += + logFile.esHealthChecks.timeSpentWaiting; + migrationStats.esHealthChecks.checksCount += logFile.esHealthChecks.checksCount; + + for (const unhealthyReasonType in logFile.esHealthChecks.unhealthyReasons) { + if (!logFile.esHealthChecks.unhealthyReasons.hasOwnProperty(unhealthyReasonType)) { + continue; + } + + if (!migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType]) { + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] = + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } + + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] += + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } } migrationStats.avgIterationDuration = duration / migrationStats.iterationsCount; @@ -176,5 +199,15 @@ export class MetaFieldsMigration { migrationStats, `Migration summary (based on ${logFilePaths.length} generated logs):` ); + + const logFilePath = path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}.log` + ); + + // Save segment processing stats to a file. + fs.writeFileSync(logFilePath, JSON.stringify(migrationStats, null, 2)); + this.logger.trace(`Migration summary saved to "${logFilePath}".`); + } } diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index bbc13c15970..4973ea0c86b 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -69,6 +69,13 @@ interface MigrationStatus { recordsScanned: number; recordsUpdated: number; recordsSkipped: number; + esHealthChecks: { + timeSpentWaiting: number; + checksCount: number; + unhealthyReasons: { + [key: string]: number; + }; + }; }; } @@ -85,7 +92,12 @@ const createInitialStatus = (): MigrationStatus => { iterationsCount: 0, recordsScanned: 0, recordsUpdated: 0, - recordsSkipped: 0 + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} + } } }; }; @@ -361,15 +373,26 @@ const createInitialStatus = (): MigrationStatus => { logger.trace( `Storing ${ddbEsItemsToBatchWrite.length} record(s) in DDB-ES DynamoDB table...` ); - await waitUntilHealthy.wait({ + const results = await waitUntilHealthy.wait({ async onUnhealthy(params) { + const shouldWaitReason = params.shouldWaitReason || "unknown"; + logger.warn( - `Cluster is unhealthy (${params.shouldWaitReason}). Waiting for the cluster to become healthy...`, + `Cluster is unhealthy (${shouldWaitReason}). Waiting for the cluster to become healthy...`, params ); + + if (status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]) { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]++; + } else { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason] = 1; + } } }); + status.stats.esHealthChecks.checksCount++; + status.stats.esHealthChecks.timeSpentWaiting += results.runningTime; + // Store data in DDB-ES DynamoDB table. const executeDdbEs = () => { return batchWriteAll({ diff --git a/yarn.lock b/yarn.lock index 45cde35899f..a193a66981b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6095,6 +6095,69 @@ __metadata: languageName: node linkType: hard +"@dprint/darwin-arm64@npm:0.45.1": + version: 0.45.1 + resolution: "@dprint/darwin-arm64@npm:0.45.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@dprint/darwin-x64@npm:0.45.1": + version: 0.45.1 + resolution: "@dprint/darwin-x64@npm:0.45.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@dprint/formatter@npm:^0.3.0": + version: 0.3.0 + resolution: "@dprint/formatter@npm:0.3.0" + checksum: 3ff486cb2395941680a84b11a5bf2c69ee10246904b1b394daa4a3ab5ced5676d0707797c3951f5d74aa0ebaf7e93219cfd2bdad448e95d9ca6d62a5a67e5c1c + languageName: node + linkType: hard + +"@dprint/linux-arm64-glibc@npm:0.45.1": + version: 0.45.1 + resolution: "@dprint/linux-arm64-glibc@npm:0.45.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@dprint/linux-arm64-musl@npm:0.45.1": + version: 0.45.1 + resolution: "@dprint/linux-arm64-musl@npm:0.45.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@dprint/linux-x64-glibc@npm:0.45.1": + version: 0.45.1 + resolution: "@dprint/linux-x64-glibc@npm:0.45.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@dprint/linux-x64-musl@npm:0.45.1": + version: 0.45.1 + resolution: "@dprint/linux-x64-musl@npm:0.45.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@dprint/typescript@npm:^0.90.4": + version: 0.90.5 + resolution: "@dprint/typescript@npm:0.90.5" + checksum: df8cc94b4afb1727be6b474344df068f4a77e2f3fa73933ae55343838085108e3582194ef01368c95e0ee817682c320e316c9941c69bd2891a51beb6383989a5 + languageName: node + linkType: hard + +"@dprint/win32-x64@npm:0.45.1": + version: 0.45.1 + resolution: "@dprint/win32-x64@npm:0.45.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@editorjs/delimiter@npm:^1.2.0": version: 1.3.0 resolution: "@editorjs/delimiter@npm:1.3.0" @@ -6813,46 +6876,36 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:1.9.6": - version: 1.9.6 - resolution: "@grpc/grpc-js@npm:1.9.6" - dependencies: - "@grpc/proto-loader": ^0.7.8 - "@types/node": ">=12.12.47" - checksum: c02981af11e9749bb8f9a71f5f7e125740da9e6addb13b65d006d41d4d7a80d94b6daa45426c6832a2accfd6f9a925d45a4660a88bd908684446ffaf4fe76c68 - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:^1.2.7": - version: 1.9.12 - resolution: "@grpc/grpc-js@npm:1.9.12" - dependencies: - "@grpc/proto-loader": ^0.7.8 - "@types/node": ">=12.12.47" - checksum: 1788bdc7256b003261d5cfd6858fe21c06043742a5f512b9855df66998239d645e6eda1612d17dbffa19a7fcce950cd2ff661e9818ce67ca36198501020da06d +"@graphql-typed-document-node/core@npm:^3.2.0": + version: 3.2.0 + resolution: "@graphql-typed-document-node/core@npm:3.2.0" + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + checksum: fa44443accd28c8cf4cb96aaaf39d144a22e8b091b13366843f4e97d19c7bfeaf609ce3c7603a4aeffe385081eaf8ea245d078633a7324c11c5ec4b2011bb76d languageName: node linkType: hard -"@grpc/grpc-js@npm:~1.3.8": - version: 1.3.8 - resolution: "@grpc/grpc-js@npm:1.3.8" +"@grpc/grpc-js@npm:^1.10.1": + version: 1.10.8 + resolution: "@grpc/grpc-js@npm:1.10.8" dependencies: - "@types/node": ">=12.12.47" - checksum: 12df94227d99ce410dd146f31a27dc34b5dbcbbea6190fd9604ace8d902ce5614272054cead9ddf0ed6db4562ea5bdccf593d71905a23ab1125686d2125d4cd5 + "@grpc/proto-loader": ^0.7.13 + "@js-sdsl/ordered-map": ^4.4.2 + checksum: 498d144016eac26fc069bc57d649bf4776ae6bd1a24e62823a8b07b7d39a4414caa72a799f8287278b79e11ec4ecf989dbac01518c3981d8f947db15916c6727 languageName: node linkType: hard -"@grpc/proto-loader@npm:^0.7.8": - version: 0.7.10 - resolution: "@grpc/proto-loader@npm:0.7.10" +"@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" dependencies: lodash.camelcase: ^4.3.0 long: ^5.0.0 - protobufjs: ^7.2.4 + protobufjs: ^7.2.5 yargs: ^17.7.2 bin: proto-loader-gen-types: build/bin/proto-loader-gen-types.js - checksum: 4987e23b57942c2363b6a6a106e63efae636666cefa348778dfafef2ff72da7343c8587667521cb1d52482827bcd001dd535bdc27065110af56d9c7c176334c9 + checksum: 399c1b8a4627f93dc31660d9636ea6bf58be5675cc7581e3df56a249369e5be02c6cd0d642c5332b0d5673bc8621619bc06fb045aa3e8f57383737b5d35930dc languageName: node linkType: hard @@ -6917,6 +6970,13 @@ __metadata: languageName: node linkType: hard +"@isaacs/string-locale-compare@npm:^1.1.0": + version: 1.1.0 + resolution: "@isaacs/string-locale-compare@npm:1.1.0" + checksum: 7287da5d11497b82c542d3c2abe534808015be4f4883e71c26853277b5456f6bbe4108535db847a29f385ad6dc9318ffb0f55ee79bb5f39993233d7dccf8751d + languageName: node + linkType: hard + "@istanbuljs/load-nyc-config@npm:^1.0.0": version: 1.1.0 resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" @@ -7260,6 +7320,13 @@ __metadata: languageName: node linkType: hard +"@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: a927ae4ff8565ecb75355cc6886a4f8fadbf2af1268143c96c0cce3ba01261d241c3f4ba77f21f3f017a00f91dfe9e0673e95f830255945c80a0e96c6d30508a + languageName: node + linkType: hard + "@lerna/add@npm:3.21.0": version: 3.21.0 resolution: "@lerna/add@npm:3.21.0" @@ -9065,6 +9132,34 @@ __metadata: languageName: node linkType: hard +"@molt/command@npm:^0.9.0": + version: 0.9.0 + resolution: "@molt/command@npm:0.9.0" + dependencies: + "@molt/types": 0.2.0 + alge: 0.8.1 + chalk: ^5.3.0 + lodash.camelcase: ^4.3.0 + lodash.snakecase: ^4.1.1 + readline-sync: ^1.4.10 + string-length: ^6.0.0 + strip-ansi: ^7.1.0 + ts-toolbelt: ^9.6.0 + type-fest: ^4.3.1 + zod: ^3.22.2 + checksum: 6c81814eb7da2dbac100884d103e345d563613f9f3d7d285024ad20d7f3a3438b84ad1491cd4a5773217d688e6c34b31481fe609e9399aaaa0a45f7c7d68f5c1 + languageName: node + linkType: hard + +"@molt/types@npm:0.2.0": + version: 0.2.0 + resolution: "@molt/types@npm:0.2.0" + dependencies: + ts-toolbelt: ^9.6.0 + checksum: 64bbf80b34bdf33413e594bdc6ab72bf517e8a828eada052240aefecc17e14f7c71fe2c5c7b70ecad09d075920d82b7e822013ca915f8d5104ba382b80acd1e1 + languageName: node + linkType: hard + "@mrmlnc/readdir-enhanced@npm:^2.2.1": version: 2.2.1 resolution: "@mrmlnc/readdir-enhanced@npm:2.2.1" @@ -9125,6 +9220,64 @@ __metadata: languageName: node linkType: hard +"@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: ^7.1.0 + http-proxy-agent: ^7.0.0 + https-proxy-agent: ^7.0.1 + lru-cache: ^10.0.1 + socks-proxy-agent: ^8.0.3 + checksum: 67de7b88cc627a79743c88bab35e023e23daf13831a8aa4e15f998b92f5507b644d8ffc3788afc8e64423c612e0785a6a92b74782ce368f49a6746084b50d874 + languageName: node + linkType: hard + +"@npmcli/arborist@npm:^7.3.1": + version: 7.5.2 + resolution: "@npmcli/arborist@npm:7.5.2" + dependencies: + "@isaacs/string-locale-compare": ^1.1.0 + "@npmcli/fs": ^3.1.1 + "@npmcli/installed-package-contents": ^2.1.0 + "@npmcli/map-workspaces": ^3.0.2 + "@npmcli/metavuln-calculator": ^7.1.1 + "@npmcli/name-from-folder": ^2.0.0 + "@npmcli/node-gyp": ^3.0.0 + "@npmcli/package-json": ^5.1.0 + "@npmcli/query": ^3.1.0 + "@npmcli/redact": ^2.0.0 + "@npmcli/run-script": ^8.1.0 + bin-links: ^4.0.4 + cacache: ^18.0.3 + common-ancestor-path: ^1.0.1 + hosted-git-info: ^7.0.2 + json-parse-even-better-errors: ^3.0.2 + json-stringify-nice: ^1.1.4 + lru-cache: ^10.2.2 + minimatch: ^9.0.4 + nopt: ^7.2.1 + npm-install-checks: ^6.2.0 + npm-package-arg: ^11.0.2 + npm-pick-manifest: ^9.0.1 + npm-registry-fetch: ^17.0.1 + pacote: ^18.0.6 + parse-conflict-json: ^3.0.0 + proc-log: ^4.2.0 + proggy: ^2.0.0 + promise-all-reject-late: ^1.0.0 + promise-call-limit: ^3.0.1 + read-package-json-fast: ^3.0.2 + semver: ^7.3.7 + ssri: ^10.0.6 + treeverse: ^3.0.0 + walk-up-path: ^3.0.1 + bin: + arborist: bin/index.js + checksum: 92686b9e947d90ff984afa447cc12977df0f374daa88b2e9a562a8cd2cec23b70883031533cdd898749ddf45345ded384af79843993ccc1ce2dd290b9f9fe692 + languageName: node + linkType: hard + "@npmcli/fs@npm:^2.1.0": version: 2.1.2 resolution: "@npmcli/fs@npm:2.1.2" @@ -9135,6 +9288,68 @@ __metadata: languageName: node linkType: hard +"@npmcli/fs@npm:^3.1.0, @npmcli/fs@npm:^3.1.1": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: ^7.3.5 + checksum: d960cab4b93adcb31ce223bfb75c5714edbd55747342efb67dcc2f25e023d930a7af6ece3e75f2f459b6f38fc14d031c766f116cd124fdc937fd33112579e820 + languageName: node + linkType: hard + +"@npmcli/git@npm:^5.0.0": + version: 5.0.7 + resolution: "@npmcli/git@npm:5.0.7" + dependencies: + "@npmcli/promise-spawn": ^7.0.0 + lru-cache: ^10.0.1 + npm-pick-manifest: ^9.0.0 + proc-log: ^4.0.0 + promise-inflight: ^1.0.1 + promise-retry: ^2.0.1 + semver: ^7.3.5 + which: ^4.0.0 + checksum: a83d4e032ca71671615de532b2d62c6bcf6342819a4a25da650ac66f8b5803357e629ad9dacada307891d9428bc5e777cca0b8cbc3ee76b66bbddce3851c30f5 + languageName: node + linkType: hard + +"@npmcli/installed-package-contents@npm:^2.0.1, @npmcli/installed-package-contents@npm:^2.1.0": + version: 2.1.0 + resolution: "@npmcli/installed-package-contents@npm:2.1.0" + dependencies: + npm-bundled: ^3.0.0 + npm-normalize-package-bin: ^3.0.0 + bin: + installed-package-contents: bin/index.js + checksum: d0f307e0c971a4ffaea44d4f38d53b57e19222413f338bab26d4321c4a7b9098318d74719dd1f8747a6de0575ac0ba29aeb388edf6599ac8299506947f53ffb6 + languageName: node + linkType: hard + +"@npmcli/map-workspaces@npm:^3.0.2": + version: 3.0.6 + resolution: "@npmcli/map-workspaces@npm:3.0.6" + dependencies: + "@npmcli/name-from-folder": ^2.0.0 + glob: ^10.2.2 + minimatch: ^9.0.0 + read-package-json-fast: ^3.0.0 + checksum: bdb09ee1d044bb9b2857d9e2d7ca82f40783a8549b5a7e150e25f874ee354cdbc8109ad7c3df42ec412f7057d95baa05920c4d361c868a93a42146b8e4390d3d + languageName: node + linkType: hard + +"@npmcli/metavuln-calculator@npm:^7.1.1": + version: 7.1.1 + resolution: "@npmcli/metavuln-calculator@npm:7.1.1" + dependencies: + cacache: ^18.0.0 + json-parse-even-better-errors: ^3.0.0 + pacote: ^18.0.0 + proc-log: ^4.1.0 + semver: ^7.3.5 + checksum: c6297e40f914100c4effb574c55ef95cbf15d0c28e73e39f29de317b12a3d3d82571f8aca3f7635cc4c8e97bff35942c71c59a79e1a8abc93475744e61abc399 + languageName: node + linkType: hard + "@npmcli/move-file@npm:^2.0.0": version: 2.0.1 resolution: "@npmcli/move-file@npm:2.0.1" @@ -9145,6 +9360,74 @@ __metadata: languageName: node linkType: hard +"@npmcli/name-from-folder@npm:^2.0.0": + version: 2.0.0 + resolution: "@npmcli/name-from-folder@npm:2.0.0" + checksum: fb3ef891aa57315fb6171866847f298577c8bda98a028e93e458048477133e142b4eb45ce9f3b80454f7c257612cb01754ee782d608507698dd712164436f5bd + languageName: node + linkType: hard + +"@npmcli/node-gyp@npm:^3.0.0": + version: 3.0.0 + resolution: "@npmcli/node-gyp@npm:3.0.0" + checksum: fe3802b813eecb4ade7ad77c9396cb56721664275faab027e3bd8a5e15adfbbe39e2ecc19f7885feb3cfa009b96632741cc81caf7850ba74440c6a2eee7b4ffc + languageName: node + linkType: hard + +"@npmcli/package-json@npm:^5.0.0, @npmcli/package-json@npm:^5.1.0": + version: 5.1.0 + resolution: "@npmcli/package-json@npm:5.1.0" + dependencies: + "@npmcli/git": ^5.0.0 + glob: ^10.2.2 + hosted-git-info: ^7.0.0 + json-parse-even-better-errors: ^3.0.0 + normalize-package-data: ^6.0.0 + proc-log: ^4.0.0 + semver: ^7.5.3 + checksum: 1482c737aebf318133cff7ea671662eb4438ea82920205d00ff1f1c47ca311e1b48bb157d64e2e24eb76cfc9a0137e8b77b98b50f7a2a23c7db249c7b50dcf88 + languageName: node + linkType: hard + +"@npmcli/promise-spawn@npm:^7.0.0": + version: 7.0.2 + resolution: "@npmcli/promise-spawn@npm:7.0.2" + dependencies: + which: ^4.0.0 + checksum: 728256506ecbafb53064036e28c2815b9a9e9190ba7a48eec77b011a9f8a899515a6d96760dbde960bc1d3e5b828fd0b0b7fe3b512efaf049d299bacbd732fda + languageName: node + linkType: hard + +"@npmcli/query@npm:^3.1.0": + version: 3.1.0 + resolution: "@npmcli/query@npm:3.1.0" + dependencies: + postcss-selector-parser: ^6.0.10 + checksum: 33c018bfcc6d64593e7969847d0442beab4e8a42b6c9f932237c9fd135c95ab55de5c4b5d5d66302dd9fc3c748bc4ead780d3595e5d586fedf9859ed6b5f2744 + languageName: node + linkType: hard + +"@npmcli/redact@npm:^2.0.0": + version: 2.0.0 + resolution: "@npmcli/redact@npm:2.0.0" + checksum: 7ed760ab0f30c7199d1176b35619e226f6810d3606f75870551486493f4ba388f64dcf2fbcfb0ab2059ea8ed36e6733ebb9c92f883116c45b2e3fd80da7d7106 + languageName: node + linkType: hard + +"@npmcli/run-script@npm:^8.0.0, @npmcli/run-script@npm:^8.1.0": + version: 8.1.0 + resolution: "@npmcli/run-script@npm:8.1.0" + dependencies: + "@npmcli/node-gyp": ^3.0.0 + "@npmcli/package-json": ^5.0.0 + "@npmcli/promise-spawn": ^7.0.0 + node-gyp: ^10.0.0 + proc-log: ^4.0.0 + which: ^4.0.0 + checksum: 21adfb308b9064041d6d2f7f0d53924be0e1466d558de1c9802fab9eb84850bd8e04fdd5695924f331e1a36565461500d912e187909f91c03188cc763a106986 + languageName: node + linkType: hard + "@octokit/app@npm:^12.0.4": version: 12.0.7 resolution: "@octokit/app@npm:12.0.7" @@ -10146,81 +10429,25 @@ __metadata: languageName: node linkType: hard -"@pulumi/aws@npm:^5.42.0": - version: 5.43.0 - resolution: "@pulumi/aws@npm:5.43.0" +"@pulumi/aws@npm:6.32.0": + version: 6.32.0 + resolution: "@pulumi/aws@npm:6.32.0" dependencies: "@pulumi/pulumi": ^3.0.0 - aws-sdk: ^2.0.0 builtin-modules: 3.0.0 mime: ^2.0.0 - read-package-tree: ^5.2.1 resolve: ^1.7.1 - checksum: 638bb25e32677590ef80a7340be55f6c20941c9f28595e6f3d325f52dd476731fa721592f9732bf67b1565665508871f3f7bf58626b85188aa93fe1a59a94981 - languageName: node - linkType: hard - -"@pulumi/pulumi@npm:^2.15.0": - version: 2.25.2 - resolution: "@pulumi/pulumi@npm:2.25.2" - dependencies: - "@grpc/grpc-js": ^1.2.7 - "@logdna/tail-file": ^2.0.6 - "@pulumi/query": ^0.3.0 - google-protobuf: ^3.5.0 - js-yaml: ^3.14.0 - minimist: ^1.2.0 - normalize-package-data: ^2.4.0 - protobufjs: ^6.8.6 - read-package-tree: ^5.3.1 - require-from-string: ^2.0.1 - semver: ^6.1.0 - source-map-support: ^0.4.16 - split2: ^3.2.2 - ts-node: ^7.0.1 - typescript: ~3.7.3 - upath: ^1.1.0 - checksum: 3780e44740815a68f8ecc6221dd931f065107f15036d5405130ab8e86151089b2a24e2dbfbb9ec3eb41704a95258f4f273c0f3d089cedb2d32160467ed1b5cfb + checksum: fc5008d5367b051aa0477e86d88ec74074b4f78e277042bc31a595859736d542120aad874c6c6844f5151f4f02dbea6f461cbcfd961d73d3997321958a2cb404 languageName: node linkType: hard -"@pulumi/pulumi@npm:^3.0.0": - version: 3.54.0 - resolution: "@pulumi/pulumi@npm:3.54.0" +"@pulumi/pulumi@npm:3.113.3": + version: 3.113.3 + resolution: "@pulumi/pulumi@npm:3.113.3" dependencies: - "@grpc/grpc-js": ~1.3.8 - "@logdna/tail-file": ^2.0.6 - "@opentelemetry/api": ^1.2.0 - "@opentelemetry/exporter-zipkin": ^1.6.0 - "@opentelemetry/instrumentation-grpc": ^0.32.0 - "@opentelemetry/resources": ^1.6.0 - "@opentelemetry/sdk-trace-base": ^1.6.0 - "@opentelemetry/sdk-trace-node": ^1.6.0 - "@opentelemetry/semantic-conventions": ^1.6.0 - "@pulumi/query": ^0.3.0 - execa: ^5.1.0 - google-protobuf: ^3.5.0 - ini: ^2.0.0 - js-yaml: ^3.14.0 - minimist: ^1.2.6 - normalize-package-data: ^2.4.0 - read-package-tree: ^5.3.1 - require-from-string: ^2.0.1 - semver: ^6.1.0 - source-map-support: ^0.5.6 - ts-node: ^7.0.1 - typescript: ~3.8.3 - upath: ^1.1.0 - checksum: 0ee833cf35923794a4c342ddcf1ea37c531466438cfa5dceb20573063d2bb6c124a9078f0375444795c5e4dc518048f6e311b5c3a302cd42edd2e31f1d1f1470 - languageName: node - linkType: hard - -"@pulumi/pulumi@npm:^3.99.0": - version: 3.99.0 - resolution: "@pulumi/pulumi@npm:3.99.0" - dependencies: - "@grpc/grpc-js": 1.9.6 + "@grpc/grpc-js": ^1.10.1 "@logdna/tail-file": ^2.0.6 + "@npmcli/arborist": ^7.3.1 "@opentelemetry/api": ^1.2.0 "@opentelemetry/exporter-zipkin": ^1.6.0 "@opentelemetry/instrumentation": ^0.32.0 @@ -10231,21 +10458,32 @@ __metadata: "@opentelemetry/semantic-conventions": ^1.6.0 "@pulumi/query": ^0.3.0 "@types/google-protobuf": ^3.15.5 + "@types/semver": ^7.5.6 + "@types/tmp": ^0.2.6 execa: ^5.1.0 + fdir: ^6.1.1 google-protobuf: ^3.5.0 + got: ^11.8.6 ini: ^2.0.0 js-yaml: ^3.14.0 minimist: ^1.2.6 - normalize-package-data: ^3.0.0 + normalize-package-data: ^6.0.0 + picomatch: ^3.0.1 pkg-dir: ^7.0.0 - read-package-tree: ^5.3.1 require-from-string: ^2.0.1 semver: ^7.5.2 source-map-support: ^0.5.6 - ts-node: ^7.0.1 - typescript: ~3.8.3 + tmp: ^0.2.1 upath: ^1.1.0 - checksum: b899a4e4f642692302020c3a7016878e806043d8c3a4f00ad198ffba057d60841eefd192545cfa9687f630c5c77e8f5545a618da59bbde9012a66de84beca3f1 + peerDependencies: + ts-node: ">= 7.0.1 < 12" + typescript: ">= 3.8.3 < 6" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + checksum: aba217832d3c9b2b064a441c034d0080f06c251a32830058be543f8662b55c3998482a80a2075e4e4026e02232ae22e3f4a0fca15af4b3822133ebe9b47cdada languageName: node linkType: hard @@ -10846,6 +11084,64 @@ __metadata: languageName: node linkType: hard +"@sigstore/bundle@npm:^2.3.2": + version: 2.3.2 + resolution: "@sigstore/bundle@npm:2.3.2" + dependencies: + "@sigstore/protobuf-specs": ^0.3.2 + checksum: 851095ef71473b187df4d8b3374821d53c152646e591557973bd9648a9f08e3e8f686c7523194f513ded9534b4d057aa18697ee11f784ec4e36161907ce6d8ee + languageName: node + linkType: hard + +"@sigstore/core@npm:^1.0.0, @sigstore/core@npm:^1.1.0": + version: 1.1.0 + resolution: "@sigstore/core@npm:1.1.0" + checksum: bb870cf11cfb260d9e83f40cc29e6bbaf6ef5211d42eacbb48517ff87b1f647ff687eff557b0b30f9880fac2517d14704ec6036ae4a0d99ef3265b3d40cef29c + languageName: node + linkType: hard + +"@sigstore/protobuf-specs@npm:^0.3.2": + version: 0.3.2 + resolution: "@sigstore/protobuf-specs@npm:0.3.2" + checksum: 677b67eb4c3128432169fa168a5daae343a0242ffada3811bfde844644ac2eae0127cbf39349ed59e1a4edd14064416285251abb6acb260b6e3e9b6b40705c13 + languageName: node + linkType: hard + +"@sigstore/sign@npm:^2.3.2": + version: 2.3.2 + resolution: "@sigstore/sign@npm:2.3.2" + dependencies: + "@sigstore/bundle": ^2.3.2 + "@sigstore/core": ^1.0.0 + "@sigstore/protobuf-specs": ^0.3.2 + make-fetch-happen: ^13.0.1 + proc-log: ^4.2.0 + promise-retry: ^2.0.1 + checksum: b8bfc38716956df0aadbba8a78ed4b3a758747e31e1ed775deab0632243ff94aee51f6c17cf344834cf6e5174449358988ce35e3437e80e49867a7821ad5aa45 + languageName: node + linkType: hard + +"@sigstore/tuf@npm:^2.3.4": + version: 2.3.4 + resolution: "@sigstore/tuf@npm:2.3.4" + dependencies: + "@sigstore/protobuf-specs": ^0.3.2 + tuf-js: ^2.2.1 + checksum: 62f0b17e116d42d224c7d9f40a4037c7c20f456e026059ce6ebfc155e6d6445396549acd01a6f799943857e900f1bb2b0523d00a9353b8f3f99862f1eba59f6d + languageName: node + linkType: hard + +"@sigstore/verify@npm:^1.2.1": + version: 1.2.1 + resolution: "@sigstore/verify@npm:1.2.1" + dependencies: + "@sigstore/bundle": ^2.3.2 + "@sigstore/core": ^1.1.0 + "@sigstore/protobuf-specs": ^0.3.2 + checksum: bcd08c152d6166e9c6a019c8cb50afe1b284c01753e219e126665d21b5923cbdba3700daa3cee5197a07af551ecca8b209a6c557fbc0e5f6a4ee6f9c531047fe + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.25.16": version: 0.25.24 resolution: "@sinclair/typebox@npm:0.25.24" @@ -12885,6 +13181,15 @@ __metadata: languageName: node linkType: hard +"@szmarczak/http-timer@npm:^4.0.5": + version: 4.0.6 + resolution: "@szmarczak/http-timer@npm:4.0.6" + dependencies: + defer-to-connect: ^2.0.0 + checksum: c29df3bcec6fc3bdec2b17981d89d9c9fc9bd7d0c9bcfe92821dc533f4440bc890ccde79971838b4ceed1921d456973c4180d7175ee1d0023ad0562240a58d95 + languageName: node + linkType: hard + "@tanstack/react-table@npm:^8.5.22": version: 8.7.9 resolution: "@tanstack/react-table@npm:8.7.9" @@ -13041,6 +13346,23 @@ __metadata: languageName: node linkType: hard +"@tufjs/canonical-json@npm:2.0.0": + version: 2.0.0 + resolution: "@tufjs/canonical-json@npm:2.0.0" + checksum: cc719a1d0d0ae1aa1ba551a82c87dcbefac088e433c03a3d8a1d547ea721350e47dab4ab5b0fca40d5c7ab1f4882e72edc39c9eae15bf47c45c43bcb6ee39f4f + languageName: node + linkType: hard + +"@tufjs/models@npm:2.0.1": + version: 2.0.1 + resolution: "@tufjs/models@npm:2.0.1" + dependencies: + "@tufjs/canonical-json": 2.0.0 + minimatch: ^9.0.4 + checksum: 7a7370ac8dc3c18b66dddca3269d9b9282d891f1c289beb2060649fd50ef74eaa6494bd6d6b3edfe11f0f1efa14ec19c5ec819c7cf1871476c9e002115ffb9a7 + languageName: node + linkType: hard + "@types/accept-language-parser@npm:^1.5.3": version: 1.5.3 resolution: "@types/accept-language-parser@npm:1.5.3" @@ -13140,6 +13462,18 @@ __metadata: languageName: node linkType: hard +"@types/cacheable-request@npm:^6.0.1": + version: 6.0.3 + resolution: "@types/cacheable-request@npm:6.0.3" + dependencies: + "@types/http-cache-semantics": "*" + "@types/keyv": ^3.1.4 + "@types/node": "*" + "@types/responselike": ^1.0.0 + checksum: d9b26403fe65ce6b0cb3720b7030104c352bcb37e4fac2a7089a25a97de59c355fa08940658751f2f347a8512aa9d18fdb66ab3ade835975b2f454f2d5befbd9 + languageName: node + linkType: hard + "@types/center-align@npm:^1.0.0": version: 1.0.0 resolution: "@types/center-align@npm:1.0.0" @@ -13335,6 +13669,13 @@ __metadata: languageName: node linkType: hard +"@types/http-cache-semantics@npm:*": + version: 4.0.4 + resolution: "@types/http-cache-semantics@npm:4.0.4" + checksum: 7f4dd832e618bc1e271be49717d7b4066d77c2d4eed5b81198eb987e532bb3e1c7e02f45d77918185bad936f884b700c10cebe06305f50400f382ab75055f9e8 + languageName: node + linkType: hard + "@types/http-proxy@npm:^1.17.8": version: 1.17.9 resolution: "@types/http-proxy@npm:1.17.9" @@ -13496,7 +13837,7 @@ __metadata: languageName: node linkType: hard -"@types/keyv@npm:^3.1.1": +"@types/keyv@npm:^3.1.1, @types/keyv@npm:^3.1.4": version: 3.1.4 resolution: "@types/keyv@npm:3.1.4" dependencies: @@ -13519,13 +13860,6 @@ __metadata: languageName: node linkType: hard -"@types/long@npm:^4.0.1": - version: 4.0.2 - resolution: "@types/long@npm:4.0.2" - checksum: d16cde7240d834cf44ba1eaec49e78ae3180e724cd667052b194a372f350d024cba8dd3f37b0864931683dab09ca935d52f0c4c1687178af5ada9fc85b0635f4 - languageName: node - linkType: hard - "@types/lru-cache@npm:^5.1.0": version: 5.1.1 resolution: "@types/lru-cache@npm:5.1.1" @@ -13594,7 +13928,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>= 8, @types/node@npm:>=12.12.47, @types/node@npm:>=6": +"@types/node@npm:*, @types/node@npm:>= 8, @types/node@npm:>=6": version: 18.13.0 resolution: "@types/node@npm:18.13.0" checksum: 4ea10f8802848b01672bce938f678b6774ca2cee0c9774f12275ab064ae07818419c3e2e41d6257ce7ba846d1ea26c63214aa1dfa4166fa3746291752b8c6416 @@ -13943,6 +14277,13 @@ __metadata: languageName: node linkType: hard +"@types/semver@npm:^7.5.6": + version: 7.5.8 + resolution: "@types/semver@npm:7.5.8" + checksum: ea6f5276f5b84c55921785a3a27a3cd37afee0111dfe2bcb3e03c31819c197c782598f17f0b150a69d453c9584cd14c4c4d7b9a55d2c5e6cacd4d66fdb3b3663 + languageName: node + linkType: hard + "@types/sharp@npm:^0.32.0": version: 0.32.0 resolution: "@types/sharp@npm:0.32.0" @@ -14003,6 +14344,13 @@ __metadata: languageName: node linkType: hard +"@types/tmp@npm:^0.2.6": + version: 0.2.6 + resolution: "@types/tmp@npm:0.2.6" + checksum: 0b24bb6040cc289440a609e10ec99a704978c890a5828ff151576489090b2257ce2e2570b0f320ace9c8099c3642ea6221fbdf6d8f2e22b7cd1f4fbf6e989e3e + languageName: node + linkType: hard + "@types/tough-cookie@npm:*": version: 4.0.2 resolution: "@types/tough-cookie@npm:4.0.2" @@ -19203,6 +19551,13 @@ __metadata: languageName: node linkType: hard +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 0e994ad2aa6575f94670d8a2149afe94465de9cedaaaac364e7fb43a40c3691c980ff74899f682f4ca58fa96b4cbd7421a015d3a6defe43a442117d7821a2f36 + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -19629,6 +19984,18 @@ __metadata: languageName: node linkType: hard +"alge@npm:0.8.1": + version: 0.8.1 + resolution: "alge@npm:0.8.1" + dependencies: + lodash.ismatch: ^4.4.0 + remeda: ^1.0.0 + ts-toolbelt: ^9.6.0 + zod: ^3.17.3 + checksum: a7f620a962eb4f00a47c758d78a3962cf0b7b148c0ec4b3fd5d835e42df6dd0184f10b9105a250e43cb2ecc190975f172ebce4028319a3474e5b9def64cef9ce + languageName: node + linkType: hard + "align-text@npm:^1.0.0": version: 1.0.2 resolution: "align-text@npm:1.0.2" @@ -20607,7 +20974,7 @@ __metadata: languageName: node linkType: hard -"arrify@npm:^1.0.0, arrify@npm:^1.0.1": +"arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" checksum: 745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 @@ -20914,7 +21281,7 @@ __metadata: languageName: node linkType: hard -"aws-sdk@npm:^2.0.0, aws-sdk@npm:^2.814.0": +"aws-sdk@npm:^2.814.0": version: 2.1310.0 resolution: "aws-sdk@npm:2.1310.0" dependencies: @@ -21676,6 +22043,18 @@ __metadata: languageName: node linkType: hard +"bin-links@npm:^4.0.4": + version: 4.0.4 + resolution: "bin-links@npm:4.0.4" + dependencies: + cmd-shim: ^6.0.0 + npm-normalize-package-bin: ^3.0.0 + read-cmd-shim: ^4.0.0 + write-file-atomic: ^5.0.0 + checksum: 9fca1fddaa3c1c9f7efd6fd7a6d991e3d8f6aaa9de5d0b9355469c2c594d8d06c9b2e0519bb0304202c14ddbe832d27b6d419d55cea4340e2c26116f9190e5c9 + languageName: node + linkType: hard + "binary-extensions@npm:^1.0.0": version: 1.13.1 resolution: "binary-extensions@npm:1.13.1" @@ -22176,7 +22555,7 @@ __metadata: languageName: node linkType: hard -"buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": +"buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" checksum: 0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb @@ -22431,6 +22810,26 @@ __metadata: languageName: node linkType: hard +"cacache@npm:^18.0.0, cacache@npm:^18.0.3": + version: 18.0.3 + resolution: "cacache@npm:18.0.3" + dependencies: + "@npmcli/fs": ^3.1.0 + fs-minipass: ^3.0.0 + glob: ^10.2.2 + lru-cache: ^10.0.1 + minipass: ^7.0.3 + minipass-collect: ^2.0.1 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + p-map: ^4.0.0 + ssri: ^10.0.0 + tar: ^6.1.11 + unique-filename: ^3.0.0 + checksum: b717fd9b36e9c3279bfde4545c3a8f6d5a539b084ee26a9504d48f83694beb724057d26e090b97540f9cc62bea18b9f6cf671c50e18fb7dac60eda9db691714f + languageName: node + linkType: hard + "cache-base@npm:^1.0.1": version: 1.0.1 resolution: "cache-base@npm:1.0.1" @@ -22448,6 +22847,13 @@ __metadata: languageName: node linkType: hard +"cacheable-lookup@npm:^5.0.3": + version: 5.0.4 + resolution: "cacheable-lookup@npm:5.0.4" + checksum: 763e02cf9196bc9afccacd8c418d942fc2677f22261969a4c2c2e760fa44a2351a81557bd908291c3921fe9beb10b976ba8fa50c5ca837c5a0dd945f16468f2d + languageName: node + linkType: hard + "cacheable-request@npm:^6.0.0": version: 6.1.0 resolution: "cacheable-request@npm:6.1.0" @@ -22463,6 +22869,21 @@ __metadata: languageName: node linkType: hard +"cacheable-request@npm:^7.0.2": + version: 7.0.4 + resolution: "cacheable-request@npm:7.0.4" + dependencies: + clone-response: ^1.0.2 + get-stream: ^5.1.0 + http-cache-semantics: ^4.0.0 + keyv: ^4.0.0 + lowercase-keys: ^2.0.0 + normalize-url: ^6.0.1 + responselike: ^2.0.0 + checksum: 0de9df773fd4e7dd9bd118959878f8f2163867e2e1ab3575ffbecbe6e75e80513dd0c68ba30005e5e5a7b377cc6162bbc00ab1db019bb4e9cb3c2f3f7a6f1ee4 + languageName: node + linkType: hard + "cachedir@npm:^1.1.0": version: 1.3.0 resolution: "cachedir@npm:1.3.0" @@ -22758,6 +23179,13 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^5.3.0": + version: 5.3.0 + resolution: "chalk@npm:5.3.0" + checksum: 623922e077b7d1e9dedaea6f8b9e9352921f8ae3afe739132e0e00c275971bdd331268183b2628cf4ab1727c45ea1f28d7e24ac23ce1db1eb653c414ca8a5a80 + languageName: node + linkType: hard + "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -23205,6 +23633,13 @@ __metadata: languageName: node linkType: hard +"cmd-shim@npm:^6.0.0": + version: 6.0.3 + resolution: "cmd-shim@npm:6.0.3" + checksum: bd79ac1505fea77cba0caf271c16210ebfbe50f348a1907f4700740876ab2157e00882b9baa685a9fcf9bc92e08a87e21bd757f45a6938f00290422f80f7d27a + languageName: node + linkType: hard + "co@npm:^4.6.0": version: 4.6.0 resolution: "co@npm:4.6.0" @@ -23520,6 +23955,13 @@ __metadata: languageName: node linkType: hard +"common-ancestor-path@npm:^1.0.1": + version: 1.0.1 + resolution: "common-ancestor-path@npm:1.0.1" + checksum: 1d2e4186067083d8cc413f00fc2908225f04ae4e19417ded67faa6494fb313c4fcd5b28a52326d1a62b466e2b3a4325e92c31133c5fee628cdf8856b3a57c3d7 + languageName: node + linkType: hard + "common-path-prefix@npm:^3.0.0": version: 3.0.0 resolution: "common-path-prefix@npm:3.0.0" @@ -25388,6 +25830,13 @@ __metadata: languageName: node linkType: hard +"defer-to-connect@npm:^2.0.0": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b + languageName: node + linkType: hard + "deferred-leveldown@npm:~5.3.0": version: 5.3.0 resolution: "deferred-leveldown@npm:5.3.0" @@ -25723,13 +26172,6 @@ __metadata: languageName: node linkType: hard -"diff@npm:^3.1.0": - version: 3.5.0 - resolution: "diff@npm:3.5.0" - checksum: 00842950a6551e26ce495bdbce11047e31667deea546527902661f25cc2e73358967ebc78cf86b1a9736ec3e14286433225f9970678155753a6291c3bca5227b - languageName: node - linkType: hard - "diff@npm:^4.0.1, diff@npm:^4.0.2": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -26191,6 +26633,38 @@ __metadata: languageName: node linkType: hard +"dprint@npm:^0.45.1": + version: 0.45.1 + resolution: "dprint@npm:0.45.1" + dependencies: + "@dprint/darwin-arm64": 0.45.1 + "@dprint/darwin-x64": 0.45.1 + "@dprint/linux-arm64-glibc": 0.45.1 + "@dprint/linux-arm64-musl": 0.45.1 + "@dprint/linux-x64-glibc": 0.45.1 + "@dprint/linux-x64-musl": 0.45.1 + "@dprint/win32-x64": 0.45.1 + dependenciesMeta: + "@dprint/darwin-arm64": + optional: true + "@dprint/darwin-x64": + optional: true + "@dprint/linux-arm64-glibc": + optional: true + "@dprint/linux-arm64-musl": + optional: true + "@dprint/linux-x64-glibc": + optional: true + "@dprint/linux-x64-musl": + optional: true + "@dprint/win32-x64": + optional: true + bin: + dprint: bin.js + checksum: 038b693c52482e0536a854e81c1757deaecdedb979a90c68b875d544b87a3c1f763dc63b34850fcfae9e770194f3d74ec76cd2167ed82ff598ea3addcecd5067 + languageName: node + linkType: hard + "drawille-blessed-contrib@npm:>=0.0.1": version: 1.0.0 resolution: "drawille-blessed-contrib@npm:1.0.0" @@ -27736,6 +28210,13 @@ __metadata: languageName: node linkType: hard +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 3d21519a4f8207c99f7457287291316306255a328770d320b401114ec8481986e4e467e854cb9914dd965e0a1ca810a23ccb559c642c88f4c7f55c55778a9b48 + languageName: node + linkType: hard + "express@npm:4.17.1": version: 4.17.1 resolution: "express@npm:4.17.1" @@ -28243,6 +28724,18 @@ __metadata: languageName: node linkType: hard +"fdir@npm:^6.1.1": + version: 6.1.1 + resolution: "fdir@npm:6.1.1" + peerDependencies: + picomatch: 3.x + peerDependenciesMeta: + picomatch: + optional: true + checksum: 2db7e261c95246ea572eaaf1c86bb32c620c3579638a4ae12f427662c4dfbb28891b36a2102c3dd691a4ff98f6ae982a9d26b3af042268238ef7fb77360d8116 + languageName: node + linkType: hard + "fecha@npm:^2.3.3": version: 2.3.3 resolution: "fecha@npm:2.3.3" @@ -29070,6 +29563,15 @@ __metadata: languageName: node linkType: hard +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: ^7.0.3 + checksum: 8722a41109130851d979222d3ec88aabaceeaaf8f57b2a8f744ef8bd2d1ce95453b04a61daa0078822bc5cd21e008814f06fe6586f56fef511e71b8d2394d802 + languageName: node + linkType: hard + "fs-monkey@npm:^1.0.3": version: 1.0.3 resolution: "fs-monkey@npm:1.0.3" @@ -29701,6 +30203,21 @@ __metadata: languageName: node linkType: hard +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.1 + resolution: "glob@npm:10.4.1" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^3.1.2 + minimatch: ^9.0.4 + minipass: ^7.1.2 + path-scurry: ^1.11.1 + bin: + glob: dist/esm/bin.mjs + checksum: 5d33c686c80bf6877f4284adf99a8c3cbb2a6eccbc92342943fe5d4b42c01d78c1881f2223d950c92a938d0f857e12e37b86a8e5483ab2141822e053b67d0dde + languageName: node + linkType: hard + "glob@npm:^5.0.15": version: 5.0.15 resolution: "glob@npm:5.0.15" @@ -29926,6 +30443,25 @@ __metadata: languageName: node linkType: hard +"got@npm:^11.8.6": + version: 11.8.6 + resolution: "got@npm:11.8.6" + dependencies: + "@sindresorhus/is": ^4.0.0 + "@szmarczak/http-timer": ^4.0.5 + "@types/cacheable-request": ^6.0.1 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^5.0.3 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + http2-wrapper: ^1.0.0-beta.5.2 + lowercase-keys: ^2.0.0 + p-cancelable: ^2.0.0 + responselike: ^2.0.0 + checksum: bbc783578a8d5030c8164ef7f57ce41b5ad7db2ed13371e1944bef157eeca5a7475530e07c0aaa71610d7085474d0d96222c9f4268d41db333a17e39b463f45d + languageName: node + linkType: hard + "got@npm:^6.3.0": version: 6.7.1 resolution: "got@npm:6.7.1" @@ -30000,6 +30536,24 @@ __metadata: languageName: node linkType: hard +"graphql-request@npm:^7.0.1": + version: 7.0.1 + resolution: "graphql-request@npm:7.0.1" + dependencies: + "@dprint/formatter": ^0.3.0 + "@dprint/typescript": ^0.90.4 + "@graphql-typed-document-node/core": ^3.2.0 + "@molt/command": ^0.9.0 + dprint: ^0.45.1 + zod: ^3.23.5 + peerDependencies: + graphql: 14 - 16 + bin: + graffle: build/cli/generate.js + checksum: 55d3cbf74f67cb9365b6e2f1bf9c90b51dd9c9fc5994288a70538ef604946a9ecd74a940a24ada3d56277317f1a396f7840f415d132b0a19637c492d35b96af7 + languageName: node + linkType: hard + "graphql-scalars@npm:1.12.0": version: 1.12.0 resolution: "graphql-scalars@npm:1.12.0" @@ -30412,6 +30966,15 @@ __metadata: languageName: node linkType: hard +"hosted-git-info@npm:^7.0.0, hosted-git-info@npm:^7.0.2": + version: 7.0.2 + resolution: "hosted-git-info@npm:7.0.2" + dependencies: + lru-cache: ^10.0.1 + checksum: 467cf908a56556417b18e86ae3b8dee03c2360ef1d51e61c4028fe87f6f309b6ff038589c94b5666af207da9d972d5107698906aabeb78aca134641962a5c6f8 + languageName: node + linkType: hard + "hpack.js@npm:^2.1.6": version: 2.1.6 resolution: "hpack.js@npm:2.1.6" @@ -30608,7 +31171,7 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0": +"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0, http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 @@ -30793,6 +31356,16 @@ __metadata: languageName: node linkType: hard +"http2-wrapper@npm:^1.0.0-beta.5.2": + version: 1.0.3 + resolution: "http2-wrapper@npm:1.0.3" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.0.0 + checksum: 74160b862ec699e3f859739101ff592d52ce1cb207b7950295bf7962e4aa1597ef709b4292c673bece9c9b300efad0559fc86c71b1409c7a1e02b7229456003e + languageName: node + linkType: hard + "https-browserify@npm:^1.0.0": version: 1.0.0 resolution: "https-browserify@npm:1.0.0" @@ -30820,7 +31393,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.2, https-proxy-agent@npm:^7.0.3": +"https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.2, https-proxy-agent@npm:^7.0.3": version: 7.0.4 resolution: "https-proxy-agent@npm:7.0.4" dependencies: @@ -30977,6 +31550,15 @@ __metadata: languageName: node linkType: hard +"ignore-walk@npm:^6.0.4": + version: 6.0.5 + resolution: "ignore-walk@npm:6.0.5" + dependencies: + minimatch: ^9.0.0 + checksum: 06f88a53c412385ca7333276149a7e9461b7fad977c44272d854522b0d456c2aa75d832bd3980a530e2c3881126aa9cc4782b3551ca270fffc0ce7c2b4a2e199 + languageName: node + linkType: hard + "ignore@npm:^3.3.5": version: 3.3.10 resolution: "ignore@npm:3.3.10" @@ -31669,6 +32251,15 @@ __metadata: languageName: node linkType: hard +"is-core-module@npm:^2.8.1": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: ^2.0.0 + checksum: 256559ee8a9488af90e4bad16f5583c6d59e92f0742e9e8bb4331e758521ee86b810b93bae44f390766ffbc518a0488b18d9dab7da9a5ff997d499efc9403f7c + languageName: node + linkType: hard + "is-data-descriptor@npm:^0.1.4": version: 0.1.4 resolution: "is-data-descriptor@npm:0.1.4" @@ -32336,6 +32927,13 @@ __metadata: languageName: node linkType: hard +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + "isnumeric@npm:^0.3.3": version: 0.3.3 resolution: "isnumeric@npm:0.3.3" @@ -32495,6 +33093,19 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^3.1.2": + version: 3.1.2 + resolution: "jackspeak@npm:3.1.2" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 134276d5f785c518930701a0dcba1f3b0e9ce3e5b1c3e300898e2ae0bbd9b5195088b77252bf2110768de072c426e9e39f47e13912b0b002da4a3f4ff6e16eac + languageName: node + linkType: hard + "jake@npm:^10.8.5": version: 10.8.5 resolution: "jake@npm:10.8.5" @@ -33397,6 +34008,13 @@ __metadata: languageName: node linkType: hard +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 9026b03edc2847eefa2e37646c579300a1f3a4586cfb62bf857832b60c852042d0d6ae55d1afb8926163fa54c2b01d83ae24705f34990348bdac6273a29d4581 + languageName: node + linkType: hard + "json-parse-better-errors@npm:^1.0.0, json-parse-better-errors@npm:^1.0.1, json-parse-better-errors@npm:^1.0.2": version: 1.0.2 resolution: "json-parse-better-errors@npm:1.0.2" @@ -33411,6 +34029,13 @@ __metadata: languageName: node linkType: hard +"json-parse-even-better-errors@npm:^3.0.0, json-parse-even-better-errors@npm:^3.0.2": + version: 3.0.2 + resolution: "json-parse-even-better-errors@npm:3.0.2" + checksum: 6f04ea6c9ccb783630a59297959247e921cc90b917b8351197ca7fd058fccc7079268fd9362be21ba876fc26aa5039369dd0a2280aae49aae425784794a94927 + languageName: node + linkType: hard + "json-schema-traverse@npm:^0.4.1": version: 0.4.1 resolution: "json-schema-traverse@npm:0.4.1" @@ -33439,6 +34064,13 @@ __metadata: languageName: node linkType: hard +"json-stringify-nice@npm:^1.1.4": + version: 1.1.4 + resolution: "json-stringify-nice@npm:1.1.4" + checksum: 6ddf781148b46857ab04e97f47be05f14c4304b86eb5478369edbeacd070c21c697269964b982fc977e8989d4c59091103b1d9dc291aba40096d6cbb9a392b72 + languageName: node + linkType: hard + "json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -33653,6 +34285,20 @@ __metadata: languageName: node linkType: hard +"just-diff-apply@npm:^5.2.0": + version: 5.5.0 + resolution: "just-diff-apply@npm:5.5.0" + checksum: ed6bbd59781542ccb786bd843038e4591e8390aa788075beb69d358051f68fbeb122bda050b7f42515d51fb64b907d5c7bea694a0543b87b24ce406cfb5f5bfa + languageName: node + linkType: hard + +"just-diff@npm:^6.0.0": + version: 6.0.2 + resolution: "just-diff@npm:6.0.2" + checksum: 1a0c7524f640cb88ab013862733e710f840927834208fd3b85cbc5da2ced97acc75e7dcfe493268ac6a6514c51dd8624d2fd9d057050efba3c02b81a6dcb7ff9 + languageName: node + linkType: hard + "just-extend@npm:^4.0.2": version: 4.2.1 resolution: "just-extend@npm:4.2.1" @@ -33726,6 +34372,15 @@ __metadata: languageName: node linkType: hard +"keyv@npm:^4.0.0": + version: 4.5.4 + resolution: "keyv@npm:4.5.4" + dependencies: + json-buffer: 3.0.1 + checksum: 74a24395b1c34bd44ad5cb2b49140d087553e170625240b86755a6604cd65aa16efdbdeae5cdb17ba1284a0fbb25ad06263755dbc71b8d8b06f74232ce3cdd72 + languageName: node + linkType: hard + "kind-of@npm:^2.0.1": version: 2.0.1 resolution: "kind-of@npm:2.0.1" @@ -34542,6 +35197,13 @@ __metadata: languageName: node linkType: hard +"lodash.snakecase@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.snakecase@npm:4.1.1" + checksum: 1685ed3e83dda6eae5a4dcaee161a51cd210aabb3e1c09c57150e7dd8feda19e4ca0d27d0631eabe8d0f4eaa51e376da64e8c018ae5415417c5890d42feb72a8 + languageName: node + linkType: hard + "lodash.sortby@npm:^4.7.0": version: 4.7.0 resolution: "lodash.sortby@npm:4.7.0" @@ -34673,13 +35335,6 @@ __metadata: languageName: node linkType: hard -"long@npm:^4.0.0": - version: 4.0.0 - resolution: "long@npm:4.0.0" - checksum: 16afbe8f749c7c849db1f4de4e2e6a31ac6e617cead3bdc4f9605cb703cd20e1e9fc1a7baba674ffcca57d660a6e5b53a9e236d7b25a295d3855cca79cc06744 - languageName: node - linkType: hard - "long@npm:^5.0.0": version: 5.2.3 resolution: "long@npm:5.2.3" @@ -34755,6 +35410,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0, lru-cache@npm:^10.2.2": + version: 10.2.2 + resolution: "lru-cache@npm:10.2.2" + checksum: 98e8fc93691c546f719a76103ef2bee5a3ac823955c755a47641ec41f8c7fafa1baeaba466937cc1cbfa9cfd47e03536d10e2db3158a64ad91ff3a58a32c893e + languageName: node + linkType: hard + "lru-cache@npm:^4.0.1": version: 4.1.5 resolution: "lru-cache@npm:4.1.5" @@ -34911,6 +35573,26 @@ __metadata: languageName: node linkType: hard +"make-fetch-happen@npm:^13.0.0, make-fetch-happen@npm:^13.0.1": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": ^2.0.0 + cacache: ^18.0.0 + http-cache-semantics: ^4.1.1 + is-lambda: ^1.0.1 + minipass: ^7.0.2 + minipass-fetch: ^3.0.0 + minipass-flush: ^1.0.5 + minipass-pipeline: ^1.2.4 + negotiator: ^0.6.3 + proc-log: ^4.2.0 + promise-retry: ^2.0.1 + ssri: ^10.0.0 + checksum: 5c9fad695579b79488fa100da05777213dd9365222f85e4757630f8dd2a21a79ddd3206c78cfd6f9b37346819681782b67900ac847a57cf04190f52dda5343fd + languageName: node + linkType: hard + "make-fetch-happen@npm:^5.0.0": version: 5.0.2 resolution: "make-fetch-happen@npm:5.0.2" @@ -35600,6 +36282,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.4": + version: 9.0.4 + resolution: "minimatch@npm:9.0.4" + dependencies: + brace-expansion: ^2.0.1 + checksum: cf717f597ec3eed7dabc33153482a2e8d49f4fd3c26e58fd9c71a94c5029a0838728841b93f46bf1263b65a8010e2ee800d0dc9b004ab8ba8b6d1ec07cc115b5 + languageName: node + linkType: hard + "minimatch@npm:^9.0.1": version: 9.0.3 resolution: "minimatch@npm:9.0.3" @@ -35669,6 +36360,15 @@ __metadata: languageName: node linkType: hard +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: ^7.0.3 + checksum: b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + "minipass-fetch@npm:^2.0.3": version: 2.1.2 resolution: "minipass-fetch@npm:2.1.2" @@ -35684,6 +36384,21 @@ __metadata: languageName: node linkType: hard +"minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: ^0.1.13 + minipass: ^7.0.3 + minipass-sized: ^1.0.3 + minizlib: ^2.1.2 + dependenciesMeta: + encoding: + optional: true + checksum: 8047d273236157aab27ab7cd8eab7ea79e6ecd63e8f80c3366ec076cb9a0fed550a6935bab51764369027c414647fd8256c2a20c5445fb250c483de43350de83 + languageName: node + linkType: hard + "minipass-flush@npm:^1.0.5": version: 1.0.5 resolution: "minipass-flush@npm:1.0.5" @@ -35693,6 +36408,16 @@ __metadata: languageName: node linkType: hard +"minipass-json-stream@npm:^1.0.1": + version: 1.0.1 + resolution: "minipass-json-stream@npm:1.0.1" + dependencies: + jsonparse: ^1.3.1 + minipass: ^3.0.0 + checksum: 791b696a27d1074c4c08dab1bf5a9f3201145c2933e428f45d880467bce12c60de4703203d2928de4b162d0ae77b0bb4b55f96cb846645800aa0eb4919b3e796 + languageName: node + linkType: hard + "minipass-pipeline@npm:^1.2.2, minipass-pipeline@npm:^1.2.4": version: 1.2.4 resolution: "minipass-pipeline@npm:1.2.4" @@ -35744,6 +36469,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 2bfd325b95c555f2b4d2814d49325691c7bee937d753814861b0b49d5edcda55cbbf22b6b6a60bb91eddac8668771f03c5ff647dcd9d0f798e9548b9cdc46ee3 + languageName: node + linkType: hard + "minizlib@npm:^1.3.3": version: 1.3.3 resolution: "minizlib@npm:1.3.3" @@ -36385,6 +37117,26 @@ __metadata: languageName: node linkType: hard +"node-gyp@npm:^10.0.0": + version: 10.1.0 + resolution: "node-gyp@npm:10.1.0" + dependencies: + env-paths: ^2.2.0 + exponential-backoff: ^3.1.1 + glob: ^10.3.10 + graceful-fs: ^4.2.6 + make-fetch-happen: ^13.0.0 + nopt: ^7.0.0 + proc-log: ^3.0.0 + semver: ^7.3.5 + tar: ^6.1.2 + which: ^4.0.0 + bin: + node-gyp: bin/node-gyp.js + checksum: 72e2ab4b23fc32007a763da94018f58069fc0694bf36115d49a2b195c8831e12cf5dd1e7a3718fa85c06969aedf8fc126722d3b672ec1cb27e06ed33caee3c60 + languageName: node + linkType: hard + "node-gyp@npm:^5.0.2": version: 5.1.1 resolution: "node-gyp@npm:5.1.1" @@ -36529,6 +37281,17 @@ __metadata: languageName: node linkType: hard +"nopt@npm:^7.0.0, nopt@npm:^7.2.1": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: ^2.0.0 + bin: + nopt: bin/nopt.js + checksum: 6fa729cc77ce4162cfad8abbc9ba31d4a0ff6850c3af61d59b505653bef4781ec059f8890ecfe93ee8aa0c511093369cca88bfc998101616a2904e715bbbb7c9 + languageName: node + linkType: hard + "nopt@npm:~1.0.10": version: 1.0.10 resolution: "nopt@npm:1.0.10" @@ -36582,6 +37345,18 @@ __metadata: languageName: node linkType: hard +"normalize-package-data@npm:^6.0.0": + version: 6.0.1 + resolution: "normalize-package-data@npm:6.0.1" + dependencies: + hosted-git-info: ^7.0.0 + is-core-module: ^2.8.1 + semver: ^7.3.5 + validate-npm-package-license: ^3.0.4 + checksum: 4f6bca00b5092b824e1d4a28fb47052b41afaaebabfd0700e47f130cac619d60668aa6ff34dfa9bccc1b06c7adcef44c34a565576b63b578e1e35b3fc67c22ca + languageName: node + linkType: hard + "normalize-path@npm:^2.0.1, normalize-path@npm:^2.1.1": version: 2.1.1 resolution: "normalize-path@npm:2.1.1" @@ -36640,6 +37415,15 @@ __metadata: languageName: node linkType: hard +"npm-bundled@npm:^3.0.0": + version: 3.0.1 + resolution: "npm-bundled@npm:3.0.1" + dependencies: + npm-normalize-package-bin: ^3.0.0 + checksum: 1f4f7307d0ff2fbd31638689490f1fd673a4540cd1d027c7c5d15e484c71d63c4b27979944b6f8738035260cf5a5477ebaae75b08818420508e7cf317d71416e + languageName: node + linkType: hard + "npm-conf@npm:^1.1.0": version: 1.1.3 resolution: "npm-conf@npm:1.1.3" @@ -36650,6 +37434,15 @@ __metadata: languageName: node linkType: hard +"npm-install-checks@npm:^6.0.0, npm-install-checks@npm:^6.2.0": + version: 6.3.0 + resolution: "npm-install-checks@npm:6.3.0" + dependencies: + semver: ^7.1.1 + checksum: 6c20dadb878a0d2f1f777405217b6b63af1299d0b43e556af9363ee6eefaa98a17dfb7b612a473a473e96faf7e789c58b221e0d8ffdc1d34903c4f71618df3b4 + languageName: node + linkType: hard + "npm-lifecycle@npm:^3.1.2": version: 3.1.5 resolution: "npm-lifecycle@npm:3.1.5" @@ -36673,6 +37466,25 @@ __metadata: languageName: node linkType: hard +"npm-normalize-package-bin@npm:^3.0.0": + version: 3.0.1 + resolution: "npm-normalize-package-bin@npm:3.0.1" + checksum: de416d720ab22137a36292ff8a333af499ea0933ef2320a8c6f56a73b0f0448227fec4db5c890d702e26d21d04f271415eab6580b5546456861cc0c19498a4bf + languageName: node + linkType: hard + +"npm-package-arg@npm:^11.0.0, npm-package-arg@npm:^11.0.2": + version: 11.0.2 + resolution: "npm-package-arg@npm:11.0.2" + dependencies: + hosted-git-info: ^7.0.0 + proc-log: ^4.0.0 + semver: ^7.3.5 + validate-npm-package-name: ^5.0.0 + checksum: cb78da54d42373fc87fcecfc68e74b10be02fea940becddf9fdcc8941334a5d57b5e867da2647e8b74880e1dc2b212d0fcc963fafd41cbccca8da3a1afef5b12 + languageName: node + linkType: hard + "npm-package-arg@npm:^4.0.0 || ^5.0.0 || ^6.0.0, npm-package-arg@npm:^6.0.0, npm-package-arg@npm:^6.1.0": version: 6.1.1 resolution: "npm-package-arg@npm:6.1.1" @@ -36696,6 +37508,15 @@ __metadata: languageName: node linkType: hard +"npm-packlist@npm:^8.0.0": + version: 8.0.2 + resolution: "npm-packlist@npm:8.0.2" + dependencies: + ignore-walk: ^6.0.4 + checksum: c75ae66b285503409e07878274d0580c1915e8db3a52539e7588a00d8c7c27b5c3c8459906d26142ffd772f0e8f291e9aa4ea076bb44a4ab0ba7e0f25b46423b + languageName: node + linkType: hard + "npm-path@npm:^2.0.2": version: 2.0.4 resolution: "npm-path@npm:2.0.4" @@ -36718,6 +37539,34 @@ __metadata: languageName: node linkType: hard +"npm-pick-manifest@npm:^9.0.0, npm-pick-manifest@npm:^9.0.1": + version: 9.0.1 + resolution: "npm-pick-manifest@npm:9.0.1" + dependencies: + npm-install-checks: ^6.0.0 + npm-normalize-package-bin: ^3.0.0 + npm-package-arg: ^11.0.0 + semver: ^7.3.5 + checksum: acd53d99cb72b39dd2e6aefe32c08a0ba969622911865ff86555dba0cd6e67ca43ae72fd1962084e4344d88596f4faf75128b70347beb29613720445d4063c87 + languageName: node + linkType: hard + +"npm-registry-fetch@npm:^17.0.0, npm-registry-fetch@npm:^17.0.1": + version: 17.0.1 + resolution: "npm-registry-fetch@npm:17.0.1" + dependencies: + "@npmcli/redact": ^2.0.0 + make-fetch-happen: ^13.0.0 + minipass: ^7.0.2 + minipass-fetch: ^3.0.0 + minipass-json-stream: ^1.0.1 + minizlib: ^2.1.2 + npm-package-arg: ^11.0.0 + proc-log: ^4.0.0 + checksum: 4a53e96969991f62fa6b5b0a47a6a0288282003ab41e6e752bc0c8ba34a284f216ae290952a032bf143fd6827faef0f204cec32f33e2d0cb348db850dd95d09d + languageName: node + linkType: hard + "npm-run-path@npm:^2.0.0": version: 2.0.2 resolution: "npm-run-path@npm:2.0.2" @@ -37660,6 +38509,33 @@ __metadata: languageName: node linkType: hard +"pacote@npm:^18.0.0, pacote@npm:^18.0.6": + version: 18.0.6 + resolution: "pacote@npm:18.0.6" + dependencies: + "@npmcli/git": ^5.0.0 + "@npmcli/installed-package-contents": ^2.0.1 + "@npmcli/package-json": ^5.1.0 + "@npmcli/promise-spawn": ^7.0.0 + "@npmcli/run-script": ^8.0.0 + cacache: ^18.0.0 + fs-minipass: ^3.0.0 + minipass: ^7.0.2 + npm-package-arg: ^11.0.0 + npm-packlist: ^8.0.0 + npm-pick-manifest: ^9.0.0 + npm-registry-fetch: ^17.0.0 + proc-log: ^4.0.0 + promise-retry: ^2.0.1 + sigstore: ^2.2.0 + ssri: ^10.0.0 + tar: ^6.1.11 + bin: + pacote: bin/index.js + checksum: a28a7aa0f4e1375d3f11917e5982e576611aa9057999e7b3a7fd18706e43d6ae4ab34b1002dc0a9821df95c3136dec6d2b6b72cfc7b02afcc1273cec006dea39 + languageName: node + linkType: hard + "pad-right@npm:^0.2.2": version: 0.2.2 resolution: "pad-right@npm:0.2.2" @@ -37733,6 +38609,17 @@ __metadata: languageName: node linkType: hard +"parse-conflict-json@npm:^3.0.0": + version: 3.0.1 + resolution: "parse-conflict-json@npm:3.0.1" + dependencies: + json-parse-even-better-errors: ^3.0.0 + just-diff: ^6.0.0 + just-diff-apply: ^5.2.0 + checksum: d8d2656bc02d4df36846366baec36b419da2fe944e31298719a4d28d28f772aa7cad2a69d01f6f329918e7c298ac481d1e6a9138d62d5662d5620a74f794af8f + languageName: node + linkType: hard + "parse-entities@npm:^1.1.2": version: 1.2.2 resolution: "parse-entities@npm:1.2.2" @@ -37995,6 +38882,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: ^10.2.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: 890d5abcd593a7912dcce7cf7c6bf7a0b5648e3dee6caf0712c126ca0a65c7f3d7b9d769072a4d1baf370f61ce493ab5b038d59988688e0c5f3f646ee3c69023 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -38097,6 +38994,13 @@ __metadata: languageName: node linkType: hard +"picomatch@npm:^3.0.1": + version: 3.0.1 + resolution: "picomatch@npm:3.0.1" + checksum: b7fe18174bcc05bbf0ea09cc85623ae395676b3e6bc25636d4c20db79a948586237e429905453bf1ba385bc7a7aa5b56f1b351680e650d2b5c305ceb98dfc914 + languageName: node + linkType: hard + "picture-tuber@npm:^1.0.1": version: 1.0.2 resolution: "picture-tuber@npm:1.0.2" @@ -39609,6 +40513,20 @@ __metadata: languageName: node linkType: hard +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"proc-log@npm:^4.0.0, proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 98f6cd012d54b5334144c5255ecb941ee171744f45fca8b43b58ae5a0c1af07352475f481cadd9848e7f0250376ee584f6aa0951a856ff8f021bdfbff4eb33fc + languageName: node + linkType: hard + "process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" @@ -39630,6 +40548,13 @@ __metadata: languageName: node linkType: hard +"proggy@npm:^2.0.0": + version: 2.0.0 + resolution: "proggy@npm:2.0.0" + checksum: 398f38c5e53d8f3dd8e1f67140dd1044dfde0a8e43edb2df55f7f38b958912841c78a970e61f2ee7222be4f3f1ee0da134e21d0eb537805cb1b10516555c7ac1 + languageName: node + linkType: hard + "progress@npm:2.0.3": version: 2.0.3 resolution: "progress@npm:2.0.3" @@ -39637,6 +40562,20 @@ __metadata: languageName: node linkType: hard +"promise-all-reject-late@npm:^1.0.0": + version: 1.0.1 + resolution: "promise-all-reject-late@npm:1.0.1" + checksum: d7d61ac412352e2c8c3463caa5b1c3ca0f0cc3db15a09f180a3da1446e33d544c4261fc716f772b95e4c27d559cfd2388540f44104feb356584f9c73cfb9ffcb + languageName: node + linkType: hard + +"promise-call-limit@npm:^3.0.1": + version: 3.0.1 + resolution: "promise-call-limit@npm:3.0.1" + checksum: f1b3c4d3a9c5482ce27ec5f40311e1389adb9bb10c16166e61c96d29ab22c701691d5225bf6745a162858f45dfb46cc82275fd09e7aa57846fc446c7855c2f06 + languageName: node + linkType: hard + "promise-inflight@npm:^1.0.1": version: 1.0.1 resolution: "promise-inflight@npm:1.0.1" @@ -39760,33 +40699,9 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^6.8.6": - version: 6.11.4 - resolution: "protobufjs@npm:6.11.4" - dependencies: - "@protobufjs/aspromise": ^1.1.2 - "@protobufjs/base64": ^1.1.2 - "@protobufjs/codegen": ^2.0.4 - "@protobufjs/eventemitter": ^1.1.0 - "@protobufjs/fetch": ^1.1.0 - "@protobufjs/float": ^1.0.2 - "@protobufjs/inquire": ^1.1.0 - "@protobufjs/path": ^1.1.2 - "@protobufjs/pool": ^1.1.0 - "@protobufjs/utf8": ^1.1.0 - "@types/long": ^4.0.1 - "@types/node": ">=13.7.0" - long: ^4.0.0 - bin: - pbjs: bin/pbjs - pbts: bin/pbts - checksum: b2fc6a01897b016c2a7e43a854ab4a3c57080f61be41e552235436e7a730711b8e89e47cb4ae52f0f065b5ab5d5989fc932f390337ce3a8ccf07203415700850 - languageName: node - linkType: hard - -"protobufjs@npm:^7.2.4": - version: 7.2.5 - resolution: "protobufjs@npm:7.2.5" +"protobufjs@npm:^7.2.5": + version: 7.3.0 + resolution: "protobufjs@npm:7.3.0" dependencies: "@protobufjs/aspromise": ^1.1.2 "@protobufjs/base64": ^1.1.2 @@ -39800,7 +40715,7 @@ __metadata: "@protobufjs/utf8": ^1.1.0 "@types/node": ">=13.7.0" long: ^5.0.0 - checksum: 3770a072114061faebbb17cfd135bc4e187b66bc6f40cd8bac624368b0270871ec0cfb43a02b9fb4f029c8335808a840f1afba3c2e7ede7063b98ae6b98a703f + checksum: bc7008ec736b0ab68677ced957b7ccbfc96ccd31f10d8a09d41408d8bf432a6132387acca71e657c652d98aaf7bd2a373f355a377762cff1ed04f0def8477c69 languageName: node linkType: hard @@ -40155,6 +41070,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed + languageName: node + linkType: hard + "raf@npm:^3.1.0, raf@npm:^3.2.0, raf@npm:^3.4.0": version: 3.4.1 resolution: "raf@npm:3.4.1" @@ -41271,6 +42193,13 @@ __metadata: languageName: node linkType: hard +"read-cmd-shim@npm:^4.0.0": + version: 4.0.0 + resolution: "read-cmd-shim@npm:4.0.0" + checksum: 2fb5a8a38984088476f559b17c6a73324a5db4e77e210ae0aab6270480fd85c355fc990d1c79102e25e555a8201606ed12844d6e3cd9f35d6a1518791184e05b + languageName: node + linkType: hard + "read-json-sync@npm:2.0.1": version: 2.0.1 resolution: "read-json-sync@npm:2.0.1" @@ -41278,6 +42207,16 @@ __metadata: languageName: node linkType: hard +"read-package-json-fast@npm:^3.0.0, read-package-json-fast@npm:^3.0.2": + version: 3.0.2 + resolution: "read-package-json-fast@npm:3.0.2" + dependencies: + json-parse-even-better-errors: ^3.0.0 + npm-normalize-package-bin: ^3.0.0 + checksum: 8d406869f045f1d76e2a99865a8fd1c1af9c1dc06200b94d2b07eef87ed734b22703a8d72e1cd36ea36cc48e22020bdd187f88243c7dd0563f72114d38c17072 + languageName: node + linkType: hard + "read-package-json@npm:1 || 2, read-package-json@npm:^2.0.0, read-package-json@npm:^2.0.13": version: 2.1.2 resolution: "read-package-json@npm:2.1.2" @@ -41290,7 +42229,7 @@ __metadata: languageName: node linkType: hard -"read-package-tree@npm:^5.1.6, read-package-tree@npm:^5.2.1, read-package-tree@npm:^5.3.1": +"read-package-tree@npm:^5.1.6": version: 5.3.1 resolution: "read-package-tree@npm:5.3.1" dependencies: @@ -41489,6 +42428,13 @@ __metadata: languageName: node linkType: hard +"readline-sync@npm:^1.4.10": + version: 1.4.10 + resolution: "readline-sync@npm:1.4.10" + checksum: 4dbd8925af028dc4cb1bb813f51ca3479035199aa5224886b560eec8e768ab27d7ebf11d69a67ed93d5a130b7c994f0bdb77796326e563cf928bbfd560e3747e + languageName: node + linkType: hard + "real-require@npm:^0.2.0": version: 0.2.0 resolution: "real-require@npm:0.2.0" @@ -41795,6 +42741,13 @@ __metadata: languageName: node linkType: hard +"remeda@npm:^1.0.0": + version: 1.61.0 + resolution: "remeda@npm:1.61.0" + checksum: c080da71953ccc178334ca774f0da5c3f4664ef25ff7bc1e1f09a921ff9c264bbf8be8e0ac876c4a3f851a4d3e017cd454319a0e24610fd744bd8f9177dd4c7b + languageName: node + linkType: hard + "remove-trailing-separator@npm:^1.0.1": version: 1.1.0 resolution: "remove-trailing-separator@npm:1.1.0" @@ -42013,6 +42966,13 @@ __metadata: languageName: node linkType: hard +"resolve-alpn@npm:^1.0.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: f558071fcb2c60b04054c99aebd572a2af97ef64128d59bef7ab73bd50d896a222a056de40ffc545b633d99b304c259ea9d0c06830d5c867c34f0bfa60b8eae0 + languageName: node + linkType: hard + "resolve-cwd@npm:^2.0.0": version: 2.0.0 resolution: "resolve-cwd@npm:2.0.0" @@ -42185,6 +43145,15 @@ __metadata: languageName: node linkType: hard +"responselike@npm:^2.0.0": + version: 2.0.1 + resolution: "responselike@npm:2.0.1" + dependencies: + lowercase-keys: ^2.0.0 + checksum: b122535466e9c97b55e69c7f18e2be0ce3823c5d47ee8de0d9c0b114aa55741c6db8bfbfce3766a94d1272e61bfb1ebf0a15e9310ac5629fbb7446a861b4fd3a + languageName: node + linkType: hard + "restore-cursor@npm:^1.0.1": version: 1.0.1 resolution: "restore-cursor@npm:1.0.1" @@ -43236,6 +44205,20 @@ __metadata: languageName: node linkType: hard +"sigstore@npm:^2.2.0": + version: 2.3.1 + resolution: "sigstore@npm:2.3.1" + dependencies: + "@sigstore/bundle": ^2.3.2 + "@sigstore/core": ^1.0.0 + "@sigstore/protobuf-specs": ^0.3.2 + "@sigstore/sign": ^2.3.2 + "@sigstore/tuf": ^2.3.4 + "@sigstore/verify": ^1.2.1 + checksum: 9e8c5e60dbe56591770fb26a0d0e987f1859d47d519532578540380d6464499bcd1f1765291d6a360d3ffe9aba171fc8b0c3e559931b0ea262140aff7e892296 + languageName: node + linkType: hard + "simple-concat@npm:^1.0.0": version: 1.0.1 resolution: "simple-concat@npm:1.0.1" @@ -43475,7 +44458,7 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:^8.0.2": +"socks-proxy-agent@npm:^8.0.2, socks-proxy-agent@npm:^8.0.3": version: 8.0.3 resolution: "socks-proxy-agent@npm:8.0.3" dependencies: @@ -43638,15 +44621,6 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:^0.4.16": - version: 0.4.18 - resolution: "source-map-support@npm:0.4.18" - dependencies: - source-map: ^0.5.6 - checksum: 669aa7e992fec586fac0ba9a8dea8ce81b7328f92806335f018ffac5709afb2920e3870b4e56c68164282607229f04b8bbcf5d0e5c845eb1b5119b092e7585c0 - languageName: node - linkType: hard - "source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.12, source-map-support@npm:~0.5.20": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" @@ -43809,7 +44783,7 @@ __metadata: languageName: node linkType: hard -"split2@npm:^3.0.0, split2@npm:^3.2.2": +"split2@npm:^3.0.0": version: 3.2.2 resolution: "split2@npm:3.2.2" dependencies: @@ -43897,6 +44871,15 @@ __metadata: languageName: node linkType: hard +"ssri@npm:^10.0.0, ssri@npm:^10.0.6": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: ^7.0.3 + checksum: 4603d53a05bcd44188747d38f1cc43833b9951b5a1ee43ba50535bdfc5fe4a0897472dbe69837570a5417c3c073377ef4f8c1a272683b401857f72738ee57299 + languageName: node + linkType: hard + "ssri@npm:^6.0.0, ssri@npm:^6.0.1": version: 6.0.2 resolution: "ssri@npm:6.0.2" @@ -44132,6 +45115,15 @@ __metadata: languageName: node linkType: hard +"string-length@npm:^6.0.0": + version: 6.0.0 + resolution: "string-length@npm:6.0.0" + dependencies: + strip-ansi: ^7.1.0 + checksum: b171e9e193ec292ad71f8b2a36e20478bf1bac8cd5beec062fb126942d627dfd9311959e271e9ab7b0a383d16b85b9e25a183d15786e30f22104d152e7627f99 + languageName: node + linkType: hard + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -44327,7 +45319,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^7.0.1": +"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": version: 7.1.0 resolution: "strip-ansi@npm:7.1.0" dependencies: @@ -45043,6 +46035,7 @@ __metadata: "@webiny/utils": 0.0.0 "@webiny/validation": 0.0.0 graphql: ^15.7.2 + graphql-request: ^7.0.1 react: 17.0.2 react-hamburger-menu: ^1.1.1 languageName: unknown @@ -45219,6 +46212,13 @@ __metadata: languageName: node linkType: hard +"tmp@npm:^0.2.1": + version: 0.2.3 + resolution: "tmp@npm:0.2.3" + checksum: 73b5c96b6e52da7e104d9d44afb5d106bb1e16d9fa7d00dbeb9e6522e61b571fbdb165c756c62164be9a3bbe192b9b268c236d370a2a0955c7689cd2ae377b95 + languageName: node + linkType: hard + "tmp@npm:~0.2.1": version: 0.2.1 resolution: "tmp@npm:0.2.1" @@ -45449,6 +46449,13 @@ __metadata: languageName: node linkType: hard +"treeverse@npm:^3.0.0": + version: 3.0.0 + resolution: "treeverse@npm:3.0.0" + checksum: 73168d9887fa57b0719218f176c5a3cfbaaf310922879acb4adf76665bc17dcdb6ed3e4163f0c27eee17e346886186a1515ea6f87e96cdc10df1dce13bf622a0 + languageName: node + linkType: hard + "trim-newlines@npm:^1.0.0": version: 1.0.0 resolution: "trim-newlines@npm:1.0.0" @@ -45601,24 +46608,6 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:^7.0.1": - version: 7.0.1 - resolution: "ts-node@npm:7.0.1" - dependencies: - arrify: ^1.0.0 - buffer-from: ^1.1.0 - diff: ^3.1.0 - make-error: ^1.1.1 - minimist: ^1.2.0 - mkdirp: ^0.5.1 - source-map-support: ^0.5.6 - yn: ^2.0.0 - bin: - ts-node: dist/bin.js - checksum: 07ed6ea1805361828737a767cfd6c57ea6e267ee8679282afb933610af02405e1a87c1f2aea1d38ed8e66b34fcbf6272b6021ab95d78849105d2e57fc283870b - languageName: node - linkType: hard - "ts-pnp@npm:^1.1.2": version: 1.2.0 resolution: "ts-pnp@npm:1.2.0" @@ -45737,6 +46726,17 @@ __metadata: languageName: node linkType: hard +"tuf-js@npm:^2.2.1": + version: 2.2.1 + resolution: "tuf-js@npm:2.2.1" + dependencies: + "@tufjs/models": 2.0.1 + debug: ^4.3.4 + make-fetch-happen: ^13.0.1 + checksum: 23a8f84a33f4569296c7d1d6919ea87273923a3d0c6cc837a84fb200041a54bb1b50623f79cc77307325d945dfe10e372ac1cad105956e34d3df2d4984027bd8 + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" @@ -45843,6 +46843,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^4.3.1": + version: 4.18.3 + resolution: "type-fest@npm:4.18.3" + checksum: 85c258c8a64011a797366bfb442d6d36ec74318ec3ab7c3d65ec156beeac5bcfeae742e8d3bb1bc1df478885388850d1812b30fcee72c14512c74e193dc3bf71 + languageName: node + linkType: hard + "type-is@npm:~1.6.17, type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -46080,6 +47087,15 @@ __metadata: languageName: node linkType: hard +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: ^4.0.0 + checksum: 8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + "unique-slug@npm:^2.0.0": version: 2.0.2 resolution: "unique-slug@npm:2.0.2" @@ -46098,6 +47114,15 @@ __metadata: languageName: node linkType: hard +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: ^0.1.4 + checksum: 0884b58365af59f89739e6f71e3feacb5b1b41f2df2d842d0757933620e6de08eff347d27e9d499b43c40476cbaf7988638d3acb2ffbcb9d35fd035591adfd15 + languageName: node + linkType: hard + "universal-cookie@npm:^4.0.4": version: 4.0.4 resolution: "universal-cookie@npm:4.0.4" @@ -46561,7 +47586,7 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.3": +"validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.3, validate-npm-package-license@npm:^3.0.4": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" dependencies: @@ -46580,6 +47605,13 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-name@npm:^5.0.0": + version: 5.0.1 + resolution: "validate-npm-package-name@npm:5.0.1" + checksum: 0d583a1af23aeffea7748742cf22b6802458736fb8b60323ba5949763824d46f796474b0e1b9206beb716f9d75269e19dbd7795d6b038b29d561be95dd827381 + languageName: node + linkType: hard + "value-or-promise@npm:1.0.6": version: 1.0.6 resolution: "value-or-promise@npm:1.0.6" @@ -46719,6 +47751,13 @@ __metadata: languageName: node linkType: hard +"walk-up-path@npm:^3.0.1": + version: 3.0.1 + resolution: "walk-up-path@npm:3.0.1" + checksum: 9ffca02fe30fb65f6db531260582988c5e766f4c739cf86a6109380a7f791236b5d0b92b1dce37a6f73e22dca6bc9d93bf3700413e16251b2bd6bbd1ca2be316 + languageName: node + linkType: hard + "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -47321,6 +48360,17 @@ __metadata: languageName: node linkType: hard +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: ^3.1.1 + bin: + node-which: bin/which.js + checksum: f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + "wicg-inert@npm:^3.0.3": version: 3.1.2 resolution: "wicg-inert@npm:3.1.2" @@ -47477,6 +48527,16 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^5.0.0": + version: 5.0.1 + resolution: "write-file-atomic@npm:5.0.1" + dependencies: + imurmurhash: ^0.1.4 + signal-exit: ^4.0.1 + checksum: 8dbb0e2512c2f72ccc20ccedab9986c7d02d04039ed6e8780c987dc4940b793339c50172a1008eed7747001bfacc0ca47562668a069a7506c46c77d7ba3926a9 + languageName: node + linkType: hard + "write-json-file@npm:4.3.0, write-json-file@npm:^4.2.0, write-json-file@npm:^4.3.0": version: 4.3.0 resolution: "write-json-file@npm:4.3.0" @@ -47825,13 +48885,6 @@ __metadata: languageName: node linkType: hard -"yn@npm:^2.0.0": - version: 2.0.0 - resolution: "yn@npm:2.0.0" - checksum: 9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 - languageName: node - linkType: hard - "yocto-queue@npm:^0.1.0": version: 0.1.0 resolution: "yocto-queue@npm:0.1.0" @@ -47917,6 +48970,13 @@ __metadata: languageName: node linkType: hard +"zod@npm:^3.17.3, zod@npm:^3.22.2, zod@npm:^3.23.5": + version: 3.23.8 + resolution: "zod@npm:3.23.8" + checksum: 15949ff82118f59c893dacd9d3c766d02b6fa2e71cf474d5aa888570c469dbf5446ac5ad562bb035bf7ac9650da94f290655c194f4a6de3e766f43febd432c5c + languageName: node + linkType: hard + "zod@npm:^3.21.4": version: 3.21.4 resolution: "zod@npm:3.21.4" From 520ed32e98f9f19799d8604a0aa02548ae9d60d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Tue, 4 Jun 2024 11:24:08 +0200 Subject: [PATCH 24/56] fix(api-dynamodb-to-elasticsearch): max waiting time [skip ci] --- .../__tests__/event.test.ts | 6 +- .../__tests__/transfer.test.ts | 56 +++++++++++++++++++ .../src/index.ts | 4 +- 3 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 packages/api-dynamodb-to-elasticsearch/__tests__/transfer.test.ts diff --git a/packages/api-dynamodb-to-elasticsearch/__tests__/event.test.ts b/packages/api-dynamodb-to-elasticsearch/__tests__/event.test.ts index 809695e3ec7..7896a1a35ba 100644 --- a/packages/api-dynamodb-to-elasticsearch/__tests__/event.test.ts +++ b/packages/api-dynamodb-to-elasticsearch/__tests__/event.test.ts @@ -73,7 +73,8 @@ describe("event", () => { }, lambdaContext, request, - reply + reply, + next: jest.fn() }); expect(result).toEqual(null); @@ -86,7 +87,8 @@ describe("event", () => { event, lambdaContext, request, - reply + reply, + next: jest.fn() }); expect(result).toEqual(null); diff --git a/packages/api-dynamodb-to-elasticsearch/__tests__/transfer.test.ts b/packages/api-dynamodb-to-elasticsearch/__tests__/transfer.test.ts new file mode 100644 index 00000000000..3f30a387c25 --- /dev/null +++ b/packages/api-dynamodb-to-elasticsearch/__tests__/transfer.test.ts @@ -0,0 +1,56 @@ +import { createEventHandler, Operations } from "~/index"; +import { createElasticsearchClient } from "@webiny/project-utils/testing/elasticsearch/createClient"; +import { ElasticsearchContext } from "@webiny/api-elasticsearch/types"; +import { Context, LambdaContext, Reply, Request } from "@webiny/handler-aws/types"; +import { marshall } from "@webiny/aws-sdk/client-dynamodb"; +import { PluginsContainer } from "@webiny/plugins"; + +describe("transfer data", () => { + it("should transfer data from event to elasticsearch", async () => { + const event = createEventHandler(); + + const elasticsearch = createElasticsearchClient(); + + const context = { + elasticsearch, + plugins: new PluginsContainer() + } as unknown as ElasticsearchContext & Context; + /** + * Register index which is going to get created, so it can be deleted after the test. + */ + const index = "a-test-index"; + elasticsearch.indices.registerIndex(index); + + const result = await event.cb({ + context, + reply: {} as Reply, + request: {} as Request, + event: { + Records: [ + { + eventName: Operations.INSERT, + dynamodb: { + Keys: marshall({ + PK: "PK_TEST", + SK: "SK_TEST" + }) as any, + NewImage: marshall({ + index, + ignore: false, + data: { + title: "Hello World" + } + }) as any + } + } + ] + }, + lambdaContext: {} as LambdaContext, + next: jest.fn() + }); + + expect(result).toEqual(null); + + await elasticsearch.indices.deleteAll(); + }); +}); diff --git a/packages/api-dynamodb-to-elasticsearch/src/index.ts b/packages/api-dynamodb-to-elasticsearch/src/index.ts index 61ad3c97895..89e4beb5dbb 100644 --- a/packages/api-dynamodb-to-elasticsearch/src/index.ts +++ b/packages/api-dynamodb-to-elasticsearch/src/index.ts @@ -12,7 +12,7 @@ import { ElasticsearchCatClusterHealthStatus } from "@webiny/api-elasticsearch/o import pRetry from "p-retry"; import { NotEnoughRemainingTimeError } from "./NotEnoughRemainingTimeError"; -enum Operations { +export enum Operations { INSERT = "INSERT", MODIFY = "MODIFY", REMOVE = "REMOVE" @@ -220,7 +220,7 @@ export const createEventHandler = () => { const execute = async (): Promise => { const remainingTime = timer.getRemainingSeconds(); const runningTime = MAX_RUNNING_TIME - remainingTime; - const maxWaitingTime = MAX_RUNNING_TIME - 90 - remainingTime; + const maxWaitingTime = remainingTime - 90; if (process.env.DEBUG === "true") { console.debug( From d581785ce192e7d5648e0b18ca401be97a6e4554 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Tue, 4 Jun 2024 12:23:15 +0200 Subject: [PATCH 25/56] chore: create revert meta fields script --- .../MetaFieldsMigration.ts | 214 ++++++++ .../SegmentProcessor.ts | 70 +++ .../utils/revertMetaFieldsMigration/bin.ts | 78 +++ ...teMetaFieldsDataMigrationDeploymentHook.ts | 94 ++++ .../utils/revertMetaFieldsMigration/index.ts | 461 ++++++++++++++++++ .../utils/revertMetaFieldsMigration/utils.ts | 14 + .../utils/revertMetaFieldsMigration/worker.ts | 339 +++++++++++++ 7 files changed, 1270 insertions(+) create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/MetaFieldsMigration.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/SegmentProcessor.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/bin.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/MetaFieldsMigration.ts new file mode 100644 index 00000000000..fb60ab7da28 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/MetaFieldsMigration.ts @@ -0,0 +1,214 @@ +import { Logger } from "@webiny/logger"; +import { SegmentProcessor } from "./SegmentProcessor"; +import { + disableElasticsearchIndexing, + esListIndexes, + fetchOriginalElasticsearchSettings, + restoreOriginalElasticsearchSettings +} from "~/utils"; +import { createElasticsearchClient } from "@webiny/api-elasticsearch"; +import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; +import { + DEFAULT_ES_HEALTH_CHECKS_PARAMS, + EsHealthChecksParams +} from "~/migrations/5.39.6/001/ddb-es/utils"; +import path from "path"; +import os from "os"; +import fs from "fs"; +import glob from "fast-glob"; + +export interface MetaFieldsMigrationParams { + ddbTable: string; + ddbEsTable: string; + esEndpoint: string; + totalSegments: number; + logger: Logger; + + // Elasticsearch health check options. + esHealthChecks?: Partial; +} + +export class MetaFieldsMigration { + private readonly runId: string; + private readonly ddbTable: string; + private readonly ddbEsTable: string; + private readonly esEndpoint: string; + private readonly totalSegments: number; + private readonly logger: Logger; + + private readonly esHealthChecks: EsHealthChecksParams; + + constructor(params: MetaFieldsMigrationParams) { + this.runId = String(new Date().getTime()); + this.ddbTable = params.ddbTable; + this.ddbEsTable = params.ddbEsTable; + this.esEndpoint = params.esEndpoint; + this.totalSegments = params.totalSegments; + this.logger = params.logger; + this.esHealthChecks = { + ...DEFAULT_ES_HEALTH_CHECKS_PARAMS, + ...params.esHealthChecks + }; + } + + async execute() { + const scanProcessesPromises = []; + + const start = Date.now(); + const getDuration = () => { + return (Date.now() - start) / 1000; + }; + + this.logger.info("Starting 5.39.6-001 meta fields data migration..."); + this.logger.info( + { + ddbTable: this.ddbTable, + ddbEsTable: this.ddbEsTable, + esEndpoint: this.esEndpoint, + totalSegments: this.totalSegments, + esHealthChecks: this.esHealthChecks + }, + "Received the following parameters:" + ); + + const elasticsearchClient = createElasticsearchClient({ + endpoint: `https://${this.esEndpoint}` + }); + + this.logger.info("Checking Elasticsearch health status..."); + const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, this.esHealthChecks); + this.logger.info("Elasticsearch is healthy."); + + await waitUntilHealthy.wait(); + + const indexes = await esListIndexes({ elasticsearchClient, match: "-headless-cms-" }); + const indexSettings: Record = {}; + for (const indexName of indexes) { + this.logger.info(`Disabling indexing for Elasticsearch index "${indexName}"...`); + indexSettings[indexName] = await fetchOriginalElasticsearchSettings({ + elasticsearchClient, + index: indexName, + logger: this.logger + }); + + await disableElasticsearchIndexing({ + elasticsearchClient, + index: indexName, + logger: this.logger + }); + } + + this.logger.info("Proceeding with the migration..."); + + for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { + const segmentProcessor = new SegmentProcessor({ + segmentIndex, + runId: this.runId, + totalSegments: this.totalSegments, + ddbTable: this.ddbTable, + ddbEsTable: this.ddbEsTable, + esEndpoint: this.esEndpoint, + esHealthChecks: this.esHealthChecks + }); + + scanProcessesPromises.push(segmentProcessor.execute()); + } + + await Promise.all(scanProcessesPromises); + + this.logger.info("Restoring original Elasticsearch settings..."); + await restoreOriginalElasticsearchSettings({ + elasticsearchClient, + indexSettings, + logger: this.logger + }); + + const duration = getDuration(); + this.logger.info(`5.39.6-001 migration completed in ${duration}s, here are the results...`); + + // Wait for 1 second. + await new Promise(resolve => setTimeout(resolve, 1000)); + + this.logger.info( + { + totalSegments: this.totalSegments, + esHealthChecks: this.esHealthChecks + }, + "The migration was performed with the following following parameters:" + ); + + // Pickup all log files and print a summary of the migration. + const logFilePaths = await glob( + path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}-*.log` + ) + ); + + const migrationStats = { + iterationsCount: 0, + avgIterationDuration: 0, + recordsScanned: 0, + avgRecordsScannedPerIteration: 0, + recordsScannedPerSecond: 0, + recordsUpdated: 0, + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} as Record + } + }; + + for (const logFilePath of logFilePaths) { + const logFileContent = fs.readFileSync(logFilePath, "utf-8"); + const logFile = JSON.parse(logFileContent); + + migrationStats.iterationsCount += logFile.iterationsCount; + migrationStats.recordsScanned += logFile.recordsScanned; + migrationStats.recordsUpdated += logFile.recordsUpdated; + migrationStats.recordsSkipped += logFile.recordsSkipped; + + migrationStats.esHealthChecks.timeSpentWaiting += + logFile.esHealthChecks.timeSpentWaiting; + migrationStats.esHealthChecks.checksCount += logFile.esHealthChecks.checksCount; + + for (const unhealthyReasonType in logFile.esHealthChecks.unhealthyReasons) { + if (!logFile.esHealthChecks.unhealthyReasons.hasOwnProperty(unhealthyReasonType)) { + continue; + } + + const hasCount = + unhealthyReasonType in migrationStats.esHealthChecks.unhealthyReasons; + if (hasCount) { + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] += + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } else { + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] = + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } + } + } + + migrationStats.avgIterationDuration = duration / migrationStats.iterationsCount; + + migrationStats.avgRecordsScannedPerIteration = + migrationStats.recordsScanned / migrationStats.iterationsCount; + + migrationStats.recordsScannedPerSecond = migrationStats.recordsScanned / duration; + + this.logger.info( + migrationStats, + `Migration summary (based on ${logFilePaths.length} generated logs):` + ); + + const logFilePath = path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}.log` + ); + + // Save segment processing stats to a file. + fs.writeFileSync(logFilePath, JSON.stringify(migrationStats, null, 2)); + this.logger.trace(`Migration summary saved to "${logFilePath}".`); + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/SegmentProcessor.ts new file mode 100644 index 00000000000..7199d35cf3b --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/SegmentProcessor.ts @@ -0,0 +1,70 @@ +import execa from "execa"; +import path from "path"; +import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; + +interface SegmentProcessorParams { + runId: string; + ddbTable: string; + ddbEsTable: string; + esEndpoint: string; + segmentIndex: number; + totalSegments: number; + esHealthChecks: EsHealthChecksParams; +} + +export class SegmentProcessor { + private readonly runId: string; + private readonly ddbTable: string; + private readonly ddbEsTable: string; + private readonly esEndpoint: string; + private readonly segmentIndex: number; + private readonly totalSegments: number; + private readonly esHealthChecks: EsHealthChecksParams; + + constructor(params: SegmentProcessorParams) { + this.runId = params.runId; + this.ddbTable = params.ddbTable; + this.ddbEsTable = params.ddbEsTable; + this.esEndpoint = params.esEndpoint; + this.segmentIndex = params.segmentIndex; + this.totalSegments = params.totalSegments; + this.esHealthChecks = params.esHealthChecks; + } + + execute() { + return execa( + "node", + [ + path.join(__dirname, "worker"), + "--runId", + this.runId, + "--ddbTable", + this.ddbTable, + "--ddbEsTable", + this.ddbEsTable, + "--esEndpoint", + this.esEndpoint, + "--segmentIndex", + String(this.segmentIndex), + "--totalSegments", + String(this.totalSegments), + + // Elasticsearch health check options. + "--esHealthMinClusterHealthStatus", + this.esHealthChecks.minClusterHealthStatus, + "--esHealthMaxProcessorPercent", + String(this.esHealthChecks.maxProcessorPercent), + "--esHealthMaxRamPercent", + String(this.esHealthChecks.maxRamPercent), + "--esHealthMaxWaitingTime", + String(this.esHealthChecks.maxWaitingTime), + "--esHealthWaitingTimeStep", + String(this.esHealthChecks.waitingTimeStep) + ], + { + stdio: "inherit", + env: process.env + } + ); + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/bin.ts new file mode 100644 index 00000000000..f70fc2efe4d --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/bin.ts @@ -0,0 +1,78 @@ +#!/usr/bin/env node +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { MetaFieldsMigration } from "./MetaFieldsMigration"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; +import { + DEFAULT_ES_HEALTH_CHECKS_PARAMS, + EsHealthChecksParams +} from "~/migrations/5.39.6/001/ddb-es/utils"; + +const argv = yargs(hideBin(process.argv)) + .options({ + ddbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + esEndpoint: { type: "string", demandOption: true }, + segments: { type: "number", demandOption: true }, + + // Elasticsearch health check options. + esHealthMinClusterHealthStatus: { + type: "string", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.minClusterHealthStatus, + description: `Minimum cluster health status to wait for before proceeding with the migration.` + }, + esHealthMaxProcessorPercent: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxProcessorPercent, + description: `Maximum CPU usage percentage to wait for before proceeding with the migration.` + }, + esHealthMaxRamPercent: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxRamPercent, + description: `Maximum RAM usage percentage to wait for before proceeding with the migration.` + }, + esHealthMaxWaitingTime: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxWaitingTime, + description: `Maximum time to wait (seconds) for before proceeding with the migration.` + }, + esHealthWaitingTimeStep: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.waitingTimeStep, + description: `Time step (seconds) to wait before checking Elasticsearch health status again.` + } + }) + .parseSync(); + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const migration = new MetaFieldsMigration({ + totalSegments: argv.segments, + ddbTable: argv.ddbTable, + ddbEsTable: argv.ddbEsTable, + esEndpoint: argv.esEndpoint, + esHealthChecks: { + minClusterHealthStatus: + argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], + maxProcessorPercent: argv.esHealthMaxProcessorPercent, + maxRamPercent: argv.esHealthMaxRamPercent, + maxWaitingTime: argv.esHealthMaxWaitingTime, + waitingTimeStep: argv.esHealthWaitingTimeStep + }, + logger + }); + + await migration.execute(); +})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts new file mode 100644 index 00000000000..7d2374cb712 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts @@ -0,0 +1,94 @@ +import { CliContext } from "@webiny/cli/types"; +import { getStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; +import { + MetaFieldsMigrationParams, + MetaFieldsMigration +} from "~/migrations/5.39.6/001/ddb-es/MetaFieldsMigration"; + +interface CoreOutput { + primaryDynamodbTableName: string; + elasticsearchDynamodbTableName: string; + elasticsearchDomainEndpoint: string; +} + +const REQUIRED_AWS_ENV_VARS = [ + "AWS_REGION", + "AWS_ACCESS_KEY_ID", + "AWS_SECRET_ACCESS_KEY", + "AWS_SESSION_TOKEN" +]; + +const ensureAwsEnvVars = () => { + const missingAwsEnvVars = []; + for (const variable of REQUIRED_AWS_ENV_VARS) { + if (!process.env[variable]) { + missingAwsEnvVars.push(variable); + } + } + + if (missingAwsEnvVars.length > 0) { + throw new Error( + `Cannot run 5.39.6 meta fields data migration. Missing required environment variables: ${missingAwsEnvVars.join( + ", " + )}.` + ); + } +}; + +/** + * Creates an after-deployment hook that triggers the meta fields data migration. + * @param params + */ +export const createMetaFieldsDataMigrationDeploymentHook = ( + params: Pick +) => { + return { + type: "hook-after-deploy", + name: "hook-after-deploy-api-run-5-39-6-meta-fields-data-migrations", + async hook({ inputs, env, projectApplication }: Record, context: CliContext) { + // Only run migrations for `api` app + if (projectApplication.id !== "api") { + return; + } + + // No need to run migrations if we're doing a preview. + if (inputs.preview) { + return; + } + + if (process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS !== "true") { + context.info( + `Skipping meta fields data migration. Set %s to %s to enable.`, + "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", + "true" + ); + return; + } + + ensureAwsEnvVars(); + + const coreOutput = getStackOutput({ folder: "apps/core", env }); + + context.info("Executing 5.39.6-001 meta fields data migration..."); + + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const migration = new MetaFieldsMigration({ + ddbTable: coreOutput.primaryDynamodbTableName, + ddbEsTable: coreOutput.elasticsearchDynamodbTableName, + esEndpoint: coreOutput.elasticsearchDomainEndpoint, + ...params, + logger + }); + + await migration.execute(); + } + }; +}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts new file mode 100644 index 00000000000..fdf0511cd89 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts @@ -0,0 +1,461 @@ +import { Table } from "@webiny/db-dynamodb/toolbox"; +import { + DataMigration, + DataMigrationContext, + ElasticsearchClientSymbol, + ElasticsearchDynamoTableSymbol, + PrimaryDynamoTableSymbol +} from "@webiny/data-migration"; +import { + batchReadAll, + BatchReadItem, + batchWriteAll, + BatchWriteItem, + ddbScanWithCallback, + disableElasticsearchIndexing, + esGetIndexName, + fetchOriginalElasticsearchSettings, + restoreOriginalElasticsearchSettings +} from "~/utils"; +import { inject, makeInjectable } from "@webiny/ioc"; +import { Client } from "@elastic/elasticsearch"; +import { executeWithRetry } from "@webiny/utils"; +import { + createDdbEntryEntity, + createDdbEsEntryEntity +} from "~/migrations/5.39.0/001/entities/createEntryEntity"; +import { CmsEntry } from "~/migrations/5.39.0/001/types"; +import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; +import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; +import { assignNewMetaFields } from "~/migrations/5.39.0/001/utils/assignNewMetaFields"; +import { fixTypeFieldValue } from "~/migrations/5.39.0/001/utils/fixTypeFieldValue"; +import { getOldestRevisionCreatedOn } from "~/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn"; +import { getFirstLastPublishedOnBy } from "~/migrations/5.39.0/001/utils/getFirstLastPublishedOn"; +import { hasValidTypeFieldValue } from "~/migrations/5.39.0/001/utils/hasValidTypeFieldValue"; +import { hasAllNonNullableValues } from "~/migrations/5.39.0/001/utils/hasAllNonNullableValues"; +import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; +import { getFallbackIdentity } from "~/migrations/5.39.0/001/utils/getFallbackIdentity"; +import { ensureAllNonNullableValues } from "~/migrations/5.39.0/001/utils/ensureAllNonNullableValues"; +import { ScanDbItem } from "@webiny/db-dynamodb"; + +interface LastEvaluatedKey { + PK: string; + SK: string; + GSI1_PK: string; + GSI1_SK: string; +} + +interface IndexSettings { + number_of_replicas: number; + refresh_interval: `${number}s`; +} + +interface CmsEntriesRootFolderDataMigrationCheckpoint { + lastEvaluatedKey?: LastEvaluatedKey | boolean; + indexes: { + [index: string]: IndexSettings | null; + }; +} + +interface DynamoDbElasticsearchRecord { + PK: string; + SK: string; + data: string; +} + +export class CmsEntriesInitNewMetaFields_5_39_6_001 implements DataMigration { + private readonly elasticsearchClient: Client; + private readonly ddbEntryEntity: ReturnType; + private readonly ddbEsEntryEntity: ReturnType; + + public constructor( + table: Table, + esTable: Table, + elasticsearchClient: Client + ) { + this.elasticsearchClient = elasticsearchClient; + this.ddbEntryEntity = createDdbEntryEntity(table); + this.ddbEsEntryEntity = createDdbEsEntryEntity(esTable); + } + + getId() { + return "5.39.6-001"; + } + + getDescription() { + return "Write new revision and entry-level on/by meta fields."; + } + + async shouldExecute({ logger }: DataMigrationContext): Promise { + let shouldExecute = false; + + await ddbScanWithCallback>( + { + entity: this.ddbEntryEntity, + options: { + filters: [ + { + attr: "_et", + eq: "CmsEntries" + } + ], + limit: 100 + } + }, + async result => { + if (result.error) { + logger.error(result.error); + throw new Error(result.error); + } + + for (const item of result.items) { + const isFullyMigrated = + isMigratedEntry(item) && + hasValidTypeFieldValue(item) && + hasAllNonNullableValues(item); + + if (!isFullyMigrated) { + shouldExecute = true; + + // Stop further scanning. + return false; + } + } + + // Continue further scanning. + return true; + } + ); + + if (shouldExecute) { + return true; + } + + logger.info(`CMS entries already upgraded. Skipping...`); + return false; + } + + async execute({ + logger, + ...context + }: DataMigrationContext): Promise { + const migrationStatus = + context.checkpoint || ({} as CmsEntriesRootFolderDataMigrationCheckpoint); + + if (migrationStatus.lastEvaluatedKey === true) { + await restoreOriginalElasticsearchSettings({ + indexSettings: migrationStatus.indexes, + logger, + elasticsearchClient: this.elasticsearchClient + }); + logger.info(`Migration completed, no need to start again.`); + return; + } + + let usingKey = ""; + if (migrationStatus?.lastEvaluatedKey) { + usingKey = JSON.stringify(migrationStatus.lastEvaluatedKey); + } + + logger.trace(`Scanning primary DynamoDB table.`, { + usingKey + }); + + let currentDdbScanIteration = 0; + + await ddbScanWithCallback( + { + entity: this.ddbEntryEntity, + options: { + filters: [ + { + attr: "_et", + eq: "CmsEntries" + } + ], + startKey: migrationStatus.lastEvaluatedKey || undefined, + limit: 100 + } + }, + async result => { + currentDdbScanIteration++; + + logger.trace(`Primary DynamoDB table scan iteration: ${currentDdbScanIteration}.`); + logger.trace(`Analyzing ${result.items.length} record(s)...`); + + const ddbItems: BatchWriteItem[] = []; + const ddbEsItems: BatchWriteItem[] = []; + const ddbEsGetItems: Record = {}; + + const fallbackDateTime = new Date().toISOString(); + + // Update records in primary DynamoDB table. Also do preparations for + // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. + for (const item of result.items) { + const isFullyMigrated = + isMigratedEntry(item) && + hasValidTypeFieldValue(item) && + hasAllNonNullableValues(item); + + if (isFullyMigrated) { + continue; + } + + const index = esGetIndexName({ + tenant: item.tenant, + locale: item.locale, + type: item.modelId, + isHeadlessCmsModel: true + }); + + // Check ES index settings. + if (!migrationStatus.indexes || migrationStatus.indexes[index] === undefined) { + // We need to fetch the index settings first + const settings = await fetchOriginalElasticsearchSettings({ + index, + logger, + elasticsearchClient: this.elasticsearchClient + }); + + // ... add it to the checkpoint... + migrationStatus.indexes = { + ...migrationStatus.indexes, + [index]: settings + }; + // and then set not to index + await disableElasticsearchIndexing({ + elasticsearchClient: this.elasticsearchClient, + index, + logger + }); + } + + // 1. Check if the data migration was ever performed. If not, let's perform it. + if (!isMigratedEntry(item)) { + // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. + const createdOn = await getOldestRevisionCreatedOn({ + entry: item, + entryEntity: this.ddbEntryEntity + }); + + const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ + entry: item, + entryEntity: this.ddbEntryEntity + }); + + assignNewMetaFields(item, { + createdOn, + ...firstLastPublishedOnByFields + }); + } + + // 2. We've noticed some of the records had an invalid `TYPE` field value + // in the database. This step addresses this issue. + if (!hasValidTypeFieldValue(item)) { + // Fixes the value of the `TYPE` field, if it's not valid. + fixTypeFieldValue(item); + } + + // 3. Finally, once both of the steps were performed, ensure that all + // new non-nullable meta fields have a value and nothing is missing. + if (!hasAllNonNullableValues(item)) { + logger.trace( + `Detected an entry with missing values for non-nullable meta fields (${item.modelId}/${item.id}).` + ); + + try { + const fallbackIdentity = await getFallbackIdentity({ + entity: this.ddbEntryEntity, + tenant: item.tenant + }); + + ensureAllNonNullableValues(item, { + dateTime: fallbackDateTime, + identity: fallbackIdentity + }); + + logger.trace( + `Successfully ensured all non-nullable meta fields have values (${item.modelId}/${item.id}). Will be saving into the database soon.` + ); + } catch (e) { + logger.debug( + `Failed to ensure all non-nullable meta fields have values (${item.modelId}/${item.id}): ${e.message}` + ); + } + } + + ddbItems.push(this.ddbEntryEntity.putBatch(item)); + + /** + * Prepare the loading of DynamoDB Elasticsearch part of the records. + */ + if (ddbEsGetItems[`${item.entryId}:L`]) { + continue; + } + + ddbEsGetItems[`${item.entryId}:L`] = this.ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "L" + }); + + if (item.status === "published" || !!item.locked) { + ddbEsGetItems[`${item.entryId}:P`] = this.ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "P" + }); + } + } + + /** + * Get all the records from DynamoDB Elasticsearch. + */ + const ddbEsRecords = await batchReadAll({ + table: this.ddbEsEntryEntity.table, + items: Object.values(ddbEsGetItems) + }); + + for (const ddbEsRecord of ddbEsRecords) { + const decompressedData = await getDecompressedData(ddbEsRecord.data); + if (!decompressedData) { + logger.trace( + `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` + ); + continue; + } + + // 1. Check if the data migration was ever performed. If not, let's perform it. + if (!isMigratedEntry(decompressedData)) { + // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. + const createdOn = await getOldestRevisionCreatedOn({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: this.ddbEntryEntity + }); + + const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: this.ddbEntryEntity + }); + + assignNewMetaFields(decompressedData, { + createdOn, + ...firstLastPublishedOnByFields + }); + } + + // 2. Ensure new non-nullable meta fields have a value and nothing is missing. + if (!hasAllNonNullableValues(decompressedData)) { + logger.trace( + [ + "[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields", + `(${decompressedData.modelId}/${decompressedData.id}).` + ].join(" ") + ); + + try { + const fallbackIdentity = await getFallbackIdentity({ + entity: this.ddbEntryEntity, + tenant: decompressedData.tenant + }); + + ensureAllNonNullableValues(decompressedData, { + dateTime: fallbackDateTime, + identity: fallbackIdentity + }); + + logger.trace( + [ + "[DDB-ES Table] Successfully ensured all non-nullable meta fields", + `have values (${decompressedData.modelId}/${decompressedData.id}).`, + "Will be saving the changes soon." + ].join(" ") + ); + } catch (e) { + logger.debug( + [ + "[DDB-ES Table] Failed to ensure all non-nullable meta fields have values", + `(${decompressedData.modelId}/${decompressedData.id}): ${e.message}` + ].join(" ") + ); + } + } + + const compressedData = await getCompressedData(decompressedData); + + ddbEsItems.push( + this.ddbEsEntryEntity.putBatch({ + ...ddbEsRecord, + data: compressedData + }) + ); + } + + // Store data in primary DynamoDB table. + const execute = () => { + return batchWriteAll({ + table: this.ddbEntryEntity.table, + items: ddbItems + }); + }; + + logger.trace("Storing records in primary DynamoDB table..."); + await executeWithRetry(execute, { + onFailedAttempt: error => { + logger.error( + `"batchWriteAll" attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + logger.trace("...stored."); + + // Store data in DDB-ES DynamoDB table. + const executeDdbEs = () => { + return batchWriteAll({ + table: this.ddbEsEntryEntity.table, + items: ddbEsItems + }); + }; + + logger.trace("Storing records in DDB-ES DynamoDB table..."); + await executeWithRetry(executeDdbEs, { + onFailedAttempt: error => { + logger.error( + `"batchWriteAll ddb-es" attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + logger.trace("...stored."); + + // Update checkpoint after every batch. + migrationStatus.lastEvaluatedKey = result.lastEvaluatedKey?.PK + ? (result.lastEvaluatedKey as unknown as LastEvaluatedKey) + : true; + + // Check if we should store checkpoint and exit. + if (context.runningOutOfTime()) { + await context.createCheckpointAndExit(migrationStatus); + } else { + await context.createCheckpoint(migrationStatus); + } + } + ); + + /** + * This is the end of the migration. + */ + await restoreOriginalElasticsearchSettings({ + indexSettings: migrationStatus.indexes, + logger, + elasticsearchClient: this.elasticsearchClient + }); + + migrationStatus.lastEvaluatedKey = true; + migrationStatus.indexes = {}; + context.createCheckpoint(migrationStatus); + } +} + +makeInjectable(CmsEntriesInitNewMetaFields_5_39_6_001, [ + inject(PrimaryDynamoTableSymbol), + inject(ElasticsearchDynamoTableSymbol), + inject(ElasticsearchClientSymbol) +]); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts new file mode 100644 index 00000000000..20ac331144c --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts @@ -0,0 +1,14 @@ +import { + ElasticsearchCatClusterHealthStatus, + IWaitUntilHealthyParams +} from "@webiny/api-elasticsearch"; + +export type EsHealthChecksParams = Required; + +export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, + maxProcessorPercent: 90, + maxRamPercent: 100, + maxWaitingTime: 90, + waitingTimeStep: 2 +}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts new file mode 100644 index 00000000000..119e7747855 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts @@ -0,0 +1,339 @@ +import { executeWithRetry } from "@webiny/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import { createTable } from "@webiny/data-migration"; +import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; +import { createElasticsearchClient } from "@webiny/api-elasticsearch"; +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; +import { hasValidTypeFieldValue } from "~/migrations/5.39.0/001/utils/hasValidTypeFieldValue"; +import { hasAllNonNullableValues } from "~/migrations/5.39.0/001/utils/hasAllNonNullableValues"; +import { getOldestRevisionCreatedOn } from "~/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn"; +import { getFirstLastPublishedOnBy } from "~/migrations/5.39.0/001/utils/getFirstLastPublishedOn"; +import { assignNewMetaFields } from "~/migrations/5.39.0/001/utils/assignNewMetaFields"; +import { fixTypeFieldValue } from "~/migrations/5.39.0/001/utils/fixTypeFieldValue"; +import { getFallbackIdentity } from "~/migrations/5.39.0/001/utils/getFallbackIdentity"; +import { ensureAllNonNullableValues } from "~/migrations/5.39.0/001/utils/ensureAllNonNullableValues"; +import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; +import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; +import { CmsEntry } from "~/migrations/5.39.0/001/types"; +import { + createDdbEntryEntity, + createDdbEsEntryEntity +} from "~/migrations/5.39.0/001/entities/createEntryEntity"; +import { + batchReadAll, + BatchReadItem, + batchWriteAll, + BatchWriteItem, + ddbScanWithCallback +} from "~/utils"; +import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; +import pinoPretty from "pino-pretty"; +import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; +import path from "path"; +import os from "os"; +import fs from "fs"; + +const argv = yargs(hideBin(process.argv)) + .options({ + runId: { type: "string", demandOption: true }, + ddbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + esEndpoint: { type: "string", demandOption: true }, + segmentIndex: { type: "number", demandOption: true }, + totalSegments: { type: "number", demandOption: true }, + + // Elasticsearch health check options. + esHealthMinClusterHealthStatus: { type: "string", demandOption: true }, + esHealthMaxProcessorPercent: { type: "number", demandOption: true }, + esHealthMaxRamPercent: { type: "number", demandOption: true }, + esHealthMaxWaitingTime: { type: "number", demandOption: true }, + esHealthWaitingTimeStep: { type: "number", demandOption: true } + }) + .parseSync(); + +interface LastEvaluatedKeyObject { + PK: string; + SK: string; + GSI1_PK: string; + GSI1_SK: string; +} + +type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; + +interface MigrationStatus { + lastEvaluatedKey: LastEvaluatedKey; + stats: { + iterationsCount: number; + recordsScanned: number; + recordsUpdated: number; + recordsSkipped: number; + esHealthChecks: { + timeSpentWaiting: number; + checksCount: number; + unhealthyReasons: { + [key: string]: number; + }; + }; + }; +} + +interface DynamoDbElasticsearchRecord { + PK: string; + SK: string; + data: string; +} + +const createInitialStatus = (): MigrationStatus => { + return { + lastEvaluatedKey: null, + stats: { + iterationsCount: 0, + recordsScanned: 0, + recordsUpdated: 0, + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} + } + } + }; +}; + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), + msgPrefix: `[segment #${argv.segmentIndex}] ` + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const documentClient = getDocumentClient(); + const elasticsearchClient = createElasticsearchClient({ + endpoint: `https://${argv.esEndpoint}` + }); + + const primaryTable = createTable({ + name: argv.ddbTable, + documentClient + }); + const dynamoToEsTable = createTable({ + name: argv.ddbEsTable, + documentClient + }); + + const ddbEntryEntity = createDdbEntryEntity(primaryTable); + const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); + + const status = createInitialStatus(); + + const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { + minClusterHealthStatus: + argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], + maxProcessorPercent: argv.esHealthMaxProcessorPercent, + maxRamPercent: argv.esHealthMaxRamPercent, + maxWaitingTime: argv.esHealthMaxWaitingTime, + waitingTimeStep: argv.esHealthWaitingTimeStep + }); + + await ddbScanWithCallback( + { + entity: ddbEntryEntity, + options: { + segment: argv.segmentIndex, + segments: argv.totalSegments, + filters: [ + { + attr: "_et", + eq: "CmsEntries" + } + ], + startKey: status.lastEvaluatedKey || undefined, + limit: 100 + } + }, + async result => { + status.stats.iterationsCount++; + status.stats.recordsScanned += result.items.length; + + if (status.stats.iterationsCount % 5 === 0) { + // We log every 5th iteration. + logger.trace( + `[iteration #${status.stats.iterationsCount}] Reading ${result.items.length} record(s)...` + ); + } + + const ddbItemsToBatchWrite: BatchWriteItem[] = []; + const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; + const ddbEsItemsToBatchRead: Record = {}; + + const fallbackDateTime = new Date().toISOString(); + + // Update records in primary DynamoDB table. Also do preparations for + // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. + for (const item of result.items) { + if (!isMigratedEntry(item)) { + status.stats.recordsSkipped++; + continue; + } + + delete item.revisionCreatedOn; + + ddbItemsToBatchWrite.push(ddbEntryEntity.putBatch(item)); + + /** + * Prepare the loading of DynamoDB Elasticsearch part of the records. + */ + + const ddbEsLatestRecordKey = `${item.entryId}:L`; + if (ddbEsItemsToBatchRead[ddbEsLatestRecordKey]) { + continue; + } + + ddbEsItemsToBatchRead[ddbEsLatestRecordKey] = ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "L" + }); + + const ddbEsPublishedRecordKey = `${item.entryId}:P`; + if (item.status === "published" || !!item.locked) { + ddbEsItemsToBatchRead[ddbEsPublishedRecordKey] = ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "P" + }); + } + } + + if (Object.keys(ddbEsItemsToBatchRead).length > 0) { + /** + * Get all the records from DynamoDB Elasticsearch. + */ + const ddbEsRecords = await batchReadAll({ + table: ddbEsEntryEntity.table, + items: Object.values(ddbEsItemsToBatchRead) + }); + + for (const ddbEsRecord of ddbEsRecords) { + const decompressedData = await getDecompressedData(ddbEsRecord.data); + if (!decompressedData) { + logger.trace( + `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` + ); + continue; + } + + if (isMigratedEntry(decompressedData)) { + status.stats.recordsSkipped++; + continue; + } + + delete decompressedData.revisionCreatedOn; + + const compressedData = await getCompressedData(decompressedData); + + ddbEsItemsToBatchWrite.push( + ddbEsEntryEntity.putBatch({ + ...ddbEsRecord, + data: compressedData + }) + ); + } + } + + if (ddbItemsToBatchWrite.length) { + // Store data in primary DynamoDB table. + const execute = () => { + return batchWriteAll({ + table: ddbEntryEntity.table, + items: ddbItemsToBatchWrite + }); + }; + + logger.trace( + `Storing ${ddbItemsToBatchWrite.length} record(s) in primary DynamoDB table...` + ); + await executeWithRetry(execute, { + onFailedAttempt: error => { + logger.warn( + `Batch write attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + + if (ddbEsItemsToBatchWrite.length) { + logger.trace( + `Storing ${ddbEsItemsToBatchWrite.length} record(s) in DDB-ES DynamoDB table...` + ); + + const results = await waitUntilHealthy.wait({ + async onUnhealthy(params) { + const shouldWaitReason = params.waitingReason.name; + + logger.warn( + `Cluster is unhealthy (${shouldWaitReason}). Waiting for the cluster to become healthy...`, + params + ); + + if (status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]) { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]++; + } else { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason] = 1; + } + } + }); + + status.stats.esHealthChecks.checksCount++; + status.stats.esHealthChecks.timeSpentWaiting += results.runningTime; + + // Store data in DDB-ES DynamoDB table. + const executeDdbEs = () => { + return batchWriteAll({ + table: ddbEsEntryEntity.table, + items: ddbEsItemsToBatchWrite + }); + }; + + await executeWithRetry(executeDdbEs, { + onFailedAttempt: error => { + logger.warn( + `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + } + + status.stats.recordsUpdated += ddbItemsToBatchWrite.length; + } + + // Update checkpoint after every batch. + let lastEvaluatedKey: LastEvaluatedKey = true; + if (result.lastEvaluatedKey) { + lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; + } + + status.lastEvaluatedKey = lastEvaluatedKey; + + if (lastEvaluatedKey === true) { + return false; + } + + // Continue further scanning. + return true; + } + ); + + // Store status in tmp file. + logger.trace({ status }, "Segment processing completed. Saving status to tmp file..."); + const logFilePath = path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${argv.runId}-${argv.segmentIndex}.log` + ); + + // Save segment processing stats to a file. + fs.writeFileSync(logFilePath, JSON.stringify(status.stats, null, 2)); + + logger.trace(`Segment processing stats saved in ${logFilePath}.`); +})(); From 8ae0fa8e3491598cc8b00c2f2dfb73cf285b4b1e Mon Sep 17 00:00:00 2001 From: adrians5j Date: Tue, 4 Jun 2024 14:06:08 +0200 Subject: [PATCH 26/56] chore: create revert meta fields script --- .../001/ddb-es/utils/revertMetaFieldsMigration/worker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts index 119e7747855..f213caf8f91 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts @@ -170,8 +170,6 @@ const createInitialStatus = (): MigrationStatus => { const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; const ddbEsItemsToBatchRead: Record = {}; - const fallbackDateTime = new Date().toISOString(); - // Update records in primary DynamoDB table. Also do preparations for // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. for (const item of result.items) { @@ -180,6 +178,7 @@ const createInitialStatus = (): MigrationStatus => { continue; } + // @ts-expect-error delete item.revisionCreatedOn; ddbItemsToBatchWrite.push(ddbEntryEntity.putBatch(item)); @@ -230,6 +229,7 @@ const createInitialStatus = (): MigrationStatus => { continue; } + // @ts-expect-error delete decompressedData.revisionCreatedOn; const compressedData = await getCompressedData(decompressedData); From c7e95ea897b22cd83ce9094abd615880b9064d1b Mon Sep 17 00:00:00 2001 From: adrians5j Date: Tue, 4 Jun 2024 14:35:15 +0200 Subject: [PATCH 27/56] chore: create revert meta fields script --- .../DeleteAllCmsEntries.ts | 0 .../deleteAllCmsEntries/SegmentProcessor.ts | 0 .../deleteAllCmsEntries/bin.ts | 0 .../deleteAllCmsEntries/worker.ts | 0 .../MetaFieldsMigration.ts | 2 +- .../SegmentProcessor.ts | 0 .../revertMetaFieldsMigration/bin.ts | 0 .../revertMetaFieldsMigration/worker.ts | 8 - ...teMetaFieldsDataMigrationDeploymentHook.ts | 94 - .../utils/revertMetaFieldsMigration/index.ts | 461 --- .../utils/revertMetaFieldsMigration/utils.ts | 14 - yarn.lock | 2620 ++++++++++++----- 12 files changed, 1820 insertions(+), 1379 deletions(-) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/deleteAllCmsEntries/DeleteAllCmsEntries.ts (100%) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/deleteAllCmsEntries/SegmentProcessor.ts (100%) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/deleteAllCmsEntries/bin.ts (100%) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/deleteAllCmsEntries/worker.ts (100%) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/revertMetaFieldsMigration/MetaFieldsMigration.ts (99%) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/revertMetaFieldsMigration/SegmentProcessor.ts (100%) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/revertMetaFieldsMigration/bin.ts (100%) rename packages/migrations/src/migrations/5.39.6/001/ddb-es/{utils => temp}/revertMetaFieldsMigration/worker.ts (94%) delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/DeleteAllCmsEntries.ts similarity index 100% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/DeleteAllCmsEntries.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/DeleteAllCmsEntries.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/SegmentProcessor.ts similarity index 100% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/SegmentProcessor.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/SegmentProcessor.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/bin.ts similarity index 100% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/bin.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/bin.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/worker.ts similarity index 100% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/deleteAllCmsEntries/worker.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/worker.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts similarity index 99% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/MetaFieldsMigration.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts index fb60ab7da28..6d2348a46f0 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/MetaFieldsMigration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts @@ -11,7 +11,7 @@ import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUnti import { DEFAULT_ES_HEALTH_CHECKS_PARAMS, EsHealthChecksParams -} from "~/migrations/5.39.6/001/ddb-es/utils"; +} from "../../utils"; import path from "path"; import os from "os"; import fs from "fs"; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/SegmentProcessor.ts similarity index 100% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/SegmentProcessor.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/SegmentProcessor.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/bin.ts similarity index 100% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/bin.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/bin.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts similarity index 94% rename from packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts rename to packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts index f213caf8f91..42e58559b59 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts @@ -6,14 +6,6 @@ import { createElasticsearchClient } from "@webiny/api-elasticsearch"; import yargs from "yargs/yargs"; import { hideBin } from "yargs/helpers"; import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; -import { hasValidTypeFieldValue } from "~/migrations/5.39.0/001/utils/hasValidTypeFieldValue"; -import { hasAllNonNullableValues } from "~/migrations/5.39.0/001/utils/hasAllNonNullableValues"; -import { getOldestRevisionCreatedOn } from "~/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn"; -import { getFirstLastPublishedOnBy } from "~/migrations/5.39.0/001/utils/getFirstLastPublishedOn"; -import { assignNewMetaFields } from "~/migrations/5.39.0/001/utils/assignNewMetaFields"; -import { fixTypeFieldValue } from "~/migrations/5.39.0/001/utils/fixTypeFieldValue"; -import { getFallbackIdentity } from "~/migrations/5.39.0/001/utils/getFallbackIdentity"; -import { ensureAllNonNullableValues } from "~/migrations/5.39.0/001/utils/ensureAllNonNullableValues"; import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; import { CmsEntry } from "~/migrations/5.39.0/001/types"; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts deleted file mode 100644 index 7d2374cb712..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/createMetaFieldsDataMigrationDeploymentHook.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { CliContext } from "@webiny/cli/types"; -import { getStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import pinoPretty from "pino-pretty"; -import { - MetaFieldsMigrationParams, - MetaFieldsMigration -} from "~/migrations/5.39.6/001/ddb-es/MetaFieldsMigration"; - -interface CoreOutput { - primaryDynamodbTableName: string; - elasticsearchDynamodbTableName: string; - elasticsearchDomainEndpoint: string; -} - -const REQUIRED_AWS_ENV_VARS = [ - "AWS_REGION", - "AWS_ACCESS_KEY_ID", - "AWS_SECRET_ACCESS_KEY", - "AWS_SESSION_TOKEN" -]; - -const ensureAwsEnvVars = () => { - const missingAwsEnvVars = []; - for (const variable of REQUIRED_AWS_ENV_VARS) { - if (!process.env[variable]) { - missingAwsEnvVars.push(variable); - } - } - - if (missingAwsEnvVars.length > 0) { - throw new Error( - `Cannot run 5.39.6 meta fields data migration. Missing required environment variables: ${missingAwsEnvVars.join( - ", " - )}.` - ); - } -}; - -/** - * Creates an after-deployment hook that triggers the meta fields data migration. - * @param params - */ -export const createMetaFieldsDataMigrationDeploymentHook = ( - params: Pick -) => { - return { - type: "hook-after-deploy", - name: "hook-after-deploy-api-run-5-39-6-meta-fields-data-migrations", - async hook({ inputs, env, projectApplication }: Record, context: CliContext) { - // Only run migrations for `api` app - if (projectApplication.id !== "api") { - return; - } - - // No need to run migrations if we're doing a preview. - if (inputs.preview) { - return; - } - - if (process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS !== "true") { - context.info( - `Skipping meta fields data migration. Set %s to %s to enable.`, - "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", - "true" - ); - return; - } - - ensureAwsEnvVars(); - - const coreOutput = getStackOutput({ folder: "apps/core", env }); - - context.info("Executing 5.39.6-001 meta fields data migration..."); - - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const migration = new MetaFieldsMigration({ - ddbTable: coreOutput.primaryDynamodbTableName, - ddbEsTable: coreOutput.elasticsearchDynamodbTableName, - esEndpoint: coreOutput.elasticsearchDomainEndpoint, - ...params, - logger - }); - - await migration.execute(); - } - }; -}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts deleted file mode 100644 index fdf0511cd89..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/index.ts +++ /dev/null @@ -1,461 +0,0 @@ -import { Table } from "@webiny/db-dynamodb/toolbox"; -import { - DataMigration, - DataMigrationContext, - ElasticsearchClientSymbol, - ElasticsearchDynamoTableSymbol, - PrimaryDynamoTableSymbol -} from "@webiny/data-migration"; -import { - batchReadAll, - BatchReadItem, - batchWriteAll, - BatchWriteItem, - ddbScanWithCallback, - disableElasticsearchIndexing, - esGetIndexName, - fetchOriginalElasticsearchSettings, - restoreOriginalElasticsearchSettings -} from "~/utils"; -import { inject, makeInjectable } from "@webiny/ioc"; -import { Client } from "@elastic/elasticsearch"; -import { executeWithRetry } from "@webiny/utils"; -import { - createDdbEntryEntity, - createDdbEsEntryEntity -} from "~/migrations/5.39.0/001/entities/createEntryEntity"; -import { CmsEntry } from "~/migrations/5.39.0/001/types"; -import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; -import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; -import { assignNewMetaFields } from "~/migrations/5.39.0/001/utils/assignNewMetaFields"; -import { fixTypeFieldValue } from "~/migrations/5.39.0/001/utils/fixTypeFieldValue"; -import { getOldestRevisionCreatedOn } from "~/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn"; -import { getFirstLastPublishedOnBy } from "~/migrations/5.39.0/001/utils/getFirstLastPublishedOn"; -import { hasValidTypeFieldValue } from "~/migrations/5.39.0/001/utils/hasValidTypeFieldValue"; -import { hasAllNonNullableValues } from "~/migrations/5.39.0/001/utils/hasAllNonNullableValues"; -import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; -import { getFallbackIdentity } from "~/migrations/5.39.0/001/utils/getFallbackIdentity"; -import { ensureAllNonNullableValues } from "~/migrations/5.39.0/001/utils/ensureAllNonNullableValues"; -import { ScanDbItem } from "@webiny/db-dynamodb"; - -interface LastEvaluatedKey { - PK: string; - SK: string; - GSI1_PK: string; - GSI1_SK: string; -} - -interface IndexSettings { - number_of_replicas: number; - refresh_interval: `${number}s`; -} - -interface CmsEntriesRootFolderDataMigrationCheckpoint { - lastEvaluatedKey?: LastEvaluatedKey | boolean; - indexes: { - [index: string]: IndexSettings | null; - }; -} - -interface DynamoDbElasticsearchRecord { - PK: string; - SK: string; - data: string; -} - -export class CmsEntriesInitNewMetaFields_5_39_6_001 implements DataMigration { - private readonly elasticsearchClient: Client; - private readonly ddbEntryEntity: ReturnType; - private readonly ddbEsEntryEntity: ReturnType; - - public constructor( - table: Table, - esTable: Table, - elasticsearchClient: Client - ) { - this.elasticsearchClient = elasticsearchClient; - this.ddbEntryEntity = createDdbEntryEntity(table); - this.ddbEsEntryEntity = createDdbEsEntryEntity(esTable); - } - - getId() { - return "5.39.6-001"; - } - - getDescription() { - return "Write new revision and entry-level on/by meta fields."; - } - - async shouldExecute({ logger }: DataMigrationContext): Promise { - let shouldExecute = false; - - await ddbScanWithCallback>( - { - entity: this.ddbEntryEntity, - options: { - filters: [ - { - attr: "_et", - eq: "CmsEntries" - } - ], - limit: 100 - } - }, - async result => { - if (result.error) { - logger.error(result.error); - throw new Error(result.error); - } - - for (const item of result.items) { - const isFullyMigrated = - isMigratedEntry(item) && - hasValidTypeFieldValue(item) && - hasAllNonNullableValues(item); - - if (!isFullyMigrated) { - shouldExecute = true; - - // Stop further scanning. - return false; - } - } - - // Continue further scanning. - return true; - } - ); - - if (shouldExecute) { - return true; - } - - logger.info(`CMS entries already upgraded. Skipping...`); - return false; - } - - async execute({ - logger, - ...context - }: DataMigrationContext): Promise { - const migrationStatus = - context.checkpoint || ({} as CmsEntriesRootFolderDataMigrationCheckpoint); - - if (migrationStatus.lastEvaluatedKey === true) { - await restoreOriginalElasticsearchSettings({ - indexSettings: migrationStatus.indexes, - logger, - elasticsearchClient: this.elasticsearchClient - }); - logger.info(`Migration completed, no need to start again.`); - return; - } - - let usingKey = ""; - if (migrationStatus?.lastEvaluatedKey) { - usingKey = JSON.stringify(migrationStatus.lastEvaluatedKey); - } - - logger.trace(`Scanning primary DynamoDB table.`, { - usingKey - }); - - let currentDdbScanIteration = 0; - - await ddbScanWithCallback( - { - entity: this.ddbEntryEntity, - options: { - filters: [ - { - attr: "_et", - eq: "CmsEntries" - } - ], - startKey: migrationStatus.lastEvaluatedKey || undefined, - limit: 100 - } - }, - async result => { - currentDdbScanIteration++; - - logger.trace(`Primary DynamoDB table scan iteration: ${currentDdbScanIteration}.`); - logger.trace(`Analyzing ${result.items.length} record(s)...`); - - const ddbItems: BatchWriteItem[] = []; - const ddbEsItems: BatchWriteItem[] = []; - const ddbEsGetItems: Record = {}; - - const fallbackDateTime = new Date().toISOString(); - - // Update records in primary DynamoDB table. Also do preparations for - // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. - for (const item of result.items) { - const isFullyMigrated = - isMigratedEntry(item) && - hasValidTypeFieldValue(item) && - hasAllNonNullableValues(item); - - if (isFullyMigrated) { - continue; - } - - const index = esGetIndexName({ - tenant: item.tenant, - locale: item.locale, - type: item.modelId, - isHeadlessCmsModel: true - }); - - // Check ES index settings. - if (!migrationStatus.indexes || migrationStatus.indexes[index] === undefined) { - // We need to fetch the index settings first - const settings = await fetchOriginalElasticsearchSettings({ - index, - logger, - elasticsearchClient: this.elasticsearchClient - }); - - // ... add it to the checkpoint... - migrationStatus.indexes = { - ...migrationStatus.indexes, - [index]: settings - }; - // and then set not to index - await disableElasticsearchIndexing({ - elasticsearchClient: this.elasticsearchClient, - index, - logger - }); - } - - // 1. Check if the data migration was ever performed. If not, let's perform it. - if (!isMigratedEntry(item)) { - // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. - const createdOn = await getOldestRevisionCreatedOn({ - entry: item, - entryEntity: this.ddbEntryEntity - }); - - const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ - entry: item, - entryEntity: this.ddbEntryEntity - }); - - assignNewMetaFields(item, { - createdOn, - ...firstLastPublishedOnByFields - }); - } - - // 2. We've noticed some of the records had an invalid `TYPE` field value - // in the database. This step addresses this issue. - if (!hasValidTypeFieldValue(item)) { - // Fixes the value of the `TYPE` field, if it's not valid. - fixTypeFieldValue(item); - } - - // 3. Finally, once both of the steps were performed, ensure that all - // new non-nullable meta fields have a value and nothing is missing. - if (!hasAllNonNullableValues(item)) { - logger.trace( - `Detected an entry with missing values for non-nullable meta fields (${item.modelId}/${item.id}).` - ); - - try { - const fallbackIdentity = await getFallbackIdentity({ - entity: this.ddbEntryEntity, - tenant: item.tenant - }); - - ensureAllNonNullableValues(item, { - dateTime: fallbackDateTime, - identity: fallbackIdentity - }); - - logger.trace( - `Successfully ensured all non-nullable meta fields have values (${item.modelId}/${item.id}). Will be saving into the database soon.` - ); - } catch (e) { - logger.debug( - `Failed to ensure all non-nullable meta fields have values (${item.modelId}/${item.id}): ${e.message}` - ); - } - } - - ddbItems.push(this.ddbEntryEntity.putBatch(item)); - - /** - * Prepare the loading of DynamoDB Elasticsearch part of the records. - */ - if (ddbEsGetItems[`${item.entryId}:L`]) { - continue; - } - - ddbEsGetItems[`${item.entryId}:L`] = this.ddbEsEntryEntity.getBatch({ - PK: item.PK, - SK: "L" - }); - - if (item.status === "published" || !!item.locked) { - ddbEsGetItems[`${item.entryId}:P`] = this.ddbEsEntryEntity.getBatch({ - PK: item.PK, - SK: "P" - }); - } - } - - /** - * Get all the records from DynamoDB Elasticsearch. - */ - const ddbEsRecords = await batchReadAll({ - table: this.ddbEsEntryEntity.table, - items: Object.values(ddbEsGetItems) - }); - - for (const ddbEsRecord of ddbEsRecords) { - const decompressedData = await getDecompressedData(ddbEsRecord.data); - if (!decompressedData) { - logger.trace( - `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` - ); - continue; - } - - // 1. Check if the data migration was ever performed. If not, let's perform it. - if (!isMigratedEntry(decompressedData)) { - // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. - const createdOn = await getOldestRevisionCreatedOn({ - entry: { ...decompressedData, PK: ddbEsRecord.PK }, - entryEntity: this.ddbEntryEntity - }); - - const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ - entry: { ...decompressedData, PK: ddbEsRecord.PK }, - entryEntity: this.ddbEntryEntity - }); - - assignNewMetaFields(decompressedData, { - createdOn, - ...firstLastPublishedOnByFields - }); - } - - // 2. Ensure new non-nullable meta fields have a value and nothing is missing. - if (!hasAllNonNullableValues(decompressedData)) { - logger.trace( - [ - "[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields", - `(${decompressedData.modelId}/${decompressedData.id}).` - ].join(" ") - ); - - try { - const fallbackIdentity = await getFallbackIdentity({ - entity: this.ddbEntryEntity, - tenant: decompressedData.tenant - }); - - ensureAllNonNullableValues(decompressedData, { - dateTime: fallbackDateTime, - identity: fallbackIdentity - }); - - logger.trace( - [ - "[DDB-ES Table] Successfully ensured all non-nullable meta fields", - `have values (${decompressedData.modelId}/${decompressedData.id}).`, - "Will be saving the changes soon." - ].join(" ") - ); - } catch (e) { - logger.debug( - [ - "[DDB-ES Table] Failed to ensure all non-nullable meta fields have values", - `(${decompressedData.modelId}/${decompressedData.id}): ${e.message}` - ].join(" ") - ); - } - } - - const compressedData = await getCompressedData(decompressedData); - - ddbEsItems.push( - this.ddbEsEntryEntity.putBatch({ - ...ddbEsRecord, - data: compressedData - }) - ); - } - - // Store data in primary DynamoDB table. - const execute = () => { - return batchWriteAll({ - table: this.ddbEntryEntity.table, - items: ddbItems - }); - }; - - logger.trace("Storing records in primary DynamoDB table..."); - await executeWithRetry(execute, { - onFailedAttempt: error => { - logger.error( - `"batchWriteAll" attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - logger.trace("...stored."); - - // Store data in DDB-ES DynamoDB table. - const executeDdbEs = () => { - return batchWriteAll({ - table: this.ddbEsEntryEntity.table, - items: ddbEsItems - }); - }; - - logger.trace("Storing records in DDB-ES DynamoDB table..."); - await executeWithRetry(executeDdbEs, { - onFailedAttempt: error => { - logger.error( - `"batchWriteAll ddb-es" attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - logger.trace("...stored."); - - // Update checkpoint after every batch. - migrationStatus.lastEvaluatedKey = result.lastEvaluatedKey?.PK - ? (result.lastEvaluatedKey as unknown as LastEvaluatedKey) - : true; - - // Check if we should store checkpoint and exit. - if (context.runningOutOfTime()) { - await context.createCheckpointAndExit(migrationStatus); - } else { - await context.createCheckpoint(migrationStatus); - } - } - ); - - /** - * This is the end of the migration. - */ - await restoreOriginalElasticsearchSettings({ - indexSettings: migrationStatus.indexes, - logger, - elasticsearchClient: this.elasticsearchClient - }); - - migrationStatus.lastEvaluatedKey = true; - migrationStatus.indexes = {}; - context.createCheckpoint(migrationStatus); - } -} - -makeInjectable(CmsEntriesInitNewMetaFields_5_39_6_001, [ - inject(PrimaryDynamoTableSymbol), - inject(ElasticsearchDynamoTableSymbol), - inject(ElasticsearchClientSymbol) -]); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts deleted file mode 100644 index 20ac331144c..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils/revertMetaFieldsMigration/utils.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { - ElasticsearchCatClusterHealthStatus, - IWaitUntilHealthyParams -} from "@webiny/api-elasticsearch"; - -export type EsHealthChecksParams = Required; - -export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { - minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, - maxProcessorPercent: 90, - maxRamPercent: 100, - maxWaitingTime: 90, - waitingTimeStep: 2 -}; diff --git a/yarn.lock b/yarn.lock index deed512598b..9d1f6b8904d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -312,7 +312,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudfront@npm:^3.425.0": +"@aws-sdk/client-cloudfront@npm:3.425.0, @aws-sdk/client-cloudfront@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cloudfront@npm:3.425.0" dependencies: @@ -361,7 +361,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudwatch-events@npm:^3.425.0": +"@aws-sdk/client-cloudwatch-events@npm:3.425.0, @aws-sdk/client-cloudwatch-events@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cloudwatch-events@npm:3.425.0" dependencies: @@ -406,46 +406,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudwatch-logs@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/client-cloudwatch-logs@npm:3.6.1" - dependencies: - "@aws-crypto/sha256-browser": ^1.0.0 - "@aws-crypto/sha256-js": ^1.0.0 - "@aws-sdk/config-resolver": 3.6.1 - "@aws-sdk/credential-provider-node": 3.6.1 - "@aws-sdk/fetch-http-handler": 3.6.1 - "@aws-sdk/hash-node": 3.6.1 - "@aws-sdk/invalid-dependency": 3.6.1 - "@aws-sdk/middleware-content-length": 3.6.1 - "@aws-sdk/middleware-host-header": 3.6.1 - "@aws-sdk/middleware-logger": 3.6.1 - "@aws-sdk/middleware-retry": 3.6.1 - "@aws-sdk/middleware-serde": 3.6.1 - "@aws-sdk/middleware-signing": 3.6.1 - "@aws-sdk/middleware-stack": 3.6.1 - "@aws-sdk/middleware-user-agent": 3.6.1 - "@aws-sdk/node-config-provider": 3.6.1 - "@aws-sdk/node-http-handler": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/url-parser": 3.6.1 - "@aws-sdk/url-parser-native": 3.6.1 - "@aws-sdk/util-base64-browser": 3.6.1 - "@aws-sdk/util-base64-node": 3.6.1 - "@aws-sdk/util-body-length-browser": 3.6.1 - "@aws-sdk/util-body-length-node": 3.6.1 - "@aws-sdk/util-user-agent-browser": 3.6.1 - "@aws-sdk/util-user-agent-node": 3.6.1 - "@aws-sdk/util-utf8-browser": 3.6.1 - "@aws-sdk/util-utf8-node": 3.6.1 - tslib: ^2.0.0 - checksum: 4edd11616499254395494e5b3c8fc779e1f36f76f57e0f6eb6b4c453ebedb87f6308bf3f5f30e462816158f1d6f3f10bfa9465311f79cd1ee98bd2693332591c - languageName: node - linkType: hard - -"@aws-sdk/client-cloudwatch-logs@npm:^3.425.0": +"@aws-sdk/client-cloudwatch-logs@npm:3.425.0, @aws-sdk/client-cloudwatch-logs@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cloudwatch-logs@npm:3.425.0" dependencies: @@ -491,7 +452,46 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cognito-identity-provider@npm:^3.425.0": +"@aws-sdk/client-cloudwatch-logs@npm:3.6.1": + version: 3.6.1 + resolution: "@aws-sdk/client-cloudwatch-logs@npm:3.6.1" + dependencies: + "@aws-crypto/sha256-browser": ^1.0.0 + "@aws-crypto/sha256-js": ^1.0.0 + "@aws-sdk/config-resolver": 3.6.1 + "@aws-sdk/credential-provider-node": 3.6.1 + "@aws-sdk/fetch-http-handler": 3.6.1 + "@aws-sdk/hash-node": 3.6.1 + "@aws-sdk/invalid-dependency": 3.6.1 + "@aws-sdk/middleware-content-length": 3.6.1 + "@aws-sdk/middleware-host-header": 3.6.1 + "@aws-sdk/middleware-logger": 3.6.1 + "@aws-sdk/middleware-retry": 3.6.1 + "@aws-sdk/middleware-serde": 3.6.1 + "@aws-sdk/middleware-signing": 3.6.1 + "@aws-sdk/middleware-stack": 3.6.1 + "@aws-sdk/middleware-user-agent": 3.6.1 + "@aws-sdk/node-config-provider": 3.6.1 + "@aws-sdk/node-http-handler": 3.6.1 + "@aws-sdk/protocol-http": 3.6.1 + "@aws-sdk/smithy-client": 3.6.1 + "@aws-sdk/types": 3.6.1 + "@aws-sdk/url-parser": 3.6.1 + "@aws-sdk/url-parser-native": 3.6.1 + "@aws-sdk/util-base64-browser": 3.6.1 + "@aws-sdk/util-base64-node": 3.6.1 + "@aws-sdk/util-body-length-browser": 3.6.1 + "@aws-sdk/util-body-length-node": 3.6.1 + "@aws-sdk/util-user-agent-browser": 3.6.1 + "@aws-sdk/util-user-agent-node": 3.6.1 + "@aws-sdk/util-utf8-browser": 3.6.1 + "@aws-sdk/util-utf8-node": 3.6.1 + tslib: ^2.0.0 + checksum: 4edd11616499254395494e5b3c8fc779e1f36f76f57e0f6eb6b4c453ebedb87f6308bf3f5f30e462816158f1d6f3f10bfa9465311f79cd1ee98bd2693332591c + languageName: node + linkType: hard + +"@aws-sdk/client-cognito-identity-provider@npm:3.425.0, @aws-sdk/client-cognito-identity-provider@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cognito-identity-provider@npm:3.425.0" dependencies: @@ -620,7 +620,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-dynamodb-streams@npm:^3.425.0": +"@aws-sdk/client-dynamodb-streams@npm:3.425.0, @aws-sdk/client-dynamodb-streams@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-dynamodb-streams@npm:3.425.0" dependencies: @@ -665,7 +665,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-dynamodb@npm:^3.425.0": +"@aws-sdk/client-dynamodb@npm:3.425.0, @aws-sdk/client-dynamodb@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-dynamodb@npm:3.425.0" dependencies: @@ -713,7 +713,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-eventbridge@npm:^3.425.0": +"@aws-sdk/client-eventbridge@npm:3.425.0, @aws-sdk/client-eventbridge@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-eventbridge@npm:3.425.0" dependencies: @@ -759,7 +759,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-iam@npm:^3.425.0": +"@aws-sdk/client-iam@npm:3.425.0, @aws-sdk/client-iam@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-iam@npm:3.425.0" dependencies: @@ -806,7 +806,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-lambda@npm:^3.425.0": +"@aws-sdk/client-lambda@npm:3.425.0, @aws-sdk/client-lambda@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-lambda@npm:3.425.0" dependencies: @@ -919,7 +919,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-sfn@npm:^3.425.0": +"@aws-sdk/client-sfn@npm:3.484.0, @aws-sdk/client-sfn@npm:^3.425.0": version: 3.484.0 resolution: "@aws-sdk/client-sfn@npm:3.484.0" dependencies: @@ -968,7 +968,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-sqs@npm:^3.425.0": +"@aws-sdk/client-sqs@npm:3.425.0, @aws-sdk/client-sqs@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-sqs@npm:3.425.0" dependencies: @@ -1503,7 +1503,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-providers@npm:^3.425.0": +"@aws-sdk/credential-providers@npm:3.425.0, @aws-sdk/credential-providers@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/credential-providers@npm:3.425.0" dependencies: @@ -1580,7 +1580,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/lib-dynamodb@npm:^3.425.0": +"@aws-sdk/lib-dynamodb@npm:3.425.0, @aws-sdk/lib-dynamodb@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/lib-dynamodb@npm:3.425.0" dependencies: @@ -1592,7 +1592,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/lib-storage@npm:^3.425.0": +"@aws-sdk/lib-storage@npm:3.451.0, @aws-sdk/lib-storage@npm:^3.425.0": version: 3.451.0 resolution: "@aws-sdk/lib-storage@npm:3.451.0" dependencies: @@ -2033,7 +2033,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/s3-presigned-post@npm:^3.425.0": +"@aws-sdk/s3-presigned-post@npm:3.425.0, @aws-sdk/s3-presigned-post@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/s3-presigned-post@npm:3.425.0" dependencies: @@ -2050,7 +2050,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/s3-request-presigner@npm:^3.425.0": +"@aws-sdk/s3-request-presigner@npm:3.425.0, @aws-sdk/s3-request-presigner@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/s3-request-presigner@npm:3.425.0" dependencies: @@ -2521,15 +2521,15 @@ __metadata: languageName: node linkType: hard -"@babel/cli@npm:^7.19.3": - version: 7.23.0 - resolution: "@babel/cli@npm:7.23.0" +"@babel/cli@npm:7.22.6, @babel/cli@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/cli@npm:7.22.6" dependencies: "@jridgewell/trace-mapping": ^0.3.17 "@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3 chokidar: ^3.4.0 commander: ^4.0.1 - convert-source-map: ^2.0.0 + convert-source-map: ^1.1.0 fs-readdir-recursive: ^1.1.0 glob: ^7.2.0 make-dir: ^2.1.0 @@ -2544,19 +2544,19 @@ __metadata: bin: babel: ./bin/babel.js babel-external-helpers: ./bin/babel-external-helpers.js - checksum: beeb189560bf9c4ea951ef637eefa5214654678fb09c4aaa6695921037059c1e1553c610fe95fbd19a9cdfd9f5598a812fc13df40a6b9a9ea899e43fc6c42052 + checksum: c2a6b7d68226f1601446a0e452fcbec9df40c5aabb991f427ad1e2d0eb75f123f530c1319b55b040d32b3593e003fced99e073ed556435e301d97a10965ac947 languageName: node linkType: hard -"@babel/cli@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/cli@npm:7.22.6" +"@babel/cli@npm:^7.19.3": + version: 7.23.0 + resolution: "@babel/cli@npm:7.23.0" dependencies: "@jridgewell/trace-mapping": ^0.3.17 "@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3 chokidar: ^3.4.0 commander: ^4.0.1 - convert-source-map: ^1.1.0 + convert-source-map: ^2.0.0 fs-readdir-recursive: ^1.1.0 glob: ^7.2.0 make-dir: ^2.1.0 @@ -2571,7 +2571,7 @@ __metadata: bin: babel: ./bin/babel.js babel-external-helpers: ./bin/babel-external-helpers.js - checksum: c2a6b7d68226f1601446a0e452fcbec9df40c5aabb991f427ad1e2d0eb75f123f530c1319b55b040d32b3593e003fced99e073ed556435e301d97a10965ac947 + checksum: beeb189560bf9c4ea951ef637eefa5214654678fb09c4aaa6695921037059c1e1553c610fe95fbd19a9cdfd9f5598a812fc13df40a6b9a9ea899e43fc6c42052 languageName: node linkType: hard @@ -2649,6 +2649,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:7.22.8, @babel/core@npm:^7.22.8": + version: 7.22.8 + resolution: "@babel/core@npm:7.22.8" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.22.5 + "@babel/generator": ^7.22.7 + "@babel/helper-compilation-targets": ^7.22.6 + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helpers": ^7.22.6 + "@babel/parser": ^7.22.7 + "@babel/template": ^7.22.5 + "@babel/traverse": ^7.22.8 + "@babel/types": ^7.22.5 + "@nicolo-ribaudo/semver-v6": ^6.3.3 + convert-source-map: ^1.7.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.2 + checksum: 75ed701c14ad17070382ae1dd166f7534b31f2c71e00995a5f261ee2398ee96335b0736573b8ff24ab6e3e6f5814ee2a48fa11ab90fabcd3dfc70ea87c5f30a6 + languageName: node + linkType: hard + "@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.7.5": version: 7.20.12 resolution: "@babel/core@npm:7.20.12" @@ -2718,29 +2741,6 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.22.8": - version: 7.22.8 - resolution: "@babel/core@npm:7.22.8" - dependencies: - "@ampproject/remapping": ^2.2.0 - "@babel/code-frame": ^7.22.5 - "@babel/generator": ^7.22.7 - "@babel/helper-compilation-targets": ^7.22.6 - "@babel/helper-module-transforms": ^7.22.5 - "@babel/helpers": ^7.22.6 - "@babel/parser": ^7.22.7 - "@babel/template": ^7.22.5 - "@babel/traverse": ^7.22.8 - "@babel/types": ^7.22.5 - "@nicolo-ribaudo/semver-v6": ^6.3.3 - convert-source-map: ^1.7.0 - debug: ^4.1.0 - gensync: ^1.0.0-beta.2 - json5: ^2.2.2 - checksum: 75ed701c14ad17070382ae1dd166f7534b31f2c71e00995a5f261ee2398ee96335b0736573b8ff24ab6e3e6f5814ee2a48fa11ab90fabcd3dfc70ea87c5f30a6 - languageName: node - linkType: hard - "@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.20.7, @babel/generator@npm:^7.7.2": version: 7.20.14 resolution: "@babel/generator@npm:7.20.14" @@ -3608,7 +3608,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.18.6, @babel/plugin-proposal-class-properties@npm:^7.7.0": +"@babel/plugin-proposal-class-properties@npm:7.18.6, @babel/plugin-proposal-class-properties@npm:^7.18.6, @babel/plugin-proposal-class-properties@npm:^7.7.0": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -4025,7 +4025,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": +"@babel/plugin-syntax-object-rest-spread@npm:7.8.3, @babel/plugin-syntax-object-rest-spread@npm:^7.8.3": version: 7.8.3 resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" dependencies: @@ -5269,92 +5269,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.19.4, @babel/preset-env@npm:^7.4.5": - version: 7.20.2 - resolution: "@babel/preset-env@npm:7.20.2" - dependencies: - "@babel/compat-data": ^7.20.1 - "@babel/helper-compilation-targets": ^7.20.0 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-validator-option": ^7.18.6 - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.18.6 - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.18.9 - "@babel/plugin-proposal-async-generator-functions": ^7.20.1 - "@babel/plugin-proposal-class-properties": ^7.18.6 - "@babel/plugin-proposal-class-static-block": ^7.18.6 - "@babel/plugin-proposal-dynamic-import": ^7.18.6 - "@babel/plugin-proposal-export-namespace-from": ^7.18.9 - "@babel/plugin-proposal-json-strings": ^7.18.6 - "@babel/plugin-proposal-logical-assignment-operators": ^7.18.9 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 - "@babel/plugin-proposal-numeric-separator": ^7.18.6 - "@babel/plugin-proposal-object-rest-spread": ^7.20.2 - "@babel/plugin-proposal-optional-catch-binding": ^7.18.6 - "@babel/plugin-proposal-optional-chaining": ^7.18.9 - "@babel/plugin-proposal-private-methods": ^7.18.6 - "@babel/plugin-proposal-private-property-in-object": ^7.18.6 - "@babel/plugin-proposal-unicode-property-regex": ^7.18.6 - "@babel/plugin-syntax-async-generators": ^7.8.4 - "@babel/plugin-syntax-class-properties": ^7.12.13 - "@babel/plugin-syntax-class-static-block": ^7.14.5 - "@babel/plugin-syntax-dynamic-import": ^7.8.3 - "@babel/plugin-syntax-export-namespace-from": ^7.8.3 - "@babel/plugin-syntax-import-assertions": ^7.20.0 - "@babel/plugin-syntax-json-strings": ^7.8.3 - "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 - "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 - "@babel/plugin-syntax-numeric-separator": ^7.10.4 - "@babel/plugin-syntax-object-rest-spread": ^7.8.3 - "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 - "@babel/plugin-syntax-optional-chaining": ^7.8.3 - "@babel/plugin-syntax-private-property-in-object": ^7.14.5 - "@babel/plugin-syntax-top-level-await": ^7.14.5 - "@babel/plugin-transform-arrow-functions": ^7.18.6 - "@babel/plugin-transform-async-to-generator": ^7.18.6 - "@babel/plugin-transform-block-scoped-functions": ^7.18.6 - "@babel/plugin-transform-block-scoping": ^7.20.2 - "@babel/plugin-transform-classes": ^7.20.2 - "@babel/plugin-transform-computed-properties": ^7.18.9 - "@babel/plugin-transform-destructuring": ^7.20.2 - "@babel/plugin-transform-dotall-regex": ^7.18.6 - "@babel/plugin-transform-duplicate-keys": ^7.18.9 - "@babel/plugin-transform-exponentiation-operator": ^7.18.6 - "@babel/plugin-transform-for-of": ^7.18.8 - "@babel/plugin-transform-function-name": ^7.18.9 - "@babel/plugin-transform-literals": ^7.18.9 - "@babel/plugin-transform-member-expression-literals": ^7.18.6 - "@babel/plugin-transform-modules-amd": ^7.19.6 - "@babel/plugin-transform-modules-commonjs": ^7.19.6 - "@babel/plugin-transform-modules-systemjs": ^7.19.6 - "@babel/plugin-transform-modules-umd": ^7.18.6 - "@babel/plugin-transform-named-capturing-groups-regex": ^7.19.1 - "@babel/plugin-transform-new-target": ^7.18.6 - "@babel/plugin-transform-object-super": ^7.18.6 - "@babel/plugin-transform-parameters": ^7.20.1 - "@babel/plugin-transform-property-literals": ^7.18.6 - "@babel/plugin-transform-regenerator": ^7.18.6 - "@babel/plugin-transform-reserved-words": ^7.18.6 - "@babel/plugin-transform-shorthand-properties": ^7.18.6 - "@babel/plugin-transform-spread": ^7.19.0 - "@babel/plugin-transform-sticky-regex": ^7.18.6 - "@babel/plugin-transform-template-literals": ^7.18.9 - "@babel/plugin-transform-typeof-symbol": ^7.18.9 - "@babel/plugin-transform-unicode-escapes": ^7.18.10 - "@babel/plugin-transform-unicode-regex": ^7.18.6 - "@babel/preset-modules": ^0.1.5 - "@babel/types": ^7.20.2 - babel-plugin-polyfill-corejs2: ^0.3.3 - babel-plugin-polyfill-corejs3: ^0.6.0 - babel-plugin-polyfill-regenerator: ^0.4.1 - core-js-compat: ^3.25.1 - semver: ^6.3.0 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: ece2d7e9c7789db6116e962b8e1a55eb55c110c44c217f0c8f6ffea4ca234954e66557f7bd019b7affadf7fbb3a53ccc807e93fc935aacd48146234b73b6947e - languageName: node - linkType: hard - -"@babel/preset-env@npm:^7.22.7": +"@babel/preset-env@npm:7.22.7, @babel/preset-env@npm:^7.22.7": version: 7.22.7 resolution: "@babel/preset-env@npm:7.22.7" dependencies: @@ -5444,6 +5359,91 @@ __metadata: languageName: node linkType: hard +"@babel/preset-env@npm:^7.19.4, @babel/preset-env@npm:^7.4.5": + version: 7.20.2 + resolution: "@babel/preset-env@npm:7.20.2" + dependencies: + "@babel/compat-data": ^7.20.1 + "@babel/helper-compilation-targets": ^7.20.0 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-validator-option": ^7.18.6 + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.18.6 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.18.9 + "@babel/plugin-proposal-async-generator-functions": ^7.20.1 + "@babel/plugin-proposal-class-properties": ^7.18.6 + "@babel/plugin-proposal-class-static-block": ^7.18.6 + "@babel/plugin-proposal-dynamic-import": ^7.18.6 + "@babel/plugin-proposal-export-namespace-from": ^7.18.9 + "@babel/plugin-proposal-json-strings": ^7.18.6 + "@babel/plugin-proposal-logical-assignment-operators": ^7.18.9 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 + "@babel/plugin-proposal-numeric-separator": ^7.18.6 + "@babel/plugin-proposal-object-rest-spread": ^7.20.2 + "@babel/plugin-proposal-optional-catch-binding": ^7.18.6 + "@babel/plugin-proposal-optional-chaining": ^7.18.9 + "@babel/plugin-proposal-private-methods": ^7.18.6 + "@babel/plugin-proposal-private-property-in-object": ^7.18.6 + "@babel/plugin-proposal-unicode-property-regex": ^7.18.6 + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-class-properties": ^7.12.13 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + "@babel/plugin-syntax-import-assertions": ^7.20.0 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + "@babel/plugin-syntax-top-level-await": ^7.14.5 + "@babel/plugin-transform-arrow-functions": ^7.18.6 + "@babel/plugin-transform-async-to-generator": ^7.18.6 + "@babel/plugin-transform-block-scoped-functions": ^7.18.6 + "@babel/plugin-transform-block-scoping": ^7.20.2 + "@babel/plugin-transform-classes": ^7.20.2 + "@babel/plugin-transform-computed-properties": ^7.18.9 + "@babel/plugin-transform-destructuring": ^7.20.2 + "@babel/plugin-transform-dotall-regex": ^7.18.6 + "@babel/plugin-transform-duplicate-keys": ^7.18.9 + "@babel/plugin-transform-exponentiation-operator": ^7.18.6 + "@babel/plugin-transform-for-of": ^7.18.8 + "@babel/plugin-transform-function-name": ^7.18.9 + "@babel/plugin-transform-literals": ^7.18.9 + "@babel/plugin-transform-member-expression-literals": ^7.18.6 + "@babel/plugin-transform-modules-amd": ^7.19.6 + "@babel/plugin-transform-modules-commonjs": ^7.19.6 + "@babel/plugin-transform-modules-systemjs": ^7.19.6 + "@babel/plugin-transform-modules-umd": ^7.18.6 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.19.1 + "@babel/plugin-transform-new-target": ^7.18.6 + "@babel/plugin-transform-object-super": ^7.18.6 + "@babel/plugin-transform-parameters": ^7.20.1 + "@babel/plugin-transform-property-literals": ^7.18.6 + "@babel/plugin-transform-regenerator": ^7.18.6 + "@babel/plugin-transform-reserved-words": ^7.18.6 + "@babel/plugin-transform-shorthand-properties": ^7.18.6 + "@babel/plugin-transform-spread": ^7.19.0 + "@babel/plugin-transform-sticky-regex": ^7.18.6 + "@babel/plugin-transform-template-literals": ^7.18.9 + "@babel/plugin-transform-typeof-symbol": ^7.18.9 + "@babel/plugin-transform-unicode-escapes": ^7.18.10 + "@babel/plugin-transform-unicode-regex": ^7.18.6 + "@babel/preset-modules": ^0.1.5 + "@babel/types": ^7.20.2 + babel-plugin-polyfill-corejs2: ^0.3.3 + babel-plugin-polyfill-corejs3: ^0.6.0 + babel-plugin-polyfill-regenerator: ^0.4.1 + core-js-compat: ^3.25.1 + semver: ^6.3.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ece2d7e9c7789db6116e962b8e1a55eb55c110c44c217f0c8f6ffea4ca234954e66557f7bd019b7affadf7fbb3a53ccc807e93fc935aacd48146234b73b6947e + languageName: node + linkType: hard + "@babel/preset-flow@npm:^7.0.0": version: 7.18.6 resolution: "@babel/preset-flow@npm:7.18.6" @@ -5472,23 +5472,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:^7.0.0, @babel/preset-react@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/preset-react@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/helper-validator-option": ^7.18.6 - "@babel/plugin-transform-react-display-name": ^7.18.6 - "@babel/plugin-transform-react-jsx": ^7.18.6 - "@babel/plugin-transform-react-jsx-development": ^7.18.6 - "@babel/plugin-transform-react-pure-annotations": ^7.18.6 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 540d9cf0a0cc0bb07e6879994e6fb7152f87dafbac880b56b65e2f528134c7ba33e0cd140b58700c77b2ebf4c81fa6468fed0ba391462d75efc7f8c1699bb4c3 - languageName: node - linkType: hard - -"@babel/preset-react@npm:^7.22.5": +"@babel/preset-react@npm:7.22.5, @babel/preset-react@npm:^7.22.5": version: 7.22.5 resolution: "@babel/preset-react@npm:7.22.5" dependencies: @@ -5504,20 +5488,23 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.18.6": +"@babel/preset-react@npm:^7.0.0, @babel/preset-react@npm:^7.18.6": version: 7.18.6 - resolution: "@babel/preset-typescript@npm:7.18.6" + resolution: "@babel/preset-react@npm:7.18.6" dependencies: "@babel/helper-plugin-utils": ^7.18.6 "@babel/helper-validator-option": ^7.18.6 - "@babel/plugin-transform-typescript": ^7.18.6 + "@babel/plugin-transform-react-display-name": ^7.18.6 + "@babel/plugin-transform-react-jsx": ^7.18.6 + "@babel/plugin-transform-react-jsx-development": ^7.18.6 + "@babel/plugin-transform-react-pure-annotations": ^7.18.6 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 7fe0da5103eb72d3cf39cf3e138a794c8cdd19c0b38e3e101507eef519c46a87a0d6d0e8bc9e28a13ea2364001ebe7430b9d75758aab4c3c3a8db9a487b9dc7c + checksum: 540d9cf0a0cc0bb07e6879994e6fb7152f87dafbac880b56b65e2f528134c7ba33e0cd140b58700c77b2ebf4c81fa6468fed0ba391462d75efc7f8c1699bb4c3 languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.22.5": +"@babel/preset-typescript@npm:7.22.5, @babel/preset-typescript@npm:^7.22.5": version: 7.22.5 resolution: "@babel/preset-typescript@npm:7.22.5" dependencies: @@ -5532,6 +5519,19 @@ __metadata: languageName: node linkType: hard +"@babel/preset-typescript@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/preset-typescript@npm:7.18.6" + dependencies: + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-validator-option": ^7.18.6 + "@babel/plugin-transform-typescript": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7fe0da5103eb72d3cf39cf3e138a794c8cdd19c0b38e3e101507eef519c46a87a0d6d0e8bc9e28a13ea2364001ebe7430b9d75758aab4c3c3a8db9a487b9dc7c + languageName: node + linkType: hard + "@babel/register@npm:^7.16.0": version: 7.18.9 resolution: "@babel/register@npm:7.18.9" @@ -5564,6 +5564,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:7.22.6, @babel/runtime@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/runtime@npm:7.22.6" + dependencies: + regenerator-runtime: ^0.13.11 + checksum: e585338287c4514a713babf4fdb8fc2a67adcebab3e7723a739fc62c79cfda875b314c90fd25f827afb150d781af97bc16c85bfdbfa2889f06053879a1ddb597 + languageName: node + linkType: hard + "@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.2.0, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.4.5, @babel/runtime@npm:^7.5.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.20.13 resolution: "@babel/runtime@npm:7.20.13" @@ -5600,15 +5609,6 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/runtime@npm:7.22.6" - dependencies: - regenerator-runtime: ^0.13.11 - checksum: e585338287c4514a713babf4fdb8fc2a67adcebab3e7723a739fc62c79cfda875b314c90fd25f827afb150d781af97bc16c85bfdbfa2889f06053879a1ddb597 - languageName: node - linkType: hard - "@babel/standalone@npm:^7.4.5": version: 7.20.15 resolution: "@babel/standalone@npm:7.20.15" @@ -6095,69 +6095,6 @@ __metadata: languageName: node linkType: hard -"@dprint/darwin-arm64@npm:0.45.1": - version: 0.45.1 - resolution: "@dprint/darwin-arm64@npm:0.45.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@dprint/darwin-x64@npm:0.45.1": - version: 0.45.1 - resolution: "@dprint/darwin-x64@npm:0.45.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@dprint/formatter@npm:^0.3.0": - version: 0.3.0 - resolution: "@dprint/formatter@npm:0.3.0" - checksum: 3ff486cb2395941680a84b11a5bf2c69ee10246904b1b394daa4a3ab5ced5676d0707797c3951f5d74aa0ebaf7e93219cfd2bdad448e95d9ca6d62a5a67e5c1c - languageName: node - linkType: hard - -"@dprint/linux-arm64-glibc@npm:0.45.1": - version: 0.45.1 - resolution: "@dprint/linux-arm64-glibc@npm:0.45.1" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@dprint/linux-arm64-musl@npm:0.45.1": - version: 0.45.1 - resolution: "@dprint/linux-arm64-musl@npm:0.45.1" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@dprint/linux-x64-glibc@npm:0.45.1": - version: 0.45.1 - resolution: "@dprint/linux-x64-glibc@npm:0.45.1" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@dprint/linux-x64-musl@npm:0.45.1": - version: 0.45.1 - resolution: "@dprint/linux-x64-musl@npm:0.45.1" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@dprint/typescript@npm:^0.90.4": - version: 0.90.5 - resolution: "@dprint/typescript@npm:0.90.5" - checksum: df8cc94b4afb1727be6b474344df068f4a77e2f3fa73933ae55343838085108e3582194ef01368c95e0ee817682c320e316c9941c69bd2891a51beb6383989a5 - languageName: node - linkType: hard - -"@dprint/win32-x64@npm:0.45.1": - version: 0.45.1 - resolution: "@dprint/win32-x64@npm:0.45.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@editorjs/delimiter@npm:^1.2.0": version: 1.3.0 resolution: "@editorjs/delimiter@npm:1.3.0" @@ -6857,7 +6794,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/schema@npm:^7.0.0, @graphql-tools/schema@npm:^7.1.2": +"@graphql-tools/schema@npm:7.1.5, @graphql-tools/schema@npm:^7.0.0, @graphql-tools/schema@npm:^7.1.2": version: 7.1.5 resolution: "@graphql-tools/schema@npm:7.1.5" dependencies: @@ -6883,16 +6820,7 @@ __metadata: languageName: node linkType: hard -"@graphql-typed-document-node/core@npm:^3.2.0": - version: 3.2.0 - resolution: "@graphql-typed-document-node/core@npm:3.2.0" - peerDependencies: - graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: fa44443accd28c8cf4cb96aaaf39d144a22e8b091b13366843f4e97d19c7bfeaf609ce3c7603a4aeffe385081eaf8ea245d078633a7324c11c5ec4b2011bb76d - languageName: node - linkType: hard - -"@grpc/grpc-js@npm:^1.10.1": +"@grpc/grpc-js@npm:^1.10.1, @grpc/grpc-js@npm:^1.2.7": version: 1.10.8 resolution: "@grpc/grpc-js@npm:1.10.8" dependencies: @@ -8255,7 +8183,7 @@ __metadata: languageName: node linkType: hard -"@lexical/headless@npm:^0.12.2": +"@lexical/headless@npm:0.12.2, @lexical/headless@npm:^0.12.2": version: 0.12.2 resolution: "@lexical/headless@npm:0.12.2" peerDependencies: @@ -8365,7 +8293,7 @@ __metadata: languageName: node linkType: hard -"@lexical/react@npm:^0.12.2": +"@lexical/react@npm:0.12.2, @lexical/react@npm:^0.12.2": version: 0.12.2 resolution: "@lexical/react@npm:0.12.2" dependencies: @@ -9139,34 +9067,6 @@ __metadata: languageName: node linkType: hard -"@molt/command@npm:^0.9.0": - version: 0.9.0 - resolution: "@molt/command@npm:0.9.0" - dependencies: - "@molt/types": 0.2.0 - alge: 0.8.1 - chalk: ^5.3.0 - lodash.camelcase: ^4.3.0 - lodash.snakecase: ^4.1.1 - readline-sync: ^1.4.10 - string-length: ^6.0.0 - strip-ansi: ^7.1.0 - ts-toolbelt: ^9.6.0 - type-fest: ^4.3.1 - zod: ^3.22.2 - checksum: 6c81814eb7da2dbac100884d103e345d563613f9f3d7d285024ad20d7f3a3438b84ad1491cd4a5773217d688e6c34b31481fe609e9399aaaa0a45f7c7d68f5c1 - languageName: node - linkType: hard - -"@molt/types@npm:0.2.0": - version: 0.2.0 - resolution: "@molt/types@npm:0.2.0" - dependencies: - ts-toolbelt: ^9.6.0 - checksum: 64bbf80b34bdf33413e594bdc6ab72bf517e8a828eada052240aefecc17e14f7c71fe2c5c7b70ecad09d075920d82b7e822013ca915f8d5104ba382b80acd1e1 - languageName: node - linkType: hard - "@mrmlnc/readdir-enhanced@npm:^2.2.1": version: 2.2.1 resolution: "@mrmlnc/readdir-enhanced@npm:2.2.1" @@ -10324,7 +10224,7 @@ __metadata: languageName: node linkType: hard -"@pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": +"@pmmmwh/react-refresh-webpack-plugin@npm:0.5.10, @pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": version: 0.5.10 resolution: "@pmmmwh/react-refresh-webpack-plugin@npm:0.5.10" dependencies: @@ -10436,21 +10336,47 @@ __metadata: languageName: node linkType: hard -"@pulumi/aws@npm:6.32.0": - version: 6.32.0 - resolution: "@pulumi/aws@npm:6.32.0" +"@pulumi/aws@npm:^5.42.0": + version: 5.43.0 + resolution: "@pulumi/aws@npm:5.43.0" dependencies: "@pulumi/pulumi": ^3.0.0 + aws-sdk: ^2.0.0 builtin-modules: 3.0.0 mime: ^2.0.0 + read-package-tree: ^5.2.1 resolve: ^1.7.1 - checksum: fc5008d5367b051aa0477e86d88ec74074b4f78e277042bc31a595859736d542120aad874c6c6844f5151f4f02dbea6f461cbcfd961d73d3997321958a2cb404 + checksum: 638bb25e32677590ef80a7340be55f6c20941c9f28595e6f3d325f52dd476731fa721592f9732bf67b1565665508871f3f7bf58626b85188aa93fe1a59a94981 + languageName: node + linkType: hard + +"@pulumi/pulumi@npm:^2.15.0": + version: 2.25.2 + resolution: "@pulumi/pulumi@npm:2.25.2" + dependencies: + "@grpc/grpc-js": ^1.2.7 + "@logdna/tail-file": ^2.0.6 + "@pulumi/query": ^0.3.0 + google-protobuf: ^3.5.0 + js-yaml: ^3.14.0 + minimist: ^1.2.0 + normalize-package-data: ^2.4.0 + protobufjs: ^6.8.6 + read-package-tree: ^5.3.1 + require-from-string: ^2.0.1 + semver: ^6.1.0 + source-map-support: ^0.4.16 + split2: ^3.2.2 + ts-node: ^7.0.1 + typescript: ~3.7.3 + upath: ^1.1.0 + checksum: 3780e44740815a68f8ecc6221dd931f065107f15036d5405130ab8e86151089b2a24e2dbfbb9ec3eb41704a95258f4f273c0f3d089cedb2d32160467ed1b5cfb languageName: node linkType: hard -"@pulumi/pulumi@npm:3.113.3": - version: 3.113.3 - resolution: "@pulumi/pulumi@npm:3.113.3" +"@pulumi/pulumi@npm:^3.0.0, @pulumi/pulumi@npm:^3.99.0": + version: 3.118.0 + resolution: "@pulumi/pulumi@npm:3.118.0" dependencies: "@grpc/grpc-js": ^1.10.1 "@logdna/tail-file": ^2.0.6 @@ -10490,7 +10416,7 @@ __metadata: optional: true typescript: optional: true - checksum: aba217832d3c9b2b064a441c034d0080f06c251a32830058be543f8662b55c3998482a80a2075e4e4026e02232ae22e3f4a0fca15af4b3822133ebe9b47cdada + checksum: 202a39abfacb99ec4ac511a887f1907a50f375fcdced8e0bcfce7a233756d6eed0d1ef085e6ba5b03b2d33820361b46fad2a4fc842158910320085df0c225e9d languageName: node linkType: hard @@ -11760,7 +11686,7 @@ __metadata: languageName: node linkType: hard -"@smithy/node-http-handler@npm:^2.1.6": +"@smithy/node-http-handler@npm:2.1.6, @smithy/node-http-handler@npm:^2.1.6": version: 2.1.6 resolution: "@smithy/node-http-handler@npm:2.1.6" dependencies: @@ -13147,6 +13073,22 @@ __metadata: languageName: node linkType: hard +"@svgr/webpack@npm:6.5.1, @svgr/webpack@npm:^6.1.1": + version: 6.5.1 + resolution: "@svgr/webpack@npm:6.5.1" + dependencies: + "@babel/core": ^7.19.6 + "@babel/plugin-transform-react-constant-elements": ^7.18.12 + "@babel/preset-env": ^7.19.4 + "@babel/preset-react": ^7.18.6 + "@babel/preset-typescript": ^7.18.6 + "@svgr/core": ^6.5.1 + "@svgr/plugin-jsx": ^6.5.1 + "@svgr/plugin-svgo": ^6.5.1 + checksum: d10582eb4fa82a5b6d314cb49f2c640af4fd3a60f5b76095d2b14e383ef6a43a6f4674b68774a21787dbde69dec0a251cfcfc3f9a96c82754ba5d5c6daf785f0 + languageName: node + linkType: hard + "@svgr/webpack@npm:^4.0.3": version: 4.3.3 resolution: "@svgr/webpack@npm:4.3.3" @@ -13163,22 +13105,6 @@ __metadata: languageName: node linkType: hard -"@svgr/webpack@npm:^6.1.1": - version: 6.5.1 - resolution: "@svgr/webpack@npm:6.5.1" - dependencies: - "@babel/core": ^7.19.6 - "@babel/plugin-transform-react-constant-elements": ^7.18.12 - "@babel/preset-env": ^7.19.4 - "@babel/preset-react": ^7.18.6 - "@babel/preset-typescript": ^7.18.6 - "@svgr/core": ^6.5.1 - "@svgr/plugin-jsx": ^6.5.1 - "@svgr/plugin-svgo": ^6.5.1 - checksum: d10582eb4fa82a5b6d314cb49f2c640af4fd3a60f5b76095d2b14e383ef6a43a6f4674b68774a21787dbde69dec0a251cfcfc3f9a96c82754ba5d5c6daf785f0 - languageName: node - linkType: hard - "@szmarczak/http-timer@npm:^1.1.2": version: 1.1.2 resolution: "@szmarczak/http-timer@npm:1.1.2" @@ -13867,6 +13793,13 @@ __metadata: languageName: node linkType: hard +"@types/long@npm:^4.0.1": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: d16cde7240d834cf44ba1eaec49e78ae3180e724cd667052b194a372f350d024cba8dd3f37b0864931683dab09ca935d52f0c4c1687178af5ada9fc85b0635f4 + languageName: node + linkType: hard + "@types/lru-cache@npm:^5.1.0": version: 5.1.1 resolution: "@types/lru-cache@npm:5.1.1" @@ -15062,6 +14995,27 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-aco@npm:5.39.6, @webiny/api-aco@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-aco@npm:5.39.6" + dependencies: + "@webiny/api": 5.39.6 + "@webiny/api-authentication": 5.39.6 + "@webiny/api-headless-cms": 5.39.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + lodash: 4.17.21 + checksum: 742984b86a21418f81612a953e769179c61e15d169a2bcfb6a0399a4ec4335b06487aa90773ba11d7f859d6c5c6136051da1c26999356f953a40af2d939dc25a + languageName: node + linkType: hard + "@webiny/api-admin-settings@0.0.0, @webiny/api-admin-settings@workspace:packages/api-admin-settings": version: 0.0.0-use.local resolution: "@webiny/api-admin-settings@workspace:packages/api-admin-settings" @@ -15091,6 +15045,20 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-admin-settings@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/api-admin-settings@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + checksum: 695c0d625b7efe8010852e83c95c2c7f8163a0d2a26c5b17bfe24e6c5af17b3f5cd1bc47cd92cc73462db8a133caa272ecf97a11c3af817fc1ca501f37e42bf3 + languageName: node + linkType: hard + "@webiny/api-admin-users-cognito-so-ddb@workspace:packages/api-admin-users-cognito-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-admin-users-cognito-so-ddb@workspace:packages/api-admin-users-cognito-so-ddb" @@ -15103,7 +15071,19 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-admin-users-so-ddb@0.0.0, @webiny/api-admin-users-so-ddb@workspace:packages/api-admin-users-so-ddb": +"@webiny/api-admin-users-so-ddb@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-admin-users-so-ddb@npm:5.39.6" + dependencies: + "@webiny/api-admin-users": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + checksum: d4c0fbf959e662d3e9eba06407fd6f1732aff3fd8172a48ed564b4ed3d24f4feca34e2e5c54bc1960ce391907a8872ad9577014472a403e61a68c392fe7870ec + languageName: node + linkType: hard + +"@webiny/api-admin-users-so-ddb@workspace:packages/api-admin-users-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-admin-users-so-ddb@workspace:packages/api-admin-users-so-ddb" dependencies: @@ -15153,6 +15133,27 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-admin-users@npm:5.39.6, @webiny/api-admin-users@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-admin-users@npm:5.39.6" + dependencies: + "@commodo/fields": 1.1.2-beta.20 + "@webiny/api": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + commodo-fields-object: 1.0.6 + dataloader: 2.2.1 + lodash: 4.17.21 + md5: 2.3.0 + checksum: 6be12b45b44d9901f5d39ce77823eb6be4ef07e7bb7a07311ee9513d1557d0355d3145fc15046d576330dbfa4aab0bc7077e59532f5c46b77548b9d9205b5619 + languageName: node + linkType: hard + "@webiny/api-apw-scheduler-so-ddb@0.0.0, @webiny/api-apw-scheduler-so-ddb@workspace:packages/api-apw-scheduler-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-apw-scheduler-so-ddb@workspace:packages/api-apw-scheduler-so-ddb" @@ -15182,6 +15183,20 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-apw-scheduler-so-ddb@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-apw-scheduler-so-ddb@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api-apw": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/plugins": 5.39.6 + checksum: 33e78a06d3077abc547f578f122245e2351cce90e3050bd51fd31b0e36b1fe9596a74a17d15de159896e5bba74154696c481775ca837d9e47bd17868708fe161 + languageName: node + linkType: hard + "@webiny/api-apw@0.0.0, @webiny/api-apw@workspace:packages/api-apw": version: 0.0.0-use.local resolution: "@webiny/api-apw@workspace:packages/api-apw" @@ -15229,6 +15244,39 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-apw@npm:5.39.6, @webiny/api-apw@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-apw@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@commodo/fields": 1.1.2-beta.20 + "@webiny/api": 5.39.6 + "@webiny/api-admin-settings": 5.39.6 + "@webiny/api-headless-cms": 5.39.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/api-mailer": 5.39.6 + "@webiny/api-page-builder": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/api-wcp": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-client": 5.39.6 + "@webiny/handler-db": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/handler-logs": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + dayjs: 1.11.7 + lodash: 4.17.21 + checksum: a6c9665fb9b07f653b6b208355a2084950e2bc93f0227a9656779a6b8b32614657d55c0d3db92977609fae01e8aa46fa0771b54708356385333e5a084cf3bbc5 + languageName: node + linkType: hard + "@webiny/api-audit-logs@0.0.0, @webiny/api-audit-logs@workspace:packages/api-audit-logs": version: 0.0.0-use.local resolution: "@webiny/api-audit-logs@workspace:packages/api-audit-logs" @@ -15266,6 +15314,24 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-audit-logs@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-audit-logs@npm:5.39.6" + dependencies: + "@webiny/api": 5.39.6 + "@webiny/api-aco": 5.39.6 + "@webiny/api-apw": 5.39.6 + "@webiny/api-form-builder": 5.39.6 + "@webiny/api-mailer": 5.39.6 + "@webiny/api-page-builder": 5.39.6 + "@webiny/api-page-builder-import-export": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/utils": 5.39.6 + checksum: d9035a51d17e26547c2ba2967497681c503b58aa5a9f7f238043cd122b2deb502cbb508f285b7e31b4c3b0c7726c526582c821f36b869e9234b084f59d2cb91a + languageName: node + linkType: hard + "@webiny/api-authentication-cognito@workspace:packages/api-authentication-cognito": version: 0.0.0-use.local resolution: "@webiny/api-authentication-cognito@workspace:packages/api-authentication-cognito" @@ -15304,7 +15370,18 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-background-tasks-ddb@0.0.0, @webiny/api-background-tasks-ddb@workspace:packages/api-background-tasks-ddb": +"@webiny/api-authentication@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/api-authentication@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/handler": 5.39.6 + checksum: 66f639a890e7cf0a00c1c8a094d341265ca4a6080b19c202e5f9998ed8b179cbcefd776376e37a6d0a7404bb5c5b7b2848112ed7a26a69539a69fe3aa60a7557 + languageName: node + linkType: hard + +"@webiny/api-background-tasks-ddb@workspace:packages/api-background-tasks-ddb": version: 0.0.0-use.local resolution: "@webiny/api-background-tasks-ddb@workspace:packages/api-background-tasks-ddb" dependencies: @@ -15320,6 +15397,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-background-tasks-es@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-background-tasks-es@npm:5.39.6" + dependencies: + "@webiny/api-elasticsearch-tasks": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/tasks": 5.39.6 + checksum: 27aa15854869989715148846d51bed3591aa784d1f9764bbada5d109600dc68689cf6ef3f5ac21fa1de57ffa0eb53ee5860e01bb79a95ce075f467c4d3622699 + languageName: node + linkType: hard + "@webiny/api-background-tasks-es@workspace:packages/api-background-tasks-es": version: 0.0.0-use.local resolution: "@webiny/api-background-tasks-es@workspace:packages/api-background-tasks-es" @@ -15375,6 +15463,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-cognito-authenticator@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/api-cognito-authenticator@npm:5.39.6" + dependencies: + jsonwebtoken: 9.0.1 + jwk-to-pem: 2.0.5 + node-fetch: 2.6.9 + checksum: ad8c5cf0caae6bb5f627c83bde01ae3c5d2b9384110462afa52c3d257930c369cde0f687878e89c286fdd3e26ecf49df59778c5fe9842dce0bcbdc4af821d364 + languageName: node + linkType: hard + "@webiny/api-dynamodb-to-elasticsearch@0.0.0, @webiny/api-dynamodb-to-elasticsearch@workspace:packages/api-dynamodb-to-elasticsearch": version: 0.0.0-use.local resolution: "@webiny/api-dynamodb-to-elasticsearch@workspace:packages/api-dynamodb-to-elasticsearch" @@ -15434,6 +15533,22 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-elasticsearch-tasks@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/api-elasticsearch-tasks@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/api-elasticsearch": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/tasks": 5.39.6 + "@webiny/utils": 5.39.6 + checksum: 0ed88b68f698d03cd8a2c19d7a0047e4a91fbc822b7257ab5ef3e21dfab330dbeed41c364b3e529b4afe2b9204bfe7142c87478496b8e70f43cf82be7c4289bc + languageName: node + linkType: hard + "@webiny/api-elasticsearch@0.0.0, @webiny/api-elasticsearch@workspace:packages/api-elasticsearch": version: 0.0.0-use.local resolution: "@webiny/api-elasticsearch@workspace:packages/api-elasticsearch" @@ -15455,6 +15570,21 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-elasticsearch@npm:5.39.6, @webiny/api-elasticsearch@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-elasticsearch@npm:5.39.6" + dependencies: + "@elastic/elasticsearch": 7.12.0 + "@webiny/api": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/utils": 5.39.6 + aws-elasticsearch-connector: 9.2.0 + elastic-ts: 0.8.0 + checksum: ae9605f83c4d021ba279a4e47d19aca4a95ea5888136cb00500a0b6fc4776d05f04ea90d3bd7f3babb2923d24a9fd4e718dc391803c6dace590c4888ef85b223 + languageName: node + linkType: hard + "@webiny/api-file-manager-ddb@0.0.0, @webiny/api-file-manager-ddb@workspace:packages/api-file-manager-ddb": version: 0.0.0-use.local resolution: "@webiny/api-file-manager-ddb@workspace:packages/api-file-manager-ddb" @@ -15482,6 +15612,21 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-file-manager-ddb@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-file-manager-ddb@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api-file-manager": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/project-utils": 5.39.6 + checksum: b2120cbf44ae49f1a1fa2e947107d6ac05be82cd707f071a6f36544168663f4324cd4c4e98c32af4016f6d7d8a9a7eb32ee17462c671630328231b9805a3d00a + languageName: node + linkType: hard + "@webiny/api-file-manager-s3@0.0.0, @webiny/api-file-manager-s3@workspace:packages/api-file-manager-s3": version: 0.0.0-use.local resolution: "@webiny/api-file-manager-s3@workspace:packages/api-file-manager-s3" @@ -15515,6 +15660,33 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-file-manager-s3@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-file-manager-s3@npm:5.39.6" + dependencies: + "@webiny/api": 5.39.6 + "@webiny/api-file-manager": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/tasks": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + form-data: 4.0.0 + mime: 3.0.0 + node-fetch: 2.6.9 + object-hash: 3.0.0 + p-map: 4.0.0 + p-reduce: 2.1.0 + sanitize-filename: 1.6.3 + sharp: 0.32.6 + checksum: aa6e9a695d32123ad4a6279ad27e9a22b0ba93247543352e6921e4da904145435f49820a9115e60c83d76c3910fd0d3d584e6bd9bb236310f2e2d187f60e5f3a + languageName: node + linkType: hard + "@webiny/api-file-manager@0.0.0, @webiny/api-file-manager@workspace:packages/api-file-manager": version: 0.0.0-use.local resolution: "@webiny/api-file-manager@workspace:packages/api-file-manager" @@ -15554,6 +15726,32 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-file-manager@npm:5.39.6, @webiny/api-file-manager@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-file-manager@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@commodo/fields": 1.1.2-beta.20 + "@webiny/api": 5.39.6 + "@webiny/api-headless-cms": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-aws": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/project-utils": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/tasks": 5.39.6 + "@webiny/validation": 5.39.6 + lodash: 4.17.21 + object-hash: 2.2.0 + checksum: bddc3cdd7e38cd7882414a3240727a06a1bee1ef68f0415231c60f8ea286750a3a75189dd7fde8ef5bd1a337d3d86a9d804b2800fc25db76bff457a47a696261 + languageName: node + linkType: hard + "@webiny/api-form-builder-so-ddb-es@0.0.0, @webiny/api-form-builder-so-ddb-es@workspace:packages/api-form-builder-so-ddb-es": version: 0.0.0-use.local resolution: "@webiny/api-form-builder-so-ddb-es@workspace:packages/api-form-builder-so-ddb-es" @@ -15587,6 +15785,25 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-form-builder-so-ddb-es@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-form-builder-so-ddb-es@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@elastic/elasticsearch": 7.12.0 + "@webiny/api-elasticsearch": 5.39.6 + "@webiny/api-elasticsearch-tasks": 5.39.6 + "@webiny/api-form-builder": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/utils": 5.39.6 + elastic-ts: 0.8.0 + checksum: 754c04ae3e67b2b8cc53085a82375afbd2953af4f60a436518c34e82e38ed7f0ccf433af5d5fb8740e298384e71d0c6d3459363e20feb02b64b6ebcc288f6a15 + languageName: node + linkType: hard + "@webiny/api-form-builder-so-ddb@0.0.0, @webiny/api-form-builder-so-ddb@workspace:packages/api-form-builder-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-form-builder-so-ddb@workspace:packages/api-form-builder-so-ddb" @@ -15663,6 +15880,38 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-form-builder@npm:5.39.6, @webiny/api-form-builder@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-form-builder@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@commodo/fields": 1.1.2-beta.20 + "@webiny/api": 5.39.6 + "@webiny/api-file-manager": 5.39.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/api-mailer": 5.39.6 + "@webiny/api-page-builder": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-aws": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + commodo-fields-object: 1.0.6 + date-fns: 2.29.3 + got: 9.6.0 + json2csv: 4.5.4 + lodash: 4.17.21 + node-fetch: 2.6.9 + slugify: 1.6.5 + checksum: 1c3c064100bcde7d023bf7c5646065a198b0aeef9fdc77dae43a9ffdcf5e27d3f6122284b98b6a6842922b605d67341f97e783cb3bdd7088d1592aff67808fb9 + languageName: node + linkType: hard + "@webiny/api-headless-cms-ddb-es@0.0.0, @webiny/api-headless-cms-ddb-es@workspace:packages/api-headless-cms-ddb-es": version: 0.0.0-use.local resolution: "@webiny/api-headless-cms-ddb-es@workspace:packages/api-headless-cms-ddb-es" @@ -15707,6 +15956,28 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-headless-cms-ddb-es@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-headless-cms-ddb-es@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/api-elasticsearch": 5.39.6 + "@webiny/api-elasticsearch-tasks": 5.39.6 + "@webiny/api-headless-cms": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-db": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/utils": 5.39.6 + dataloader: 2.2.1 + jsonpack: 1.1.5 + lodash: 4.17.21 + checksum: fe23b8d96e3af4d7592be2b1be83931633ee23f4b410dddedbf8d0aefffcfdfaf03a0a71c2af55d0044cb484cfa110f2db7a239d630f536a2a67e9da045a6ad7 + languageName: node + linkType: hard + "@webiny/api-headless-cms-ddb@0.0.0, @webiny/api-headless-cms-ddb@workspace:packages/api-headless-cms-ddb": version: 0.0.0-use.local resolution: "@webiny/api-headless-cms-ddb@workspace:packages/api-headless-cms-ddb" @@ -15815,6 +16086,41 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-headless-cms@npm:5.39.6, @webiny/api-headless-cms@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-headless-cms@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@graphql-tools/schema": 7.1.5 + "@webiny/api": 5.39.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-aws": 5.39.6 + "@webiny/handler-db": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/lexical-converter": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + code-frame: 5.0.0 + dot-prop: 6.0.1 + graphql-tag: 2.12.6 + jsdom: 21.1.2 + lodash: 4.17.21 + p-map: 4.0.0 + p-reduce: 2.1.0 + pluralize: 8.0.0 + semver: 7.5.4 + slugify: 1.6.5 + zod: 3.21.4 + checksum: f843f1522d18d455415bb0b2c3a288c48369f0dd4b88d4893cde96f98f072f427c951071697556599484faf99277dccf9f3dfc9b0dd52fe7e514c5ddf8eac440 + languageName: node + linkType: hard + "@webiny/api-i18n-content@0.0.0, @webiny/api-i18n-content@workspace:packages/api-i18n-content": version: 0.0.0-use.local resolution: "@webiny/api-i18n-content@workspace:packages/api-i18n-content" @@ -15833,6 +16139,19 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-i18n-content@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-i18n-content@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/api-security": 5.39.6 + graphql: 15.8.0 + checksum: 9cf87cdf6bab1353c5537821bba8411e2eb2ce358b4fc48601e3518a6883568aef65af95e8e1022c338f2c509f556af27e3fb2ac9fb2cb66ec697451f7ff12a1 + languageName: node + linkType: hard + "@webiny/api-i18n-ddb@0.0.0, @webiny/api-i18n-ddb@workspace:packages/api-i18n-ddb": version: 0.0.0-use.local resolution: "@webiny/api-i18n-ddb@workspace:packages/api-i18n-ddb" @@ -15864,6 +16183,20 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-i18n-ddb@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-i18n-ddb@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-db": 5.39.6 + checksum: 77b3dd833183c1b85376294c241aa7db65f765a8342c62776d15bf5e5ba206a2e27f74dff12fa5091b9080a812477c9e042698d3bbdcb3abd7610a136e159f6f + languageName: node + linkType: hard + "@webiny/api-i18n@0.0.0, @webiny/api-i18n@workspace:packages/api-i18n": version: 0.0.0-use.local resolution: "@webiny/api-i18n@workspace:packages/api-i18n" @@ -15896,6 +16229,26 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-i18n@npm:5.39.6, @webiny/api-i18n@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-i18n@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-aws": 5.39.6 + "@webiny/handler-client": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + accept-language-parser: 1.5.0 + i18n-locales: 0.0.2 + checksum: b9dc97f0a6a6d611a935383a81bb6f5ecec85a1651a4ee56be611f24bb52e4abd29592cf89d49970e609491eefd9f3bc7957f0f808341e91b8aa9ac28d822fad + languageName: node + linkType: hard + "@webiny/api-mailer@0.0.0, @webiny/api-mailer@workspace:packages/api-mailer": version: 0.0.0-use.local resolution: "@webiny/api-mailer@workspace:packages/api-mailer" @@ -15935,6 +16288,25 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-mailer@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/api-mailer@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/api-headless-cms": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + crypto-js: 4.1.1 + lodash: 4.17.21 + nodemailer: 6.9.1 + zod: 3.21.4 + checksum: 200d04b45f68216d9f84ae0e63493f5c7bdea617599e73e0076a1d89df69e71d0e9494a6a05d1a5e54b8a5ee74408d2b237af662138b48cf4bd5a38faef989dd + languageName: node + linkType: hard + "@webiny/api-page-builder-aco@0.0.0, @webiny/api-page-builder-aco@workspace:packages/api-page-builder-aco": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-aco@workspace:packages/api-page-builder-aco" @@ -15968,6 +16340,20 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-page-builder-aco@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-page-builder-aco@npm:5.39.6" + dependencies: + "@webiny/api": 5.39.6 + "@webiny/api-aco": 5.39.6 + "@webiny/api-page-builder": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + lodash: 4.17.21 + checksum: e541defbacec75a97789d527cda113667f3ac2f80c48ad695dc46ce53932979af0228781eca17dd745296db9eae1a2955ae3fd60ffa3c95ad06076a09c50bb02 + languageName: node + linkType: hard + "@webiny/api-page-builder-import-export-so-ddb@0.0.0, @webiny/api-page-builder-import-export-so-ddb@workspace:packages/api-page-builder-import-export-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-import-export-so-ddb@workspace:packages/api-page-builder-import-export-so-ddb" @@ -15995,6 +16381,19 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-page-builder-import-export-so-ddb@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-page-builder-import-export-so-ddb@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api-page-builder-import-export": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + checksum: 6d0a499eca3508faadec1a180230438ebb0c61f23725fda62eddd5c663124789a297569f5556d39b228c28e7010107e778e14d1706e94b4d06db164fe3a9a579 + languageName: node + linkType: hard + "@webiny/api-page-builder-import-export@0.0.0, @webiny/api-page-builder-import-export@workspace:packages/api-page-builder-import-export": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-import-export@workspace:packages/api-page-builder-import-export" @@ -16049,6 +16448,41 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-page-builder-import-export@npm:5.39.6, @webiny/api-page-builder-import-export@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-page-builder-import-export@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@commodo/fields": 1.1.2-beta.20 + "@smithy/node-http-handler": 2.1.6 + "@webiny/api": 5.39.6 + "@webiny/api-file-manager": 5.39.6 + "@webiny/api-form-builder": 5.39.6 + "@webiny/api-page-builder": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-aws": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/tasks": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + archiver: 7.0.0 + commodo-fields-object: 1.0.6 + dot-prop-immutable: 2.1.1 + fs-extra: 9.1.0 + load-json-file: 6.2.0 + lodash: 4.17.21 + node-fetch: 2.6.9 + stream: 0.0.2 + uniqid: 5.4.0 + yauzl: 2.10.0 + checksum: 685ef78bf021e8fa19a801b7658532a6b78a5e60d3e5c5c5cb03db92e94d68dac8f7a797e88c5c0d41b40693de0a49edc9bb29503883eb4cab93dadf15961303 + languageName: node + linkType: hard + "@webiny/api-page-builder-so-ddb-es@0.0.0, @webiny/api-page-builder-so-ddb-es@workspace:packages/api-page-builder-so-ddb-es": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-so-ddb-es@workspace:packages/api-page-builder-so-ddb-es" @@ -16100,6 +16534,27 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-page-builder-so-ddb-es@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-page-builder-so-ddb-es@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api-elasticsearch": 5.39.6 + "@webiny/api-elasticsearch-tasks": 5.39.6 + "@webiny/api-page-builder": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-db": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/utils": 5.39.6 + dataloader: 2.2.1 + elastic-ts: 0.8.0 + lodash: 4.17.21 + checksum: 5b686eb5e4498aab08a6f821aae403aa677250a3b5f4074ca337db915af5295f82dba5a5afb7fbbc4b39c7d4c3fb3fc03d61fe8612c3d3f0681d2eda773d23e1 + languageName: node + linkType: hard + "@webiny/api-page-builder-so-ddb@0.0.0, @webiny/api-page-builder-so-ddb@workspace:packages/api-page-builder-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-so-ddb@workspace:packages/api-page-builder-so-ddb" @@ -16183,6 +16638,42 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-page-builder@npm:5.39.6, @webiny/api-page-builder@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-page-builder@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/api-file-manager": 5.39.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/api-prerendering-service": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-aws": 5.39.6 + "@webiny/handler-db": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + dataloader: 2.2.1 + extract-zip: 1.7.0 + fs-extra: 9.1.0 + jsonpack: 1.1.5 + load-json-file: 6.2.0 + lodash: 4.17.21 + node-fetch: 2.6.9 + rimraf: 3.0.2 + stream: 0.0.2 + uniqid: 5.4.0 + zip-local: 0.3.5 + zod: 3.21.4 + checksum: 7cefabc53989a11520c851a711e82368c9ff554f3ac17d5c556988f74ad69ac0de87ce2142632826c10db195237e614cf7be6cff98d89ec1b47135a8dadd4108 + languageName: node + linkType: hard + "@webiny/api-prerendering-service-aws@0.0.0, @webiny/api-prerendering-service-aws@workspace:packages/api-prerendering-service-aws": version: 0.0.0-use.local resolution: "@webiny/api-prerendering-service-aws@workspace:packages/api-prerendering-service-aws" @@ -16273,6 +16764,32 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-prerendering-service@npm:5.39.6, @webiny/api-prerendering-service@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-prerendering-service@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@sparticuz/chromium": 123.0.1 + "@webiny/api": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-client": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/utils": 5.39.6 + lodash: 4.17.21 + object-hash: 2.2.0 + pluralize: 8.0.0 + posthtml: 0.15.2 + posthtml-noopener: 1.0.5 + posthtml-plugin-link-preload: 1.0.0 + puppeteer-core: 22.6.4 + shortid: 2.2.16 + srcset: 4.0.0 + checksum: 9152ff4f5570548348df19388cc9ac724876d3eec1cce50ecaaeb91b199f72e480351656c6443c9e9fef27bdf0c48d1b22596cb0adfbd33c8b5538d17f02c07c + languageName: node + linkType: hard + "@webiny/api-security-auth0@workspace:packages/api-security-auth0": version: 0.0.0-use.local resolution: "@webiny/api-security-auth0@workspace:packages/api-security-auth0" @@ -16302,7 +16819,24 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-security-cognito@0.0.0, @webiny/api-security-cognito@workspace:packages/api-security-cognito": +"@webiny/api-security-cognito@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-security-cognito@npm:5.39.6" + dependencies: + "@webiny/api": 5.39.6 + "@webiny/api-admin-users": 5.39.6 + "@webiny/api-cognito-authenticator": 5.39.6 + "@webiny/api-i18n": 5.39.6 + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + checksum: a03bcd55bd948616d3aa0599472c552dd9f203463df132d5f4fcf99a89ef7c930e87d102e363e64d3eb7d9db29debebc11fe5b831e214c1fd18ecd29a3636924 + languageName: node + linkType: hard + +"@webiny/api-security-cognito@workspace:packages/api-security-cognito": version: 0.0.0-use.local resolution: "@webiny/api-security-cognito@workspace:packages/api-security-cognito" dependencies: @@ -16375,6 +16909,18 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-security-so-ddb@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-security-so-ddb@npm:5.39.6" + dependencies: + "@webiny/api-security": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + checksum: aeecc44337c75f16e9fabe0f370335784d7d2d56c5be5109e21cb6da829398ec290b06a392c902d194897c686697244020c96191daa2152d50f9c91af509eb26 + languageName: node + linkType: hard + "@webiny/api-security@0.0.0, @webiny/api-security@workspace:packages/api-security": version: 0.0.0-use.local resolution: "@webiny/api-security@workspace:packages/api-security" @@ -16414,6 +16960,31 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-security@npm:5.39.6, @webiny/api-security@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-security@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@commodo/fields": 1.1.2-beta.20 + "@webiny/api": 5.39.6 + "@webiny/api-authentication": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + "@webiny/validation": 5.39.6 + commodo-fields-object: 1.0.6 + deep-equal: 2.2.3 + jsonwebtoken: 9.0.1 + minimatch: 5.1.6 + checksum: 9234f228e32b43367ba3773ae1538983edcfd7c962861d051a812d9db9cf372e0274449b0e6f9cfc15b666cfe7866df735681cf163567032d541b104e12096ff + languageName: node + linkType: hard + "@webiny/api-tenancy-so-ddb@0.0.0, @webiny/api-tenancy-so-ddb@workspace:packages/api-tenancy-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-tenancy-so-ddb@workspace:packages/api-tenancy-so-ddb" @@ -16434,6 +17005,18 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-tenancy-so-ddb@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-tenancy-so-ddb@npm:5.39.6" + dependencies: + "@webiny/api-tenancy": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db-dynamodb": 5.39.6 + "@webiny/error": 5.39.6 + checksum: 441e41ec680ec1e265ab3d8ded51dbfc2742f82cb709bf6cbfce1217d22515d2a4f4b873961eb82793015a8776594f09caf6cf655b3c1897a2f4bc32f9f1e94c + languageName: node + linkType: hard + "@webiny/api-tenancy@0.0.0, @webiny/api-tenancy@workspace:packages/api-tenancy": version: 0.0.0-use.local resolution: "@webiny/api-tenancy@workspace:packages/api-tenancy" @@ -16459,6 +17042,23 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-tenancy@npm:5.39.6, @webiny/api-tenancy@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-tenancy@npm:5.39.6" + dependencies: + "@webiny/api": 5.39.6 + "@webiny/api-wcp": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-db": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + dataloader: 2.2.1 + checksum: 6a7563a7cc503cac16382c5d4fc6da683b8629bc95d1aa2bded7d4d7e102363dfb959e6ebed58bb0e0b66384fb6a76ab83b19e8577d2c76b2bfb42855c74a6fb + languageName: node + linkType: hard + "@webiny/api-tenant-manager@0.0.0, @webiny/api-tenant-manager@workspace:packages/api-tenant-manager": version: 0.0.0-use.local resolution: "@webiny/api-tenant-manager@workspace:packages/api-tenant-manager" @@ -16483,6 +17083,18 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-tenant-manager@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-tenant-manager@npm:5.39.6" + dependencies: + "@webiny/api-security": 5.39.6 + "@webiny/api-tenancy": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/utils": 5.39.6 + checksum: 24ed193ebcb65855c2a933b70223b6fa04068c7cf3c36d401ff7077418e5ccdf38c47b6b897248116fe5c3fb65e1ac55df6e8622507ac0ed168c860937923fdc + languageName: node + linkType: hard + "@webiny/api-theme-manager@workspace:packages/api-theme-manager": version: 0.0.0-use.local resolution: "@webiny/api-theme-manager@workspace:packages/api-theme-manager" @@ -16526,6 +17138,20 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api-wcp@npm:5.39.6, @webiny/api-wcp@npm:latest": + version: 5.39.6 + resolution: "@webiny/api-wcp@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/wcp": 5.39.6 + node-fetch: 2.6.9 + checksum: 57e93c9a54a7437ebbcf8cc7b534fb537c174baaeeefc2982291ce60c0faf1e58dd15f25156c49b2f0b2e8f577012a5fd138489803aab23f7c44dc61fdfa98ed + languageName: node + linkType: hard + "@webiny/api@0.0.0, @webiny/api@workspace:packages/api": version: 0.0.0-use.local resolution: "@webiny/api@workspace:packages/api" @@ -16545,6 +17171,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/api@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/api@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/plugins": 5.39.6 + checksum: 130d63052bca4509e24ce79c81898f05c0dccc5cdd1acea46f663f0596b18e6f356802c0ba58f502213d2a9437c5448c6b5ed2b3e5336e46ef332a700af17a29 + languageName: node + linkType: hard + "@webiny/app-aco@0.0.0, @webiny/app-aco@workspace:packages/app-aco": version: 0.0.0-use.local resolution: "@webiny/app-aco@workspace:packages/app-aco" @@ -18003,6 +18640,34 @@ __metadata: languageName: unknown linkType: soft +"@webiny/aws-sdk@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/aws-sdk@npm:5.39.6" + dependencies: + "@aws-sdk/client-cloudfront": 3.425.0 + "@aws-sdk/client-cloudwatch-events": 3.425.0 + "@aws-sdk/client-cloudwatch-logs": 3.425.0 + "@aws-sdk/client-cognito-identity-provider": 3.425.0 + "@aws-sdk/client-dynamodb": 3.425.0 + "@aws-sdk/client-dynamodb-streams": 3.425.0 + "@aws-sdk/client-eventbridge": 3.425.0 + "@aws-sdk/client-iam": 3.425.0 + "@aws-sdk/client-lambda": 3.425.0 + "@aws-sdk/client-s3": 3.425.0 + "@aws-sdk/client-sfn": 3.484.0 + "@aws-sdk/client-sqs": 3.425.0 + "@aws-sdk/client-sts": 3.425.0 + "@aws-sdk/credential-providers": 3.425.0 + "@aws-sdk/lib-dynamodb": 3.425.0 + "@aws-sdk/lib-storage": 3.451.0 + "@aws-sdk/s3-presigned-post": 3.425.0 + "@aws-sdk/s3-request-presigner": 3.425.0 + "@aws-sdk/util-dynamodb": 3.425.0 + "@webiny/utils": 5.39.6 + checksum: cfa550ef14fb5c55c342744514bf1f4019f401f11b46432ccf2dd1443980d999f778dfcec1b2b2fbfec9144e9718ec0b1e3cc7f67d43e0f1c45432c6ace4f122 + languageName: node + linkType: hard + "@webiny/cli-plugin-deploy-pulumi@0.0.0, @webiny/cli-plugin-deploy-pulumi@workspace:packages/cli-plugin-deploy-pulumi": version: 0.0.0-use.local resolution: "@webiny/cli-plugin-deploy-pulumi@workspace:packages/cli-plugin-deploy-pulumi" @@ -18302,6 +18967,36 @@ __metadata: languageName: unknown linkType: soft +"@webiny/cli@npm:5.39.6, @webiny/cli@npm:latest": + version: 5.39.6 + resolution: "@webiny/cli@npm:5.39.6" + dependencies: + "@webiny/telemetry": 5.39.6 + "@webiny/wcp": 5.39.6 + boolean: 3.2.0 + camelcase: 5.3.1 + chalk: 4.1.2 + dotenv: 8.6.0 + execa: 5.1.1 + fast-glob: 3.2.12 + find-up: 5.0.0 + fs-extra: 9.1.0 + graphql-request: 3.7.0 + inquirer: 7.3.3 + ncp: 2.0.0 + open: 8.4.0 + pirates: 4.0.5 + semver: 7.5.4 + ts-morph: 11.0.3 + typescript: 4.7.4 + uniqid: 5.4.0 + yargs: 17.6.2 + bin: + webiny: bin.js + checksum: 9ef66ef9b68cdf042bdfe087224a940a8e3104f93915732839332df3c74afaf52164192ade97b5a64db4717e6507ed483d3cf553428a9e48903c97789ef09d87 + languageName: node + linkType: hard + "@webiny/commodo@workspace:packages/commodo": version: 0.0.0-use.local resolution: "@webiny/commodo@workspace:packages/commodo" @@ -18407,6 +19102,26 @@ __metadata: languageName: unknown linkType: soft +"@webiny/db-dynamodb@npm:5.39.6, @webiny/db-dynamodb@npm:latest": + version: 5.39.6 + resolution: "@webiny/db-dynamodb@npm:5.39.6" + dependencies: + "@webiny/api": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/db": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-db": 5.39.6 + "@webiny/plugins": 5.39.6 + date-fns: 2.29.3 + dot-prop: 6.0.1 + dynamodb-toolbox: 0.9.2 + fuse.js: 7.0.0 + is-number: 7.0.0 + lodash: 4.17.21 + checksum: aaa3e1a8677523a1850fb4d67cfca3ced011998ea1f06d2ee6e7c2639704742b792b7aa01c79de7fa0ba836bff1927cf43161a93e1e5452da3a62b2529eab728 + languageName: node + linkType: hard + "@webiny/db@0.0.0, @webiny/db@workspace:packages/db": version: 0.0.0-use.local resolution: "@webiny/db@workspace:packages/db" @@ -18420,6 +19135,13 @@ __metadata: languageName: unknown linkType: soft +"@webiny/db@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/db@npm:5.39.6" + checksum: e1f69ce4a261dcc3e7d925618a8d76ec4503964d15d0d5aaa08af9f27bff634a0deedf6f5571d311fd04cf8bee495aab930129e9a45995aab58b16a1c9ad1c2f + languageName: node + linkType: hard + "@webiny/error@0.0.0, @webiny/error@workspace:packages/error": version: 0.0.0-use.local resolution: "@webiny/error@workspace:packages/error" @@ -18434,6 +19156,13 @@ __metadata: languageName: unknown linkType: soft +"@webiny/error@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/error@npm:5.39.6" + checksum: 7590fc45a7738000b8179d15fb4cc4377e855807818376a3c3a417e679d798f4508d61e4cac6fde3e8d088acfdc61d7c662522da5f1a1ec9d599975d62712cf5 + languageName: node + linkType: hard + "@webiny/feature-flags@0.0.0, @webiny/feature-flags@workspace:packages/feature-flags": version: 0.0.0-use.local resolution: "@webiny/feature-flags@workspace:packages/feature-flags" @@ -18486,6 +19215,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/global-config@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/global-config@npm:5.39.6" + dependencies: + load-json-file: 6.2.0 + uuid: 8.3.2 + write-json-file: 4.3.0 + checksum: 0a24e81cccdfad48970228567bb38dca9559cc76c9eb8269cdc7954b6308471dbe6048433d960f2b6b24e18daaeb1a43883bcc9f1f2261fc183d5efee84dd9b3 + languageName: node + linkType: hard + "@webiny/handler-aws@0.0.0, @webiny/handler-aws@workspace:packages/handler-aws": version: 0.0.0-use.local resolution: "@webiny/handler-aws@workspace:packages/handler-aws" @@ -18511,6 +19251,22 @@ __metadata: languageName: unknown linkType: soft +"@webiny/handler-aws@npm:5.39.6, @webiny/handler-aws@npm:latest": + version: 5.39.6 + resolution: "@webiny/handler-aws@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@fastify/aws-lambda": 3.1.3 + "@webiny/aws-sdk": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-client": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/utils": 5.39.6 + fastify: 4.11.0 + checksum: 733a190b8f4e3218a5a79d1af230dcf6229ab43250c983bcdc8bded7b802db94c163cf6d824594d3750e9a047c42ce14adb52bdcb918e4579c6be7db23c143d1 + languageName: node + linkType: hard + "@webiny/handler-client@0.0.0, @webiny/handler-client@workspace:packages/handler-client": version: 0.0.0-use.local resolution: "@webiny/handler-client@workspace:packages/handler-client" @@ -18531,6 +19287,18 @@ __metadata: languageName: unknown linkType: soft +"@webiny/handler-client@npm:5.39.6, @webiny/handler-client@npm:latest": + version: 5.39.6 + resolution: "@webiny/handler-client@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/plugins": 5.39.6 + checksum: a60e03ca3c89b9bc01f4580b35da5c9120303262cd6f4ee46dd2405a974d0022b7efc48a3b91dda4fb3df75e27f446b6b5f8feefe498905a030747a4ef4a7bb1 + languageName: node + linkType: hard + "@webiny/handler-db@0.0.0, @webiny/handler-db@workspace:packages/handler-db": version: 0.0.0-use.local resolution: "@webiny/handler-db@workspace:packages/handler-db" @@ -18548,6 +19316,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/handler-db@npm:5.39.6, @webiny/handler-db@npm:latest": + version: 5.39.6 + resolution: "@webiny/handler-db@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/db": 5.39.6 + checksum: c38179bd7aa05930c520792d14ad54c3dedb39e3f073f7facb3e1aa9e5112d1d05d0f27fd8c8c96323fccdaf75130ea389980fc203a96f8bf6d7803356e28b9b + languageName: node + linkType: hard + "@webiny/handler-graphql@0.0.0, @webiny/handler-graphql@workspace:packages/handler-graphql": version: 0.0.0-use.local resolution: "@webiny/handler-graphql@workspace:packages/handler-graphql" @@ -18576,6 +19355,24 @@ __metadata: languageName: unknown linkType: soft +"@webiny/handler-graphql@npm:5.39.6, @webiny/handler-graphql@npm:latest": + version: 5.39.6 + resolution: "@webiny/handler-graphql@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@graphql-tools/schema": 7.1.5 + "@webiny/api": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/plugins": 5.39.6 + boolean: 3.2.0 + graphql: 15.8.0 + graphql-scalars: 1.12.0 + graphql-tag: 2.12.6 + checksum: 6270cbf1df9d0e681207f87cbea13e0657943dceb82319f50b5368da679b864b2fab026cd37230362f25d56e4f14af767e8322cd42b7f18bfb95e684c547f217 + languageName: node + linkType: hard + "@webiny/handler-logs@0.0.0, @webiny/handler-logs@workspace:packages/handler-logs": version: 0.0.0-use.local resolution: "@webiny/handler-logs@workspace:packages/handler-logs" @@ -18596,6 +19393,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/handler-logs@npm:5.39.6, @webiny/handler-logs@npm:latest": + version: 5.39.6 + resolution: "@webiny/handler-logs@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/handler": 5.39.6 + node-fetch: 2.6.9 + checksum: 93430effa2da1dbf12f69b0353b2b538e158828ec8d0c975afd2e2a7cc158f56d5046810922fba84b3b8d5f50972e01eede4a9cc7f06f52a4c1edceaff47ba9d + languageName: node + linkType: hard + "@webiny/handler@0.0.0, @webiny/handler@workspace:packages/handler": version: 0.0.0-use.local resolution: "@webiny/handler@workspace:packages/handler" @@ -18621,6 +19429,23 @@ __metadata: languageName: unknown linkType: soft +"@webiny/handler@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/handler@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@fastify/compress": 6.2.0 + "@fastify/cookie": 8.3.0 + "@webiny/api": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler-client": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/utils": 5.39.6 + fastify: 4.11.0 + checksum: b8531b846efa3ebabe273946d341dccc5835b21ad4ee0141d8904290e0d8830a317edbf086e137dcb39ba143658d9d5a5a5df4bb82cb8bd1b3e289dca8bf7c3e + languageName: node + linkType: hard + "@webiny/i18n-react@0.0.0, @webiny/i18n-react@workspace:packages/i18n-react": version: 0.0.0-use.local resolution: "@webiny/i18n-react@workspace:packages/i18n-react" @@ -18699,6 +19524,18 @@ __metadata: languageName: unknown linkType: soft +"@webiny/lexical-converter@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/lexical-converter@npm:5.39.6" + dependencies: + "@lexical/headless": 0.12.2 + "@lexical/html": 0.12.2 + "@webiny/lexical-nodes": 5.39.6 + lexical: 0.12.2 + checksum: 7210d62d60f64035c9fb3a558bd323ff8f3d4a52c582313f1ed6d32796703fd7f47a32169d9f59b9b977dfa48047a51bf684782ced30e78f14b1f3bbec1b7403 + languageName: node + linkType: hard + "@webiny/lexical-editor-actions@0.0.0, @webiny/lexical-editor-actions@workspace:packages/lexical-editor-actions": version: 0.0.0-use.local resolution: "@webiny/lexical-editor-actions@workspace:packages/lexical-editor-actions" @@ -18787,6 +19624,26 @@ __metadata: languageName: unknown linkType: soft +"@webiny/lexical-nodes@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/lexical-nodes@npm:5.39.6" + dependencies: + "@lexical/code": 0.12.2 + "@lexical/hashtag": 0.12.2 + "@lexical/history": 0.12.2 + "@lexical/list": 0.12.2 + "@lexical/mark": 0.12.2 + "@lexical/overflow": 0.12.2 + "@lexical/react": 0.12.2 + "@lexical/rich-text": 0.12.2 + "@lexical/selection": 0.12.2 + "@lexical/utils": 0.12.2 + "@webiny/lexical-theme": 5.39.6 + lexical: 0.12.2 + checksum: f6faca5ca4237f6dbfca772a2e6b3b8c9ce25f71480a3a48a795fb3a1869b469e25ab826ff7e0aeeb042432efd453337a5f044815e7fc0766f2176444c3c4c84 + languageName: node + linkType: hard + "@webiny/lexical-theme@0.0.0, @webiny/lexical-theme@workspace:packages/lexical-theme": version: 0.0.0-use.local resolution: "@webiny/lexical-theme@workspace:packages/lexical-theme" @@ -18799,6 +19656,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/lexical-theme@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/lexical-theme@npm:5.39.6" + dependencies: + "@emotion/react": 11.10.8 + lexical: 0.12.2 + react-style-object-to-css: 1.1.2 + checksum: 5d0e66b992f35c7fec7ed2469640a6fc708613850ba994ab4fd736aba507cca3b60da7f307fd5a1ed1d687fce6a9c992bdb2c87bc8b7a0d57bef90ec09f42d87 + languageName: node + linkType: hard + "@webiny/logger@0.0.0, @webiny/logger@workspace:packages/logger": version: 0.0.0-use.local resolution: "@webiny/logger@workspace:packages/logger" @@ -18869,6 +19737,16 @@ __metadata: languageName: unknown linkType: soft +"@webiny/plugins@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/plugins@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + uniqid: 5.4.0 + checksum: d4aa71978f4886552078d9da1cdc3a969c697ea20f89dcf595c86e50e8de545f7219b162c0b62a60578b3c529b53084028b4ff52490bac796e90a12ae8fabef8 + languageName: node + linkType: hard + "@webiny/project-utils@0.0.0, @webiny/project-utils@workspace:packages/project-utils": version: 0.0.0-use.local resolution: "@webiny/project-utils@workspace:packages/project-utils" @@ -18952,6 +19830,83 @@ __metadata: languageName: unknown linkType: soft +"@webiny/project-utils@npm:5.39.6, @webiny/project-utils@npm:latest": + version: 5.39.6 + resolution: "@webiny/project-utils@npm:5.39.6" + dependencies: + "@babel/cli": 7.22.6 + "@babel/core": 7.22.8 + "@babel/plugin-proposal-class-properties": 7.18.6 + "@babel/plugin-syntax-object-rest-spread": 7.8.3 + "@babel/preset-env": 7.22.7 + "@babel/preset-react": 7.22.5 + "@babel/preset-typescript": 7.22.5 + "@babel/runtime": 7.22.6 + "@pmmmwh/react-refresh-webpack-plugin": 0.5.10 + "@svgr/webpack": 6.5.1 + "@types/webpack-env": 1.16.3 + "@webiny/aws-sdk": 5.39.6 + "@webiny/cli": 5.39.6 + "@webiny/global-config": 5.39.6 + "@webiny/telemetry": 5.39.6 + assert-browserify: 2.0.0 + babel-loader: 9.1.2 + buffer: 6.0.3 + camelcase: 5.3.1 + case-sensitive-paths-webpack-plugin: 2.4.0 + chalk: 4.1.2 + crypto-browserify: 3.12.0 + css-loader: 6.5.1 + css-minimizer-webpack-plugin: 3.4.1 + eslint: 8.33.0 + eslint-config-react-app: 6.0.0 + eslint-webpack-plugin: 3.2.0 + file-loader: 6.2.0 + fork-ts-checker-webpack-plugin: 6.5.2 + fs-extra: 9.1.0 + get-yarn-workspaces: 1.0.2 + glob: 7.2.3 + html-webpack-plugin: 5.5.0 + lodash: 4.17.21 + mini-css-extract-plugin: 2.4.5 + null-loader: 4.0.1 + os-browserify: 0.3.0 + path-browserify: 1.0.1 + postcss-flexbugs-fixes: 5.0.2 + postcss-loader: 6.2.1 + postcss-normalize: 10.0.1 + postcss-preset-env: 7.0.1 + process: 0.11.10 + raw-loader: 4.0.2 + react: 17.0.2 + react-dev-utils: 12.0.0 + react-dom: 17.0.2 + react-native-web: 0.12.3 + react-refresh: 0.11.0 + read-json-sync: 2.0.1 + resolve: 1.12.2 + resolve-url-loader: 4.0.0 + rimraf: 3.0.2 + sass: 1.44.0 + sass-loader: 12.3.0 + scheduler: 0.19.1 + source-map-loader: 1.1.3 + source-map-support: 0.5.21 + style-loader: 3.3.1 + terser-webpack-plugin: 5.2.5 + ttypescript: 1.5.15 + typescript: 4.7.4 + url: 0.11.0 + url-loader: 4.1.1 + vm-browserify: 1.1.2 + webpack: 5.75.0 + webpack-dev-server: 4.6.0 + webpack-manifest-plugin: 4.0.2 + webpackbar: 5.0.2 + checksum: 34c918f07d2bf905971a2d98300cb99a276a0d50882bbda6bd2e435796f20630f67633d65f5fdda54257f5bb158a3f04c421228b7bf39aee5cef00b575bc203e + languageName: node + linkType: hard + "@webiny/pubsub@0.0.0, @webiny/pubsub@workspace:packages/pubsub": version: 0.0.0-use.local resolution: "@webiny/pubsub@workspace:packages/pubsub" @@ -18969,6 +19924,13 @@ __metadata: languageName: unknown linkType: soft +"@webiny/pubsub@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/pubsub@npm:5.39.6" + checksum: 5cb13724ea627615e72348720a81992902df856038b90bb9516fe91f15332bb0aae76217148def9f0bf657121f3505483ea55cba9c0fe2cf20400da4528e9787 + languageName: node + linkType: hard + "@webiny/pulumi-aws@0.0.0, @webiny/pulumi-aws@workspace:packages/pulumi-aws": version: 0.0.0-use.local resolution: "@webiny/pulumi-aws@workspace:packages/pulumi-aws" @@ -19280,6 +20242,30 @@ __metadata: languageName: unknown linkType: soft +"@webiny/tasks@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/tasks@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + "@webiny/api": 5.39.6 + "@webiny/api-headless-cms": 5.39.6 + "@webiny/aws-sdk": 5.39.6 + "@webiny/error": 5.39.6 + "@webiny/handler": 5.39.6 + "@webiny/handler-aws": 5.39.6 + "@webiny/handler-graphql": 5.39.6 + "@webiny/plugins": 5.39.6 + "@webiny/pubsub": 5.39.6 + "@webiny/utils": 5.39.6 + aws-lambda: 1.0.7 + deep-equal: 2.2.3 + lodash: 4.17.21 + object-merge-advanced: 12.1.0 + zod: 3.21.4 + checksum: f0015bceb3b01994a6edbd3ae5eec999bee84d478d03167d2799ed2965931d76065e0322ebb612b88c27586bf118bcf67f5532c765e646b19fc9c996f4eac335 + languageName: node + linkType: hard + "@webiny/telemetry@0.0.0, @webiny/telemetry@workspace:packages/telemetry": version: 0.0.0-use.local resolution: "@webiny/telemetry@workspace:packages/telemetry" @@ -19290,6 +20276,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/telemetry@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/telemetry@npm:5.39.6" + dependencies: + "@webiny/global-config": 5.39.6 + form-data: 3.0.0 + node-fetch: 2.6.1 + checksum: 8be8e882b71292930160b284e08bf8c8e00d67b8477934c21e5c869a2c525eca22c52eb528f694f8b35a33346f3e25c8e55a11597c32d35835848e00f29db3c8 + languageName: node + linkType: hard + "@webiny/theme@0.0.0, @webiny/theme@workspace:packages/theme": version: 0.0.0-use.local resolution: "@webiny/theme@workspace:packages/theme" @@ -19455,6 +20452,21 @@ __metadata: languageName: unknown linkType: soft +"@webiny/utils@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/utils@npm:5.39.6" + dependencies: + "@webiny/error": 5.39.6 + mdbid: 1.0.0 + nanoid: 3.3.4 + nanoid-dictionary: 4.3.0 + p-retry: 4.6.2 + peerDependencies: + zod: ^3.21.4 + checksum: 1390a3e3f68088d4357ac3907a7d930880b93b3efeb62fc43d412f89b4866af7d6d6b225ca21a3f39fec43d8a81d9c99ebbed94157ecc75fec58701a0f188431 + languageName: node + linkType: hard + "@webiny/validation@0.0.0, @webiny/validation@workspace:packages/validation": version: 0.0.0-use.local resolution: "@webiny/validation@workspace:packages/validation" @@ -19476,6 +20488,17 @@ __metadata: languageName: unknown linkType: soft +"@webiny/validation@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/validation@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + isnumeric: 0.3.3 + lodash: 4.17.21 + checksum: 95013b5751ed78ff251dc786eb3cb2c167060420de9bc3f573026b33ccde96f9e58f51e911263f3e79a2a7f9a586d158051629e91d13b5a3451113baaba02cd1 + languageName: node + linkType: hard + "@webiny/wcp@0.0.0, @webiny/wcp@workspace:packages/wcp": version: 0.0.0-use.local resolution: "@webiny/wcp@workspace:packages/wcp" @@ -19496,6 +20519,16 @@ __metadata: languageName: unknown linkType: soft +"@webiny/wcp@npm:5.39.6": + version: 5.39.6 + resolution: "@webiny/wcp@npm:5.39.6" + dependencies: + "@babel/runtime": 7.22.6 + node-fetch: 2.6.9 + checksum: 14fe03b5ccaa5bbafcb9ec54a34e7d5922f148ce02a6226282d49b0437854997946c56ba4665642cbcf44258aea2c515c46b818ca1461f17af9fb17622836a85 + languageName: node + linkType: hard + "@webpack-contrib/schema-utils@npm:^1.0.0-beta.0": version: 1.0.0-beta.0 resolution: "@webpack-contrib/schema-utils@npm:1.0.0-beta.0" @@ -19655,7 +20688,7 @@ __metadata: languageName: node linkType: hard -"accept-language-parser@npm:^1.5.0": +"accept-language-parser@npm:1.5.0, accept-language-parser@npm:^1.5.0": version: 1.5.0 resolution: "accept-language-parser@npm:1.5.0" checksum: e32124e500f67d30da7dd15462b3ff7a718df327ff8bd1c97ae02d8ee5cf0917a3f600bf3b171965b1f95fef480b96d36752f674eff2cb0069c276d9783d32f6 @@ -20022,18 +21055,6 @@ __metadata: languageName: node linkType: hard -"alge@npm:0.8.1": - version: 0.8.1 - resolution: "alge@npm:0.8.1" - dependencies: - lodash.ismatch: ^4.4.0 - remeda: ^1.0.0 - ts-toolbelt: ^9.6.0 - zod: ^3.17.3 - checksum: a7f620a962eb4f00a47c758d78a3962cf0b7b148c0ec4b3fd5d835e42df6dd0184f10b9105a250e43cb2ecc190975f172ebce4028319a3474e5b9def64cef9ce - languageName: node - linkType: hard - "align-text@npm:^1.0.0": version: 1.0.2 resolution: "align-text@npm:1.0.2" @@ -20353,47 +21374,46 @@ __metadata: version: 0.0.0-use.local resolution: "api-graphql@workspace:apps/api/graphql" dependencies: - "@webiny/api-aco": 0.0.0 - "@webiny/api-admin-users": 0.0.0 - "@webiny/api-admin-users-so-ddb": 0.0.0 - "@webiny/api-apw": 0.0.0 - "@webiny/api-apw-scheduler-so-ddb": 0.0.0 - "@webiny/api-audit-logs": 0.0.0 - "@webiny/api-background-tasks-ddb": 0.0.0 - "@webiny/api-file-manager": 0.0.0 - "@webiny/api-file-manager-ddb": 0.0.0 - "@webiny/api-file-manager-s3": 0.0.0 - "@webiny/api-form-builder": 0.0.0 - "@webiny/api-form-builder-so-ddb": 0.0.0 - "@webiny/api-headless-cms": 0.0.0 - "@webiny/api-headless-cms-ddb": 0.0.0 - "@webiny/api-i18n": 0.0.0 - "@webiny/api-i18n-content": 0.0.0 - "@webiny/api-i18n-ddb": 0.0.0 - "@webiny/api-page-builder": 0.0.0 - "@webiny/api-page-builder-aco": 0.0.0 - "@webiny/api-page-builder-import-export": 0.0.0 - "@webiny/api-page-builder-import-export-so-ddb": 0.0.0 - "@webiny/api-page-builder-so-ddb": 0.0.0 - "@webiny/api-prerendering-service": 0.0.0 - "@webiny/api-prerendering-service-aws": 0.0.0 - "@webiny/api-security": 0.0.0 - "@webiny/api-security-cognito": 0.0.0 - "@webiny/api-security-so-ddb": 0.0.0 - "@webiny/api-tenancy": 0.0.0 - "@webiny/api-tenancy-so-ddb": 0.0.0 - "@webiny/api-tenant-manager": 0.0.0 - "@webiny/api-wcp": 0.0.0 - "@webiny/aws-sdk": 0.0.0 - "@webiny/cli": 0.0.0 + "@webiny/api-aco": latest + "@webiny/api-admin-users": latest + "@webiny/api-admin-users-so-ddb": latest + "@webiny/api-apw": latest + "@webiny/api-apw-scheduler-so-ddb": latest + "@webiny/api-audit-logs": latest + "@webiny/api-background-tasks-es": latest + "@webiny/api-elasticsearch": latest + "@webiny/api-file-manager": latest + "@webiny/api-file-manager-ddb": latest + "@webiny/api-file-manager-s3": latest + "@webiny/api-form-builder": latest + "@webiny/api-form-builder-so-ddb-es": latest + "@webiny/api-headless-cms": latest + "@webiny/api-headless-cms-ddb-es": latest + "@webiny/api-i18n": latest + "@webiny/api-i18n-content": latest + "@webiny/api-i18n-ddb": latest + "@webiny/api-page-builder": latest + "@webiny/api-page-builder-aco": latest + "@webiny/api-page-builder-import-export": latest + "@webiny/api-page-builder-import-export-so-ddb": latest + "@webiny/api-page-builder-so-ddb-es": latest + "@webiny/api-prerendering-service": latest + "@webiny/api-security": latest + "@webiny/api-security-cognito": latest + "@webiny/api-security-so-ddb": latest + "@webiny/api-tenancy": latest + "@webiny/api-tenancy-so-ddb": latest + "@webiny/api-tenant-manager": latest + "@webiny/api-wcp": latest + "@webiny/cli": latest "@webiny/cli-plugin-deploy-pulumi": 0.0.0 - "@webiny/db-dynamodb": 0.0.0 - "@webiny/handler-aws": 0.0.0 - "@webiny/handler-db": 0.0.0 - "@webiny/handler-graphql": 0.0.0 - "@webiny/handler-logs": 0.0.0 - "@webiny/project-utils": 0.0.0 - "@webiny/tasks": 0.0.0 + "@webiny/db-dynamodb": latest + "@webiny/handler-aws": latest + "@webiny/handler-client": latest + "@webiny/handler-db": latest + "@webiny/handler-graphql": latest + "@webiny/handler-logs": latest + "@webiny/project-utils": latest graphql-request: ^3.4.0 languageName: unknown linkType: soft @@ -20726,7 +21746,7 @@ __metadata: languageName: node linkType: hard -"archiver@npm:^7.0.0": +"archiver@npm:7.0.0, archiver@npm:^7.0.0": version: 7.0.0 resolution: "archiver@npm:7.0.0" dependencies: @@ -21012,7 +22032,7 @@ __metadata: languageName: node linkType: hard -"arrify@npm:^1.0.1": +"arrify@npm:^1.0.0, arrify@npm:^1.0.1": version: 1.0.1 resolution: "arrify@npm:1.0.1" checksum: 745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 @@ -21065,7 +22085,7 @@ __metadata: languageName: node linkType: hard -"assert-browserify@npm:^2.0.0": +"assert-browserify@npm:2.0.0, assert-browserify@npm:^2.0.0": version: 2.0.0 resolution: "assert-browserify@npm:2.0.0" dependencies: @@ -21293,7 +22313,7 @@ __metadata: languageName: node linkType: hard -"aws-elasticsearch-connector@npm:^9.0.0": +"aws-elasticsearch-connector@npm:9.2.0, aws-elasticsearch-connector@npm:^9.0.0": version: 9.2.0 resolution: "aws-elasticsearch-connector@npm:9.2.0" dependencies: @@ -21305,7 +22325,7 @@ __metadata: languageName: node linkType: hard -"aws-lambda@npm:^1.0.7": +"aws-lambda@npm:1.0.7, aws-lambda@npm:^1.0.7": version: 1.0.7 resolution: "aws-lambda@npm:1.0.7" dependencies: @@ -21319,6 +22339,24 @@ __metadata: languageName: node linkType: hard +"aws-sdk@npm:^2.0.0": + version: 2.1632.0 + resolution: "aws-sdk@npm:2.1632.0" + dependencies: + buffer: 4.9.2 + events: 1.1.1 + ieee754: 1.1.13 + jmespath: 0.16.0 + querystring: 0.2.0 + sax: 1.2.1 + url: 0.10.3 + util: ^0.12.4 + uuid: 8.0.0 + xml2js: 0.6.2 + checksum: 23a08c09b78443feee2ccbed0e34d393c5fc44290681261563e4589e592f6d2c20999327e959483dbf65737039ebf8a2d7ef83b7ef44a474a299c636140e6803 + languageName: node + linkType: hard + "aws-sdk@npm:^2.814.0": version: 2.1310.0 resolution: "aws-sdk@npm:2.1310.0" @@ -22262,7 +23300,7 @@ __metadata: languageName: node linkType: hard -"boolean@npm:^3.0.1, boolean@npm:^3.1.4": +"boolean@npm:3.2.0, boolean@npm:^3.0.1, boolean@npm:^3.1.4": version: 3.2.0 resolution: "boolean@npm:3.2.0" checksum: fb29535b8bf710ef45279677a86d14f5185d604557204abd2ca5fa3fb2a5c80e04d695c8dbf13ab269991977a79bb6c04b048220a6b2a3849853faa94f4a7d77 @@ -22593,7 +23631,7 @@ __metadata: languageName: node linkType: hard -"buffer-from@npm:^1.0.0": +"buffer-from@npm:^1.0.0, buffer-from@npm:^1.1.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" checksum: 0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb @@ -22635,23 +23673,23 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.6.0": - version: 5.7.1 - resolution: "buffer@npm:5.7.1" +"buffer@npm:6.0.3, buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" dependencies: base64-js: ^1.3.1 - ieee754: ^1.1.13 - checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 languageName: node linkType: hard -"buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" +"buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.6.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" dependencies: base64-js: ^1.3.1 - ieee754: ^1.2.1 - checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + ieee754: ^1.1.13 + checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84 languageName: node linkType: hard @@ -23217,13 +24255,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^5.3.0": - version: 5.3.0 - resolution: "chalk@npm:5.3.0" - checksum: 623922e077b7d1e9dedaea6f8b9e9352921f8ae3afe739132e0e00c275971bdd331268183b2628cf4ab1727c45ea1f28d7e24ac23ce1db1eb653c414ca8a5a80 - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -23703,7 +24734,7 @@ __metadata: languageName: node linkType: hard -"code-frame@npm:^5.0.0": +"code-frame@npm:5.0.0, code-frame@npm:^5.0.0": version: 5.0.0 resolution: "code-frame@npm:5.0.0" dependencies: @@ -23984,7 +25015,7 @@ __metadata: languageName: node linkType: hard -"commodo-fields-object@npm:^1.0.3, commodo-fields-object@npm:^1.0.6": +"commodo-fields-object@npm:1.0.6, commodo-fields-object@npm:^1.0.3, commodo-fields-object@npm:^1.0.6": version: 1.0.6 resolution: "commodo-fields-object@npm:1.0.6" dependencies: @@ -24810,7 +25841,7 @@ __metadata: languageName: node linkType: hard -"crypto-browserify@npm:^3.11.0, crypto-browserify@npm:^3.12.0": +"crypto-browserify@npm:3.12.0, crypto-browserify@npm:^3.11.0, crypto-browserify@npm:^3.12.0": version: 3.12.0 resolution: "crypto-browserify@npm:3.12.0" dependencies: @@ -24829,7 +25860,7 @@ __metadata: languageName: node linkType: hard -"crypto-js@npm:^4.0.0, crypto-js@npm:^4.1.1": +"crypto-js@npm:4.1.1, crypto-js@npm:^4.0.0, crypto-js@npm:^4.1.1": version: 4.1.1 resolution: "crypto-js@npm:4.1.1" checksum: b3747c12ee3a7632fab3b3e171ea50f78b182545f0714f6d3e7e2858385f0f4101a15f2517e033802ce9d12ba50a391575ff4638c9de3dd9b2c4bc47768d5425 @@ -24930,7 +25961,7 @@ __metadata: languageName: node linkType: hard -"css-minimizer-webpack-plugin@npm:^3.2.0": +"css-minimizer-webpack-plugin@npm:3.4.1, css-minimizer-webpack-plugin@npm:^3.2.0": version: 3.4.1 resolution: "css-minimizer-webpack-plugin@npm:3.4.1" dependencies: @@ -25471,7 +26502,7 @@ __metadata: languageName: node linkType: hard -"dataloader@npm:^2.0.0": +"dataloader@npm:2.2.1, dataloader@npm:^2.0.0": version: 2.2.1 resolution: "dataloader@npm:2.2.1" checksum: bc80fec711c264fa4244c749123658c7e73946aaa6f9906eb109763001751614aeb1688ffba2226c507bddb2da4da85432ae837cea8d09929e09bdb67048b96e @@ -25487,6 +26518,13 @@ __metadata: languageName: node linkType: hard +"date-fns@npm:2.29.3, date-fns@npm:^2.22.1": + version: 2.29.3 + resolution: "date-fns@npm:2.29.3" + checksum: e01cf5b62af04e05dfff921bb9c9933310ed0e1ae9a81eb8653452e64dc841acf7f6e01e1a5ae5644d0337e9a7f936175fd2cb6819dc122fdd9c5e86c56be484 + languageName: node + linkType: hard + "date-fns@npm:^1.27.2": version: 1.30.1 resolution: "date-fns@npm:1.30.1" @@ -25494,13 +26532,6 @@ __metadata: languageName: node linkType: hard -"date-fns@npm:^2.22.1": - version: 2.29.3 - resolution: "date-fns@npm:2.29.3" - checksum: e01cf5b62af04e05dfff921bb9c9933310ed0e1ae9a81eb8653452e64dc841acf7f6e01e1a5ae5644d0337e9a7f936175fd2cb6819dc122fdd9c5e86c56be484 - languageName: node - linkType: hard - "date-now@npm:^0.1.4": version: 0.1.4 resolution: "date-now@npm:0.1.4" @@ -25529,7 +26560,7 @@ __metadata: languageName: node linkType: hard -"dayjs@npm:^1.10.4": +"dayjs@npm:1.11.7, dayjs@npm:^1.10.4": version: 1.11.7 resolution: "dayjs@npm:1.11.7" checksum: 5003a7c1dd9ed51385beb658231c3548700b82d3548c0cfbe549d85f2d08e90e972510282b7506941452c58d32136d6362f009c77ca55381a09c704e9f177ebb @@ -25750,6 +26781,32 @@ __metadata: languageName: node linkType: hard +"deep-equal@npm:2.2.3, deep-equal@npm:^2.2.3": + version: 2.2.3 + resolution: "deep-equal@npm:2.2.3" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.5 + es-get-iterator: ^1.1.3 + get-intrinsic: ^1.2.2 + is-arguments: ^1.1.1 + is-array-buffer: ^3.0.2 + is-date-object: ^1.0.5 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + isarray: ^2.0.5 + object-is: ^1.1.5 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + side-channel: ^1.0.4 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.13 + checksum: ee8852f23e4d20a5626c13b02f415ba443a1b30b4b3d39eaf366d59c4a85e6545d7ec917db44d476a85ae5a86064f7e5f7af7479f38f113995ba869f3a1ddc53 + languageName: node + linkType: hard + "deep-equal@npm:^1.0.1, deep-equal@npm:^1.1.1": version: 1.1.1 resolution: "deep-equal@npm:1.1.1" @@ -25789,32 +26846,6 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:^2.2.3": - version: 2.2.3 - resolution: "deep-equal@npm:2.2.3" - dependencies: - array-buffer-byte-length: ^1.0.0 - call-bind: ^1.0.5 - es-get-iterator: ^1.1.3 - get-intrinsic: ^1.2.2 - is-arguments: ^1.1.1 - is-array-buffer: ^3.0.2 - is-date-object: ^1.0.5 - is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.2 - isarray: ^2.0.5 - object-is: ^1.1.5 - object-keys: ^1.1.1 - object.assign: ^4.1.4 - regexp.prototype.flags: ^1.5.1 - side-channel: ^1.0.4 - which-boxed-primitive: ^1.0.2 - which-collection: ^1.0.1 - which-typed-array: ^1.1.13 - checksum: ee8852f23e4d20a5626c13b02f415ba443a1b30b4b3d39eaf366d59c4a85e6545d7ec917db44d476a85ae5a86064f7e5f7af7479f38f113995ba869f3a1ddc53 - languageName: node - linkType: hard - "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -26210,6 +27241,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:^3.1.0": + version: 3.5.0 + resolution: "diff@npm:3.5.0" + checksum: 00842950a6551e26ce495bdbce11047e31667deea546527902661f25cc2e73358967ebc78cf86b1a9736ec3e14286433225f9970678155753a6291c3bca5227b + languageName: node + linkType: hard + "diff@npm:^4.0.1, diff@npm:^4.0.2": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -26555,13 +27593,22 @@ __metadata: languageName: node linkType: hard -"dot-prop-immutable@npm:^2.1.0, dot-prop-immutable@npm:^2.1.1": +"dot-prop-immutable@npm:2.1.1, dot-prop-immutable@npm:^2.1.0, dot-prop-immutable@npm:^2.1.1": version: 2.1.1 resolution: "dot-prop-immutable@npm:2.1.1" checksum: d5a2e696e661c6a5f32e6bf41322122cc8a07bbe0d53c56a3c0e6157020e325332a0b635e03308b6a8ec8d70b16b4d5a07e8457cf7f2157d9f49795eded4d744 languageName: node linkType: hard +"dot-prop@npm:6.0.1, dot-prop@npm:^6.0.1": + version: 6.0.1 + resolution: "dot-prop@npm:6.0.1" + dependencies: + is-obj: ^2.0.0 + checksum: 0f47600a4b93e1dc37261da4e6909652c008832a5d3684b5bf9a9a0d3f4c67ea949a86dceed9b72f5733ed8e8e6383cc5958df3bbd0799ee317fd181f2ece700 + languageName: node + linkType: hard + "dot-prop@npm:^4.2.0": version: 4.2.1 resolution: "dot-prop@npm:4.2.1" @@ -26580,15 +27627,6 @@ __metadata: languageName: node linkType: hard -"dot-prop@npm:^6.0.1": - version: 6.0.1 - resolution: "dot-prop@npm:6.0.1" - dependencies: - is-obj: ^2.0.0 - checksum: 0f47600a4b93e1dc37261da4e6909652c008832a5d3684b5bf9a9a0d3f4c67ea949a86dceed9b72f5733ed8e8e6383cc5958df3bbd0799ee317fd181f2ece700 - languageName: node - linkType: hard - "dotenv-defaults@npm:^1.0.2": version: 1.1.1 resolution: "dotenv-defaults@npm:1.1.1" @@ -26616,6 +27654,13 @@ __metadata: languageName: node linkType: hard +"dotenv@npm:8.6.0, dotenv@npm:^8.0.0, dotenv@npm:^8.2.0": + version: 8.6.0 + resolution: "dotenv@npm:8.6.0" + checksum: 38e902c80b0666ab59e9310a3d24ed237029a7ce34d976796349765ac96b8d769f6df19090f1f471b77a25ca391971efde8a1ea63bb83111bd8bec8e5cc9b2cd + languageName: node + linkType: hard + "dotenv@npm:^6.2.0": version: 6.2.0 resolution: "dotenv@npm:6.2.0" @@ -26623,13 +27668,6 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^8.0.0, dotenv@npm:^8.2.0": - version: 8.6.0 - resolution: "dotenv@npm:8.6.0" - checksum: 38e902c80b0666ab59e9310a3d24ed237029a7ce34d976796349765ac96b8d769f6df19090f1f471b77a25ca391971efde8a1ea63bb83111bd8bec8e5cc9b2cd - languageName: node - linkType: hard - "download@npm:^5.0.3": version: 5.0.3 resolution: "download@npm:5.0.3" @@ -26671,38 +27709,6 @@ __metadata: languageName: node linkType: hard -"dprint@npm:^0.45.1": - version: 0.45.1 - resolution: "dprint@npm:0.45.1" - dependencies: - "@dprint/darwin-arm64": 0.45.1 - "@dprint/darwin-x64": 0.45.1 - "@dprint/linux-arm64-glibc": 0.45.1 - "@dprint/linux-arm64-musl": 0.45.1 - "@dprint/linux-x64-glibc": 0.45.1 - "@dprint/linux-x64-musl": 0.45.1 - "@dprint/win32-x64": 0.45.1 - dependenciesMeta: - "@dprint/darwin-arm64": - optional: true - "@dprint/darwin-x64": - optional: true - "@dprint/linux-arm64-glibc": - optional: true - "@dprint/linux-arm64-musl": - optional: true - "@dprint/linux-x64-glibc": - optional: true - "@dprint/linux-x64-musl": - optional: true - "@dprint/win32-x64": - optional: true - bin: - dprint: bin.js - checksum: 038b693c52482e0536a854e81c1757deaecdedb979a90c68b875d544b87a3c1f763dc63b34850fcfae9e770194f3d74ec76cd2167ed82ff598ea3addcecd5067 - languageName: node - linkType: hard - "drawille-blessed-contrib@npm:>=0.0.1": version: 1.0.0 resolution: "drawille-blessed-contrib@npm:1.0.0" @@ -26795,7 +27801,7 @@ __metadata: languageName: node linkType: hard -"dynamodb-toolbox@npm:^0.9.2": +"dynamodb-toolbox@npm:0.9.2, dynamodb-toolbox@npm:^0.9.2": version: 0.9.2 resolution: "dynamodb-toolbox@npm:0.9.2" dependencies: @@ -26866,7 +27872,7 @@ __metadata: languageName: node linkType: hard -"elastic-ts@npm:^0.8.0": +"elastic-ts@npm:0.8.0, elastic-ts@npm:^0.8.0": version: 0.8.0 resolution: "elastic-ts@npm:0.8.0" dependencies: @@ -27511,7 +28517,7 @@ __metadata: languageName: node linkType: hard -"eslint-config-react-app@npm:^6.0.0": +"eslint-config-react-app@npm:6.0.0, eslint-config-react-app@npm:^6.0.0": version: 6.0.0 resolution: "eslint-config-react-app@npm:6.0.0" dependencies: @@ -27780,7 +28786,7 @@ __metadata: languageName: node linkType: hard -"eslint-webpack-plugin@npm:^3.1.1": +"eslint-webpack-plugin@npm:3.2.0, eslint-webpack-plugin@npm:^3.1.1": version: 3.2.0 resolution: "eslint-webpack-plugin@npm:3.2.0" dependencies: @@ -27796,7 +28802,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.16.1, eslint@npm:^8.4.1": +"eslint@npm:8.33.0, eslint@npm:^8.16.1, eslint@npm:^8.4.1": version: 8.33.0 resolution: "eslint@npm:8.33.0" dependencies: @@ -28432,6 +29438,20 @@ __metadata: languageName: node linkType: hard +"extract-zip@npm:1.7.0, extract-zip@npm:^1.6.7": + version: 1.7.0 + resolution: "extract-zip@npm:1.7.0" + dependencies: + concat-stream: ^1.6.2 + debug: ^2.6.9 + mkdirp: ^0.5.4 + yauzl: ^2.10.0 + bin: + extract-zip: cli.js + checksum: 011bab660d738614555773d381a6ba4815d98c1cfcdcdf027e154ebcc9fc8c9ef637b3ea5c9b2144013100071ee41722ed041fc9aacc60f6198ef747cac0c073 + languageName: node + linkType: hard + "extract-zip@npm:2.0.1": version: 2.0.1 resolution: "extract-zip@npm:2.0.1" @@ -28449,20 +29469,6 @@ __metadata: languageName: node linkType: hard -"extract-zip@npm:^1.6.7": - version: 1.7.0 - resolution: "extract-zip@npm:1.7.0" - dependencies: - concat-stream: ^1.6.2 - debug: ^2.6.9 - mkdirp: ^0.5.4 - yauzl: ^2.10.0 - bin: - extract-zip: cli.js - checksum: 011bab660d738614555773d381a6ba4815d98c1cfcdcdf027e154ebcc9fc8c9ef637b3ea5c9b2144013100071ee41722ed041fc9aacc60f6198ef747cac0c073 - languageName: node - linkType: hard - "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -28526,6 +29532,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:3.2.12, fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": + version: 3.2.12 + resolution: "fast-glob@npm:3.2.12" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 0b1990f6ce831c7e28c4d505edcdaad8e27e88ab9fa65eedadb730438cfc7cde4910d6c975d6b7b8dc8a73da4773702ebcfcd6e3518e73938bb1383badfe01c2 + languageName: node + linkType: hard + "fast-glob@npm:^2.0.2, fast-glob@npm:^2.2.6": version: 2.2.7 resolution: "fast-glob@npm:2.2.7" @@ -28553,19 +29572,6 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": - version: 3.2.12 - resolution: "fast-glob@npm:3.2.12" - dependencies: - "@nodelib/fs.stat": ^2.0.2 - "@nodelib/fs.walk": ^1.2.3 - glob-parent: ^5.1.2 - merge2: ^1.3.0 - micromatch: ^4.0.4 - checksum: 0b1990f6ce831c7e28c4d505edcdaad8e27e88ab9fa65eedadb730438cfc7cde4910d6c975d6b7b8dc8a73da4773702ebcfcd6e3518e73938bb1383badfe01c2 - languageName: node - linkType: hard - "fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -29345,7 +30351,7 @@ __metadata: languageName: node linkType: hard -"fork-ts-checker-webpack-plugin@npm:^6.5.0": +"fork-ts-checker-webpack-plugin@npm:6.5.2, fork-ts-checker-webpack-plugin@npm:^6.5.0": version: 6.5.2 resolution: "fork-ts-checker-webpack-plugin@npm:6.5.2" dependencies: @@ -29387,6 +30393,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:4.0.0, form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.8 + mime-types: ^2.1.12 + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + "form-data@npm:^2.5.0": version: 2.5.1 resolution: "form-data@npm:2.5.1" @@ -29409,17 +30426,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.0": - version: 4.0.0 - resolution: "form-data@npm:4.0.0" - dependencies: - asynckit: ^0.4.0 - combined-stream: ^1.0.8 - mime-types: ^2.1.12 - checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c - languageName: node - linkType: hard - "form-data@npm:~2.3.2": version: 2.3.3 resolution: "form-data@npm:2.3.3" @@ -29516,6 +30522,18 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:9.1.0, fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": + version: 9.1.0 + resolution: "fs-extra@npm:9.1.0" + dependencies: + at-least-node: ^1.0.0 + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20 + languageName: node + linkType: hard + "fs-extra@npm:^1.0.0": version: 1.0.0 resolution: "fs-extra@npm:1.0.0" @@ -29571,18 +30589,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": - version: 9.1.0 - resolution: "fs-extra@npm:9.1.0" - dependencies: - at-least-node: ^1.0.0 - graceful-fs: ^4.2.0 - jsonfile: ^6.0.1 - universalify: ^2.0.0 - checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20 - languageName: node - linkType: hard - "fs-minipass@npm:^1.2.7": version: 1.2.7 resolution: "fs-minipass@npm:1.2.7" @@ -30226,6 +31232,20 @@ __metadata: languageName: node linkType: hard +"glob@npm:7.2.3, glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.1.1 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 + languageName: node + linkType: hard + "glob@npm:^10.0.0": version: 10.3.10 resolution: "glob@npm:10.3.10" @@ -30282,20 +31302,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0": - version: 7.2.3 - resolution: "glob@npm:7.2.3" - dependencies: - fs.realpath: ^1.0.0 - inflight: ^1.0.4 - inherits: 2 - minimatch: ^3.1.1 - once: ^1.3.0 - path-is-absolute: ^1.0.0 - checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 - languageName: node - linkType: hard - "glob@npm:^8.0.0, glob@npm:^8.0.1": version: 8.1.0 resolution: "glob@npm:8.1.0" @@ -30481,6 +31487,25 @@ __metadata: languageName: node linkType: hard +"got@npm:9.6.0, got@npm:^9.6.0": + version: 9.6.0 + resolution: "got@npm:9.6.0" + dependencies: + "@sindresorhus/is": ^0.14.0 + "@szmarczak/http-timer": ^1.1.2 + cacheable-request: ^6.0.0 + decompress-response: ^3.3.0 + duplexer3: ^0.1.4 + get-stream: ^4.1.0 + lowercase-keys: ^1.0.1 + mimic-response: ^1.0.1 + p-cancelable: ^1.0.0 + to-readable-stream: ^1.0.0 + url-parse-lax: ^3.0.0 + checksum: 941807bd9704bacf5eb401f0cc1212ffa1f67c6642f2d028fd75900471c221b1da2b8527f4553d2558f3faeda62ea1cf31665f8b002c6137f5de8732f07370b0 + languageName: node + linkType: hard + "got@npm:^11.8.6": version: 11.8.6 resolution: "got@npm:11.8.6" @@ -30519,25 +31544,6 @@ __metadata: languageName: node linkType: hard -"got@npm:^9.6.0": - version: 9.6.0 - resolution: "got@npm:9.6.0" - dependencies: - "@sindresorhus/is": ^0.14.0 - "@szmarczak/http-timer": ^1.1.2 - cacheable-request: ^6.0.0 - decompress-response: ^3.3.0 - duplexer3: ^0.1.4 - get-stream: ^4.1.0 - lowercase-keys: ^1.0.1 - mimic-response: ^1.0.1 - p-cancelable: ^1.0.0 - to-readable-stream: ^1.0.0 - url-parse-lax: ^3.0.0 - checksum: 941807bd9704bacf5eb401f0cc1212ffa1f67c6642f2d028fd75900471c221b1da2b8527f4553d2558f3faeda62ea1cf31665f8b002c6137f5de8732f07370b0 - languageName: node - linkType: hard - "graceful-fs@npm:^4.1.10, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.2, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" @@ -30561,7 +31567,7 @@ __metadata: languageName: node linkType: hard -"graphql-request@npm:^3.3.0, graphql-request@npm:^3.4.0, graphql-request@npm:^3.7.0": +"graphql-request@npm:3.7.0, graphql-request@npm:^3.3.0, graphql-request@npm:^3.4.0, graphql-request@npm:^3.7.0": version: 3.7.0 resolution: "graphql-request@npm:3.7.0" dependencies: @@ -30574,24 +31580,6 @@ __metadata: languageName: node linkType: hard -"graphql-request@npm:^7.0.1": - version: 7.0.1 - resolution: "graphql-request@npm:7.0.1" - dependencies: - "@dprint/formatter": ^0.3.0 - "@dprint/typescript": ^0.90.4 - "@graphql-typed-document-node/core": ^3.2.0 - "@molt/command": ^0.9.0 - dprint: ^0.45.1 - zod: ^3.23.5 - peerDependencies: - graphql: 14 - 16 - bin: - graffle: build/cli/generate.js - checksum: 55d3cbf74f67cb9365b6e2f1bf9c90b51dd9c9fc5994288a70538ef604946a9ecd74a940a24ada3d56277317f1a396f7840f415d132b0a19637c492d35b96af7 - languageName: node - linkType: hard - "graphql-scalars@npm:1.12.0": version: 1.12.0 resolution: "graphql-scalars@npm:1.12.0" @@ -30603,7 +31591,7 @@ __metadata: languageName: node linkType: hard -"graphql-tag@npm:^2.10.1, graphql-tag@npm:^2.12.6": +"graphql-tag@npm:2.12.6, graphql-tag@npm:^2.10.1, graphql-tag@npm:^2.12.6": version: 2.12.6 resolution: "graphql-tag@npm:2.12.6" dependencies: @@ -30614,7 +31602,7 @@ __metadata: languageName: node linkType: hard -"graphql@npm:^15.7.2, graphql@npm:^15.8.0": +"graphql@npm:15.8.0, graphql@npm:^15.7.2, graphql@npm:^15.8.0": version: 15.8.0 resolution: "graphql@npm:15.8.0" checksum: 423325271db8858428641b9aca01699283d1fe5b40ef6d4ac622569ecca927019fce8196208b91dd1d8eb8114f00263fe661d241d0eb40c10e5bfd650f86ec5e @@ -31506,7 +32494,7 @@ __metadata: languageName: node linkType: hard -"i18n-locales@npm:^0.0.2": +"i18n-locales@npm:0.0.2, i18n-locales@npm:^0.0.2": version: 0.0.2 resolution: "i18n-locales@npm:0.0.2" checksum: 1e2387c77d583987074b0e507f9a3196df290322d7250d4f447b103ab92b5ed028747a5a94a40f6e10e25ebd0701c23c2a74067d35f171c0a76fa75ec3b237ce @@ -32574,6 +33562,13 @@ __metadata: languageName: node linkType: hard +"is-number@npm:7.0.0, is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a + languageName: node + linkType: hard + "is-number@npm:^2.1.0": version: 2.1.0 resolution: "is-number@npm:2.1.0" @@ -32599,13 +33594,6 @@ __metadata: languageName: node linkType: hard -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a - languageName: node - linkType: hard - "is-obj@npm:^1.0.0, is-obj@npm:^1.0.1": version: 1.0.1 resolution: "is-obj@npm:1.0.1" @@ -32972,7 +33960,7 @@ __metadata: languageName: node linkType: hard -"isnumeric@npm:^0.3.3": +"isnumeric@npm:0.3.3, isnumeric@npm:^0.3.3": version: 0.3.3 resolution: "isnumeric@npm:0.3.3" checksum: daeae3dc07291dcefabe87a524464688bb91eb3b228256afa85e56bc63e1250edcc3dd6cc6cec7629d3ddecb7ec6533418f83c2088145c974ed9b630d88de314 @@ -34116,7 +35104,7 @@ __metadata: languageName: node linkType: hard -"json2csv@npm:^4.5.2": +"json2csv@npm:4.5.4, json2csv@npm:^4.5.2": version: 4.5.4 resolution: "json2csv@npm:4.5.4" dependencies: @@ -34202,7 +35190,7 @@ __metadata: languageName: node linkType: hard -"jsonpack@npm:^1.1.5": +"jsonpack@npm:1.1.5, jsonpack@npm:^1.1.5": version: 1.1.5 resolution: "jsonpack@npm:1.1.5" checksum: 60ae0a52343a6bc254ff6677e87c55f4d71347b4a0c981b53cd3fdc184e139e0bf1b6bc127d42c1ab41b3c99d98e1e81559a94ba74a1c91c9143f70c8d751bf6 @@ -34241,27 +35229,27 @@ __metadata: languageName: node linkType: hard -"jsonwebtoken@npm:^9.0.0": - version: 9.0.0 - resolution: "jsonwebtoken@npm:9.0.0" +"jsonwebtoken@npm:9.0.1, jsonwebtoken@npm:^9.0.1": + version: 9.0.1 + resolution: "jsonwebtoken@npm:9.0.1" dependencies: jws: ^3.2.2 lodash: ^4.17.21 ms: ^2.1.1 semver: ^7.3.8 - checksum: b9181cecf9df99f1dc0253f91ba000a1aa4d91f5816d1608c0dba61a5623726a0bfe200b51df25de18c1a6000825d231ad7ce2788aa54fd48dcb760ad9eb9514 + checksum: 0eafe268896f4e8f9ab1f0f20e8c645721b7a9cddc41c0aba1e58da5c34564e8c9990817c1a5b646d795bcbb1339350826fe57c4569b5379ba9eea4a9aa5bbd0 languageName: node linkType: hard -"jsonwebtoken@npm:^9.0.1": - version: 9.0.1 - resolution: "jsonwebtoken@npm:9.0.1" +"jsonwebtoken@npm:^9.0.0": + version: 9.0.0 + resolution: "jsonwebtoken@npm:9.0.0" dependencies: jws: ^3.2.2 lodash: ^4.17.21 ms: ^2.1.1 semver: ^7.3.8 - checksum: 0eafe268896f4e8f9ab1f0f20e8c645721b7a9cddc41c0aba1e58da5c34564e8c9990817c1a5b646d795bcbb1339350826fe57c4569b5379ba9eea4a9aa5bbd0 + checksum: b9181cecf9df99f1dc0253f91ba000a1aa4d91f5816d1608c0dba61a5623726a0bfe200b51df25de18c1a6000825d231ad7ce2788aa54fd48dcb760ad9eb9514 languageName: node linkType: hard @@ -34355,7 +35343,7 @@ __metadata: languageName: node linkType: hard -"jwk-to-pem@npm:^2.0.1": +"jwk-to-pem@npm:2.0.5, jwk-to-pem@npm:^2.0.1": version: 2.0.5 resolution: "jwk-to-pem@npm:2.0.5" dependencies: @@ -35235,13 +36223,6 @@ __metadata: languageName: node linkType: hard -"lodash.snakecase@npm:^4.1.1": - version: 4.1.1 - resolution: "lodash.snakecase@npm:4.1.1" - checksum: 1685ed3e83dda6eae5a4dcaee161a51cd210aabb3e1c09c57150e7dd8feda19e4ca0d27d0631eabe8d0f4eaa51e376da64e8c018ae5415417c5890d42feb72a8 - languageName: node - linkType: hard - "lodash.sortby@npm:^4.7.0": version: 4.7.0 resolution: "lodash.sortby@npm:4.7.0" @@ -35373,6 +36354,13 @@ __metadata: languageName: node linkType: hard +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 16afbe8f749c7c849db1f4de4e2e6a31ac6e617cead3bdc4f9605cb703cd20e1e9fc1a7baba674ffcca57d660a6e5b53a9e236d7b25a295d3855cca79cc06744 + languageName: node + linkType: hard + "long@npm:^5.0.0": version: 5.2.3 resolution: "long@npm:5.2.3" @@ -35864,7 +36852,7 @@ __metadata: languageName: node linkType: hard -"md5@npm:^2.3.0": +"md5@npm:2.3.0, md5@npm:^2.3.0": version: 2.3.0 resolution: "md5@npm:2.3.0" dependencies: @@ -35875,7 +36863,7 @@ __metadata: languageName: node linkType: hard -"mdbid@npm:^1.0.0": +"mdbid@npm:1.0.0, mdbid@npm:^1.0.0": version: 1.0.0 resolution: "mdbid@npm:1.0.0" dependencies: @@ -36201,7 +37189,7 @@ __metadata: languageName: node linkType: hard -"mime@npm:^3.0.0": +"mime@npm:3.0.0, mime@npm:^3.0.0": version: 3.0.0 resolution: "mime@npm:3.0.0" bin: @@ -36311,7 +37299,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0, minimatch@npm:^5.1.6, minimatch@npm:~5.1.2": +"minimatch@npm:5.1.6, minimatch@npm:^5.0.1, minimatch@npm:^5.1.0, minimatch@npm:^5.1.6, minimatch@npm:~5.1.2": version: 5.1.6 resolution: "minimatch@npm:5.1.6" dependencies: @@ -36840,13 +37828,22 @@ __metadata: languageName: node linkType: hard -"nanoid-dictionary@npm:^4.3.0": +"nanoid-dictionary@npm:4.3.0, nanoid-dictionary@npm:^4.3.0": version: 4.3.0 resolution: "nanoid-dictionary@npm:4.3.0" checksum: 254ed606f0ef6cfea6f5b1fcaa69f10d561650c0d2cff8b138290c6abd8cbdc3335be8799d7520b8ad8b598b8a8b2bd774bfea49eac1ddecb222e4d80e558de5 languageName: node linkType: hard +"nanoid@npm:3.3.4, nanoid@npm:^3.1.20, nanoid@npm:^3.1.22, nanoid@npm:^3.1.30, nanoid@npm:^3.3.4": + version: 3.3.4 + resolution: "nanoid@npm:3.3.4" + bin: + nanoid: bin/nanoid.cjs + checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c + languageName: node + linkType: hard + "nanoid@npm:^2.1.0": version: 2.1.11 resolution: "nanoid@npm:2.1.11" @@ -36863,15 +37860,6 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.1.20, nanoid@npm:^3.1.22, nanoid@npm:^3.1.30, nanoid@npm:^3.3.4": - version: 3.3.4 - resolution: "nanoid@npm:3.3.4" - bin: - nanoid: bin/nanoid.cjs - checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c - languageName: node - linkType: hard - "nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -37102,17 +38090,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^1.0.1": - version: 1.7.3 - resolution: "node-fetch@npm:1.7.3" - dependencies: - encoding: ^0.1.11 - is-stream: ^1.0.1 - checksum: 3bb0528c05d541316ebe52770d71ee25a6dce334df4231fd55df41a644143e07f068637488c18a5b0c43f05041dbd3346752f9e19b50df50569a802484544d5b - languageName: node - linkType: hard - -"node-fetch@npm:^2.5.0, node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": +"node-fetch@npm:2.6.9, node-fetch@npm:^2.5.0, node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": version: 2.6.9 resolution: "node-fetch@npm:2.6.9" dependencies: @@ -37126,6 +38104,16 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^1.0.1": + version: 1.7.3 + resolution: "node-fetch@npm:1.7.3" + dependencies: + encoding: ^0.1.11 + is-stream: ^1.0.1 + checksum: 3bb0528c05d541316ebe52770d71ee25a6dce334df4231fd55df41a644143e07f068637488c18a5b0c43f05041dbd3346752f9e19b50df50569a802484544d5b + languageName: node + linkType: hard + "node-forge@npm:^0.10.0": version: 0.10.0 resolution: "node-forge@npm:0.10.0" @@ -37289,7 +38277,7 @@ __metadata: languageName: node linkType: hard -"nodemailer@npm:^6.7.6": +"nodemailer@npm:6.9.1, nodemailer@npm:^6.7.6": version: 6.9.1 resolution: "nodemailer@npm:6.9.1" checksum: b1b9670afc170b4454665abae3fc9acd7e781adb9f579d1c2cd991bf75c647ebe345593f8a057e48d7bf9e4c9a9218869f87db8fb7171c614f557000ab654572 @@ -37721,7 +38709,7 @@ __metadata: languageName: node linkType: hard -"null-loader@npm:^4.0.1": +"null-loader@npm:4.0.1, null-loader@npm:^4.0.1": version: 4.0.1 resolution: "null-loader@npm:4.0.1" dependencies: @@ -37793,14 +38781,14 @@ __metadata: languageName: node linkType: hard -"object-hash@npm:^2.1.1": +"object-hash@npm:2.2.0, object-hash@npm:^2.1.1": version: 2.2.0 resolution: "object-hash@npm:2.2.0" checksum: 55ba841e3adce9c4f1b9b46b41983eda40f854e0d01af2802d3ae18a7085a17168d6b81731d43fdf1d6bcbb3c9f9c56d22c8fea992203ad90a38d7d919bc28f1 languageName: node linkType: hard -"object-hash@npm:^3.0.0": +"object-hash@npm:3.0.0, object-hash@npm:^3.0.0": version: 3.0.0 resolution: "object-hash@npm:3.0.0" checksum: 80b4904bb3857c52cc1bfd0b52c0352532ca12ed3b8a6ff06a90cd209dfda1b95cee059a7625eb9da29537027f68ac4619363491eedb2f5d3dddbba97494fd6c @@ -37831,7 +38819,7 @@ __metadata: languageName: node linkType: hard -"object-merge-advanced@npm:^12.1.0": +"object-merge-advanced@npm:12.1.0, object-merge-advanced@npm:^12.1.0": version: 12.1.0 resolution: "object-merge-advanced@npm:12.1.0" dependencies: @@ -38058,6 +39046,17 @@ __metadata: languageName: node linkType: hard +"open@npm:8.4.0, open@npm:^8.0.6, open@npm:^8.0.9, open@npm:^8.4.0": + version: 8.4.0 + resolution: "open@npm:8.4.0" + dependencies: + define-lazy-prop: ^2.0.0 + is-docker: ^2.1.1 + is-wsl: ^2.2.0 + checksum: e9545bec64cdbf30a0c35c1bdc310344adf8428a117f7d8df3c0af0a0a24c513b304916a6d9b11db0190ff7225c2d578885080b761ed46a3d5f6f1eebb98b63c + languageName: node + linkType: hard + "open@npm:^6.3.0": version: 6.4.0 resolution: "open@npm:6.4.0" @@ -38077,17 +39076,6 @@ __metadata: languageName: node linkType: hard -"open@npm:^8.0.6, open@npm:^8.0.9, open@npm:^8.4.0": - version: 8.4.0 - resolution: "open@npm:8.4.0" - dependencies: - define-lazy-prop: ^2.0.0 - is-docker: ^2.1.1 - is-wsl: ^2.2.0 - checksum: e9545bec64cdbf30a0c35c1bdc310344adf8428a117f7d8df3c0af0a0a24c513b304916a6d9b11db0190ff7225c2d578885080b761ed46a3d5f6f1eebb98b63c - languageName: node - linkType: hard - "opencollective-postinstall@npm:^2.0.0, opencollective-postinstall@npm:^2.0.2": version: 2.0.3 resolution: "opencollective-postinstall@npm:2.0.3" @@ -38202,7 +39190,7 @@ __metadata: languageName: node linkType: hard -"os-browserify@npm:^0.3.0": +"os-browserify@npm:0.3.0, os-browserify@npm:^0.3.0": version: 0.3.0 resolution: "os-browserify@npm:0.3.0" checksum: 16e37ba3c0e6a4c63443c7b55799ce4066d59104143cb637ecb9fce586d5da319cdca786ba1c867abbe3890d2cbf37953f2d51eea85e20dd6c4570d6c54bfebf @@ -38444,7 +39432,7 @@ __metadata: languageName: node linkType: hard -"p-retry@npm:^4.5.0, p-retry@npm:^4.6.2": +"p-retry@npm:4.6.2, p-retry@npm:^4.5.0, p-retry@npm:^4.6.2": version: 4.6.2 resolution: "p-retry@npm:4.6.2" dependencies: @@ -38824,7 +39812,7 @@ __metadata: languageName: node linkType: hard -"path-browserify@npm:^1.0.1": +"path-browserify@npm:1.0.1, path-browserify@npm:^1.0.1": version: 1.0.1 resolution: "path-browserify@npm:1.0.1" checksum: c6d7fa376423fe35b95b2d67990060c3ee304fc815ff0a2dc1c6c3cfaff2bd0d572ee67e18f19d0ea3bbe32e8add2a05021132ac40509416459fffee35200699 @@ -39184,7 +40172,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": +"pirates@npm:4.0.5, pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": version: 4.0.5 resolution: "pirates@npm:4.0.5" checksum: c9994e61b85260bec6c4fc0307016340d9b0c4f4b6550a957afaaff0c9b1ad58fbbea5cfcf083860a25cb27a375442e2b0edf52e2e1e40e69934e08dcc52d227 @@ -39289,7 +40277,7 @@ __metadata: languageName: node linkType: hard -"pluralize@npm:^8.0.0": +"pluralize@npm:8.0.0, pluralize@npm:^8.0.0": version: 8.0.0 resolution: "pluralize@npm:8.0.0" checksum: 08931d4a6a4a5561a7f94f67a31c17e6632cb21e459ab3ff4f6f629d9a822984cf8afef2311d2005fbea5d7ef26016ebb090db008e2d8bce39d0a9a9d218736e @@ -40295,7 +41283,7 @@ __metadata: languageName: node linkType: hard -"posthtml-noopener@npm:^1.0.5": +"posthtml-noopener@npm:1.0.5, posthtml-noopener@npm:^1.0.5": version: 1.0.5 resolution: "posthtml-noopener@npm:1.0.5" dependencies: @@ -40322,7 +41310,7 @@ __metadata: languageName: node linkType: hard -"posthtml-plugin-link-preload@npm:^1.0.0": +"posthtml-plugin-link-preload@npm:1.0.0, posthtml-plugin-link-preload@npm:^1.0.0": version: 1.0.0 resolution: "posthtml-plugin-link-preload@npm:1.0.0" dependencies: @@ -40338,6 +41326,16 @@ __metadata: languageName: node linkType: hard +"posthtml@npm:0.15.2, posthtml@npm:^0.15.0": + version: 0.15.2 + resolution: "posthtml@npm:0.15.2" + dependencies: + posthtml-parser: ^0.7.2 + posthtml-render: ^1.3.1 + checksum: 9b37fea35f8adecfd4379e568ba4038448c0a1fd9e0c8167765488e4e453891fa4481a9b8925d23b1dba5c2810c42717e19bc4870468f07983d5d99e0f105bb7 + languageName: node + linkType: hard + "posthtml@npm:^0.12.0": version: 0.12.3 resolution: "posthtml@npm:0.12.3" @@ -40348,16 +41346,6 @@ __metadata: languageName: node linkType: hard -"posthtml@npm:^0.15.0": - version: 0.15.2 - resolution: "posthtml@npm:0.15.2" - dependencies: - posthtml-parser: ^0.7.2 - posthtml-render: ^1.3.1 - checksum: 9b37fea35f8adecfd4379e568ba4038448c0a1fd9e0c8167765488e4e453891fa4481a9b8925d23b1dba5c2810c42717e19bc4870468f07983d5d99e0f105bb7 - languageName: node - linkType: hard - "prebuild-install@npm:^7.1.1": version: 7.1.1 resolution: "prebuild-install@npm:7.1.1" @@ -40579,7 +41567,7 @@ __metadata: languageName: node linkType: hard -"process@npm:^0.11.10": +"process@npm:0.11.10, process@npm:^0.11.10": version: 0.11.10 resolution: "process@npm:0.11.10" checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 @@ -40737,6 +41725,30 @@ __metadata: languageName: node linkType: hard +"protobufjs@npm:^6.8.6": + version: 6.11.4 + resolution: "protobufjs@npm:6.11.4" + dependencies: + "@protobufjs/aspromise": ^1.1.2 + "@protobufjs/base64": ^1.1.2 + "@protobufjs/codegen": ^2.0.4 + "@protobufjs/eventemitter": ^1.1.0 + "@protobufjs/fetch": ^1.1.0 + "@protobufjs/float": ^1.0.2 + "@protobufjs/inquire": ^1.1.0 + "@protobufjs/path": ^1.1.2 + "@protobufjs/pool": ^1.1.0 + "@protobufjs/utf8": ^1.1.0 + "@types/long": ^4.0.1 + "@types/node": ">=13.7.0" + long: ^4.0.0 + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: b2fc6a01897b016c2a7e43a854ab4a3c57080f61be41e552235436e7a730711b8e89e47cb4ae52f0f065b5ab5d5989fc932f390337ce3a8ccf07203415700850 + languageName: node + linkType: hard + "protobufjs@npm:^7.2.5": version: 7.3.0 resolution: "protobufjs@npm:7.3.0" @@ -41971,7 +42983,7 @@ __metadata: languageName: node linkType: hard -"react-refresh@npm:^0.11.0": +"react-refresh@npm:0.11.0, react-refresh@npm:^0.11.0": version: 0.11.0 resolution: "react-refresh@npm:0.11.0" checksum: 112178a05b1e0ffeaf5d9fb4e56b4410a34a73adeb04dbf13abdc50d9ac9df2ada83e81485156cca0b3fa296aa3612751b3d6cd13be4464642a43679b819cbc7 @@ -42115,7 +43127,7 @@ __metadata: languageName: node linkType: hard -"react-style-object-to-css@npm:^1.1.2": +"react-style-object-to-css@npm:1.1.2, react-style-object-to-css@npm:^1.1.2": version: 1.1.2 resolution: "react-style-object-to-css@npm:1.1.2" checksum: 1f854bf5c7fabcc0be3db3e35e4b346dd0d3cb2b09079f100380ab299d2db94ba75ab225254446958d820933c7be67b609219746610a14cda2c42e708711cc78 @@ -42267,7 +43279,7 @@ __metadata: languageName: node linkType: hard -"read-package-tree@npm:^5.1.6": +"read-package-tree@npm:^5.1.6, read-package-tree@npm:^5.2.1, read-package-tree@npm:^5.3.1": version: 5.3.1 resolution: "read-package-tree@npm:5.3.1" dependencies: @@ -42466,13 +43478,6 @@ __metadata: languageName: node linkType: hard -"readline-sync@npm:^1.4.10": - version: 1.4.10 - resolution: "readline-sync@npm:1.4.10" - checksum: 4dbd8925af028dc4cb1bb813f51ca3479035199aa5224886b560eec8e768ab27d7ebf11d69a67ed93d5a130b7c994f0bdb77796326e563cf928bbfd560e3747e - languageName: node - linkType: hard - "real-require@npm:^0.2.0": version: 0.2.0 resolution: "real-require@npm:0.2.0" @@ -42779,13 +43784,6 @@ __metadata: languageName: node linkType: hard -"remeda@npm:^1.0.0": - version: 1.61.0 - resolution: "remeda@npm:1.61.0" - checksum: c080da71953ccc178334ca774f0da5c3f4664ef25ff7bc1e1f09a921ff9c264bbf8be8e0ac876c4a3f851a4d3e017cd454319a0e24610fd744bd8f9177dd4c7b - languageName: node - linkType: hard - "remove-trailing-separator@npm:^1.0.1": version: 1.1.0 resolution: "remove-trailing-separator@npm:1.1.0" @@ -43577,7 +44575,7 @@ __metadata: languageName: node linkType: hard -"sanitize-filename@npm:^1.6.3": +"sanitize-filename@npm:1.6.3, sanitize-filename@npm:^1.6.3": version: 1.6.3 resolution: "sanitize-filename@npm:1.6.3" dependencies: @@ -44209,7 +45207,7 @@ __metadata: languageName: node linkType: hard -"shortid@npm:^2.2.14, shortid@npm:^2.2.16": +"shortid@npm:2.2.16, shortid@npm:^2.2.14, shortid@npm:^2.2.16": version: 2.2.16 resolution: "shortid@npm:2.2.16" dependencies: @@ -44389,7 +45387,7 @@ __metadata: languageName: node linkType: hard -"slugify@npm:^1.2.9, slugify@npm:^1.4.0": +"slugify@npm:1.6.5, slugify@npm:^1.2.9, slugify@npm:^1.4.0": version: 1.6.5 resolution: "slugify@npm:1.6.5" checksum: a955a1b600201030f4c1daa9bb74a17d4402a0693fc40978bbd17e44e64fd72dad3bac4037422aa8aed55b5170edd57f3f4cd8f59ba331f5cf0f10f1a7795609 @@ -44610,7 +45608,7 @@ __metadata: languageName: node linkType: hard -"source-map-loader@npm:^1.1.3": +"source-map-loader@npm:1.1.3, source-map-loader@npm:^1.1.3": version: 1.1.3 resolution: "source-map-loader@npm:1.1.3" dependencies: @@ -44659,7 +45657,7 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.12, source-map-support@npm:~0.5.20": +"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.12, source-map-support@npm:~0.5.20": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -44669,6 +45667,15 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.4.16": + version: 0.4.18 + resolution: "source-map-support@npm:0.4.18" + dependencies: + source-map: ^0.5.6 + checksum: 669aa7e992fec586fac0ba9a8dea8ce81b7328f92806335f018ffac5709afb2920e3870b4e56c68164282607229f04b8bbcf5d0e5c845eb1b5119b092e7585c0 + languageName: node + linkType: hard + "source-map-url@npm:^0.4.0": version: 0.4.1 resolution: "source-map-url@npm:0.4.1" @@ -44821,7 +45828,7 @@ __metadata: languageName: node linkType: hard -"split2@npm:^3.0.0": +"split2@npm:^3.0.0, split2@npm:^3.2.2": version: 3.2.2 resolution: "split2@npm:3.2.2" dependencies: @@ -44867,7 +45874,7 @@ __metadata: languageName: node linkType: hard -"srcset@npm:^4.0.0": +"srcset@npm:4.0.0, srcset@npm:^4.0.0": version: 4.0.0 resolution: "srcset@npm:4.0.0" checksum: aceb898c9281101ef43bfbf96bf04dfae828e1bf942a45df6fad74ae9f8f0a425f4bca1480e0d22879beb40dd2bc6947e0e1e5f4d307a714666196164bc5769d @@ -45089,7 +46096,7 @@ __metadata: languageName: node linkType: hard -"stream@npm:^0.0.2": +"stream@npm:0.0.2, stream@npm:^0.0.2": version: 0.0.2 resolution: "stream@npm:0.0.2" dependencies: @@ -45153,15 +46160,6 @@ __metadata: languageName: node linkType: hard -"string-length@npm:^6.0.0": - version: 6.0.0 - resolution: "string-length@npm:6.0.0" - dependencies: - strip-ansi: ^7.1.0 - checksum: b171e9e193ec292ad71f8b2a36e20478bf1bac8cd5beec062fb126942d627dfd9311959e271e9ab7b0a383d16b85b9e25a183d15786e30f22104d152e7627f99 - languageName: node - linkType: hard - "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -45357,7 +46355,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": +"strip-ansi@npm:^7.0.1": version: 7.1.0 resolution: "strip-ansi@npm:7.1.0" dependencies: @@ -46073,7 +47071,6 @@ __metadata: "@webiny/utils": 0.0.0 "@webiny/validation": 0.0.0 graphql: ^15.7.2 - graphql-request: ^7.0.1 react: 17.0.2 react-hamburger-menu: ^1.1.1 languageName: unknown @@ -46598,7 +47595,7 @@ __metadata: languageName: node linkType: hard -"ts-morph@npm:^11.0.0": +"ts-morph@npm:11.0.3, ts-morph@npm:^11.0.0": version: 11.0.3 resolution: "ts-morph@npm:11.0.3" dependencies: @@ -46646,6 +47643,24 @@ __metadata: languageName: node linkType: hard +"ts-node@npm:^7.0.1": + version: 7.0.1 + resolution: "ts-node@npm:7.0.1" + dependencies: + arrify: ^1.0.0 + buffer-from: ^1.1.0 + diff: ^3.1.0 + make-error: ^1.1.1 + minimist: ^1.2.0 + mkdirp: ^0.5.1 + source-map-support: ^0.5.6 + yn: ^2.0.0 + bin: + ts-node: dist/bin.js + checksum: 07ed6ea1805361828737a767cfd6c57ea6e267ee8679282afb933610af02405e1a87c1f2aea1d38ed8e66b34fcbf6272b6021ab95d78849105d2e57fc283870b + languageName: node + linkType: hard + "ts-pnp@npm:^1.1.2": version: 1.2.0 resolution: "ts-pnp@npm:1.2.0" @@ -46749,7 +47764,7 @@ __metadata: languageName: node linkType: hard -"ttypescript@npm:^1.3.2, ttypescript@npm:^1.5.12, ttypescript@npm:^1.5.13, ttypescript@npm:^1.5.15": +"ttypescript@npm:1.5.15, ttypescript@npm:^1.3.2, ttypescript@npm:^1.5.12, ttypescript@npm:^1.5.13, ttypescript@npm:^1.5.15": version: 1.5.15 resolution: "ttypescript@npm:1.5.15" dependencies: @@ -46881,13 +47896,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^4.3.1": - version: 4.18.3 - resolution: "type-fest@npm:4.18.3" - checksum: 85c258c8a64011a797366bfb442d6d36ec74318ec3ab7c3d65ec156beeac5bcfeae742e8d3bb1bc1df478885388850d1812b30fcee72c14512c74e193dc3bf71 - languageName: node - linkType: hard - "type-is@npm:~1.6.17, type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -47753,7 +48761,7 @@ __metadata: languageName: node linkType: hard -"vm-browserify@npm:^1.0.1, vm-browserify@npm:^1.1.2": +"vm-browserify@npm:1.1.2, vm-browserify@npm:^1.0.1, vm-browserify@npm:^1.1.2": version: 1.1.2 resolution: "vm-browserify@npm:1.1.2" checksum: 10a1c50aab54ff8b4c9042c15fc64aefccce8d2fb90c0640403242db0ee7fb269f9b102bdb69cfb435d7ef3180d61fd4fb004a043a12709abaf9056cfd7e039d @@ -48060,6 +49068,43 @@ __metadata: languageName: node linkType: hard +"webpack@npm:5.75.0, webpack@npm:^5, webpack@npm:^5.74.0": + version: 5.75.0 + resolution: "webpack@npm:5.75.0" + dependencies: + "@types/eslint-scope": ^3.7.3 + "@types/estree": ^0.0.51 + "@webassemblyjs/ast": 1.11.1 + "@webassemblyjs/wasm-edit": 1.11.1 + "@webassemblyjs/wasm-parser": 1.11.1 + acorn: ^8.7.1 + acorn-import-assertions: ^1.7.6 + browserslist: ^4.14.5 + chrome-trace-event: ^1.0.2 + enhanced-resolve: ^5.10.0 + es-module-lexer: ^0.9.0 + eslint-scope: 5.1.1 + events: ^3.2.0 + glob-to-regexp: ^0.4.1 + graceful-fs: ^4.2.9 + json-parse-even-better-errors: ^2.3.1 + loader-runner: ^4.2.0 + mime-types: ^2.1.27 + neo-async: ^2.6.2 + schema-utils: ^3.1.0 + tapable: ^2.1.1 + terser-webpack-plugin: ^5.1.3 + watchpack: ^2.4.0 + webpack-sources: ^3.2.3 + peerDependenciesMeta: + webpack-cli: + optional: true + bin: + webpack: bin/webpack.js + checksum: 2bcc5f3c195f375944e8af2f00bf2feea39cb9fda5f763b0d1b00077f1c51783db25c94d3fae96a07dead9fa085e6ae7474417e5ab31719c9776ea5969ceb83a + languageName: node + linkType: hard + "webpack@npm:^4.33.0, webpack@npm:^4.38.0, webpack@npm:^4.46.0": version: 4.46.0 resolution: "webpack@npm:4.46.0" @@ -48098,43 +49143,6 @@ __metadata: languageName: node linkType: hard -"webpack@npm:^5, webpack@npm:^5.74.0": - version: 5.75.0 - resolution: "webpack@npm:5.75.0" - dependencies: - "@types/eslint-scope": ^3.7.3 - "@types/estree": ^0.0.51 - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/wasm-edit": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 - acorn: ^8.7.1 - acorn-import-assertions: ^1.7.6 - browserslist: ^4.14.5 - chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.10.0 - es-module-lexer: ^0.9.0 - eslint-scope: 5.1.1 - events: ^3.2.0 - glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 - json-parse-even-better-errors: ^2.3.1 - loader-runner: ^4.2.0 - mime-types: ^2.1.27 - neo-async: ^2.6.2 - schema-utils: ^3.1.0 - tapable: ^2.1.1 - terser-webpack-plugin: ^5.1.3 - watchpack: ^2.4.0 - webpack-sources: ^3.2.3 - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 2bcc5f3c195f375944e8af2f00bf2feea39cb9fda5f763b0d1b00077f1c51783db25c94d3fae96a07dead9fa085e6ae7474417e5ab31719c9776ea5969ceb83a - languageName: node - linkType: hard - "webpackbar@npm:5.0.2": version: 5.0.2 resolution: "webpackbar@npm:5.0.2" @@ -48770,6 +49778,16 @@ __metadata: languageName: node linkType: hard +"xml2js@npm:0.6.2": + version: 0.6.2 + resolution: "xml2js@npm:0.6.2" + dependencies: + sax: ">=0.6.0" + xmlbuilder: ~11.0.0 + checksum: 458a83806193008edff44562c0bdb982801d61ee7867ae58fd35fab781e69e17f40dfeb8fc05391a4648c9c54012066d3955fe5d993ffbe4dc63399023f32ac2 + languageName: node + linkType: hard + "xml2js@npm:^0.4.5": version: 0.4.23 resolution: "xml2js@npm:0.4.23" @@ -48906,7 +49924,7 @@ __metadata: languageName: node linkType: hard -"yauzl@npm:^2.10.0, yauzl@npm:^2.4.2": +"yauzl@npm:2.10.0, yauzl@npm:^2.10.0, yauzl@npm:^2.4.2": version: 2.10.0 resolution: "yauzl@npm:2.10.0" dependencies: @@ -48923,6 +49941,13 @@ __metadata: languageName: node linkType: hard +"yn@npm:^2.0.0": + version: 2.0.0 + resolution: "yn@npm:2.0.0" + checksum: 9d49527cb3e9a0948cc057223810bf30607bf04b9ff7666cc1681a6501d660b60d90000c16f9e29311b0f28d8a06222ada565ccdca5f1049cdfefb1908217572 + languageName: node + linkType: hard + "yocto-queue@npm:^0.1.0": version: 0.1.0 resolution: "yocto-queue@npm:0.1.0" @@ -48978,7 +50003,7 @@ __metadata: languageName: node linkType: hard -"zip-local@npm:^0.3.4": +"zip-local@npm:0.3.5, zip-local@npm:^0.3.4": version: 0.3.5 resolution: "zip-local@npm:0.3.5" dependencies: @@ -49001,23 +50026,16 @@ __metadata: languageName: node linkType: hard +"zod@npm:3.21.4, zod@npm:^3.21.4": + version: 3.21.4 + resolution: "zod@npm:3.21.4" + checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f + languageName: node + linkType: hard + "zod@npm:3.22.4, zod@npm:^3.22.4": version: 3.22.4 resolution: "zod@npm:3.22.4" checksum: 80bfd7f8039b24fddeb0718a2ec7c02aa9856e4838d6aa4864335a047b6b37a3273b191ef335bf0b2002e5c514ef261ffcda5a589fb084a48c336ffc4cdbab7f languageName: node linkType: hard - -"zod@npm:^3.17.3, zod@npm:^3.22.2, zod@npm:^3.23.5": - version: 3.23.8 - resolution: "zod@npm:3.23.8" - checksum: 15949ff82118f59c893dacd9d3c766d02b6fa2e71cf474d5aa888570c469dbf5446ac5ad562bb035bf7ac9650da94f290655c194f4a6de3e766f43febd432c5c - languageName: node - linkType: hard - -"zod@npm:^3.21.4": - version: 3.21.4 - resolution: "zod@npm:3.21.4" - checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f - languageName: node - linkType: hard From d97a50745405d288d039f1e7d5e67a7e7e5cf499 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Tue, 4 Jun 2024 15:04:32 +0200 Subject: [PATCH 28/56] chore: create revert meta fields script --- .../5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts index 42e58559b59..f736b1ed531 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts @@ -216,7 +216,7 @@ const createInitialStatus = (): MigrationStatus => { continue; } - if (isMigratedEntry(decompressedData)) { + if (!isMigratedEntry(decompressedData)) { status.stats.recordsSkipped++; continue; } From 897133a3c643323eec0eeba9bef587b117a9ed8e Mon Sep 17 00:00:00 2001 From: adrians5j Date: Tue, 4 Jun 2024 16:07:21 +0200 Subject: [PATCH 29/56] chore: create revert meta fields script --- .../getNonNullableFieldsWithMissingValues.ts | 21 +++++++++++++++++++ .../migrations/5.39.6/001/ddb-es/worker.ts | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 packages/migrations/src/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.ts diff --git a/packages/migrations/src/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.ts b/packages/migrations/src/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.ts new file mode 100644 index 00000000000..9265ef492a5 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.ts @@ -0,0 +1,21 @@ +import { CmsEntry } from "~/migrations/5.39.0/001/types"; +import { + EntryMetaFieldName, + isNonNullableEntryMetaField, + pickEntryMetaFields +} from "@webiny/api-headless-cms/constants"; + +export const getNonNullableFieldsWithMissingValues = (entry: CmsEntry) => { + // Only `modifiedX` and `publishedX` fields are nullable. + const nonNullableMetaFields = pickEntryMetaFields(entry, isNonNullableEntryMetaField); + + const missingFields: EntryMetaFieldName[] = []; + for (const fieldName in nonNullableMetaFields) { + const value = nonNullableMetaFields[fieldName as EntryMetaFieldName]; + if (!value) { + missingFields.push(fieldName as EntryMetaFieldName); + } + } + + return missingFields; +}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index 64bafdd4966..a7975833d1d 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -34,6 +34,9 @@ import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; import path from "path"; import os from "os"; import fs from "fs"; +import { + getNonNullableFieldsWithMissingValues +} from "~/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues"; const argv = yargs(hideBin(process.argv)) .options({ @@ -215,6 +218,7 @@ const createInitialStatus = (): MigrationStatus => { // new non-nullable meta fields have a value and nothing is missing. if (!hasAllNonNullableValues(item)) { logger.trace( + getNonNullableFieldsWithMissingValues(item), `Detected an entry with missing values for non-nullable meta fields (${item.modelId}/${item.id}).` ); @@ -304,6 +308,7 @@ const createInitialStatus = (): MigrationStatus => { // 2. Ensure new non-nullable meta fields have a value and nothing is missing. if (!hasAllNonNullableValues(decompressedData)) { logger.trace( + getNonNullableFieldsWithMissingValues(decompressedData), [ `[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields`, `(${decompressedData.modelId}/${decompressedData.id}).` From 8591d64252b5c2c7e9f1182a5e17466b7ca71e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Wed, 5 Jun 2024 14:10:15 +0200 Subject: [PATCH 30/56] fix(api-headless-cms-es-tasks): add create index [skip ci] --- .../MockDataManager/createModelAndGroup.ts | 7 + .../src/utils/createIndex.ts | 35 + .../src/utils/index.ts | 1 + .../MetaFieldsMigration.ts | 5 +- .../migrations/5.39.6/001/ddb-es/worker.ts | 4 +- yarn.lock | 2263 +++++------------ 6 files changed, 627 insertions(+), 1688 deletions(-) create mode 100644 packages/api-headless-cms-es-tasks/src/utils/createIndex.ts diff --git a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts index 9deec219480..53ce0406b4b 100644 --- a/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts +++ b/packages/api-headless-cms-es-tasks/src/tasks/MockDataManager/createModelAndGroup.ts @@ -2,6 +2,7 @@ import { CmsGroup, CmsModel } from "@webiny/api-headless-cms/types"; import { Context } from "~/types"; import { createGroupData } from "./group"; import { createCarsModel } from "./model"; +import { createIndex } from "~/utils"; interface ICreateModelAndGroupParams { context: Context; @@ -37,6 +38,12 @@ export const createModelAndGroup = async ( const carsModel = createCarsModel(group); model = await context.cms.createModel(carsModel); } + await createIndex({ + model, + client: context.elasticsearch, + plugins: context.plugins + }); + return { group: group as CmsGroup, model: model as CmsModel diff --git a/packages/api-headless-cms-es-tasks/src/utils/createIndex.ts b/packages/api-headless-cms-es-tasks/src/utils/createIndex.ts new file mode 100644 index 00000000000..a62144b10d5 --- /dev/null +++ b/packages/api-headless-cms-es-tasks/src/utils/createIndex.ts @@ -0,0 +1,35 @@ +import { Client, createIndex as baseCreateIndex } from "@webiny/api-elasticsearch"; +import { CmsModel } from "@webiny/api-headless-cms/types"; +import { configurations } from "@webiny/api-headless-cms-ddb-es/configurations"; +import { CmsEntryElasticsearchIndexPlugin } from "@webiny/api-headless-cms-ddb-es/plugins"; +import { PluginsContainer } from "@webiny/plugins"; + +export interface ICreateIndexParams { + client: Client; + model: Pick; + plugins: PluginsContainer; +} + +export const createIndex = async (params: ICreateIndexParams): Promise => { + const { client, model, plugins } = params; + + const { index } = configurations.es({ + model + }); + + const result = await client.indices.exists({ + index + }); + if (result.body) { + return; + } + + await baseCreateIndex({ + index, + client, + locale: model.locale, + tenant: model.tenant, + plugins, + type: CmsEntryElasticsearchIndexPlugin.type + }); +}; diff --git a/packages/api-headless-cms-es-tasks/src/utils/index.ts b/packages/api-headless-cms-es-tasks/src/utils/index.ts index 894f15614b6..fe1ed9e91ea 100644 --- a/packages/api-headless-cms-es-tasks/src/utils/index.ts +++ b/packages/api-headless-cms-es-tasks/src/utils/index.ts @@ -1,2 +1,3 @@ +export * from "./createIndex"; export * from "./disableIndexing"; export * from "./enableIndexing"; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts index 6d2348a46f0..4bd0641972a 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts @@ -8,10 +8,7 @@ import { } from "~/utils"; import { createElasticsearchClient } from "@webiny/api-elasticsearch"; import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import { - DEFAULT_ES_HEALTH_CHECKS_PARAMS, - EsHealthChecksParams -} from "../../utils"; +import { DEFAULT_ES_HEALTH_CHECKS_PARAMS, EsHealthChecksParams } from "../../utils"; import path from "path"; import os from "os"; import fs from "fs"; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts index a7975833d1d..9418f20702c 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -34,9 +34,7 @@ import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; import path from "path"; import os from "os"; import fs from "fs"; -import { - getNonNullableFieldsWithMissingValues -} from "~/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues"; +import { getNonNullableFieldsWithMissingValues } from "~/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues"; const argv = yargs(hideBin(process.argv)) .options({ diff --git a/yarn.lock b/yarn.lock index 9d1f6b8904d..eec9ca56019 100644 --- a/yarn.lock +++ b/yarn.lock @@ -312,7 +312,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudfront@npm:3.425.0, @aws-sdk/client-cloudfront@npm:^3.425.0": +"@aws-sdk/client-cloudfront@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cloudfront@npm:3.425.0" dependencies: @@ -361,7 +361,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudwatch-events@npm:3.425.0, @aws-sdk/client-cloudwatch-events@npm:^3.425.0": +"@aws-sdk/client-cloudwatch-events@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cloudwatch-events@npm:3.425.0" dependencies: @@ -406,7 +406,46 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudwatch-logs@npm:3.425.0, @aws-sdk/client-cloudwatch-logs@npm:^3.425.0": +"@aws-sdk/client-cloudwatch-logs@npm:3.6.1": + version: 3.6.1 + resolution: "@aws-sdk/client-cloudwatch-logs@npm:3.6.1" + dependencies: + "@aws-crypto/sha256-browser": ^1.0.0 + "@aws-crypto/sha256-js": ^1.0.0 + "@aws-sdk/config-resolver": 3.6.1 + "@aws-sdk/credential-provider-node": 3.6.1 + "@aws-sdk/fetch-http-handler": 3.6.1 + "@aws-sdk/hash-node": 3.6.1 + "@aws-sdk/invalid-dependency": 3.6.1 + "@aws-sdk/middleware-content-length": 3.6.1 + "@aws-sdk/middleware-host-header": 3.6.1 + "@aws-sdk/middleware-logger": 3.6.1 + "@aws-sdk/middleware-retry": 3.6.1 + "@aws-sdk/middleware-serde": 3.6.1 + "@aws-sdk/middleware-signing": 3.6.1 + "@aws-sdk/middleware-stack": 3.6.1 + "@aws-sdk/middleware-user-agent": 3.6.1 + "@aws-sdk/node-config-provider": 3.6.1 + "@aws-sdk/node-http-handler": 3.6.1 + "@aws-sdk/protocol-http": 3.6.1 + "@aws-sdk/smithy-client": 3.6.1 + "@aws-sdk/types": 3.6.1 + "@aws-sdk/url-parser": 3.6.1 + "@aws-sdk/url-parser-native": 3.6.1 + "@aws-sdk/util-base64-browser": 3.6.1 + "@aws-sdk/util-base64-node": 3.6.1 + "@aws-sdk/util-body-length-browser": 3.6.1 + "@aws-sdk/util-body-length-node": 3.6.1 + "@aws-sdk/util-user-agent-browser": 3.6.1 + "@aws-sdk/util-user-agent-node": 3.6.1 + "@aws-sdk/util-utf8-browser": 3.6.1 + "@aws-sdk/util-utf8-node": 3.6.1 + tslib: ^2.0.0 + checksum: 4edd11616499254395494e5b3c8fc779e1f36f76f57e0f6eb6b4c453ebedb87f6308bf3f5f30e462816158f1d6f3f10bfa9465311f79cd1ee98bd2693332591c + languageName: node + linkType: hard + +"@aws-sdk/client-cloudwatch-logs@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cloudwatch-logs@npm:3.425.0" dependencies: @@ -452,46 +491,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-cloudwatch-logs@npm:3.6.1": - version: 3.6.1 - resolution: "@aws-sdk/client-cloudwatch-logs@npm:3.6.1" - dependencies: - "@aws-crypto/sha256-browser": ^1.0.0 - "@aws-crypto/sha256-js": ^1.0.0 - "@aws-sdk/config-resolver": 3.6.1 - "@aws-sdk/credential-provider-node": 3.6.1 - "@aws-sdk/fetch-http-handler": 3.6.1 - "@aws-sdk/hash-node": 3.6.1 - "@aws-sdk/invalid-dependency": 3.6.1 - "@aws-sdk/middleware-content-length": 3.6.1 - "@aws-sdk/middleware-host-header": 3.6.1 - "@aws-sdk/middleware-logger": 3.6.1 - "@aws-sdk/middleware-retry": 3.6.1 - "@aws-sdk/middleware-serde": 3.6.1 - "@aws-sdk/middleware-signing": 3.6.1 - "@aws-sdk/middleware-stack": 3.6.1 - "@aws-sdk/middleware-user-agent": 3.6.1 - "@aws-sdk/node-config-provider": 3.6.1 - "@aws-sdk/node-http-handler": 3.6.1 - "@aws-sdk/protocol-http": 3.6.1 - "@aws-sdk/smithy-client": 3.6.1 - "@aws-sdk/types": 3.6.1 - "@aws-sdk/url-parser": 3.6.1 - "@aws-sdk/url-parser-native": 3.6.1 - "@aws-sdk/util-base64-browser": 3.6.1 - "@aws-sdk/util-base64-node": 3.6.1 - "@aws-sdk/util-body-length-browser": 3.6.1 - "@aws-sdk/util-body-length-node": 3.6.1 - "@aws-sdk/util-user-agent-browser": 3.6.1 - "@aws-sdk/util-user-agent-node": 3.6.1 - "@aws-sdk/util-utf8-browser": 3.6.1 - "@aws-sdk/util-utf8-node": 3.6.1 - tslib: ^2.0.0 - checksum: 4edd11616499254395494e5b3c8fc779e1f36f76f57e0f6eb6b4c453ebedb87f6308bf3f5f30e462816158f1d6f3f10bfa9465311f79cd1ee98bd2693332591c - languageName: node - linkType: hard - -"@aws-sdk/client-cognito-identity-provider@npm:3.425.0, @aws-sdk/client-cognito-identity-provider@npm:^3.425.0": +"@aws-sdk/client-cognito-identity-provider@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-cognito-identity-provider@npm:3.425.0" dependencies: @@ -620,7 +620,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-dynamodb-streams@npm:3.425.0, @aws-sdk/client-dynamodb-streams@npm:^3.425.0": +"@aws-sdk/client-dynamodb-streams@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-dynamodb-streams@npm:3.425.0" dependencies: @@ -665,7 +665,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-dynamodb@npm:3.425.0, @aws-sdk/client-dynamodb@npm:^3.425.0": +"@aws-sdk/client-dynamodb@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-dynamodb@npm:3.425.0" dependencies: @@ -713,7 +713,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-eventbridge@npm:3.425.0, @aws-sdk/client-eventbridge@npm:^3.425.0": +"@aws-sdk/client-eventbridge@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-eventbridge@npm:3.425.0" dependencies: @@ -759,7 +759,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-iam@npm:3.425.0, @aws-sdk/client-iam@npm:^3.425.0": +"@aws-sdk/client-iam@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-iam@npm:3.425.0" dependencies: @@ -806,7 +806,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-lambda@npm:3.425.0, @aws-sdk/client-lambda@npm:^3.425.0": +"@aws-sdk/client-lambda@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-lambda@npm:3.425.0" dependencies: @@ -919,7 +919,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-sfn@npm:3.484.0, @aws-sdk/client-sfn@npm:^3.425.0": +"@aws-sdk/client-sfn@npm:^3.425.0": version: 3.484.0 resolution: "@aws-sdk/client-sfn@npm:3.484.0" dependencies: @@ -968,7 +968,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/client-sqs@npm:3.425.0, @aws-sdk/client-sqs@npm:^3.425.0": +"@aws-sdk/client-sqs@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/client-sqs@npm:3.425.0" dependencies: @@ -1503,7 +1503,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/credential-providers@npm:3.425.0, @aws-sdk/credential-providers@npm:^3.425.0": +"@aws-sdk/credential-providers@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/credential-providers@npm:3.425.0" dependencies: @@ -1580,7 +1580,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/lib-dynamodb@npm:3.425.0, @aws-sdk/lib-dynamodb@npm:^3.425.0": +"@aws-sdk/lib-dynamodb@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/lib-dynamodb@npm:3.425.0" dependencies: @@ -1592,7 +1592,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/lib-storage@npm:3.451.0, @aws-sdk/lib-storage@npm:^3.425.0": +"@aws-sdk/lib-storage@npm:^3.425.0": version: 3.451.0 resolution: "@aws-sdk/lib-storage@npm:3.451.0" dependencies: @@ -2033,7 +2033,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/s3-presigned-post@npm:3.425.0, @aws-sdk/s3-presigned-post@npm:^3.425.0": +"@aws-sdk/s3-presigned-post@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/s3-presigned-post@npm:3.425.0" dependencies: @@ -2050,7 +2050,7 @@ __metadata: languageName: node linkType: hard -"@aws-sdk/s3-request-presigner@npm:3.425.0, @aws-sdk/s3-request-presigner@npm:^3.425.0": +"@aws-sdk/s3-request-presigner@npm:^3.425.0": version: 3.425.0 resolution: "@aws-sdk/s3-request-presigner@npm:3.425.0" dependencies: @@ -2521,15 +2521,15 @@ __metadata: languageName: node linkType: hard -"@babel/cli@npm:7.22.6, @babel/cli@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/cli@npm:7.22.6" +"@babel/cli@npm:^7.19.3": + version: 7.23.0 + resolution: "@babel/cli@npm:7.23.0" dependencies: "@jridgewell/trace-mapping": ^0.3.17 "@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3 chokidar: ^3.4.0 commander: ^4.0.1 - convert-source-map: ^1.1.0 + convert-source-map: ^2.0.0 fs-readdir-recursive: ^1.1.0 glob: ^7.2.0 make-dir: ^2.1.0 @@ -2544,19 +2544,19 @@ __metadata: bin: babel: ./bin/babel.js babel-external-helpers: ./bin/babel-external-helpers.js - checksum: c2a6b7d68226f1601446a0e452fcbec9df40c5aabb991f427ad1e2d0eb75f123f530c1319b55b040d32b3593e003fced99e073ed556435e301d97a10965ac947 + checksum: beeb189560bf9c4ea951ef637eefa5214654678fb09c4aaa6695921037059c1e1553c610fe95fbd19a9cdfd9f5598a812fc13df40a6b9a9ea899e43fc6c42052 languageName: node linkType: hard -"@babel/cli@npm:^7.19.3": - version: 7.23.0 - resolution: "@babel/cli@npm:7.23.0" +"@babel/cli@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/cli@npm:7.22.6" dependencies: "@jridgewell/trace-mapping": ^0.3.17 "@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3 chokidar: ^3.4.0 commander: ^4.0.1 - convert-source-map: ^2.0.0 + convert-source-map: ^1.1.0 fs-readdir-recursive: ^1.1.0 glob: ^7.2.0 make-dir: ^2.1.0 @@ -2571,7 +2571,7 @@ __metadata: bin: babel: ./bin/babel.js babel-external-helpers: ./bin/babel-external-helpers.js - checksum: beeb189560bf9c4ea951ef637eefa5214654678fb09c4aaa6695921037059c1e1553c610fe95fbd19a9cdfd9f5598a812fc13df40a6b9a9ea899e43fc6c42052 + checksum: c2a6b7d68226f1601446a0e452fcbec9df40c5aabb991f427ad1e2d0eb75f123f530c1319b55b040d32b3593e003fced99e073ed556435e301d97a10965ac947 languageName: node linkType: hard @@ -2649,29 +2649,6 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:7.22.8, @babel/core@npm:^7.22.8": - version: 7.22.8 - resolution: "@babel/core@npm:7.22.8" - dependencies: - "@ampproject/remapping": ^2.2.0 - "@babel/code-frame": ^7.22.5 - "@babel/generator": ^7.22.7 - "@babel/helper-compilation-targets": ^7.22.6 - "@babel/helper-module-transforms": ^7.22.5 - "@babel/helpers": ^7.22.6 - "@babel/parser": ^7.22.7 - "@babel/template": ^7.22.5 - "@babel/traverse": ^7.22.8 - "@babel/types": ^7.22.5 - "@nicolo-ribaudo/semver-v6": ^6.3.3 - convert-source-map: ^1.7.0 - debug: ^4.1.0 - gensync: ^1.0.0-beta.2 - json5: ^2.2.2 - checksum: 75ed701c14ad17070382ae1dd166f7534b31f2c71e00995a5f261ee2398ee96335b0736573b8ff24ab6e3e6f5814ee2a48fa11ab90fabcd3dfc70ea87c5f30a6 - languageName: node - linkType: hard - "@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.7.5": version: 7.20.12 resolution: "@babel/core@npm:7.20.12" @@ -2741,6 +2718,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.22.8": + version: 7.22.8 + resolution: "@babel/core@npm:7.22.8" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.22.5 + "@babel/generator": ^7.22.7 + "@babel/helper-compilation-targets": ^7.22.6 + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helpers": ^7.22.6 + "@babel/parser": ^7.22.7 + "@babel/template": ^7.22.5 + "@babel/traverse": ^7.22.8 + "@babel/types": ^7.22.5 + "@nicolo-ribaudo/semver-v6": ^6.3.3 + convert-source-map: ^1.7.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.2 + checksum: 75ed701c14ad17070382ae1dd166f7534b31f2c71e00995a5f261ee2398ee96335b0736573b8ff24ab6e3e6f5814ee2a48fa11ab90fabcd3dfc70ea87c5f30a6 + languageName: node + linkType: hard + "@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.20.7, @babel/generator@npm:^7.7.2": version: 7.20.14 resolution: "@babel/generator@npm:7.20.14" @@ -3608,7 +3608,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:7.18.6, @babel/plugin-proposal-class-properties@npm:^7.18.6, @babel/plugin-proposal-class-properties@npm:^7.7.0": +"@babel/plugin-proposal-class-properties@npm:^7.18.6, @babel/plugin-proposal-class-properties@npm:^7.7.0": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -4025,7 +4025,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-object-rest-spread@npm:7.8.3, @babel/plugin-syntax-object-rest-spread@npm:^7.8.3": +"@babel/plugin-syntax-object-rest-spread@npm:^7.8.3": version: 7.8.3 resolution: "@babel/plugin-syntax-object-rest-spread@npm:7.8.3" dependencies: @@ -5269,7 +5269,92 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:7.22.7, @babel/preset-env@npm:^7.22.7": +"@babel/preset-env@npm:^7.19.4, @babel/preset-env@npm:^7.4.5": + version: 7.20.2 + resolution: "@babel/preset-env@npm:7.20.2" + dependencies: + "@babel/compat-data": ^7.20.1 + "@babel/helper-compilation-targets": ^7.20.0 + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-validator-option": ^7.18.6 + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.18.6 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.18.9 + "@babel/plugin-proposal-async-generator-functions": ^7.20.1 + "@babel/plugin-proposal-class-properties": ^7.18.6 + "@babel/plugin-proposal-class-static-block": ^7.18.6 + "@babel/plugin-proposal-dynamic-import": ^7.18.6 + "@babel/plugin-proposal-export-namespace-from": ^7.18.9 + "@babel/plugin-proposal-json-strings": ^7.18.6 + "@babel/plugin-proposal-logical-assignment-operators": ^7.18.9 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 + "@babel/plugin-proposal-numeric-separator": ^7.18.6 + "@babel/plugin-proposal-object-rest-spread": ^7.20.2 + "@babel/plugin-proposal-optional-catch-binding": ^7.18.6 + "@babel/plugin-proposal-optional-chaining": ^7.18.9 + "@babel/plugin-proposal-private-methods": ^7.18.6 + "@babel/plugin-proposal-private-property-in-object": ^7.18.6 + "@babel/plugin-proposal-unicode-property-regex": ^7.18.6 + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-class-properties": ^7.12.13 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + "@babel/plugin-syntax-import-assertions": ^7.20.0 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + "@babel/plugin-syntax-top-level-await": ^7.14.5 + "@babel/plugin-transform-arrow-functions": ^7.18.6 + "@babel/plugin-transform-async-to-generator": ^7.18.6 + "@babel/plugin-transform-block-scoped-functions": ^7.18.6 + "@babel/plugin-transform-block-scoping": ^7.20.2 + "@babel/plugin-transform-classes": ^7.20.2 + "@babel/plugin-transform-computed-properties": ^7.18.9 + "@babel/plugin-transform-destructuring": ^7.20.2 + "@babel/plugin-transform-dotall-regex": ^7.18.6 + "@babel/plugin-transform-duplicate-keys": ^7.18.9 + "@babel/plugin-transform-exponentiation-operator": ^7.18.6 + "@babel/plugin-transform-for-of": ^7.18.8 + "@babel/plugin-transform-function-name": ^7.18.9 + "@babel/plugin-transform-literals": ^7.18.9 + "@babel/plugin-transform-member-expression-literals": ^7.18.6 + "@babel/plugin-transform-modules-amd": ^7.19.6 + "@babel/plugin-transform-modules-commonjs": ^7.19.6 + "@babel/plugin-transform-modules-systemjs": ^7.19.6 + "@babel/plugin-transform-modules-umd": ^7.18.6 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.19.1 + "@babel/plugin-transform-new-target": ^7.18.6 + "@babel/plugin-transform-object-super": ^7.18.6 + "@babel/plugin-transform-parameters": ^7.20.1 + "@babel/plugin-transform-property-literals": ^7.18.6 + "@babel/plugin-transform-regenerator": ^7.18.6 + "@babel/plugin-transform-reserved-words": ^7.18.6 + "@babel/plugin-transform-shorthand-properties": ^7.18.6 + "@babel/plugin-transform-spread": ^7.19.0 + "@babel/plugin-transform-sticky-regex": ^7.18.6 + "@babel/plugin-transform-template-literals": ^7.18.9 + "@babel/plugin-transform-typeof-symbol": ^7.18.9 + "@babel/plugin-transform-unicode-escapes": ^7.18.10 + "@babel/plugin-transform-unicode-regex": ^7.18.6 + "@babel/preset-modules": ^0.1.5 + "@babel/types": ^7.20.2 + babel-plugin-polyfill-corejs2: ^0.3.3 + babel-plugin-polyfill-corejs3: ^0.6.0 + babel-plugin-polyfill-regenerator: ^0.4.1 + core-js-compat: ^3.25.1 + semver: ^6.3.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ece2d7e9c7789db6116e962b8e1a55eb55c110c44c217f0c8f6ffea4ca234954e66557f7bd019b7affadf7fbb3a53ccc807e93fc935aacd48146234b73b6947e + languageName: node + linkType: hard + +"@babel/preset-env@npm:^7.22.7": version: 7.22.7 resolution: "@babel/preset-env@npm:7.22.7" dependencies: @@ -5359,91 +5444,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.19.4, @babel/preset-env@npm:^7.4.5": - version: 7.20.2 - resolution: "@babel/preset-env@npm:7.20.2" - dependencies: - "@babel/compat-data": ^7.20.1 - "@babel/helper-compilation-targets": ^7.20.0 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-validator-option": ^7.18.6 - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.18.6 - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.18.9 - "@babel/plugin-proposal-async-generator-functions": ^7.20.1 - "@babel/plugin-proposal-class-properties": ^7.18.6 - "@babel/plugin-proposal-class-static-block": ^7.18.6 - "@babel/plugin-proposal-dynamic-import": ^7.18.6 - "@babel/plugin-proposal-export-namespace-from": ^7.18.9 - "@babel/plugin-proposal-json-strings": ^7.18.6 - "@babel/plugin-proposal-logical-assignment-operators": ^7.18.9 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.18.6 - "@babel/plugin-proposal-numeric-separator": ^7.18.6 - "@babel/plugin-proposal-object-rest-spread": ^7.20.2 - "@babel/plugin-proposal-optional-catch-binding": ^7.18.6 - "@babel/plugin-proposal-optional-chaining": ^7.18.9 - "@babel/plugin-proposal-private-methods": ^7.18.6 - "@babel/plugin-proposal-private-property-in-object": ^7.18.6 - "@babel/plugin-proposal-unicode-property-regex": ^7.18.6 - "@babel/plugin-syntax-async-generators": ^7.8.4 - "@babel/plugin-syntax-class-properties": ^7.12.13 - "@babel/plugin-syntax-class-static-block": ^7.14.5 - "@babel/plugin-syntax-dynamic-import": ^7.8.3 - "@babel/plugin-syntax-export-namespace-from": ^7.8.3 - "@babel/plugin-syntax-import-assertions": ^7.20.0 - "@babel/plugin-syntax-json-strings": ^7.8.3 - "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 - "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 - "@babel/plugin-syntax-numeric-separator": ^7.10.4 - "@babel/plugin-syntax-object-rest-spread": ^7.8.3 - "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 - "@babel/plugin-syntax-optional-chaining": ^7.8.3 - "@babel/plugin-syntax-private-property-in-object": ^7.14.5 - "@babel/plugin-syntax-top-level-await": ^7.14.5 - "@babel/plugin-transform-arrow-functions": ^7.18.6 - "@babel/plugin-transform-async-to-generator": ^7.18.6 - "@babel/plugin-transform-block-scoped-functions": ^7.18.6 - "@babel/plugin-transform-block-scoping": ^7.20.2 - "@babel/plugin-transform-classes": ^7.20.2 - "@babel/plugin-transform-computed-properties": ^7.18.9 - "@babel/plugin-transform-destructuring": ^7.20.2 - "@babel/plugin-transform-dotall-regex": ^7.18.6 - "@babel/plugin-transform-duplicate-keys": ^7.18.9 - "@babel/plugin-transform-exponentiation-operator": ^7.18.6 - "@babel/plugin-transform-for-of": ^7.18.8 - "@babel/plugin-transform-function-name": ^7.18.9 - "@babel/plugin-transform-literals": ^7.18.9 - "@babel/plugin-transform-member-expression-literals": ^7.18.6 - "@babel/plugin-transform-modules-amd": ^7.19.6 - "@babel/plugin-transform-modules-commonjs": ^7.19.6 - "@babel/plugin-transform-modules-systemjs": ^7.19.6 - "@babel/plugin-transform-modules-umd": ^7.18.6 - "@babel/plugin-transform-named-capturing-groups-regex": ^7.19.1 - "@babel/plugin-transform-new-target": ^7.18.6 - "@babel/plugin-transform-object-super": ^7.18.6 - "@babel/plugin-transform-parameters": ^7.20.1 - "@babel/plugin-transform-property-literals": ^7.18.6 - "@babel/plugin-transform-regenerator": ^7.18.6 - "@babel/plugin-transform-reserved-words": ^7.18.6 - "@babel/plugin-transform-shorthand-properties": ^7.18.6 - "@babel/plugin-transform-spread": ^7.19.0 - "@babel/plugin-transform-sticky-regex": ^7.18.6 - "@babel/plugin-transform-template-literals": ^7.18.9 - "@babel/plugin-transform-typeof-symbol": ^7.18.9 - "@babel/plugin-transform-unicode-escapes": ^7.18.10 - "@babel/plugin-transform-unicode-regex": ^7.18.6 - "@babel/preset-modules": ^0.1.5 - "@babel/types": ^7.20.2 - babel-plugin-polyfill-corejs2: ^0.3.3 - babel-plugin-polyfill-corejs3: ^0.6.0 - babel-plugin-polyfill-regenerator: ^0.4.1 - core-js-compat: ^3.25.1 - semver: ^6.3.0 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: ece2d7e9c7789db6116e962b8e1a55eb55c110c44c217f0c8f6ffea4ca234954e66557f7bd019b7affadf7fbb3a53ccc807e93fc935aacd48146234b73b6947e - languageName: node - linkType: hard - "@babel/preset-flow@npm:^7.0.0": version: 7.18.6 resolution: "@babel/preset-flow@npm:7.18.6" @@ -5472,22 +5472,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:7.22.5, @babel/preset-react@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/preset-react@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": ^7.22.5 - "@babel/helper-validator-option": ^7.22.5 - "@babel/plugin-transform-react-display-name": ^7.22.5 - "@babel/plugin-transform-react-jsx": ^7.22.5 - "@babel/plugin-transform-react-jsx-development": ^7.22.5 - "@babel/plugin-transform-react-pure-annotations": ^7.22.5 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: b977c7ee83e93f62d77e61929ca3d97e5291e026e2f025a1b8b7ac9186486ed56c7d5bc36f0becabe0c24e8c42a4e4f2243a3cf841384cfafc3204c5d3e6c619 - languageName: node - linkType: hard - "@babel/preset-react@npm:^7.0.0, @babel/preset-react@npm:^7.18.6": version: 7.18.6 resolution: "@babel/preset-react@npm:7.18.6" @@ -5504,18 +5488,19 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:7.22.5, @babel/preset-typescript@npm:^7.22.5": +"@babel/preset-react@npm:^7.22.5": version: 7.22.5 - resolution: "@babel/preset-typescript@npm:7.22.5" + resolution: "@babel/preset-react@npm:7.22.5" dependencies: "@babel/helper-plugin-utils": ^7.22.5 "@babel/helper-validator-option": ^7.22.5 - "@babel/plugin-syntax-jsx": ^7.22.5 - "@babel/plugin-transform-modules-commonjs": ^7.22.5 - "@babel/plugin-transform-typescript": ^7.22.5 + "@babel/plugin-transform-react-display-name": ^7.22.5 + "@babel/plugin-transform-react-jsx": ^7.22.5 + "@babel/plugin-transform-react-jsx-development": ^7.22.5 + "@babel/plugin-transform-react-pure-annotations": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 7be1670cb4404797d3a473bd72d66eb2b3e0f2f8a672a5e40bdb0812cc66085ec84bcd7b896709764cabf042fdc6b7f2d4755ac7cce10515eb596ff61dab5154 + checksum: b977c7ee83e93f62d77e61929ca3d97e5291e026e2f025a1b8b7ac9186486ed56c7d5bc36f0becabe0c24e8c42a4e4f2243a3cf841384cfafc3204c5d3e6c619 languageName: node linkType: hard @@ -5532,6 +5517,21 @@ __metadata: languageName: node linkType: hard +"@babel/preset-typescript@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/preset-typescript@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.5 + "@babel/plugin-syntax-jsx": ^7.22.5 + "@babel/plugin-transform-modules-commonjs": ^7.22.5 + "@babel/plugin-transform-typescript": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7be1670cb4404797d3a473bd72d66eb2b3e0f2f8a672a5e40bdb0812cc66085ec84bcd7b896709764cabf042fdc6b7f2d4755ac7cce10515eb596ff61dab5154 + languageName: node + linkType: hard + "@babel/register@npm:^7.16.0": version: 7.18.9 resolution: "@babel/register@npm:7.18.9" @@ -5564,15 +5564,6 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:7.22.6, @babel/runtime@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/runtime@npm:7.22.6" - dependencies: - regenerator-runtime: ^0.13.11 - checksum: e585338287c4514a713babf4fdb8fc2a67adcebab3e7723a739fc62c79cfda875b314c90fd25f827afb150d781af97bc16c85bfdbfa2889f06053879a1ddb597 - languageName: node - linkType: hard - "@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.2.0, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.4.4, @babel/runtime@npm:^7.4.5, @babel/runtime@npm:^7.5.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.20.13 resolution: "@babel/runtime@npm:7.20.13" @@ -5609,6 +5600,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/runtime@npm:7.22.6" + dependencies: + regenerator-runtime: ^0.13.11 + checksum: e585338287c4514a713babf4fdb8fc2a67adcebab3e7723a739fc62c79cfda875b314c90fd25f827afb150d781af97bc16c85bfdbfa2889f06053879a1ddb597 + languageName: node + linkType: hard + "@babel/standalone@npm:^7.4.5": version: 7.20.15 resolution: "@babel/standalone@npm:7.20.15" @@ -6794,7 +6794,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/schema@npm:7.1.5, @graphql-tools/schema@npm:^7.0.0, @graphql-tools/schema@npm:^7.1.2": +"@graphql-tools/schema@npm:^7.0.0, @graphql-tools/schema@npm:^7.1.2": version: 7.1.5 resolution: "@graphql-tools/schema@npm:7.1.5" dependencies: @@ -8183,7 +8183,7 @@ __metadata: languageName: node linkType: hard -"@lexical/headless@npm:0.12.2, @lexical/headless@npm:^0.12.2": +"@lexical/headless@npm:^0.12.2": version: 0.12.2 resolution: "@lexical/headless@npm:0.12.2" peerDependencies: @@ -8293,7 +8293,7 @@ __metadata: languageName: node linkType: hard -"@lexical/react@npm:0.12.2, @lexical/react@npm:^0.12.2": +"@lexical/react@npm:^0.12.2": version: 0.12.2 resolution: "@lexical/react@npm:0.12.2" dependencies: @@ -10224,7 +10224,7 @@ __metadata: languageName: node linkType: hard -"@pmmmwh/react-refresh-webpack-plugin@npm:0.5.10, @pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": +"@pmmmwh/react-refresh-webpack-plugin@npm:^0.5.3": version: 0.5.10 resolution: "@pmmmwh/react-refresh-webpack-plugin@npm:0.5.10" dependencies: @@ -11686,7 +11686,7 @@ __metadata: languageName: node linkType: hard -"@smithy/node-http-handler@npm:2.1.6, @smithy/node-http-handler@npm:^2.1.6": +"@smithy/node-http-handler@npm:^2.1.6": version: 2.1.6 resolution: "@smithy/node-http-handler@npm:2.1.6" dependencies: @@ -13073,22 +13073,6 @@ __metadata: languageName: node linkType: hard -"@svgr/webpack@npm:6.5.1, @svgr/webpack@npm:^6.1.1": - version: 6.5.1 - resolution: "@svgr/webpack@npm:6.5.1" - dependencies: - "@babel/core": ^7.19.6 - "@babel/plugin-transform-react-constant-elements": ^7.18.12 - "@babel/preset-env": ^7.19.4 - "@babel/preset-react": ^7.18.6 - "@babel/preset-typescript": ^7.18.6 - "@svgr/core": ^6.5.1 - "@svgr/plugin-jsx": ^6.5.1 - "@svgr/plugin-svgo": ^6.5.1 - checksum: d10582eb4fa82a5b6d314cb49f2c640af4fd3a60f5b76095d2b14e383ef6a43a6f4674b68774a21787dbde69dec0a251cfcfc3f9a96c82754ba5d5c6daf785f0 - languageName: node - linkType: hard - "@svgr/webpack@npm:^4.0.3": version: 4.3.3 resolution: "@svgr/webpack@npm:4.3.3" @@ -13105,6 +13089,22 @@ __metadata: languageName: node linkType: hard +"@svgr/webpack@npm:^6.1.1": + version: 6.5.1 + resolution: "@svgr/webpack@npm:6.5.1" + dependencies: + "@babel/core": ^7.19.6 + "@babel/plugin-transform-react-constant-elements": ^7.18.12 + "@babel/preset-env": ^7.19.4 + "@babel/preset-react": ^7.18.6 + "@babel/preset-typescript": ^7.18.6 + "@svgr/core": ^6.5.1 + "@svgr/plugin-jsx": ^6.5.1 + "@svgr/plugin-svgo": ^6.5.1 + checksum: d10582eb4fa82a5b6d314cb49f2c640af4fd3a60f5b76095d2b14e383ef6a43a6f4674b68774a21787dbde69dec0a251cfcfc3f9a96c82754ba5d5c6daf785f0 + languageName: node + linkType: hard + "@szmarczak/http-timer@npm:^1.1.2": version: 1.1.2 resolution: "@szmarczak/http-timer@npm:1.1.2" @@ -14995,27 +14995,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-aco@npm:5.39.6, @webiny/api-aco@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-aco@npm:5.39.6" - dependencies: - "@webiny/api": 5.39.6 - "@webiny/api-authentication": 5.39.6 - "@webiny/api-headless-cms": 5.39.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - lodash: 4.17.21 - checksum: 742984b86a21418f81612a953e769179c61e15d169a2bcfb6a0399a4ec4335b06487aa90773ba11d7f859d6c5c6136051da1c26999356f953a40af2d939dc25a - languageName: node - linkType: hard - "@webiny/api-admin-settings@0.0.0, @webiny/api-admin-settings@workspace:packages/api-admin-settings": version: 0.0.0-use.local resolution: "@webiny/api-admin-settings@workspace:packages/api-admin-settings" @@ -15045,20 +15024,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-admin-settings@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/api-admin-settings@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - checksum: 695c0d625b7efe8010852e83c95c2c7f8163a0d2a26c5b17bfe24e6c5af17b3f5cd1bc47cd92cc73462db8a133caa272ecf97a11c3af817fc1ca501f37e42bf3 - languageName: node - linkType: hard - "@webiny/api-admin-users-cognito-so-ddb@workspace:packages/api-admin-users-cognito-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-admin-users-cognito-so-ddb@workspace:packages/api-admin-users-cognito-so-ddb" @@ -15071,19 +15036,7 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-admin-users-so-ddb@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-admin-users-so-ddb@npm:5.39.6" - dependencies: - "@webiny/api-admin-users": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - checksum: d4c0fbf959e662d3e9eba06407fd6f1732aff3fd8172a48ed564b4ed3d24f4feca34e2e5c54bc1960ce391907a8872ad9577014472a403e61a68c392fe7870ec - languageName: node - linkType: hard - -"@webiny/api-admin-users-so-ddb@workspace:packages/api-admin-users-so-ddb": +"@webiny/api-admin-users-so-ddb@0.0.0, @webiny/api-admin-users-so-ddb@workspace:packages/api-admin-users-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-admin-users-so-ddb@workspace:packages/api-admin-users-so-ddb" dependencies: @@ -15133,27 +15086,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-admin-users@npm:5.39.6, @webiny/api-admin-users@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-admin-users@npm:5.39.6" - dependencies: - "@commodo/fields": 1.1.2-beta.20 - "@webiny/api": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - commodo-fields-object: 1.0.6 - dataloader: 2.2.1 - lodash: 4.17.21 - md5: 2.3.0 - checksum: 6be12b45b44d9901f5d39ce77823eb6be4ef07e7bb7a07311ee9513d1557d0355d3145fc15046d576330dbfa4aab0bc7077e59532f5c46b77548b9d9205b5619 - languageName: node - linkType: hard - "@webiny/api-apw-scheduler-so-ddb@0.0.0, @webiny/api-apw-scheduler-so-ddb@workspace:packages/api-apw-scheduler-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-apw-scheduler-so-ddb@workspace:packages/api-apw-scheduler-so-ddb" @@ -15183,20 +15115,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-apw-scheduler-so-ddb@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-apw-scheduler-so-ddb@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api-apw": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/plugins": 5.39.6 - checksum: 33e78a06d3077abc547f578f122245e2351cce90e3050bd51fd31b0e36b1fe9596a74a17d15de159896e5bba74154696c481775ca837d9e47bd17868708fe161 - languageName: node - linkType: hard - "@webiny/api-apw@0.0.0, @webiny/api-apw@workspace:packages/api-apw": version: 0.0.0-use.local resolution: "@webiny/api-apw@workspace:packages/api-apw" @@ -15244,39 +15162,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-apw@npm:5.39.6, @webiny/api-apw@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-apw@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@commodo/fields": 1.1.2-beta.20 - "@webiny/api": 5.39.6 - "@webiny/api-admin-settings": 5.39.6 - "@webiny/api-headless-cms": 5.39.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/api-mailer": 5.39.6 - "@webiny/api-page-builder": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/api-wcp": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-client": 5.39.6 - "@webiny/handler-db": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/handler-logs": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - dayjs: 1.11.7 - lodash: 4.17.21 - checksum: a6c9665fb9b07f653b6b208355a2084950e2bc93f0227a9656779a6b8b32614657d55c0d3db92977609fae01e8aa46fa0771b54708356385333e5a084cf3bbc5 - languageName: node - linkType: hard - "@webiny/api-audit-logs@0.0.0, @webiny/api-audit-logs@workspace:packages/api-audit-logs": version: 0.0.0-use.local resolution: "@webiny/api-audit-logs@workspace:packages/api-audit-logs" @@ -15314,24 +15199,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-audit-logs@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-audit-logs@npm:5.39.6" - dependencies: - "@webiny/api": 5.39.6 - "@webiny/api-aco": 5.39.6 - "@webiny/api-apw": 5.39.6 - "@webiny/api-form-builder": 5.39.6 - "@webiny/api-mailer": 5.39.6 - "@webiny/api-page-builder": 5.39.6 - "@webiny/api-page-builder-import-export": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/utils": 5.39.6 - checksum: d9035a51d17e26547c2ba2967497681c503b58aa5a9f7f238043cd122b2deb502cbb508f285b7e31b4c3b0c7726c526582c821f36b869e9234b084f59d2cb91a - languageName: node - linkType: hard - "@webiny/api-authentication-cognito@workspace:packages/api-authentication-cognito": version: 0.0.0-use.local resolution: "@webiny/api-authentication-cognito@workspace:packages/api-authentication-cognito" @@ -15370,18 +15237,7 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-authentication@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/api-authentication@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/handler": 5.39.6 - checksum: 66f639a890e7cf0a00c1c8a094d341265ca4a6080b19c202e5f9998ed8b179cbcefd776376e37a6d0a7404bb5c5b7b2848112ed7a26a69539a69fe3aa60a7557 - languageName: node - linkType: hard - -"@webiny/api-background-tasks-ddb@workspace:packages/api-background-tasks-ddb": +"@webiny/api-background-tasks-ddb@0.0.0, @webiny/api-background-tasks-ddb@workspace:packages/api-background-tasks-ddb": version: 0.0.0-use.local resolution: "@webiny/api-background-tasks-ddb@workspace:packages/api-background-tasks-ddb" dependencies: @@ -15397,17 +15253,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-background-tasks-es@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-background-tasks-es@npm:5.39.6" - dependencies: - "@webiny/api-elasticsearch-tasks": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/tasks": 5.39.6 - checksum: 27aa15854869989715148846d51bed3591aa784d1f9764bbada5d109600dc68689cf6ef3f5ac21fa1de57ffa0eb53ee5860e01bb79a95ce075f467c4d3622699 - languageName: node - linkType: hard - "@webiny/api-background-tasks-es@workspace:packages/api-background-tasks-es": version: 0.0.0-use.local resolution: "@webiny/api-background-tasks-es@workspace:packages/api-background-tasks-es" @@ -15463,17 +15308,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-cognito-authenticator@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/api-cognito-authenticator@npm:5.39.6" - dependencies: - jsonwebtoken: 9.0.1 - jwk-to-pem: 2.0.5 - node-fetch: 2.6.9 - checksum: ad8c5cf0caae6bb5f627c83bde01ae3c5d2b9384110462afa52c3d257930c369cde0f687878e89c286fdd3e26ecf49df59778c5fe9842dce0bcbdc4af821d364 - languageName: node - linkType: hard - "@webiny/api-dynamodb-to-elasticsearch@0.0.0, @webiny/api-dynamodb-to-elasticsearch@workspace:packages/api-dynamodb-to-elasticsearch": version: 0.0.0-use.local resolution: "@webiny/api-dynamodb-to-elasticsearch@workspace:packages/api-dynamodb-to-elasticsearch" @@ -15533,22 +15367,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-elasticsearch-tasks@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/api-elasticsearch-tasks@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/api-elasticsearch": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/tasks": 5.39.6 - "@webiny/utils": 5.39.6 - checksum: 0ed88b68f698d03cd8a2c19d7a0047e4a91fbc822b7257ab5ef3e21dfab330dbeed41c364b3e529b4afe2b9204bfe7142c87478496b8e70f43cf82be7c4289bc - languageName: node - linkType: hard - "@webiny/api-elasticsearch@0.0.0, @webiny/api-elasticsearch@workspace:packages/api-elasticsearch": version: 0.0.0-use.local resolution: "@webiny/api-elasticsearch@workspace:packages/api-elasticsearch" @@ -15570,21 +15388,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-elasticsearch@npm:5.39.6, @webiny/api-elasticsearch@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-elasticsearch@npm:5.39.6" - dependencies: - "@elastic/elasticsearch": 7.12.0 - "@webiny/api": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/utils": 5.39.6 - aws-elasticsearch-connector: 9.2.0 - elastic-ts: 0.8.0 - checksum: ae9605f83c4d021ba279a4e47d19aca4a95ea5888136cb00500a0b6fc4776d05f04ea90d3bd7f3babb2923d24a9fd4e718dc391803c6dace590c4888ef85b223 - languageName: node - linkType: hard - "@webiny/api-file-manager-ddb@0.0.0, @webiny/api-file-manager-ddb@workspace:packages/api-file-manager-ddb": version: 0.0.0-use.local resolution: "@webiny/api-file-manager-ddb@workspace:packages/api-file-manager-ddb" @@ -15612,21 +15415,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-file-manager-ddb@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-file-manager-ddb@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api-file-manager": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/project-utils": 5.39.6 - checksum: b2120cbf44ae49f1a1fa2e947107d6ac05be82cd707f071a6f36544168663f4324cd4c4e98c32af4016f6d7d8a9a7eb32ee17462c671630328231b9805a3d00a - languageName: node - linkType: hard - "@webiny/api-file-manager-s3@0.0.0, @webiny/api-file-manager-s3@workspace:packages/api-file-manager-s3": version: 0.0.0-use.local resolution: "@webiny/api-file-manager-s3@workspace:packages/api-file-manager-s3" @@ -15660,33 +15448,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-file-manager-s3@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-file-manager-s3@npm:5.39.6" - dependencies: - "@webiny/api": 5.39.6 - "@webiny/api-file-manager": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/tasks": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - form-data: 4.0.0 - mime: 3.0.0 - node-fetch: 2.6.9 - object-hash: 3.0.0 - p-map: 4.0.0 - p-reduce: 2.1.0 - sanitize-filename: 1.6.3 - sharp: 0.32.6 - checksum: aa6e9a695d32123ad4a6279ad27e9a22b0ba93247543352e6921e4da904145435f49820a9115e60c83d76c3910fd0d3d584e6bd9bb236310f2e2d187f60e5f3a - languageName: node - linkType: hard - "@webiny/api-file-manager@0.0.0, @webiny/api-file-manager@workspace:packages/api-file-manager": version: 0.0.0-use.local resolution: "@webiny/api-file-manager@workspace:packages/api-file-manager" @@ -15726,32 +15487,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-file-manager@npm:5.39.6, @webiny/api-file-manager@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-file-manager@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@commodo/fields": 1.1.2-beta.20 - "@webiny/api": 5.39.6 - "@webiny/api-headless-cms": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-aws": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/project-utils": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/tasks": 5.39.6 - "@webiny/validation": 5.39.6 - lodash: 4.17.21 - object-hash: 2.2.0 - checksum: bddc3cdd7e38cd7882414a3240727a06a1bee1ef68f0415231c60f8ea286750a3a75189dd7fde8ef5bd1a337d3d86a9d804b2800fc25db76bff457a47a696261 - languageName: node - linkType: hard - "@webiny/api-form-builder-so-ddb-es@0.0.0, @webiny/api-form-builder-so-ddb-es@workspace:packages/api-form-builder-so-ddb-es": version: 0.0.0-use.local resolution: "@webiny/api-form-builder-so-ddb-es@workspace:packages/api-form-builder-so-ddb-es" @@ -15785,25 +15520,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-form-builder-so-ddb-es@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-form-builder-so-ddb-es@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@elastic/elasticsearch": 7.12.0 - "@webiny/api-elasticsearch": 5.39.6 - "@webiny/api-elasticsearch-tasks": 5.39.6 - "@webiny/api-form-builder": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/utils": 5.39.6 - elastic-ts: 0.8.0 - checksum: 754c04ae3e67b2b8cc53085a82375afbd2953af4f60a436518c34e82e38ed7f0ccf433af5d5fb8740e298384e71d0c6d3459363e20feb02b64b6ebcc288f6a15 - languageName: node - linkType: hard - "@webiny/api-form-builder-so-ddb@0.0.0, @webiny/api-form-builder-so-ddb@workspace:packages/api-form-builder-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-form-builder-so-ddb@workspace:packages/api-form-builder-so-ddb" @@ -15880,38 +15596,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-form-builder@npm:5.39.6, @webiny/api-form-builder@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-form-builder@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@commodo/fields": 1.1.2-beta.20 - "@webiny/api": 5.39.6 - "@webiny/api-file-manager": 5.39.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/api-mailer": 5.39.6 - "@webiny/api-page-builder": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-aws": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - commodo-fields-object: 1.0.6 - date-fns: 2.29.3 - got: 9.6.0 - json2csv: 4.5.4 - lodash: 4.17.21 - node-fetch: 2.6.9 - slugify: 1.6.5 - checksum: 1c3c064100bcde7d023bf7c5646065a198b0aeef9fdc77dae43a9ffdcf5e27d3f6122284b98b6a6842922b605d67341f97e783cb3bdd7088d1592aff67808fb9 - languageName: node - linkType: hard - "@webiny/api-headless-cms-ddb-es@0.0.0, @webiny/api-headless-cms-ddb-es@workspace:packages/api-headless-cms-ddb-es": version: 0.0.0-use.local resolution: "@webiny/api-headless-cms-ddb-es@workspace:packages/api-headless-cms-ddb-es" @@ -15956,28 +15640,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-headless-cms-ddb-es@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-headless-cms-ddb-es@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/api-elasticsearch": 5.39.6 - "@webiny/api-elasticsearch-tasks": 5.39.6 - "@webiny/api-headless-cms": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-db": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/utils": 5.39.6 - dataloader: 2.2.1 - jsonpack: 1.1.5 - lodash: 4.17.21 - checksum: fe23b8d96e3af4d7592be2b1be83931633ee23f4b410dddedbf8d0aefffcfdfaf03a0a71c2af55d0044cb484cfa110f2db7a239d630f536a2a67e9da045a6ad7 - languageName: node - linkType: hard - "@webiny/api-headless-cms-ddb@0.0.0, @webiny/api-headless-cms-ddb@workspace:packages/api-headless-cms-ddb": version: 0.0.0-use.local resolution: "@webiny/api-headless-cms-ddb@workspace:packages/api-headless-cms-ddb" @@ -16086,41 +15748,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-headless-cms@npm:5.39.6, @webiny/api-headless-cms@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-headless-cms@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@graphql-tools/schema": 7.1.5 - "@webiny/api": 5.39.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-aws": 5.39.6 - "@webiny/handler-db": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/lexical-converter": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - code-frame: 5.0.0 - dot-prop: 6.0.1 - graphql-tag: 2.12.6 - jsdom: 21.1.2 - lodash: 4.17.21 - p-map: 4.0.0 - p-reduce: 2.1.0 - pluralize: 8.0.0 - semver: 7.5.4 - slugify: 1.6.5 - zod: 3.21.4 - checksum: f843f1522d18d455415bb0b2c3a288c48369f0dd4b88d4893cde96f98f072f427c951071697556599484faf99277dccf9f3dfc9b0dd52fe7e514c5ddf8eac440 - languageName: node - linkType: hard - "@webiny/api-i18n-content@0.0.0, @webiny/api-i18n-content@workspace:packages/api-i18n-content": version: 0.0.0-use.local resolution: "@webiny/api-i18n-content@workspace:packages/api-i18n-content" @@ -16139,19 +15766,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-i18n-content@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-i18n-content@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/api-security": 5.39.6 - graphql: 15.8.0 - checksum: 9cf87cdf6bab1353c5537821bba8411e2eb2ce358b4fc48601e3518a6883568aef65af95e8e1022c338f2c509f556af27e3fb2ac9fb2cb66ec697451f7ff12a1 - languageName: node - linkType: hard - "@webiny/api-i18n-ddb@0.0.0, @webiny/api-i18n-ddb@workspace:packages/api-i18n-ddb": version: 0.0.0-use.local resolution: "@webiny/api-i18n-ddb@workspace:packages/api-i18n-ddb" @@ -16183,20 +15797,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-i18n-ddb@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-i18n-ddb@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-db": 5.39.6 - checksum: 77b3dd833183c1b85376294c241aa7db65f765a8342c62776d15bf5e5ba206a2e27f74dff12fa5091b9080a812477c9e042698d3bbdcb3abd7610a136e159f6f - languageName: node - linkType: hard - "@webiny/api-i18n@0.0.0, @webiny/api-i18n@workspace:packages/api-i18n": version: 0.0.0-use.local resolution: "@webiny/api-i18n@workspace:packages/api-i18n" @@ -16229,26 +15829,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-i18n@npm:5.39.6, @webiny/api-i18n@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-i18n@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-aws": 5.39.6 - "@webiny/handler-client": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - accept-language-parser: 1.5.0 - i18n-locales: 0.0.2 - checksum: b9dc97f0a6a6d611a935383a81bb6f5ecec85a1651a4ee56be611f24bb52e4abd29592cf89d49970e609491eefd9f3bc7957f0f808341e91b8aa9ac28d822fad - languageName: node - linkType: hard - "@webiny/api-mailer@0.0.0, @webiny/api-mailer@workspace:packages/api-mailer": version: 0.0.0-use.local resolution: "@webiny/api-mailer@workspace:packages/api-mailer" @@ -16288,25 +15868,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-mailer@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/api-mailer@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/api-headless-cms": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - crypto-js: 4.1.1 - lodash: 4.17.21 - nodemailer: 6.9.1 - zod: 3.21.4 - checksum: 200d04b45f68216d9f84ae0e63493f5c7bdea617599e73e0076a1d89df69e71d0e9494a6a05d1a5e54b8a5ee74408d2b237af662138b48cf4bd5a38faef989dd - languageName: node - linkType: hard - "@webiny/api-page-builder-aco@0.0.0, @webiny/api-page-builder-aco@workspace:packages/api-page-builder-aco": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-aco@workspace:packages/api-page-builder-aco" @@ -16340,20 +15901,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-page-builder-aco@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-page-builder-aco@npm:5.39.6" - dependencies: - "@webiny/api": 5.39.6 - "@webiny/api-aco": 5.39.6 - "@webiny/api-page-builder": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - lodash: 4.17.21 - checksum: e541defbacec75a97789d527cda113667f3ac2f80c48ad695dc46ce53932979af0228781eca17dd745296db9eae1a2955ae3fd60ffa3c95ad06076a09c50bb02 - languageName: node - linkType: hard - "@webiny/api-page-builder-import-export-so-ddb@0.0.0, @webiny/api-page-builder-import-export-so-ddb@workspace:packages/api-page-builder-import-export-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-import-export-so-ddb@workspace:packages/api-page-builder-import-export-so-ddb" @@ -16381,19 +15928,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-page-builder-import-export-so-ddb@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-page-builder-import-export-so-ddb@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api-page-builder-import-export": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - checksum: 6d0a499eca3508faadec1a180230438ebb0c61f23725fda62eddd5c663124789a297569f5556d39b228c28e7010107e778e14d1706e94b4d06db164fe3a9a579 - languageName: node - linkType: hard - "@webiny/api-page-builder-import-export@0.0.0, @webiny/api-page-builder-import-export@workspace:packages/api-page-builder-import-export": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-import-export@workspace:packages/api-page-builder-import-export" @@ -16448,41 +15982,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-page-builder-import-export@npm:5.39.6, @webiny/api-page-builder-import-export@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-page-builder-import-export@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@commodo/fields": 1.1.2-beta.20 - "@smithy/node-http-handler": 2.1.6 - "@webiny/api": 5.39.6 - "@webiny/api-file-manager": 5.39.6 - "@webiny/api-form-builder": 5.39.6 - "@webiny/api-page-builder": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-aws": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/tasks": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - archiver: 7.0.0 - commodo-fields-object: 1.0.6 - dot-prop-immutable: 2.1.1 - fs-extra: 9.1.0 - load-json-file: 6.2.0 - lodash: 4.17.21 - node-fetch: 2.6.9 - stream: 0.0.2 - uniqid: 5.4.0 - yauzl: 2.10.0 - checksum: 685ef78bf021e8fa19a801b7658532a6b78a5e60d3e5c5c5cb03db92e94d68dac8f7a797e88c5c0d41b40693de0a49edc9bb29503883eb4cab93dadf15961303 - languageName: node - linkType: hard - "@webiny/api-page-builder-so-ddb-es@0.0.0, @webiny/api-page-builder-so-ddb-es@workspace:packages/api-page-builder-so-ddb-es": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-so-ddb-es@workspace:packages/api-page-builder-so-ddb-es" @@ -16534,27 +16033,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-page-builder-so-ddb-es@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-page-builder-so-ddb-es@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api-elasticsearch": 5.39.6 - "@webiny/api-elasticsearch-tasks": 5.39.6 - "@webiny/api-page-builder": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-db": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/utils": 5.39.6 - dataloader: 2.2.1 - elastic-ts: 0.8.0 - lodash: 4.17.21 - checksum: 5b686eb5e4498aab08a6f821aae403aa677250a3b5f4074ca337db915af5295f82dba5a5afb7fbbc4b39c7d4c3fb3fc03d61fe8612c3d3f0681d2eda773d23e1 - languageName: node - linkType: hard - "@webiny/api-page-builder-so-ddb@0.0.0, @webiny/api-page-builder-so-ddb@workspace:packages/api-page-builder-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-page-builder-so-ddb@workspace:packages/api-page-builder-so-ddb" @@ -16638,42 +16116,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-page-builder@npm:5.39.6, @webiny/api-page-builder@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-page-builder@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/api-file-manager": 5.39.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/api-prerendering-service": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-aws": 5.39.6 - "@webiny/handler-db": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - dataloader: 2.2.1 - extract-zip: 1.7.0 - fs-extra: 9.1.0 - jsonpack: 1.1.5 - load-json-file: 6.2.0 - lodash: 4.17.21 - node-fetch: 2.6.9 - rimraf: 3.0.2 - stream: 0.0.2 - uniqid: 5.4.0 - zip-local: 0.3.5 - zod: 3.21.4 - checksum: 7cefabc53989a11520c851a711e82368c9ff554f3ac17d5c556988f74ad69ac0de87ce2142632826c10db195237e614cf7be6cff98d89ec1b47135a8dadd4108 - languageName: node - linkType: hard - "@webiny/api-prerendering-service-aws@0.0.0, @webiny/api-prerendering-service-aws@workspace:packages/api-prerendering-service-aws": version: 0.0.0-use.local resolution: "@webiny/api-prerendering-service-aws@workspace:packages/api-prerendering-service-aws" @@ -16764,32 +16206,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-prerendering-service@npm:5.39.6, @webiny/api-prerendering-service@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-prerendering-service@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@sparticuz/chromium": 123.0.1 - "@webiny/api": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-client": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/utils": 5.39.6 - lodash: 4.17.21 - object-hash: 2.2.0 - pluralize: 8.0.0 - posthtml: 0.15.2 - posthtml-noopener: 1.0.5 - posthtml-plugin-link-preload: 1.0.0 - puppeteer-core: 22.6.4 - shortid: 2.2.16 - srcset: 4.0.0 - checksum: 9152ff4f5570548348df19388cc9ac724876d3eec1cce50ecaaeb91b199f72e480351656c6443c9e9fef27bdf0c48d1b22596cb0adfbd33c8b5538d17f02c07c - languageName: node - linkType: hard - "@webiny/api-security-auth0@workspace:packages/api-security-auth0": version: 0.0.0-use.local resolution: "@webiny/api-security-auth0@workspace:packages/api-security-auth0" @@ -16819,24 +16235,7 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-security-cognito@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-security-cognito@npm:5.39.6" - dependencies: - "@webiny/api": 5.39.6 - "@webiny/api-admin-users": 5.39.6 - "@webiny/api-cognito-authenticator": 5.39.6 - "@webiny/api-i18n": 5.39.6 - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - checksum: a03bcd55bd948616d3aa0599472c552dd9f203463df132d5f4fcf99a89ef7c930e87d102e363e64d3eb7d9db29debebc11fe5b831e214c1fd18ecd29a3636924 - languageName: node - linkType: hard - -"@webiny/api-security-cognito@workspace:packages/api-security-cognito": +"@webiny/api-security-cognito@0.0.0, @webiny/api-security-cognito@workspace:packages/api-security-cognito": version: 0.0.0-use.local resolution: "@webiny/api-security-cognito@workspace:packages/api-security-cognito" dependencies: @@ -16909,18 +16308,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-security-so-ddb@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-security-so-ddb@npm:5.39.6" - dependencies: - "@webiny/api-security": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - checksum: aeecc44337c75f16e9fabe0f370335784d7d2d56c5be5109e21cb6da829398ec290b06a392c902d194897c686697244020c96191daa2152d50f9c91af509eb26 - languageName: node - linkType: hard - "@webiny/api-security@0.0.0, @webiny/api-security@workspace:packages/api-security": version: 0.0.0-use.local resolution: "@webiny/api-security@workspace:packages/api-security" @@ -16960,31 +16347,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-security@npm:5.39.6, @webiny/api-security@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-security@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@commodo/fields": 1.1.2-beta.20 - "@webiny/api": 5.39.6 - "@webiny/api-authentication": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - "@webiny/validation": 5.39.6 - commodo-fields-object: 1.0.6 - deep-equal: 2.2.3 - jsonwebtoken: 9.0.1 - minimatch: 5.1.6 - checksum: 9234f228e32b43367ba3773ae1538983edcfd7c962861d051a812d9db9cf372e0274449b0e6f9cfc15b666cfe7866df735681cf163567032d541b104e12096ff - languageName: node - linkType: hard - "@webiny/api-tenancy-so-ddb@0.0.0, @webiny/api-tenancy-so-ddb@workspace:packages/api-tenancy-so-ddb": version: 0.0.0-use.local resolution: "@webiny/api-tenancy-so-ddb@workspace:packages/api-tenancy-so-ddb" @@ -17005,18 +16367,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-tenancy-so-ddb@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-tenancy-so-ddb@npm:5.39.6" - dependencies: - "@webiny/api-tenancy": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db-dynamodb": 5.39.6 - "@webiny/error": 5.39.6 - checksum: 441e41ec680ec1e265ab3d8ded51dbfc2742f82cb709bf6cbfce1217d22515d2a4f4b873961eb82793015a8776594f09caf6cf655b3c1897a2f4bc32f9f1e94c - languageName: node - linkType: hard - "@webiny/api-tenancy@0.0.0, @webiny/api-tenancy@workspace:packages/api-tenancy": version: 0.0.0-use.local resolution: "@webiny/api-tenancy@workspace:packages/api-tenancy" @@ -17042,23 +16392,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-tenancy@npm:5.39.6, @webiny/api-tenancy@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-tenancy@npm:5.39.6" - dependencies: - "@webiny/api": 5.39.6 - "@webiny/api-wcp": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-db": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - dataloader: 2.2.1 - checksum: 6a7563a7cc503cac16382c5d4fc6da683b8629bc95d1aa2bded7d4d7e102363dfb959e6ebed58bb0e0b66384fb6a76ab83b19e8577d2c76b2bfb42855c74a6fb - languageName: node - linkType: hard - "@webiny/api-tenant-manager@0.0.0, @webiny/api-tenant-manager@workspace:packages/api-tenant-manager": version: 0.0.0-use.local resolution: "@webiny/api-tenant-manager@workspace:packages/api-tenant-manager" @@ -17083,18 +16416,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-tenant-manager@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-tenant-manager@npm:5.39.6" - dependencies: - "@webiny/api-security": 5.39.6 - "@webiny/api-tenancy": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/utils": 5.39.6 - checksum: 24ed193ebcb65855c2a933b70223b6fa04068c7cf3c36d401ff7077418e5ccdf38c47b6b897248116fe5c3fb65e1ac55df6e8622507ac0ed168c860937923fdc - languageName: node - linkType: hard - "@webiny/api-theme-manager@workspace:packages/api-theme-manager": version: 0.0.0-use.local resolution: "@webiny/api-theme-manager@workspace:packages/api-theme-manager" @@ -17138,20 +16459,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api-wcp@npm:5.39.6, @webiny/api-wcp@npm:latest": - version: 5.39.6 - resolution: "@webiny/api-wcp@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/wcp": 5.39.6 - node-fetch: 2.6.9 - checksum: 57e93c9a54a7437ebbcf8cc7b534fb537c174baaeeefc2982291ce60c0faf1e58dd15f25156c49b2f0b2e8f577012a5fd138489803aab23f7c44dc61fdfa98ed - languageName: node - linkType: hard - "@webiny/api@0.0.0, @webiny/api@workspace:packages/api": version: 0.0.0-use.local resolution: "@webiny/api@workspace:packages/api" @@ -17171,17 +16478,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/api@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/api@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/plugins": 5.39.6 - checksum: 130d63052bca4509e24ce79c81898f05c0dccc5cdd1acea46f663f0596b18e6f356802c0ba58f502213d2a9437c5448c6b5ed2b3e5336e46ef332a700af17a29 - languageName: node - linkType: hard - "@webiny/app-aco@0.0.0, @webiny/app-aco@workspace:packages/app-aco": version: 0.0.0-use.local resolution: "@webiny/app-aco@workspace:packages/app-aco" @@ -18640,34 +17936,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/aws-sdk@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/aws-sdk@npm:5.39.6" - dependencies: - "@aws-sdk/client-cloudfront": 3.425.0 - "@aws-sdk/client-cloudwatch-events": 3.425.0 - "@aws-sdk/client-cloudwatch-logs": 3.425.0 - "@aws-sdk/client-cognito-identity-provider": 3.425.0 - "@aws-sdk/client-dynamodb": 3.425.0 - "@aws-sdk/client-dynamodb-streams": 3.425.0 - "@aws-sdk/client-eventbridge": 3.425.0 - "@aws-sdk/client-iam": 3.425.0 - "@aws-sdk/client-lambda": 3.425.0 - "@aws-sdk/client-s3": 3.425.0 - "@aws-sdk/client-sfn": 3.484.0 - "@aws-sdk/client-sqs": 3.425.0 - "@aws-sdk/client-sts": 3.425.0 - "@aws-sdk/credential-providers": 3.425.0 - "@aws-sdk/lib-dynamodb": 3.425.0 - "@aws-sdk/lib-storage": 3.451.0 - "@aws-sdk/s3-presigned-post": 3.425.0 - "@aws-sdk/s3-request-presigner": 3.425.0 - "@aws-sdk/util-dynamodb": 3.425.0 - "@webiny/utils": 5.39.6 - checksum: cfa550ef14fb5c55c342744514bf1f4019f401f11b46432ccf2dd1443980d999f778dfcec1b2b2fbfec9144e9718ec0b1e3cc7f67d43e0f1c45432c6ace4f122 - languageName: node - linkType: hard - "@webiny/cli-plugin-deploy-pulumi@0.0.0, @webiny/cli-plugin-deploy-pulumi@workspace:packages/cli-plugin-deploy-pulumi": version: 0.0.0-use.local resolution: "@webiny/cli-plugin-deploy-pulumi@workspace:packages/cli-plugin-deploy-pulumi" @@ -18967,36 +18235,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/cli@npm:5.39.6, @webiny/cli@npm:latest": - version: 5.39.6 - resolution: "@webiny/cli@npm:5.39.6" - dependencies: - "@webiny/telemetry": 5.39.6 - "@webiny/wcp": 5.39.6 - boolean: 3.2.0 - camelcase: 5.3.1 - chalk: 4.1.2 - dotenv: 8.6.0 - execa: 5.1.1 - fast-glob: 3.2.12 - find-up: 5.0.0 - fs-extra: 9.1.0 - graphql-request: 3.7.0 - inquirer: 7.3.3 - ncp: 2.0.0 - open: 8.4.0 - pirates: 4.0.5 - semver: 7.5.4 - ts-morph: 11.0.3 - typescript: 4.7.4 - uniqid: 5.4.0 - yargs: 17.6.2 - bin: - webiny: bin.js - checksum: 9ef66ef9b68cdf042bdfe087224a940a8e3104f93915732839332df3c74afaf52164192ade97b5a64db4717e6507ed483d3cf553428a9e48903c97789ef09d87 - languageName: node - linkType: hard - "@webiny/commodo@workspace:packages/commodo": version: 0.0.0-use.local resolution: "@webiny/commodo@workspace:packages/commodo" @@ -19102,26 +18340,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/db-dynamodb@npm:5.39.6, @webiny/db-dynamodb@npm:latest": - version: 5.39.6 - resolution: "@webiny/db-dynamodb@npm:5.39.6" - dependencies: - "@webiny/api": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/db": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-db": 5.39.6 - "@webiny/plugins": 5.39.6 - date-fns: 2.29.3 - dot-prop: 6.0.1 - dynamodb-toolbox: 0.9.2 - fuse.js: 7.0.0 - is-number: 7.0.0 - lodash: 4.17.21 - checksum: aaa3e1a8677523a1850fb4d67cfca3ced011998ea1f06d2ee6e7c2639704742b792b7aa01c79de7fa0ba836bff1927cf43161a93e1e5452da3a62b2529eab728 - languageName: node - linkType: hard - "@webiny/db@0.0.0, @webiny/db@workspace:packages/db": version: 0.0.0-use.local resolution: "@webiny/db@workspace:packages/db" @@ -19135,13 +18353,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/db@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/db@npm:5.39.6" - checksum: e1f69ce4a261dcc3e7d925618a8d76ec4503964d15d0d5aaa08af9f27bff634a0deedf6f5571d311fd04cf8bee495aab930129e9a45995aab58b16a1c9ad1c2f - languageName: node - linkType: hard - "@webiny/error@0.0.0, @webiny/error@workspace:packages/error": version: 0.0.0-use.local resolution: "@webiny/error@workspace:packages/error" @@ -19156,13 +18367,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/error@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/error@npm:5.39.6" - checksum: 7590fc45a7738000b8179d15fb4cc4377e855807818376a3c3a417e679d798f4508d61e4cac6fde3e8d088acfdc61d7c662522da5f1a1ec9d599975d62712cf5 - languageName: node - linkType: hard - "@webiny/feature-flags@0.0.0, @webiny/feature-flags@workspace:packages/feature-flags": version: 0.0.0-use.local resolution: "@webiny/feature-flags@workspace:packages/feature-flags" @@ -19215,17 +18419,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/global-config@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/global-config@npm:5.39.6" - dependencies: - load-json-file: 6.2.0 - uuid: 8.3.2 - write-json-file: 4.3.0 - checksum: 0a24e81cccdfad48970228567bb38dca9559cc76c9eb8269cdc7954b6308471dbe6048433d960f2b6b24e18daaeb1a43883bcc9f1f2261fc183d5efee84dd9b3 - languageName: node - linkType: hard - "@webiny/handler-aws@0.0.0, @webiny/handler-aws@workspace:packages/handler-aws": version: 0.0.0-use.local resolution: "@webiny/handler-aws@workspace:packages/handler-aws" @@ -19251,22 +18444,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/handler-aws@npm:5.39.6, @webiny/handler-aws@npm:latest": - version: 5.39.6 - resolution: "@webiny/handler-aws@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@fastify/aws-lambda": 3.1.3 - "@webiny/aws-sdk": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-client": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/utils": 5.39.6 - fastify: 4.11.0 - checksum: 733a190b8f4e3218a5a79d1af230dcf6229ab43250c983bcdc8bded7b802db94c163cf6d824594d3750e9a047c42ce14adb52bdcb918e4579c6be7db23c143d1 - languageName: node - linkType: hard - "@webiny/handler-client@0.0.0, @webiny/handler-client@workspace:packages/handler-client": version: 0.0.0-use.local resolution: "@webiny/handler-client@workspace:packages/handler-client" @@ -19287,18 +18464,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/handler-client@npm:5.39.6, @webiny/handler-client@npm:latest": - version: 5.39.6 - resolution: "@webiny/handler-client@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/plugins": 5.39.6 - checksum: a60e03ca3c89b9bc01f4580b35da5c9120303262cd6f4ee46dd2405a974d0022b7efc48a3b91dda4fb3df75e27f446b6b5f8feefe498905a030747a4ef4a7bb1 - languageName: node - linkType: hard - "@webiny/handler-db@0.0.0, @webiny/handler-db@workspace:packages/handler-db": version: 0.0.0-use.local resolution: "@webiny/handler-db@workspace:packages/handler-db" @@ -19316,17 +18481,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/handler-db@npm:5.39.6, @webiny/handler-db@npm:latest": - version: 5.39.6 - resolution: "@webiny/handler-db@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/db": 5.39.6 - checksum: c38179bd7aa05930c520792d14ad54c3dedb39e3f073f7facb3e1aa9e5112d1d05d0f27fd8c8c96323fccdaf75130ea389980fc203a96f8bf6d7803356e28b9b - languageName: node - linkType: hard - "@webiny/handler-graphql@0.0.0, @webiny/handler-graphql@workspace:packages/handler-graphql": version: 0.0.0-use.local resolution: "@webiny/handler-graphql@workspace:packages/handler-graphql" @@ -19355,24 +18509,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/handler-graphql@npm:5.39.6, @webiny/handler-graphql@npm:latest": - version: 5.39.6 - resolution: "@webiny/handler-graphql@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@graphql-tools/schema": 7.1.5 - "@webiny/api": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/plugins": 5.39.6 - boolean: 3.2.0 - graphql: 15.8.0 - graphql-scalars: 1.12.0 - graphql-tag: 2.12.6 - checksum: 6270cbf1df9d0e681207f87cbea13e0657943dceb82319f50b5368da679b864b2fab026cd37230362f25d56e4f14af767e8322cd42b7f18bfb95e684c547f217 - languageName: node - linkType: hard - "@webiny/handler-logs@0.0.0, @webiny/handler-logs@workspace:packages/handler-logs": version: 0.0.0-use.local resolution: "@webiny/handler-logs@workspace:packages/handler-logs" @@ -19393,17 +18529,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/handler-logs@npm:5.39.6, @webiny/handler-logs@npm:latest": - version: 5.39.6 - resolution: "@webiny/handler-logs@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/handler": 5.39.6 - node-fetch: 2.6.9 - checksum: 93430effa2da1dbf12f69b0353b2b538e158828ec8d0c975afd2e2a7cc158f56d5046810922fba84b3b8d5f50972e01eede4a9cc7f06f52a4c1edceaff47ba9d - languageName: node - linkType: hard - "@webiny/handler@0.0.0, @webiny/handler@workspace:packages/handler": version: 0.0.0-use.local resolution: "@webiny/handler@workspace:packages/handler" @@ -19429,23 +18554,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/handler@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/handler@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@fastify/compress": 6.2.0 - "@fastify/cookie": 8.3.0 - "@webiny/api": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler-client": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/utils": 5.39.6 - fastify: 4.11.0 - checksum: b8531b846efa3ebabe273946d341dccc5835b21ad4ee0141d8904290e0d8830a317edbf086e137dcb39ba143658d9d5a5a5df4bb82cb8bd1b3e289dca8bf7c3e - languageName: node - linkType: hard - "@webiny/i18n-react@0.0.0, @webiny/i18n-react@workspace:packages/i18n-react": version: 0.0.0-use.local resolution: "@webiny/i18n-react@workspace:packages/i18n-react" @@ -19524,18 +18632,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/lexical-converter@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/lexical-converter@npm:5.39.6" - dependencies: - "@lexical/headless": 0.12.2 - "@lexical/html": 0.12.2 - "@webiny/lexical-nodes": 5.39.6 - lexical: 0.12.2 - checksum: 7210d62d60f64035c9fb3a558bd323ff8f3d4a52c582313f1ed6d32796703fd7f47a32169d9f59b9b977dfa48047a51bf684782ced30e78f14b1f3bbec1b7403 - languageName: node - linkType: hard - "@webiny/lexical-editor-actions@0.0.0, @webiny/lexical-editor-actions@workspace:packages/lexical-editor-actions": version: 0.0.0-use.local resolution: "@webiny/lexical-editor-actions@workspace:packages/lexical-editor-actions" @@ -19624,26 +18720,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/lexical-nodes@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/lexical-nodes@npm:5.39.6" - dependencies: - "@lexical/code": 0.12.2 - "@lexical/hashtag": 0.12.2 - "@lexical/history": 0.12.2 - "@lexical/list": 0.12.2 - "@lexical/mark": 0.12.2 - "@lexical/overflow": 0.12.2 - "@lexical/react": 0.12.2 - "@lexical/rich-text": 0.12.2 - "@lexical/selection": 0.12.2 - "@lexical/utils": 0.12.2 - "@webiny/lexical-theme": 5.39.6 - lexical: 0.12.2 - checksum: f6faca5ca4237f6dbfca772a2e6b3b8c9ce25f71480a3a48a795fb3a1869b469e25ab826ff7e0aeeb042432efd453337a5f044815e7fc0766f2176444c3c4c84 - languageName: node - linkType: hard - "@webiny/lexical-theme@0.0.0, @webiny/lexical-theme@workspace:packages/lexical-theme": version: 0.0.0-use.local resolution: "@webiny/lexical-theme@workspace:packages/lexical-theme" @@ -19656,17 +18732,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/lexical-theme@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/lexical-theme@npm:5.39.6" - dependencies: - "@emotion/react": 11.10.8 - lexical: 0.12.2 - react-style-object-to-css: 1.1.2 - checksum: 5d0e66b992f35c7fec7ed2469640a6fc708613850ba994ab4fd736aba507cca3b60da7f307fd5a1ed1d687fce6a9c992bdb2c87bc8b7a0d57bef90ec09f42d87 - languageName: node - linkType: hard - "@webiny/logger@0.0.0, @webiny/logger@workspace:packages/logger": version: 0.0.0-use.local resolution: "@webiny/logger@workspace:packages/logger" @@ -19737,16 +18802,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/plugins@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/plugins@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - uniqid: 5.4.0 - checksum: d4aa71978f4886552078d9da1cdc3a969c697ea20f89dcf595c86e50e8de545f7219b162c0b62a60578b3c529b53084028b4ff52490bac796e90a12ae8fabef8 - languageName: node - linkType: hard - "@webiny/project-utils@0.0.0, @webiny/project-utils@workspace:packages/project-utils": version: 0.0.0-use.local resolution: "@webiny/project-utils@workspace:packages/project-utils" @@ -19830,83 +18885,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/project-utils@npm:5.39.6, @webiny/project-utils@npm:latest": - version: 5.39.6 - resolution: "@webiny/project-utils@npm:5.39.6" - dependencies: - "@babel/cli": 7.22.6 - "@babel/core": 7.22.8 - "@babel/plugin-proposal-class-properties": 7.18.6 - "@babel/plugin-syntax-object-rest-spread": 7.8.3 - "@babel/preset-env": 7.22.7 - "@babel/preset-react": 7.22.5 - "@babel/preset-typescript": 7.22.5 - "@babel/runtime": 7.22.6 - "@pmmmwh/react-refresh-webpack-plugin": 0.5.10 - "@svgr/webpack": 6.5.1 - "@types/webpack-env": 1.16.3 - "@webiny/aws-sdk": 5.39.6 - "@webiny/cli": 5.39.6 - "@webiny/global-config": 5.39.6 - "@webiny/telemetry": 5.39.6 - assert-browserify: 2.0.0 - babel-loader: 9.1.2 - buffer: 6.0.3 - camelcase: 5.3.1 - case-sensitive-paths-webpack-plugin: 2.4.0 - chalk: 4.1.2 - crypto-browserify: 3.12.0 - css-loader: 6.5.1 - css-minimizer-webpack-plugin: 3.4.1 - eslint: 8.33.0 - eslint-config-react-app: 6.0.0 - eslint-webpack-plugin: 3.2.0 - file-loader: 6.2.0 - fork-ts-checker-webpack-plugin: 6.5.2 - fs-extra: 9.1.0 - get-yarn-workspaces: 1.0.2 - glob: 7.2.3 - html-webpack-plugin: 5.5.0 - lodash: 4.17.21 - mini-css-extract-plugin: 2.4.5 - null-loader: 4.0.1 - os-browserify: 0.3.0 - path-browserify: 1.0.1 - postcss-flexbugs-fixes: 5.0.2 - postcss-loader: 6.2.1 - postcss-normalize: 10.0.1 - postcss-preset-env: 7.0.1 - process: 0.11.10 - raw-loader: 4.0.2 - react: 17.0.2 - react-dev-utils: 12.0.0 - react-dom: 17.0.2 - react-native-web: 0.12.3 - react-refresh: 0.11.0 - read-json-sync: 2.0.1 - resolve: 1.12.2 - resolve-url-loader: 4.0.0 - rimraf: 3.0.2 - sass: 1.44.0 - sass-loader: 12.3.0 - scheduler: 0.19.1 - source-map-loader: 1.1.3 - source-map-support: 0.5.21 - style-loader: 3.3.1 - terser-webpack-plugin: 5.2.5 - ttypescript: 1.5.15 - typescript: 4.7.4 - url: 0.11.0 - url-loader: 4.1.1 - vm-browserify: 1.1.2 - webpack: 5.75.0 - webpack-dev-server: 4.6.0 - webpack-manifest-plugin: 4.0.2 - webpackbar: 5.0.2 - checksum: 34c918f07d2bf905971a2d98300cb99a276a0d50882bbda6bd2e435796f20630f67633d65f5fdda54257f5bb158a3f04c421228b7bf39aee5cef00b575bc203e - languageName: node - linkType: hard - "@webiny/pubsub@0.0.0, @webiny/pubsub@workspace:packages/pubsub": version: 0.0.0-use.local resolution: "@webiny/pubsub@workspace:packages/pubsub" @@ -19924,13 +18902,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/pubsub@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/pubsub@npm:5.39.6" - checksum: 5cb13724ea627615e72348720a81992902df856038b90bb9516fe91f15332bb0aae76217148def9f0bf657121f3505483ea55cba9c0fe2cf20400da4528e9787 - languageName: node - linkType: hard - "@webiny/pulumi-aws@0.0.0, @webiny/pulumi-aws@workspace:packages/pulumi-aws": version: 0.0.0-use.local resolution: "@webiny/pulumi-aws@workspace:packages/pulumi-aws" @@ -20242,30 +19213,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/tasks@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/tasks@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - "@webiny/api": 5.39.6 - "@webiny/api-headless-cms": 5.39.6 - "@webiny/aws-sdk": 5.39.6 - "@webiny/error": 5.39.6 - "@webiny/handler": 5.39.6 - "@webiny/handler-aws": 5.39.6 - "@webiny/handler-graphql": 5.39.6 - "@webiny/plugins": 5.39.6 - "@webiny/pubsub": 5.39.6 - "@webiny/utils": 5.39.6 - aws-lambda: 1.0.7 - deep-equal: 2.2.3 - lodash: 4.17.21 - object-merge-advanced: 12.1.0 - zod: 3.21.4 - checksum: f0015bceb3b01994a6edbd3ae5eec999bee84d478d03167d2799ed2965931d76065e0322ebb612b88c27586bf118bcf67f5532c765e646b19fc9c996f4eac335 - languageName: node - linkType: hard - "@webiny/telemetry@0.0.0, @webiny/telemetry@workspace:packages/telemetry": version: 0.0.0-use.local resolution: "@webiny/telemetry@workspace:packages/telemetry" @@ -20276,17 +19223,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/telemetry@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/telemetry@npm:5.39.6" - dependencies: - "@webiny/global-config": 5.39.6 - form-data: 3.0.0 - node-fetch: 2.6.1 - checksum: 8be8e882b71292930160b284e08bf8c8e00d67b8477934c21e5c869a2c525eca22c52eb528f694f8b35a33346f3e25c8e55a11597c32d35835848e00f29db3c8 - languageName: node - linkType: hard - "@webiny/theme@0.0.0, @webiny/theme@workspace:packages/theme": version: 0.0.0-use.local resolution: "@webiny/theme@workspace:packages/theme" @@ -20452,21 +19388,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/utils@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/utils@npm:5.39.6" - dependencies: - "@webiny/error": 5.39.6 - mdbid: 1.0.0 - nanoid: 3.3.4 - nanoid-dictionary: 4.3.0 - p-retry: 4.6.2 - peerDependencies: - zod: ^3.21.4 - checksum: 1390a3e3f68088d4357ac3907a7d930880b93b3efeb62fc43d412f89b4866af7d6d6b225ca21a3f39fec43d8a81d9c99ebbed94157ecc75fec58701a0f188431 - languageName: node - linkType: hard - "@webiny/validation@0.0.0, @webiny/validation@workspace:packages/validation": version: 0.0.0-use.local resolution: "@webiny/validation@workspace:packages/validation" @@ -20488,17 +19409,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/validation@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/validation@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - isnumeric: 0.3.3 - lodash: 4.17.21 - checksum: 95013b5751ed78ff251dc786eb3cb2c167060420de9bc3f573026b33ccde96f9e58f51e911263f3e79a2a7f9a586d158051629e91d13b5a3451113baaba02cd1 - languageName: node - linkType: hard - "@webiny/wcp@0.0.0, @webiny/wcp@workspace:packages/wcp": version: 0.0.0-use.local resolution: "@webiny/wcp@workspace:packages/wcp" @@ -20519,16 +19429,6 @@ __metadata: languageName: unknown linkType: soft -"@webiny/wcp@npm:5.39.6": - version: 5.39.6 - resolution: "@webiny/wcp@npm:5.39.6" - dependencies: - "@babel/runtime": 7.22.6 - node-fetch: 2.6.9 - checksum: 14fe03b5ccaa5bbafcb9ec54a34e7d5922f148ce02a6226282d49b0437854997946c56ba4665642cbcf44258aea2c515c46b818ca1461f17af9fb17622836a85 - languageName: node - linkType: hard - "@webpack-contrib/schema-utils@npm:^1.0.0-beta.0": version: 1.0.0-beta.0 resolution: "@webpack-contrib/schema-utils@npm:1.0.0-beta.0" @@ -20688,7 +19588,7 @@ __metadata: languageName: node linkType: hard -"accept-language-parser@npm:1.5.0, accept-language-parser@npm:^1.5.0": +"accept-language-parser@npm:^1.5.0": version: 1.5.0 resolution: "accept-language-parser@npm:1.5.0" checksum: e32124e500f67d30da7dd15462b3ff7a718df327ff8bd1c97ae02d8ee5cf0917a3f600bf3b171965b1f95fef480b96d36752f674eff2cb0069c276d9783d32f6 @@ -21374,46 +20274,47 @@ __metadata: version: 0.0.0-use.local resolution: "api-graphql@workspace:apps/api/graphql" dependencies: - "@webiny/api-aco": latest - "@webiny/api-admin-users": latest - "@webiny/api-admin-users-so-ddb": latest - "@webiny/api-apw": latest - "@webiny/api-apw-scheduler-so-ddb": latest - "@webiny/api-audit-logs": latest - "@webiny/api-background-tasks-es": latest - "@webiny/api-elasticsearch": latest - "@webiny/api-file-manager": latest - "@webiny/api-file-manager-ddb": latest - "@webiny/api-file-manager-s3": latest - "@webiny/api-form-builder": latest - "@webiny/api-form-builder-so-ddb-es": latest - "@webiny/api-headless-cms": latest - "@webiny/api-headless-cms-ddb-es": latest - "@webiny/api-i18n": latest - "@webiny/api-i18n-content": latest - "@webiny/api-i18n-ddb": latest - "@webiny/api-page-builder": latest - "@webiny/api-page-builder-aco": latest - "@webiny/api-page-builder-import-export": latest - "@webiny/api-page-builder-import-export-so-ddb": latest - "@webiny/api-page-builder-so-ddb-es": latest - "@webiny/api-prerendering-service": latest - "@webiny/api-security": latest - "@webiny/api-security-cognito": latest - "@webiny/api-security-so-ddb": latest - "@webiny/api-tenancy": latest - "@webiny/api-tenancy-so-ddb": latest - "@webiny/api-tenant-manager": latest - "@webiny/api-wcp": latest - "@webiny/cli": latest + "@webiny/api-aco": 0.0.0 + "@webiny/api-admin-users": 0.0.0 + "@webiny/api-admin-users-so-ddb": 0.0.0 + "@webiny/api-apw": 0.0.0 + "@webiny/api-apw-scheduler-so-ddb": 0.0.0 + "@webiny/api-audit-logs": 0.0.0 + "@webiny/api-background-tasks-ddb": 0.0.0 + "@webiny/api-file-manager": 0.0.0 + "@webiny/api-file-manager-ddb": 0.0.0 + "@webiny/api-file-manager-s3": 0.0.0 + "@webiny/api-form-builder": 0.0.0 + "@webiny/api-form-builder-so-ddb": 0.0.0 + "@webiny/api-headless-cms": 0.0.0 + "@webiny/api-headless-cms-ddb": 0.0.0 + "@webiny/api-i18n": 0.0.0 + "@webiny/api-i18n-content": 0.0.0 + "@webiny/api-i18n-ddb": 0.0.0 + "@webiny/api-page-builder": 0.0.0 + "@webiny/api-page-builder-aco": 0.0.0 + "@webiny/api-page-builder-import-export": 0.0.0 + "@webiny/api-page-builder-import-export-so-ddb": 0.0.0 + "@webiny/api-page-builder-so-ddb": 0.0.0 + "@webiny/api-prerendering-service": 0.0.0 + "@webiny/api-prerendering-service-aws": 0.0.0 + "@webiny/api-security": 0.0.0 + "@webiny/api-security-cognito": 0.0.0 + "@webiny/api-security-so-ddb": 0.0.0 + "@webiny/api-tenancy": 0.0.0 + "@webiny/api-tenancy-so-ddb": 0.0.0 + "@webiny/api-tenant-manager": 0.0.0 + "@webiny/api-wcp": 0.0.0 + "@webiny/aws-sdk": 0.0.0 + "@webiny/cli": 0.0.0 "@webiny/cli-plugin-deploy-pulumi": 0.0.0 - "@webiny/db-dynamodb": latest - "@webiny/handler-aws": latest - "@webiny/handler-client": latest - "@webiny/handler-db": latest - "@webiny/handler-graphql": latest - "@webiny/handler-logs": latest - "@webiny/project-utils": latest + "@webiny/db-dynamodb": 0.0.0 + "@webiny/handler-aws": 0.0.0 + "@webiny/handler-db": 0.0.0 + "@webiny/handler-graphql": 0.0.0 + "@webiny/handler-logs": 0.0.0 + "@webiny/project-utils": 0.0.0 + "@webiny/tasks": 0.0.0 graphql-request: ^3.4.0 languageName: unknown linkType: soft @@ -21746,7 +20647,7 @@ __metadata: languageName: node linkType: hard -"archiver@npm:7.0.0, archiver@npm:^7.0.0": +"archiver@npm:^7.0.0": version: 7.0.0 resolution: "archiver@npm:7.0.0" dependencies: @@ -22085,7 +20986,7 @@ __metadata: languageName: node linkType: hard -"assert-browserify@npm:2.0.0, assert-browserify@npm:^2.0.0": +"assert-browserify@npm:^2.0.0": version: 2.0.0 resolution: "assert-browserify@npm:2.0.0" dependencies: @@ -22313,7 +21214,7 @@ __metadata: languageName: node linkType: hard -"aws-elasticsearch-connector@npm:9.2.0, aws-elasticsearch-connector@npm:^9.0.0": +"aws-elasticsearch-connector@npm:^9.0.0": version: 9.2.0 resolution: "aws-elasticsearch-connector@npm:9.2.0" dependencies: @@ -22325,7 +21226,7 @@ __metadata: languageName: node linkType: hard -"aws-lambda@npm:1.0.7, aws-lambda@npm:^1.0.7": +"aws-lambda@npm:^1.0.7": version: 1.0.7 resolution: "aws-lambda@npm:1.0.7" dependencies: @@ -23300,7 +22201,7 @@ __metadata: languageName: node linkType: hard -"boolean@npm:3.2.0, boolean@npm:^3.0.1, boolean@npm:^3.1.4": +"boolean@npm:^3.0.1, boolean@npm:^3.1.4": version: 3.2.0 resolution: "boolean@npm:3.2.0" checksum: fb29535b8bf710ef45279677a86d14f5185d604557204abd2ca5fa3fb2a5c80e04d695c8dbf13ab269991977a79bb6c04b048220a6b2a3849853faa94f4a7d77 @@ -23673,16 +22574,6 @@ __metadata: languageName: node linkType: hard -"buffer@npm:6.0.3, buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" - dependencies: - base64-js: ^1.3.1 - ieee754: ^1.2.1 - checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 - languageName: node - linkType: hard - "buffer@npm:^5.2.1, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" @@ -23693,6 +22584,16 @@ __metadata: languageName: node linkType: hard +"buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + "buffers@npm:~0.1.1": version: 0.1.1 resolution: "buffers@npm:0.1.1" @@ -24734,7 +23635,7 @@ __metadata: languageName: node linkType: hard -"code-frame@npm:5.0.0, code-frame@npm:^5.0.0": +"code-frame@npm:^5.0.0": version: 5.0.0 resolution: "code-frame@npm:5.0.0" dependencies: @@ -25015,7 +23916,7 @@ __metadata: languageName: node linkType: hard -"commodo-fields-object@npm:1.0.6, commodo-fields-object@npm:^1.0.3, commodo-fields-object@npm:^1.0.6": +"commodo-fields-object@npm:^1.0.3, commodo-fields-object@npm:^1.0.6": version: 1.0.6 resolution: "commodo-fields-object@npm:1.0.6" dependencies: @@ -25841,7 +24742,7 @@ __metadata: languageName: node linkType: hard -"crypto-browserify@npm:3.12.0, crypto-browserify@npm:^3.11.0, crypto-browserify@npm:^3.12.0": +"crypto-browserify@npm:^3.11.0, crypto-browserify@npm:^3.12.0": version: 3.12.0 resolution: "crypto-browserify@npm:3.12.0" dependencies: @@ -25860,7 +24761,7 @@ __metadata: languageName: node linkType: hard -"crypto-js@npm:4.1.1, crypto-js@npm:^4.0.0, crypto-js@npm:^4.1.1": +"crypto-js@npm:^4.0.0, crypto-js@npm:^4.1.1": version: 4.1.1 resolution: "crypto-js@npm:4.1.1" checksum: b3747c12ee3a7632fab3b3e171ea50f78b182545f0714f6d3e7e2858385f0f4101a15f2517e033802ce9d12ba50a391575ff4638c9de3dd9b2c4bc47768d5425 @@ -25961,7 +24862,7 @@ __metadata: languageName: node linkType: hard -"css-minimizer-webpack-plugin@npm:3.4.1, css-minimizer-webpack-plugin@npm:^3.2.0": +"css-minimizer-webpack-plugin@npm:^3.2.0": version: 3.4.1 resolution: "css-minimizer-webpack-plugin@npm:3.4.1" dependencies: @@ -26502,7 +25403,7 @@ __metadata: languageName: node linkType: hard -"dataloader@npm:2.2.1, dataloader@npm:^2.0.0": +"dataloader@npm:^2.0.0": version: 2.2.1 resolution: "dataloader@npm:2.2.1" checksum: bc80fec711c264fa4244c749123658c7e73946aaa6f9906eb109763001751614aeb1688ffba2226c507bddb2da4da85432ae837cea8d09929e09bdb67048b96e @@ -26518,13 +25419,6 @@ __metadata: languageName: node linkType: hard -"date-fns@npm:2.29.3, date-fns@npm:^2.22.1": - version: 2.29.3 - resolution: "date-fns@npm:2.29.3" - checksum: e01cf5b62af04e05dfff921bb9c9933310ed0e1ae9a81eb8653452e64dc841acf7f6e01e1a5ae5644d0337e9a7f936175fd2cb6819dc122fdd9c5e86c56be484 - languageName: node - linkType: hard - "date-fns@npm:^1.27.2": version: 1.30.1 resolution: "date-fns@npm:1.30.1" @@ -26532,6 +25426,13 @@ __metadata: languageName: node linkType: hard +"date-fns@npm:^2.22.1": + version: 2.29.3 + resolution: "date-fns@npm:2.29.3" + checksum: e01cf5b62af04e05dfff921bb9c9933310ed0e1ae9a81eb8653452e64dc841acf7f6e01e1a5ae5644d0337e9a7f936175fd2cb6819dc122fdd9c5e86c56be484 + languageName: node + linkType: hard + "date-now@npm:^0.1.4": version: 0.1.4 resolution: "date-now@npm:0.1.4" @@ -26560,7 +25461,7 @@ __metadata: languageName: node linkType: hard -"dayjs@npm:1.11.7, dayjs@npm:^1.10.4": +"dayjs@npm:^1.10.4": version: 1.11.7 resolution: "dayjs@npm:1.11.7" checksum: 5003a7c1dd9ed51385beb658231c3548700b82d3548c0cfbe549d85f2d08e90e972510282b7506941452c58d32136d6362f009c77ca55381a09c704e9f177ebb @@ -26781,32 +25682,6 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:2.2.3, deep-equal@npm:^2.2.3": - version: 2.2.3 - resolution: "deep-equal@npm:2.2.3" - dependencies: - array-buffer-byte-length: ^1.0.0 - call-bind: ^1.0.5 - es-get-iterator: ^1.1.3 - get-intrinsic: ^1.2.2 - is-arguments: ^1.1.1 - is-array-buffer: ^3.0.2 - is-date-object: ^1.0.5 - is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.2 - isarray: ^2.0.5 - object-is: ^1.1.5 - object-keys: ^1.1.1 - object.assign: ^4.1.4 - regexp.prototype.flags: ^1.5.1 - side-channel: ^1.0.4 - which-boxed-primitive: ^1.0.2 - which-collection: ^1.0.1 - which-typed-array: ^1.1.13 - checksum: ee8852f23e4d20a5626c13b02f415ba443a1b30b4b3d39eaf366d59c4a85e6545d7ec917db44d476a85ae5a86064f7e5f7af7479f38f113995ba869f3a1ddc53 - languageName: node - linkType: hard - "deep-equal@npm:^1.0.1, deep-equal@npm:^1.1.1": version: 1.1.1 resolution: "deep-equal@npm:1.1.1" @@ -26846,6 +25721,32 @@ __metadata: languageName: node linkType: hard +"deep-equal@npm:^2.2.3": + version: 2.2.3 + resolution: "deep-equal@npm:2.2.3" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.5 + es-get-iterator: ^1.1.3 + get-intrinsic: ^1.2.2 + is-arguments: ^1.1.1 + is-array-buffer: ^3.0.2 + is-date-object: ^1.0.5 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + isarray: ^2.0.5 + object-is: ^1.1.5 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + side-channel: ^1.0.4 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.13 + checksum: ee8852f23e4d20a5626c13b02f415ba443a1b30b4b3d39eaf366d59c4a85e6545d7ec917db44d476a85ae5a86064f7e5f7af7479f38f113995ba869f3a1ddc53 + languageName: node + linkType: hard + "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -27593,22 +26494,13 @@ __metadata: languageName: node linkType: hard -"dot-prop-immutable@npm:2.1.1, dot-prop-immutable@npm:^2.1.0, dot-prop-immutable@npm:^2.1.1": +"dot-prop-immutable@npm:^2.1.0, dot-prop-immutable@npm:^2.1.1": version: 2.1.1 resolution: "dot-prop-immutable@npm:2.1.1" checksum: d5a2e696e661c6a5f32e6bf41322122cc8a07bbe0d53c56a3c0e6157020e325332a0b635e03308b6a8ec8d70b16b4d5a07e8457cf7f2157d9f49795eded4d744 languageName: node linkType: hard -"dot-prop@npm:6.0.1, dot-prop@npm:^6.0.1": - version: 6.0.1 - resolution: "dot-prop@npm:6.0.1" - dependencies: - is-obj: ^2.0.0 - checksum: 0f47600a4b93e1dc37261da4e6909652c008832a5d3684b5bf9a9a0d3f4c67ea949a86dceed9b72f5733ed8e8e6383cc5958df3bbd0799ee317fd181f2ece700 - languageName: node - linkType: hard - "dot-prop@npm:^4.2.0": version: 4.2.1 resolution: "dot-prop@npm:4.2.1" @@ -27627,6 +26519,15 @@ __metadata: languageName: node linkType: hard +"dot-prop@npm:^6.0.1": + version: 6.0.1 + resolution: "dot-prop@npm:6.0.1" + dependencies: + is-obj: ^2.0.0 + checksum: 0f47600a4b93e1dc37261da4e6909652c008832a5d3684b5bf9a9a0d3f4c67ea949a86dceed9b72f5733ed8e8e6383cc5958df3bbd0799ee317fd181f2ece700 + languageName: node + linkType: hard + "dotenv-defaults@npm:^1.0.2": version: 1.1.1 resolution: "dotenv-defaults@npm:1.1.1" @@ -27654,13 +26555,6 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:8.6.0, dotenv@npm:^8.0.0, dotenv@npm:^8.2.0": - version: 8.6.0 - resolution: "dotenv@npm:8.6.0" - checksum: 38e902c80b0666ab59e9310a3d24ed237029a7ce34d976796349765ac96b8d769f6df19090f1f471b77a25ca391971efde8a1ea63bb83111bd8bec8e5cc9b2cd - languageName: node - linkType: hard - "dotenv@npm:^6.2.0": version: 6.2.0 resolution: "dotenv@npm:6.2.0" @@ -27668,6 +26562,13 @@ __metadata: languageName: node linkType: hard +"dotenv@npm:^8.0.0, dotenv@npm:^8.2.0": + version: 8.6.0 + resolution: "dotenv@npm:8.6.0" + checksum: 38e902c80b0666ab59e9310a3d24ed237029a7ce34d976796349765ac96b8d769f6df19090f1f471b77a25ca391971efde8a1ea63bb83111bd8bec8e5cc9b2cd + languageName: node + linkType: hard + "download@npm:^5.0.3": version: 5.0.3 resolution: "download@npm:5.0.3" @@ -27801,7 +26702,7 @@ __metadata: languageName: node linkType: hard -"dynamodb-toolbox@npm:0.9.2, dynamodb-toolbox@npm:^0.9.2": +"dynamodb-toolbox@npm:^0.9.2": version: 0.9.2 resolution: "dynamodb-toolbox@npm:0.9.2" dependencies: @@ -27872,7 +26773,7 @@ __metadata: languageName: node linkType: hard -"elastic-ts@npm:0.8.0, elastic-ts@npm:^0.8.0": +"elastic-ts@npm:^0.8.0": version: 0.8.0 resolution: "elastic-ts@npm:0.8.0" dependencies: @@ -28517,7 +27418,7 @@ __metadata: languageName: node linkType: hard -"eslint-config-react-app@npm:6.0.0, eslint-config-react-app@npm:^6.0.0": +"eslint-config-react-app@npm:^6.0.0": version: 6.0.0 resolution: "eslint-config-react-app@npm:6.0.0" dependencies: @@ -28786,7 +27687,7 @@ __metadata: languageName: node linkType: hard -"eslint-webpack-plugin@npm:3.2.0, eslint-webpack-plugin@npm:^3.1.1": +"eslint-webpack-plugin@npm:^3.1.1": version: 3.2.0 resolution: "eslint-webpack-plugin@npm:3.2.0" dependencies: @@ -28802,7 +27703,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:8.33.0, eslint@npm:^8.16.1, eslint@npm:^8.4.1": +"eslint@npm:^8.16.1, eslint@npm:^8.4.1": version: 8.33.0 resolution: "eslint@npm:8.33.0" dependencies: @@ -29438,20 +28339,6 @@ __metadata: languageName: node linkType: hard -"extract-zip@npm:1.7.0, extract-zip@npm:^1.6.7": - version: 1.7.0 - resolution: "extract-zip@npm:1.7.0" - dependencies: - concat-stream: ^1.6.2 - debug: ^2.6.9 - mkdirp: ^0.5.4 - yauzl: ^2.10.0 - bin: - extract-zip: cli.js - checksum: 011bab660d738614555773d381a6ba4815d98c1cfcdcdf027e154ebcc9fc8c9ef637b3ea5c9b2144013100071ee41722ed041fc9aacc60f6198ef747cac0c073 - languageName: node - linkType: hard - "extract-zip@npm:2.0.1": version: 2.0.1 resolution: "extract-zip@npm:2.0.1" @@ -29469,6 +28356,20 @@ __metadata: languageName: node linkType: hard +"extract-zip@npm:^1.6.7": + version: 1.7.0 + resolution: "extract-zip@npm:1.7.0" + dependencies: + concat-stream: ^1.6.2 + debug: ^2.6.9 + mkdirp: ^0.5.4 + yauzl: ^2.10.0 + bin: + extract-zip: cli.js + checksum: 011bab660d738614555773d381a6ba4815d98c1cfcdcdf027e154ebcc9fc8c9ef637b3ea5c9b2144013100071ee41722ed041fc9aacc60f6198ef747cac0c073 + languageName: node + linkType: hard + "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -29532,19 +28433,6 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:3.2.12, fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": - version: 3.2.12 - resolution: "fast-glob@npm:3.2.12" - dependencies: - "@nodelib/fs.stat": ^2.0.2 - "@nodelib/fs.walk": ^1.2.3 - glob-parent: ^5.1.2 - merge2: ^1.3.0 - micromatch: ^4.0.4 - checksum: 0b1990f6ce831c7e28c4d505edcdaad8e27e88ab9fa65eedadb730438cfc7cde4910d6c975d6b7b8dc8a73da4773702ebcfcd6e3518e73938bb1383badfe01c2 - languageName: node - linkType: hard - "fast-glob@npm:^2.0.2, fast-glob@npm:^2.2.6": version: 2.2.7 resolution: "fast-glob@npm:2.2.7" @@ -29572,6 +28460,19 @@ __metadata: languageName: node linkType: hard +"fast-glob@npm:^3.2.5, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": + version: 3.2.12 + resolution: "fast-glob@npm:3.2.12" + dependencies: + "@nodelib/fs.stat": ^2.0.2 + "@nodelib/fs.walk": ^1.2.3 + glob-parent: ^5.1.2 + merge2: ^1.3.0 + micromatch: ^4.0.4 + checksum: 0b1990f6ce831c7e28c4d505edcdaad8e27e88ab9fa65eedadb730438cfc7cde4910d6c975d6b7b8dc8a73da4773702ebcfcd6e3518e73938bb1383badfe01c2 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -30351,7 +29252,7 @@ __metadata: languageName: node linkType: hard -"fork-ts-checker-webpack-plugin@npm:6.5.2, fork-ts-checker-webpack-plugin@npm:^6.5.0": +"fork-ts-checker-webpack-plugin@npm:^6.5.0": version: 6.5.2 resolution: "fork-ts-checker-webpack-plugin@npm:6.5.2" dependencies: @@ -30393,17 +29294,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:4.0.0, form-data@npm:^4.0.0": - version: 4.0.0 - resolution: "form-data@npm:4.0.0" - dependencies: - asynckit: ^0.4.0 - combined-stream: ^1.0.8 - mime-types: ^2.1.12 - checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c - languageName: node - linkType: hard - "form-data@npm:^2.5.0": version: 2.5.1 resolution: "form-data@npm:2.5.1" @@ -30426,6 +29316,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.8 + mime-types: ^2.1.12 + checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c + languageName: node + linkType: hard + "form-data@npm:~2.3.2": version: 2.3.3 resolution: "form-data@npm:2.3.3" @@ -30522,18 +29423,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:9.1.0, fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": - version: 9.1.0 - resolution: "fs-extra@npm:9.1.0" - dependencies: - at-least-node: ^1.0.0 - graceful-fs: ^4.2.0 - jsonfile: ^6.0.1 - universalify: ^2.0.0 - checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20 - languageName: node - linkType: hard - "fs-extra@npm:^1.0.0": version: 1.0.0 resolution: "fs-extra@npm:1.0.0" @@ -30589,6 +29478,18 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": + version: 9.1.0 + resolution: "fs-extra@npm:9.1.0" + dependencies: + at-least-node: ^1.0.0 + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20 + languageName: node + linkType: hard + "fs-minipass@npm:^1.2.7": version: 1.2.7 resolution: "fs-minipass@npm:1.2.7" @@ -31232,20 +30133,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.2.3, glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0": - version: 7.2.3 - resolution: "glob@npm:7.2.3" - dependencies: - fs.realpath: ^1.0.0 - inflight: ^1.0.4 - inherits: 2 - minimatch: ^3.1.1 - once: ^1.3.0 - path-is-absolute: ^1.0.0 - checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 - languageName: node - linkType: hard - "glob@npm:^10.0.0": version: 10.3.10 resolution: "glob@npm:10.3.10" @@ -31302,6 +30189,20 @@ __metadata: languageName: node linkType: hard +"glob@npm:^7.0.0, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.1.1 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 + languageName: node + linkType: hard + "glob@npm:^8.0.0, glob@npm:^8.0.1": version: 8.1.0 resolution: "glob@npm:8.1.0" @@ -31487,25 +30388,6 @@ __metadata: languageName: node linkType: hard -"got@npm:9.6.0, got@npm:^9.6.0": - version: 9.6.0 - resolution: "got@npm:9.6.0" - dependencies: - "@sindresorhus/is": ^0.14.0 - "@szmarczak/http-timer": ^1.1.2 - cacheable-request: ^6.0.0 - decompress-response: ^3.3.0 - duplexer3: ^0.1.4 - get-stream: ^4.1.0 - lowercase-keys: ^1.0.1 - mimic-response: ^1.0.1 - p-cancelable: ^1.0.0 - to-readable-stream: ^1.0.0 - url-parse-lax: ^3.0.0 - checksum: 941807bd9704bacf5eb401f0cc1212ffa1f67c6642f2d028fd75900471c221b1da2b8527f4553d2558f3faeda62ea1cf31665f8b002c6137f5de8732f07370b0 - languageName: node - linkType: hard - "got@npm:^11.8.6": version: 11.8.6 resolution: "got@npm:11.8.6" @@ -31544,6 +30426,25 @@ __metadata: languageName: node linkType: hard +"got@npm:^9.6.0": + version: 9.6.0 + resolution: "got@npm:9.6.0" + dependencies: + "@sindresorhus/is": ^0.14.0 + "@szmarczak/http-timer": ^1.1.2 + cacheable-request: ^6.0.0 + decompress-response: ^3.3.0 + duplexer3: ^0.1.4 + get-stream: ^4.1.0 + lowercase-keys: ^1.0.1 + mimic-response: ^1.0.1 + p-cancelable: ^1.0.0 + to-readable-stream: ^1.0.0 + url-parse-lax: ^3.0.0 + checksum: 941807bd9704bacf5eb401f0cc1212ffa1f67c6642f2d028fd75900471c221b1da2b8527f4553d2558f3faeda62ea1cf31665f8b002c6137f5de8732f07370b0 + languageName: node + linkType: hard + "graceful-fs@npm:^4.1.10, graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.2, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" @@ -31567,7 +30468,7 @@ __metadata: languageName: node linkType: hard -"graphql-request@npm:3.7.0, graphql-request@npm:^3.3.0, graphql-request@npm:^3.4.0, graphql-request@npm:^3.7.0": +"graphql-request@npm:^3.3.0, graphql-request@npm:^3.4.0, graphql-request@npm:^3.7.0": version: 3.7.0 resolution: "graphql-request@npm:3.7.0" dependencies: @@ -31591,7 +30492,7 @@ __metadata: languageName: node linkType: hard -"graphql-tag@npm:2.12.6, graphql-tag@npm:^2.10.1, graphql-tag@npm:^2.12.6": +"graphql-tag@npm:^2.10.1, graphql-tag@npm:^2.12.6": version: 2.12.6 resolution: "graphql-tag@npm:2.12.6" dependencies: @@ -31602,7 +30503,7 @@ __metadata: languageName: node linkType: hard -"graphql@npm:15.8.0, graphql@npm:^15.7.2, graphql@npm:^15.8.0": +"graphql@npm:^15.7.2, graphql@npm:^15.8.0": version: 15.8.0 resolution: "graphql@npm:15.8.0" checksum: 423325271db8858428641b9aca01699283d1fe5b40ef6d4ac622569ecca927019fce8196208b91dd1d8eb8114f00263fe661d241d0eb40c10e5bfd650f86ec5e @@ -32494,7 +31395,7 @@ __metadata: languageName: node linkType: hard -"i18n-locales@npm:0.0.2, i18n-locales@npm:^0.0.2": +"i18n-locales@npm:^0.0.2": version: 0.0.2 resolution: "i18n-locales@npm:0.0.2" checksum: 1e2387c77d583987074b0e507f9a3196df290322d7250d4f447b103ab92b5ed028747a5a94a40f6e10e25ebd0701c23c2a74067d35f171c0a76fa75ec3b237ce @@ -33562,13 +32463,6 @@ __metadata: languageName: node linkType: hard -"is-number@npm:7.0.0, is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a - languageName: node - linkType: hard - "is-number@npm:^2.1.0": version: 2.1.0 resolution: "is-number@npm:2.1.0" @@ -33594,6 +32488,13 @@ __metadata: languageName: node linkType: hard +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 456ac6f8e0f3111ed34668a624e45315201dff921e5ac181f8ec24923b99e9f32ca1a194912dc79d539c97d33dba17dc635202ff0b2cf98326f608323276d27a + languageName: node + linkType: hard + "is-obj@npm:^1.0.0, is-obj@npm:^1.0.1": version: 1.0.1 resolution: "is-obj@npm:1.0.1" @@ -33960,7 +32861,7 @@ __metadata: languageName: node linkType: hard -"isnumeric@npm:0.3.3, isnumeric@npm:^0.3.3": +"isnumeric@npm:^0.3.3": version: 0.3.3 resolution: "isnumeric@npm:0.3.3" checksum: daeae3dc07291dcefabe87a524464688bb91eb3b228256afa85e56bc63e1250edcc3dd6cc6cec7629d3ddecb7ec6533418f83c2088145c974ed9b630d88de314 @@ -35104,7 +34005,7 @@ __metadata: languageName: node linkType: hard -"json2csv@npm:4.5.4, json2csv@npm:^4.5.2": +"json2csv@npm:^4.5.2": version: 4.5.4 resolution: "json2csv@npm:4.5.4" dependencies: @@ -35190,7 +34091,7 @@ __metadata: languageName: node linkType: hard -"jsonpack@npm:1.1.5, jsonpack@npm:^1.1.5": +"jsonpack@npm:^1.1.5": version: 1.1.5 resolution: "jsonpack@npm:1.1.5" checksum: 60ae0a52343a6bc254ff6677e87c55f4d71347b4a0c981b53cd3fdc184e139e0bf1b6bc127d42c1ab41b3c99d98e1e81559a94ba74a1c91c9143f70c8d751bf6 @@ -35229,27 +34130,27 @@ __metadata: languageName: node linkType: hard -"jsonwebtoken@npm:9.0.1, jsonwebtoken@npm:^9.0.1": - version: 9.0.1 - resolution: "jsonwebtoken@npm:9.0.1" +"jsonwebtoken@npm:^9.0.0": + version: 9.0.0 + resolution: "jsonwebtoken@npm:9.0.0" dependencies: jws: ^3.2.2 lodash: ^4.17.21 ms: ^2.1.1 semver: ^7.3.8 - checksum: 0eafe268896f4e8f9ab1f0f20e8c645721b7a9cddc41c0aba1e58da5c34564e8c9990817c1a5b646d795bcbb1339350826fe57c4569b5379ba9eea4a9aa5bbd0 + checksum: b9181cecf9df99f1dc0253f91ba000a1aa4d91f5816d1608c0dba61a5623726a0bfe200b51df25de18c1a6000825d231ad7ce2788aa54fd48dcb760ad9eb9514 languageName: node linkType: hard -"jsonwebtoken@npm:^9.0.0": - version: 9.0.0 - resolution: "jsonwebtoken@npm:9.0.0" +"jsonwebtoken@npm:^9.0.1": + version: 9.0.1 + resolution: "jsonwebtoken@npm:9.0.1" dependencies: jws: ^3.2.2 lodash: ^4.17.21 ms: ^2.1.1 semver: ^7.3.8 - checksum: b9181cecf9df99f1dc0253f91ba000a1aa4d91f5816d1608c0dba61a5623726a0bfe200b51df25de18c1a6000825d231ad7ce2788aa54fd48dcb760ad9eb9514 + checksum: 0eafe268896f4e8f9ab1f0f20e8c645721b7a9cddc41c0aba1e58da5c34564e8c9990817c1a5b646d795bcbb1339350826fe57c4569b5379ba9eea4a9aa5bbd0 languageName: node linkType: hard @@ -35343,7 +34244,7 @@ __metadata: languageName: node linkType: hard -"jwk-to-pem@npm:2.0.5, jwk-to-pem@npm:^2.0.1": +"jwk-to-pem@npm:^2.0.1": version: 2.0.5 resolution: "jwk-to-pem@npm:2.0.5" dependencies: @@ -36852,7 +35753,7 @@ __metadata: languageName: node linkType: hard -"md5@npm:2.3.0, md5@npm:^2.3.0": +"md5@npm:^2.3.0": version: 2.3.0 resolution: "md5@npm:2.3.0" dependencies: @@ -36863,7 +35764,7 @@ __metadata: languageName: node linkType: hard -"mdbid@npm:1.0.0, mdbid@npm:^1.0.0": +"mdbid@npm:^1.0.0": version: 1.0.0 resolution: "mdbid@npm:1.0.0" dependencies: @@ -37189,7 +36090,7 @@ __metadata: languageName: node linkType: hard -"mime@npm:3.0.0, mime@npm:^3.0.0": +"mime@npm:^3.0.0": version: 3.0.0 resolution: "mime@npm:3.0.0" bin: @@ -37299,7 +36200,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:5.1.6, minimatch@npm:^5.0.1, minimatch@npm:^5.1.0, minimatch@npm:^5.1.6, minimatch@npm:~5.1.2": +"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0, minimatch@npm:^5.1.6, minimatch@npm:~5.1.2": version: 5.1.6 resolution: "minimatch@npm:5.1.6" dependencies: @@ -37828,22 +36729,13 @@ __metadata: languageName: node linkType: hard -"nanoid-dictionary@npm:4.3.0, nanoid-dictionary@npm:^4.3.0": +"nanoid-dictionary@npm:^4.3.0": version: 4.3.0 resolution: "nanoid-dictionary@npm:4.3.0" checksum: 254ed606f0ef6cfea6f5b1fcaa69f10d561650c0d2cff8b138290c6abd8cbdc3335be8799d7520b8ad8b598b8a8b2bd774bfea49eac1ddecb222e4d80e558de5 languageName: node linkType: hard -"nanoid@npm:3.3.4, nanoid@npm:^3.1.20, nanoid@npm:^3.1.22, nanoid@npm:^3.1.30, nanoid@npm:^3.3.4": - version: 3.3.4 - resolution: "nanoid@npm:3.3.4" - bin: - nanoid: bin/nanoid.cjs - checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c - languageName: node - linkType: hard - "nanoid@npm:^2.1.0": version: 2.1.11 resolution: "nanoid@npm:2.1.11" @@ -37860,6 +36752,15 @@ __metadata: languageName: node linkType: hard +"nanoid@npm:^3.1.20, nanoid@npm:^3.1.22, nanoid@npm:^3.1.30, nanoid@npm:^3.3.4": + version: 3.3.4 + resolution: "nanoid@npm:3.3.4" + bin: + nanoid: bin/nanoid.cjs + checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c + languageName: node + linkType: hard + "nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -38090,7 +36991,17 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:2.6.9, node-fetch@npm:^2.5.0, node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": +"node-fetch@npm:^1.0.1": + version: 1.7.3 + resolution: "node-fetch@npm:1.7.3" + dependencies: + encoding: ^0.1.11 + is-stream: ^1.0.1 + checksum: 3bb0528c05d541316ebe52770d71ee25a6dce334df4231fd55df41a644143e07f068637488c18a5b0c43f05041dbd3346752f9e19b50df50569a802484544d5b + languageName: node + linkType: hard + +"node-fetch@npm:^2.5.0, node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7": version: 2.6.9 resolution: "node-fetch@npm:2.6.9" dependencies: @@ -38104,16 +37015,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^1.0.1": - version: 1.7.3 - resolution: "node-fetch@npm:1.7.3" - dependencies: - encoding: ^0.1.11 - is-stream: ^1.0.1 - checksum: 3bb0528c05d541316ebe52770d71ee25a6dce334df4231fd55df41a644143e07f068637488c18a5b0c43f05041dbd3346752f9e19b50df50569a802484544d5b - languageName: node - linkType: hard - "node-forge@npm:^0.10.0": version: 0.10.0 resolution: "node-forge@npm:0.10.0" @@ -38277,7 +37178,7 @@ __metadata: languageName: node linkType: hard -"nodemailer@npm:6.9.1, nodemailer@npm:^6.7.6": +"nodemailer@npm:^6.7.6": version: 6.9.1 resolution: "nodemailer@npm:6.9.1" checksum: b1b9670afc170b4454665abae3fc9acd7e781adb9f579d1c2cd991bf75c647ebe345593f8a057e48d7bf9e4c9a9218869f87db8fb7171c614f557000ab654572 @@ -38709,7 +37610,7 @@ __metadata: languageName: node linkType: hard -"null-loader@npm:4.0.1, null-loader@npm:^4.0.1": +"null-loader@npm:^4.0.1": version: 4.0.1 resolution: "null-loader@npm:4.0.1" dependencies: @@ -38781,14 +37682,14 @@ __metadata: languageName: node linkType: hard -"object-hash@npm:2.2.0, object-hash@npm:^2.1.1": +"object-hash@npm:^2.1.1": version: 2.2.0 resolution: "object-hash@npm:2.2.0" checksum: 55ba841e3adce9c4f1b9b46b41983eda40f854e0d01af2802d3ae18a7085a17168d6b81731d43fdf1d6bcbb3c9f9c56d22c8fea992203ad90a38d7d919bc28f1 languageName: node linkType: hard -"object-hash@npm:3.0.0, object-hash@npm:^3.0.0": +"object-hash@npm:^3.0.0": version: 3.0.0 resolution: "object-hash@npm:3.0.0" checksum: 80b4904bb3857c52cc1bfd0b52c0352532ca12ed3b8a6ff06a90cd209dfda1b95cee059a7625eb9da29537027f68ac4619363491eedb2f5d3dddbba97494fd6c @@ -38819,7 +37720,7 @@ __metadata: languageName: node linkType: hard -"object-merge-advanced@npm:12.1.0, object-merge-advanced@npm:^12.1.0": +"object-merge-advanced@npm:^12.1.0": version: 12.1.0 resolution: "object-merge-advanced@npm:12.1.0" dependencies: @@ -39046,17 +37947,6 @@ __metadata: languageName: node linkType: hard -"open@npm:8.4.0, open@npm:^8.0.6, open@npm:^8.0.9, open@npm:^8.4.0": - version: 8.4.0 - resolution: "open@npm:8.4.0" - dependencies: - define-lazy-prop: ^2.0.0 - is-docker: ^2.1.1 - is-wsl: ^2.2.0 - checksum: e9545bec64cdbf30a0c35c1bdc310344adf8428a117f7d8df3c0af0a0a24c513b304916a6d9b11db0190ff7225c2d578885080b761ed46a3d5f6f1eebb98b63c - languageName: node - linkType: hard - "open@npm:^6.3.0": version: 6.4.0 resolution: "open@npm:6.4.0" @@ -39076,6 +37966,17 @@ __metadata: languageName: node linkType: hard +"open@npm:^8.0.6, open@npm:^8.0.9, open@npm:^8.4.0": + version: 8.4.0 + resolution: "open@npm:8.4.0" + dependencies: + define-lazy-prop: ^2.0.0 + is-docker: ^2.1.1 + is-wsl: ^2.2.0 + checksum: e9545bec64cdbf30a0c35c1bdc310344adf8428a117f7d8df3c0af0a0a24c513b304916a6d9b11db0190ff7225c2d578885080b761ed46a3d5f6f1eebb98b63c + languageName: node + linkType: hard + "opencollective-postinstall@npm:^2.0.0, opencollective-postinstall@npm:^2.0.2": version: 2.0.3 resolution: "opencollective-postinstall@npm:2.0.3" @@ -39190,7 +38091,7 @@ __metadata: languageName: node linkType: hard -"os-browserify@npm:0.3.0, os-browserify@npm:^0.3.0": +"os-browserify@npm:^0.3.0": version: 0.3.0 resolution: "os-browserify@npm:0.3.0" checksum: 16e37ba3c0e6a4c63443c7b55799ce4066d59104143cb637ecb9fce586d5da319cdca786ba1c867abbe3890d2cbf37953f2d51eea85e20dd6c4570d6c54bfebf @@ -39432,7 +38333,7 @@ __metadata: languageName: node linkType: hard -"p-retry@npm:4.6.2, p-retry@npm:^4.5.0, p-retry@npm:^4.6.2": +"p-retry@npm:^4.5.0, p-retry@npm:^4.6.2": version: 4.6.2 resolution: "p-retry@npm:4.6.2" dependencies: @@ -39812,7 +38713,7 @@ __metadata: languageName: node linkType: hard -"path-browserify@npm:1.0.1, path-browserify@npm:^1.0.1": +"path-browserify@npm:^1.0.1": version: 1.0.1 resolution: "path-browserify@npm:1.0.1" checksum: c6d7fa376423fe35b95b2d67990060c3ee304fc815ff0a2dc1c6c3cfaff2bd0d572ee67e18f19d0ea3bbe32e8add2a05021132ac40509416459fffee35200699 @@ -40172,7 +39073,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:4.0.5, pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": +"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": version: 4.0.5 resolution: "pirates@npm:4.0.5" checksum: c9994e61b85260bec6c4fc0307016340d9b0c4f4b6550a957afaaff0c9b1ad58fbbea5cfcf083860a25cb27a375442e2b0edf52e2e1e40e69934e08dcc52d227 @@ -40277,7 +39178,7 @@ __metadata: languageName: node linkType: hard -"pluralize@npm:8.0.0, pluralize@npm:^8.0.0": +"pluralize@npm:^8.0.0": version: 8.0.0 resolution: "pluralize@npm:8.0.0" checksum: 08931d4a6a4a5561a7f94f67a31c17e6632cb21e459ab3ff4f6f629d9a822984cf8afef2311d2005fbea5d7ef26016ebb090db008e2d8bce39d0a9a9d218736e @@ -41283,7 +40184,7 @@ __metadata: languageName: node linkType: hard -"posthtml-noopener@npm:1.0.5, posthtml-noopener@npm:^1.0.5": +"posthtml-noopener@npm:^1.0.5": version: 1.0.5 resolution: "posthtml-noopener@npm:1.0.5" dependencies: @@ -41310,7 +40211,7 @@ __metadata: languageName: node linkType: hard -"posthtml-plugin-link-preload@npm:1.0.0, posthtml-plugin-link-preload@npm:^1.0.0": +"posthtml-plugin-link-preload@npm:^1.0.0": version: 1.0.0 resolution: "posthtml-plugin-link-preload@npm:1.0.0" dependencies: @@ -41326,16 +40227,6 @@ __metadata: languageName: node linkType: hard -"posthtml@npm:0.15.2, posthtml@npm:^0.15.0": - version: 0.15.2 - resolution: "posthtml@npm:0.15.2" - dependencies: - posthtml-parser: ^0.7.2 - posthtml-render: ^1.3.1 - checksum: 9b37fea35f8adecfd4379e568ba4038448c0a1fd9e0c8167765488e4e453891fa4481a9b8925d23b1dba5c2810c42717e19bc4870468f07983d5d99e0f105bb7 - languageName: node - linkType: hard - "posthtml@npm:^0.12.0": version: 0.12.3 resolution: "posthtml@npm:0.12.3" @@ -41346,6 +40237,16 @@ __metadata: languageName: node linkType: hard +"posthtml@npm:^0.15.0": + version: 0.15.2 + resolution: "posthtml@npm:0.15.2" + dependencies: + posthtml-parser: ^0.7.2 + posthtml-render: ^1.3.1 + checksum: 9b37fea35f8adecfd4379e568ba4038448c0a1fd9e0c8167765488e4e453891fa4481a9b8925d23b1dba5c2810c42717e19bc4870468f07983d5d99e0f105bb7 + languageName: node + linkType: hard + "prebuild-install@npm:^7.1.1": version: 7.1.1 resolution: "prebuild-install@npm:7.1.1" @@ -41567,7 +40468,7 @@ __metadata: languageName: node linkType: hard -"process@npm:0.11.10, process@npm:^0.11.10": +"process@npm:^0.11.10": version: 0.11.10 resolution: "process@npm:0.11.10" checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 @@ -42983,7 +41884,7 @@ __metadata: languageName: node linkType: hard -"react-refresh@npm:0.11.0, react-refresh@npm:^0.11.0": +"react-refresh@npm:^0.11.0": version: 0.11.0 resolution: "react-refresh@npm:0.11.0" checksum: 112178a05b1e0ffeaf5d9fb4e56b4410a34a73adeb04dbf13abdc50d9ac9df2ada83e81485156cca0b3fa296aa3612751b3d6cd13be4464642a43679b819cbc7 @@ -43127,7 +42028,7 @@ __metadata: languageName: node linkType: hard -"react-style-object-to-css@npm:1.1.2, react-style-object-to-css@npm:^1.1.2": +"react-style-object-to-css@npm:^1.1.2": version: 1.1.2 resolution: "react-style-object-to-css@npm:1.1.2" checksum: 1f854bf5c7fabcc0be3db3e35e4b346dd0d3cb2b09079f100380ab299d2db94ba75ab225254446958d820933c7be67b609219746610a14cda2c42e708711cc78 @@ -44575,7 +43476,7 @@ __metadata: languageName: node linkType: hard -"sanitize-filename@npm:1.6.3, sanitize-filename@npm:^1.6.3": +"sanitize-filename@npm:^1.6.3": version: 1.6.3 resolution: "sanitize-filename@npm:1.6.3" dependencies: @@ -45207,7 +44108,7 @@ __metadata: languageName: node linkType: hard -"shortid@npm:2.2.16, shortid@npm:^2.2.14, shortid@npm:^2.2.16": +"shortid@npm:^2.2.14, shortid@npm:^2.2.16": version: 2.2.16 resolution: "shortid@npm:2.2.16" dependencies: @@ -45387,7 +44288,7 @@ __metadata: languageName: node linkType: hard -"slugify@npm:1.6.5, slugify@npm:^1.2.9, slugify@npm:^1.4.0": +"slugify@npm:^1.2.9, slugify@npm:^1.4.0": version: 1.6.5 resolution: "slugify@npm:1.6.5" checksum: a955a1b600201030f4c1daa9bb74a17d4402a0693fc40978bbd17e44e64fd72dad3bac4037422aa8aed55b5170edd57f3f4cd8f59ba331f5cf0f10f1a7795609 @@ -45608,7 +44509,7 @@ __metadata: languageName: node linkType: hard -"source-map-loader@npm:1.1.3, source-map-loader@npm:^1.1.3": +"source-map-loader@npm:^1.1.3": version: 1.1.3 resolution: "source-map-loader@npm:1.1.3" dependencies: @@ -45657,16 +44558,6 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.12, source-map-support@npm:~0.5.20": - version: 0.5.21 - resolution: "source-map-support@npm:0.5.21" - dependencies: - buffer-from: ^1.0.0 - source-map: ^0.6.0 - checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 - languageName: node - linkType: hard - "source-map-support@npm:^0.4.16": version: 0.4.18 resolution: "source-map-support@npm:0.4.18" @@ -45676,6 +44567,16 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.21, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.12, source-map-support@npm:~0.5.20": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 + languageName: node + linkType: hard + "source-map-url@npm:^0.4.0": version: 0.4.1 resolution: "source-map-url@npm:0.4.1" @@ -45874,7 +44775,7 @@ __metadata: languageName: node linkType: hard -"srcset@npm:4.0.0, srcset@npm:^4.0.0": +"srcset@npm:^4.0.0": version: 4.0.0 resolution: "srcset@npm:4.0.0" checksum: aceb898c9281101ef43bfbf96bf04dfae828e1bf942a45df6fad74ae9f8f0a425f4bca1480e0d22879beb40dd2bc6947e0e1e5f4d307a714666196164bc5769d @@ -46096,7 +44997,7 @@ __metadata: languageName: node linkType: hard -"stream@npm:0.0.2, stream@npm:^0.0.2": +"stream@npm:^0.0.2": version: 0.0.2 resolution: "stream@npm:0.0.2" dependencies: @@ -47595,7 +46496,7 @@ __metadata: languageName: node linkType: hard -"ts-morph@npm:11.0.3, ts-morph@npm:^11.0.0": +"ts-morph@npm:^11.0.0": version: 11.0.3 resolution: "ts-morph@npm:11.0.3" dependencies: @@ -47764,7 +46665,7 @@ __metadata: languageName: node linkType: hard -"ttypescript@npm:1.5.15, ttypescript@npm:^1.3.2, ttypescript@npm:^1.5.12, ttypescript@npm:^1.5.13, ttypescript@npm:^1.5.15": +"ttypescript@npm:^1.3.2, ttypescript@npm:^1.5.12, ttypescript@npm:^1.5.13, ttypescript@npm:^1.5.15": version: 1.5.15 resolution: "ttypescript@npm:1.5.15" dependencies: @@ -48761,7 +47662,7 @@ __metadata: languageName: node linkType: hard -"vm-browserify@npm:1.1.2, vm-browserify@npm:^1.0.1, vm-browserify@npm:^1.1.2": +"vm-browserify@npm:^1.0.1, vm-browserify@npm:^1.1.2": version: 1.1.2 resolution: "vm-browserify@npm:1.1.2" checksum: 10a1c50aab54ff8b4c9042c15fc64aefccce8d2fb90c0640403242db0ee7fb269f9b102bdb69cfb435d7ef3180d61fd4fb004a043a12709abaf9056cfd7e039d @@ -49068,43 +47969,6 @@ __metadata: languageName: node linkType: hard -"webpack@npm:5.75.0, webpack@npm:^5, webpack@npm:^5.74.0": - version: 5.75.0 - resolution: "webpack@npm:5.75.0" - dependencies: - "@types/eslint-scope": ^3.7.3 - "@types/estree": ^0.0.51 - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/wasm-edit": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 - acorn: ^8.7.1 - acorn-import-assertions: ^1.7.6 - browserslist: ^4.14.5 - chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.10.0 - es-module-lexer: ^0.9.0 - eslint-scope: 5.1.1 - events: ^3.2.0 - glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 - json-parse-even-better-errors: ^2.3.1 - loader-runner: ^4.2.0 - mime-types: ^2.1.27 - neo-async: ^2.6.2 - schema-utils: ^3.1.0 - tapable: ^2.1.1 - terser-webpack-plugin: ^5.1.3 - watchpack: ^2.4.0 - webpack-sources: ^3.2.3 - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 2bcc5f3c195f375944e8af2f00bf2feea39cb9fda5f763b0d1b00077f1c51783db25c94d3fae96a07dead9fa085e6ae7474417e5ab31719c9776ea5969ceb83a - languageName: node - linkType: hard - "webpack@npm:^4.33.0, webpack@npm:^4.38.0, webpack@npm:^4.46.0": version: 4.46.0 resolution: "webpack@npm:4.46.0" @@ -49143,6 +48007,43 @@ __metadata: languageName: node linkType: hard +"webpack@npm:^5, webpack@npm:^5.74.0": + version: 5.75.0 + resolution: "webpack@npm:5.75.0" + dependencies: + "@types/eslint-scope": ^3.7.3 + "@types/estree": ^0.0.51 + "@webassemblyjs/ast": 1.11.1 + "@webassemblyjs/wasm-edit": 1.11.1 + "@webassemblyjs/wasm-parser": 1.11.1 + acorn: ^8.7.1 + acorn-import-assertions: ^1.7.6 + browserslist: ^4.14.5 + chrome-trace-event: ^1.0.2 + enhanced-resolve: ^5.10.0 + es-module-lexer: ^0.9.0 + eslint-scope: 5.1.1 + events: ^3.2.0 + glob-to-regexp: ^0.4.1 + graceful-fs: ^4.2.9 + json-parse-even-better-errors: ^2.3.1 + loader-runner: ^4.2.0 + mime-types: ^2.1.27 + neo-async: ^2.6.2 + schema-utils: ^3.1.0 + tapable: ^2.1.1 + terser-webpack-plugin: ^5.1.3 + watchpack: ^2.4.0 + webpack-sources: ^3.2.3 + peerDependenciesMeta: + webpack-cli: + optional: true + bin: + webpack: bin/webpack.js + checksum: 2bcc5f3c195f375944e8af2f00bf2feea39cb9fda5f763b0d1b00077f1c51783db25c94d3fae96a07dead9fa085e6ae7474417e5ab31719c9776ea5969ceb83a + languageName: node + linkType: hard + "webpackbar@npm:5.0.2": version: 5.0.2 resolution: "webpackbar@npm:5.0.2" @@ -49924,7 +48825,7 @@ __metadata: languageName: node linkType: hard -"yauzl@npm:2.10.0, yauzl@npm:^2.10.0, yauzl@npm:^2.4.2": +"yauzl@npm:^2.10.0, yauzl@npm:^2.4.2": version: 2.10.0 resolution: "yauzl@npm:2.10.0" dependencies: @@ -50003,7 +48904,7 @@ __metadata: languageName: node linkType: hard -"zip-local@npm:0.3.5, zip-local@npm:^0.3.4": +"zip-local@npm:^0.3.4": version: 0.3.5 resolution: "zip-local@npm:0.3.5" dependencies: @@ -50026,16 +48927,16 @@ __metadata: languageName: node linkType: hard -"zod@npm:3.21.4, zod@npm:^3.21.4": - version: 3.21.4 - resolution: "zod@npm:3.21.4" - checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f - languageName: node - linkType: hard - "zod@npm:3.22.4, zod@npm:^3.22.4": version: 3.22.4 resolution: "zod@npm:3.22.4" checksum: 80bfd7f8039b24fddeb0718a2ec7c02aa9856e4838d6aa4864335a047b6b37a3273b191ef335bf0b2002e5c514ef261ffcda5a589fb084a48c336ffc4cdbab7f languageName: node linkType: hard + +"zod@npm:^3.21.4": + version: 3.21.4 + resolution: "zod@npm:3.21.4" + checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f + languageName: node + linkType: hard From 746bfa2b0d2b88c6023c01ede7ce3e7a891c4d0e Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 5 Jun 2024 15:55:39 +0200 Subject: [PATCH 31/56] chore: remove temp scripts --- .../DeleteAllCmsEntries.ts | 47 --- .../deleteAllCmsEntries/SegmentProcessor.ts | 44 --- .../ddb-es/temp/deleteAllCmsEntries/bin.ts | 32 -- .../ddb-es/temp/deleteAllCmsEntries/worker.ts | 196 ----------- .../MetaFieldsMigration.ts | 211 ----------- .../SegmentProcessor.ts | 70 ---- .../temp/revertMetaFieldsMigration/bin.ts | 78 ----- .../temp/revertMetaFieldsMigration/worker.ts | 331 ------------------ 8 files changed, 1009 deletions(-) delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/DeleteAllCmsEntries.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/SegmentProcessor.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/bin.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/worker.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/SegmentProcessor.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/bin.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/DeleteAllCmsEntries.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/DeleteAllCmsEntries.ts deleted file mode 100644 index 7d05ac4e85b..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/DeleteAllCmsEntries.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Logger } from "@webiny/logger"; -import { SegmentProcessor } from "./SegmentProcessor"; - -interface SegmentProcessorParams { - ddbTable: string; - ddbEsTable: string; - totalSegments: number; - logger: Logger; -} - -export class DeleteAllCmsEntries { - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly totalSegments: number; - private readonly logger: Logger; - - constructor(params: SegmentProcessorParams) { - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.totalSegments = params.totalSegments; - this.logger = params.logger; - } - - async execute() { - const scanProcessesPromises = []; - - const start = Date.now(); - const getDuration = () => { - return (Date.now() - start) / 1000; - }; - - for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { - const segmentProcessor = new SegmentProcessor({ - segmentIndex, - totalSegments: this.totalSegments, - ddbTable: this.ddbTable, - ddbEsTable: this.ddbEsTable - }); - - scanProcessesPromises.push(segmentProcessor.execute()); - } - - await Promise.all(scanProcessesPromises); - - this.logger.trace(`All CMS entries have been deleted. Took: ${getDuration()}s`); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/SegmentProcessor.ts deleted file mode 100644 index 783a32c886f..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/SegmentProcessor.ts +++ /dev/null @@ -1,44 +0,0 @@ -import execa from "execa"; -import path from "path"; - -interface SegmentProcessorParams { - ddbTable: string; - ddbEsTable: string; - segmentIndex: number; - totalSegments: number; -} - -export class SegmentProcessor { - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly segmentIndex: number; - private readonly totalSegments: number; - - constructor(params: SegmentProcessorParams) { - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.segmentIndex = params.segmentIndex; - this.totalSegments = params.totalSegments; - } - - async execute() { - return execa( - "node", - [ - path.join(__dirname, "worker"), - "--ddbTable", - this.ddbTable, - "--ddbEsTable", - this.ddbEsTable, - "--segmentIndex", - String(this.segmentIndex), - "--totalSegments", - String(this.totalSegments) - ], - { - stdio: "inherit", - env: process.env - } - ); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/bin.ts deleted file mode 100644 index 344ec0adba3..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/bin.ts +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { DeleteAllCmsEntries } from "./DeleteAllCmsEntries"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import pinoPretty from "pino-pretty"; - -const argv = yargs(hideBin(process.argv)) - .options({ - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - segments: { type: "number", demandOption: true } - }) - .parseSync(); - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const deleteAllCmsEntries = new DeleteAllCmsEntries({ - totalSegments: argv.segments, - ddbTable: argv.ddbTable, - ddbEsTable: argv.ddbEsTable, - logger - }); - - await deleteAllCmsEntries.execute(); -})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/worker.ts deleted file mode 100644 index 06815f6681e..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/deleteAllCmsEntries/worker.ts +++ /dev/null @@ -1,196 +0,0 @@ -import { executeWithRetry } from "@webiny/utils"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import { createTable } from "@webiny/data-migration"; -import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { CmsEntry } from "~/migrations/5.39.0/001/types"; -import { - createDdbEntryEntity, - createDdbEsEntryEntity -} from "~/migrations/5.39.0/001/entities/createEntryEntity"; -import { batchWriteAll, BatchWriteItem, ddbScanWithCallback } from "~/utils"; -import pinoPretty from "pino-pretty"; - -const argv = yargs(hideBin(process.argv)) - .options({ - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - segmentIndex: { type: "number", demandOption: true }, - totalSegments: { type: "number", demandOption: true } - }) - .parseSync(); - -interface LastEvaluatedKeyObject { - PK: string; - SK: string; - GSI1_PK: string; - GSI1_SK: string; -} - -type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; - -interface MigrationStatus { - lastEvaluatedKey: LastEvaluatedKey; - iterationsCount: number; - recordsScanned: number; - recordsUpdated: number; - recordsSkipped: number; -} - -const createInitialStatus = (): MigrationStatus => { - return { - lastEvaluatedKey: null, - iterationsCount: 0, - recordsScanned: 0, - recordsUpdated: 0, - recordsSkipped: 0 - }; -}; - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), - msgPrefix: `[segment #${argv.segmentIndex}] ` - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const documentClient = getDocumentClient(); - - const primaryTable = createTable({ - name: argv.ddbTable, - documentClient - }); - const dynamoToEsTable = createTable({ - name: argv.ddbEsTable, - documentClient - }); - - const ddbEntryEntity = createDdbEntryEntity(primaryTable); - const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); - - const status = createInitialStatus(); - - await ddbScanWithCallback( - { - entity: ddbEntryEntity, - options: { - segment: argv.segmentIndex, - segments: argv.totalSegments, - filters: [ - { - attr: "_et", - eq: "CmsEntries" - } - ], - startKey: status.lastEvaluatedKey || undefined, - limit: 100 - } - }, - async result => { - status.iterationsCount++; - status.recordsScanned += result.items.length; - - logger.trace(`Reading ${result.items.length} record(s)...`); - const ddbItemsToBatchDelete: BatchWriteItem[] = []; - const ddbEsItemsToBatchDelete: BatchWriteItem[] = []; - const ddbEsItemsToPutIntoBatchDelete: Record = {}; - - for (const item of result.items) { - ddbItemsToBatchDelete.push(ddbEntryEntity.deleteBatch(item)); - - /** - * Prepare the loading of DynamoDB Elasticsearch part of the records. - */ - - const ddbEsLatestRecordKey = `${item.entryId}:L`; - if (ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey]) { - continue; - } - - ddbEsItemsToPutIntoBatchDelete[ddbEsLatestRecordKey] = { - PK: item.PK, - SK: "L" - }; - - const ddbEsPublishedRecordKey = `${item.entryId}:P`; - if (item.status === "published" || !!item.locked) { - ddbEsItemsToPutIntoBatchDelete[ddbEsPublishedRecordKey] = { - PK: item.PK, - SK: "P" - }; - } - } - - if (Object.keys(ddbEsItemsToPutIntoBatchDelete).length > 0) { - Object.values(ddbEsItemsToPutIntoBatchDelete).forEach(item => { - ddbEsItemsToBatchDelete.push(ddbEsEntryEntity.deleteBatch(item)); - }); - } - - if (ddbItemsToBatchDelete.length) { - // Store data in primary DynamoDB table. - const execute = () => { - return batchWriteAll({ - table: ddbEntryEntity.table, - items: ddbItemsToBatchDelete - }); - }; - - logger.trace( - `Deleting ${ddbItemsToBatchDelete.length} record(s) in primary DynamoDB table...` - ); - await executeWithRetry(execute, { - onFailedAttempt: error => { - logger.warn( - `Batch delete attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - - if (ddbEsItemsToBatchDelete.length) { - logger.trace( - `Deleting ${ddbEsItemsToBatchDelete.length} record(s) in DDB-ES DynamoDB table...` - ); - - // Store data in DDB-ES DynamoDB table. - const executeDdbEs = () => { - return batchWriteAll({ - table: ddbEsEntryEntity.table, - items: ddbEsItemsToBatchDelete - }); - }; - - await executeWithRetry(executeDdbEs, { - onFailedAttempt: error => { - logger.warn( - `[DDB-ES Table] Batch delete attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - } - - status.recordsUpdated += ddbItemsToBatchDelete.length; - } - - // Update checkpoint after every batch. - let lastEvaluatedKey: LastEvaluatedKey = true; - if (result.lastEvaluatedKey) { - lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; - } - - status.lastEvaluatedKey = lastEvaluatedKey; - - if (lastEvaluatedKey === true) { - return false; - } - - // Continue further scanning. - return true; - } - ); - - logger.trace({ status }, "Segment processing completed."); -})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts deleted file mode 100644 index 4bd0641972a..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/MetaFieldsMigration.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { Logger } from "@webiny/logger"; -import { SegmentProcessor } from "./SegmentProcessor"; -import { - disableElasticsearchIndexing, - esListIndexes, - fetchOriginalElasticsearchSettings, - restoreOriginalElasticsearchSettings -} from "~/utils"; -import { createElasticsearchClient } from "@webiny/api-elasticsearch"; -import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import { DEFAULT_ES_HEALTH_CHECKS_PARAMS, EsHealthChecksParams } from "../../utils"; -import path from "path"; -import os from "os"; -import fs from "fs"; -import glob from "fast-glob"; - -export interface MetaFieldsMigrationParams { - ddbTable: string; - ddbEsTable: string; - esEndpoint: string; - totalSegments: number; - logger: Logger; - - // Elasticsearch health check options. - esHealthChecks?: Partial; -} - -export class MetaFieldsMigration { - private readonly runId: string; - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly esEndpoint: string; - private readonly totalSegments: number; - private readonly logger: Logger; - - private readonly esHealthChecks: EsHealthChecksParams; - - constructor(params: MetaFieldsMigrationParams) { - this.runId = String(new Date().getTime()); - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.esEndpoint = params.esEndpoint; - this.totalSegments = params.totalSegments; - this.logger = params.logger; - this.esHealthChecks = { - ...DEFAULT_ES_HEALTH_CHECKS_PARAMS, - ...params.esHealthChecks - }; - } - - async execute() { - const scanProcessesPromises = []; - - const start = Date.now(); - const getDuration = () => { - return (Date.now() - start) / 1000; - }; - - this.logger.info("Starting 5.39.6-001 meta fields data migration..."); - this.logger.info( - { - ddbTable: this.ddbTable, - ddbEsTable: this.ddbEsTable, - esEndpoint: this.esEndpoint, - totalSegments: this.totalSegments, - esHealthChecks: this.esHealthChecks - }, - "Received the following parameters:" - ); - - const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${this.esEndpoint}` - }); - - this.logger.info("Checking Elasticsearch health status..."); - const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, this.esHealthChecks); - this.logger.info("Elasticsearch is healthy."); - - await waitUntilHealthy.wait(); - - const indexes = await esListIndexes({ elasticsearchClient, match: "-headless-cms-" }); - const indexSettings: Record = {}; - for (const indexName of indexes) { - this.logger.info(`Disabling indexing for Elasticsearch index "${indexName}"...`); - indexSettings[indexName] = await fetchOriginalElasticsearchSettings({ - elasticsearchClient, - index: indexName, - logger: this.logger - }); - - await disableElasticsearchIndexing({ - elasticsearchClient, - index: indexName, - logger: this.logger - }); - } - - this.logger.info("Proceeding with the migration..."); - - for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { - const segmentProcessor = new SegmentProcessor({ - segmentIndex, - runId: this.runId, - totalSegments: this.totalSegments, - ddbTable: this.ddbTable, - ddbEsTable: this.ddbEsTable, - esEndpoint: this.esEndpoint, - esHealthChecks: this.esHealthChecks - }); - - scanProcessesPromises.push(segmentProcessor.execute()); - } - - await Promise.all(scanProcessesPromises); - - this.logger.info("Restoring original Elasticsearch settings..."); - await restoreOriginalElasticsearchSettings({ - elasticsearchClient, - indexSettings, - logger: this.logger - }); - - const duration = getDuration(); - this.logger.info(`5.39.6-001 migration completed in ${duration}s, here are the results...`); - - // Wait for 1 second. - await new Promise(resolve => setTimeout(resolve, 1000)); - - this.logger.info( - { - totalSegments: this.totalSegments, - esHealthChecks: this.esHealthChecks - }, - "The migration was performed with the following following parameters:" - ); - - // Pickup all log files and print a summary of the migration. - const logFilePaths = await glob( - path.join( - os.tmpdir(), - `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}-*.log` - ) - ); - - const migrationStats = { - iterationsCount: 0, - avgIterationDuration: 0, - recordsScanned: 0, - avgRecordsScannedPerIteration: 0, - recordsScannedPerSecond: 0, - recordsUpdated: 0, - recordsSkipped: 0, - esHealthChecks: { - timeSpentWaiting: 0, - checksCount: 0, - unhealthyReasons: {} as Record - } - }; - - for (const logFilePath of logFilePaths) { - const logFileContent = fs.readFileSync(logFilePath, "utf-8"); - const logFile = JSON.parse(logFileContent); - - migrationStats.iterationsCount += logFile.iterationsCount; - migrationStats.recordsScanned += logFile.recordsScanned; - migrationStats.recordsUpdated += logFile.recordsUpdated; - migrationStats.recordsSkipped += logFile.recordsSkipped; - - migrationStats.esHealthChecks.timeSpentWaiting += - logFile.esHealthChecks.timeSpentWaiting; - migrationStats.esHealthChecks.checksCount += logFile.esHealthChecks.checksCount; - - for (const unhealthyReasonType in logFile.esHealthChecks.unhealthyReasons) { - if (!logFile.esHealthChecks.unhealthyReasons.hasOwnProperty(unhealthyReasonType)) { - continue; - } - - const hasCount = - unhealthyReasonType in migrationStats.esHealthChecks.unhealthyReasons; - if (hasCount) { - migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] += - logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; - } else { - migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] = - logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; - } - } - } - - migrationStats.avgIterationDuration = duration / migrationStats.iterationsCount; - - migrationStats.avgRecordsScannedPerIteration = - migrationStats.recordsScanned / migrationStats.iterationsCount; - - migrationStats.recordsScannedPerSecond = migrationStats.recordsScanned / duration; - - this.logger.info( - migrationStats, - `Migration summary (based on ${logFilePaths.length} generated logs):` - ); - - const logFilePath = path.join( - os.tmpdir(), - `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}.log` - ); - - // Save segment processing stats to a file. - fs.writeFileSync(logFilePath, JSON.stringify(migrationStats, null, 2)); - this.logger.trace(`Migration summary saved to "${logFilePath}".`); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/SegmentProcessor.ts deleted file mode 100644 index 7199d35cf3b..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/SegmentProcessor.ts +++ /dev/null @@ -1,70 +0,0 @@ -import execa from "execa"; -import path from "path"; -import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; - -interface SegmentProcessorParams { - runId: string; - ddbTable: string; - ddbEsTable: string; - esEndpoint: string; - segmentIndex: number; - totalSegments: number; - esHealthChecks: EsHealthChecksParams; -} - -export class SegmentProcessor { - private readonly runId: string; - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly esEndpoint: string; - private readonly segmentIndex: number; - private readonly totalSegments: number; - private readonly esHealthChecks: EsHealthChecksParams; - - constructor(params: SegmentProcessorParams) { - this.runId = params.runId; - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.esEndpoint = params.esEndpoint; - this.segmentIndex = params.segmentIndex; - this.totalSegments = params.totalSegments; - this.esHealthChecks = params.esHealthChecks; - } - - execute() { - return execa( - "node", - [ - path.join(__dirname, "worker"), - "--runId", - this.runId, - "--ddbTable", - this.ddbTable, - "--ddbEsTable", - this.ddbEsTable, - "--esEndpoint", - this.esEndpoint, - "--segmentIndex", - String(this.segmentIndex), - "--totalSegments", - String(this.totalSegments), - - // Elasticsearch health check options. - "--esHealthMinClusterHealthStatus", - this.esHealthChecks.minClusterHealthStatus, - "--esHealthMaxProcessorPercent", - String(this.esHealthChecks.maxProcessorPercent), - "--esHealthMaxRamPercent", - String(this.esHealthChecks.maxRamPercent), - "--esHealthMaxWaitingTime", - String(this.esHealthChecks.maxWaitingTime), - "--esHealthWaitingTimeStep", - String(this.esHealthChecks.waitingTimeStep) - ], - { - stdio: "inherit", - env: process.env - } - ); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/bin.ts deleted file mode 100644 index f70fc2efe4d..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/bin.ts +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env node -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { MetaFieldsMigration } from "./MetaFieldsMigration"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import pinoPretty from "pino-pretty"; -import { - DEFAULT_ES_HEALTH_CHECKS_PARAMS, - EsHealthChecksParams -} from "~/migrations/5.39.6/001/ddb-es/utils"; - -const argv = yargs(hideBin(process.argv)) - .options({ - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - esEndpoint: { type: "string", demandOption: true }, - segments: { type: "number", demandOption: true }, - - // Elasticsearch health check options. - esHealthMinClusterHealthStatus: { - type: "string", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.minClusterHealthStatus, - description: `Minimum cluster health status to wait for before proceeding with the migration.` - }, - esHealthMaxProcessorPercent: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxProcessorPercent, - description: `Maximum CPU usage percentage to wait for before proceeding with the migration.` - }, - esHealthMaxRamPercent: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxRamPercent, - description: `Maximum RAM usage percentage to wait for before proceeding with the migration.` - }, - esHealthMaxWaitingTime: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxWaitingTime, - description: `Maximum time to wait (seconds) for before proceeding with the migration.` - }, - esHealthWaitingTimeStep: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.waitingTimeStep, - description: `Time step (seconds) to wait before checking Elasticsearch health status again.` - } - }) - .parseSync(); - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const migration = new MetaFieldsMigration({ - totalSegments: argv.segments, - ddbTable: argv.ddbTable, - ddbEsTable: argv.ddbEsTable, - esEndpoint: argv.esEndpoint, - esHealthChecks: { - minClusterHealthStatus: - argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], - maxProcessorPercent: argv.esHealthMaxProcessorPercent, - maxRamPercent: argv.esHealthMaxRamPercent, - maxWaitingTime: argv.esHealthMaxWaitingTime, - waitingTimeStep: argv.esHealthWaitingTimeStep - }, - logger - }); - - await migration.execute(); -})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts deleted file mode 100644 index f736b1ed531..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/temp/revertMetaFieldsMigration/worker.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { executeWithRetry } from "@webiny/utils"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import { createTable } from "@webiny/data-migration"; -import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; -import { createElasticsearchClient } from "@webiny/api-elasticsearch"; -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; -import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; -import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; -import { CmsEntry } from "~/migrations/5.39.0/001/types"; -import { - createDdbEntryEntity, - createDdbEsEntryEntity -} from "~/migrations/5.39.0/001/entities/createEntryEntity"; -import { - batchReadAll, - BatchReadItem, - batchWriteAll, - BatchWriteItem, - ddbScanWithCallback -} from "~/utils"; -import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import pinoPretty from "pino-pretty"; -import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; -import path from "path"; -import os from "os"; -import fs from "fs"; - -const argv = yargs(hideBin(process.argv)) - .options({ - runId: { type: "string", demandOption: true }, - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - esEndpoint: { type: "string", demandOption: true }, - segmentIndex: { type: "number", demandOption: true }, - totalSegments: { type: "number", demandOption: true }, - - // Elasticsearch health check options. - esHealthMinClusterHealthStatus: { type: "string", demandOption: true }, - esHealthMaxProcessorPercent: { type: "number", demandOption: true }, - esHealthMaxRamPercent: { type: "number", demandOption: true }, - esHealthMaxWaitingTime: { type: "number", demandOption: true }, - esHealthWaitingTimeStep: { type: "number", demandOption: true } - }) - .parseSync(); - -interface LastEvaluatedKeyObject { - PK: string; - SK: string; - GSI1_PK: string; - GSI1_SK: string; -} - -type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; - -interface MigrationStatus { - lastEvaluatedKey: LastEvaluatedKey; - stats: { - iterationsCount: number; - recordsScanned: number; - recordsUpdated: number; - recordsSkipped: number; - esHealthChecks: { - timeSpentWaiting: number; - checksCount: number; - unhealthyReasons: { - [key: string]: number; - }; - }; - }; -} - -interface DynamoDbElasticsearchRecord { - PK: string; - SK: string; - data: string; -} - -const createInitialStatus = (): MigrationStatus => { - return { - lastEvaluatedKey: null, - stats: { - iterationsCount: 0, - recordsScanned: 0, - recordsUpdated: 0, - recordsSkipped: 0, - esHealthChecks: { - timeSpentWaiting: 0, - checksCount: 0, - unhealthyReasons: {} - } - } - }; -}; - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), - msgPrefix: `[segment #${argv.segmentIndex}] ` - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const documentClient = getDocumentClient(); - const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${argv.esEndpoint}` - }); - - const primaryTable = createTable({ - name: argv.ddbTable, - documentClient - }); - const dynamoToEsTable = createTable({ - name: argv.ddbEsTable, - documentClient - }); - - const ddbEntryEntity = createDdbEntryEntity(primaryTable); - const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); - - const status = createInitialStatus(); - - const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { - minClusterHealthStatus: - argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], - maxProcessorPercent: argv.esHealthMaxProcessorPercent, - maxRamPercent: argv.esHealthMaxRamPercent, - maxWaitingTime: argv.esHealthMaxWaitingTime, - waitingTimeStep: argv.esHealthWaitingTimeStep - }); - - await ddbScanWithCallback( - { - entity: ddbEntryEntity, - options: { - segment: argv.segmentIndex, - segments: argv.totalSegments, - filters: [ - { - attr: "_et", - eq: "CmsEntries" - } - ], - startKey: status.lastEvaluatedKey || undefined, - limit: 100 - } - }, - async result => { - status.stats.iterationsCount++; - status.stats.recordsScanned += result.items.length; - - if (status.stats.iterationsCount % 5 === 0) { - // We log every 5th iteration. - logger.trace( - `[iteration #${status.stats.iterationsCount}] Reading ${result.items.length} record(s)...` - ); - } - - const ddbItemsToBatchWrite: BatchWriteItem[] = []; - const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; - const ddbEsItemsToBatchRead: Record = {}; - - // Update records in primary DynamoDB table. Also do preparations for - // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. - for (const item of result.items) { - if (!isMigratedEntry(item)) { - status.stats.recordsSkipped++; - continue; - } - - // @ts-expect-error - delete item.revisionCreatedOn; - - ddbItemsToBatchWrite.push(ddbEntryEntity.putBatch(item)); - - /** - * Prepare the loading of DynamoDB Elasticsearch part of the records. - */ - - const ddbEsLatestRecordKey = `${item.entryId}:L`; - if (ddbEsItemsToBatchRead[ddbEsLatestRecordKey]) { - continue; - } - - ddbEsItemsToBatchRead[ddbEsLatestRecordKey] = ddbEsEntryEntity.getBatch({ - PK: item.PK, - SK: "L" - }); - - const ddbEsPublishedRecordKey = `${item.entryId}:P`; - if (item.status === "published" || !!item.locked) { - ddbEsItemsToBatchRead[ddbEsPublishedRecordKey] = ddbEsEntryEntity.getBatch({ - PK: item.PK, - SK: "P" - }); - } - } - - if (Object.keys(ddbEsItemsToBatchRead).length > 0) { - /** - * Get all the records from DynamoDB Elasticsearch. - */ - const ddbEsRecords = await batchReadAll({ - table: ddbEsEntryEntity.table, - items: Object.values(ddbEsItemsToBatchRead) - }); - - for (const ddbEsRecord of ddbEsRecords) { - const decompressedData = await getDecompressedData(ddbEsRecord.data); - if (!decompressedData) { - logger.trace( - `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` - ); - continue; - } - - if (!isMigratedEntry(decompressedData)) { - status.stats.recordsSkipped++; - continue; - } - - // @ts-expect-error - delete decompressedData.revisionCreatedOn; - - const compressedData = await getCompressedData(decompressedData); - - ddbEsItemsToBatchWrite.push( - ddbEsEntryEntity.putBatch({ - ...ddbEsRecord, - data: compressedData - }) - ); - } - } - - if (ddbItemsToBatchWrite.length) { - // Store data in primary DynamoDB table. - const execute = () => { - return batchWriteAll({ - table: ddbEntryEntity.table, - items: ddbItemsToBatchWrite - }); - }; - - logger.trace( - `Storing ${ddbItemsToBatchWrite.length} record(s) in primary DynamoDB table...` - ); - await executeWithRetry(execute, { - onFailedAttempt: error => { - logger.warn( - `Batch write attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - - if (ddbEsItemsToBatchWrite.length) { - logger.trace( - `Storing ${ddbEsItemsToBatchWrite.length} record(s) in DDB-ES DynamoDB table...` - ); - - const results = await waitUntilHealthy.wait({ - async onUnhealthy(params) { - const shouldWaitReason = params.waitingReason.name; - - logger.warn( - `Cluster is unhealthy (${shouldWaitReason}). Waiting for the cluster to become healthy...`, - params - ); - - if (status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]) { - status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]++; - } else { - status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason] = 1; - } - } - }); - - status.stats.esHealthChecks.checksCount++; - status.stats.esHealthChecks.timeSpentWaiting += results.runningTime; - - // Store data in DDB-ES DynamoDB table. - const executeDdbEs = () => { - return batchWriteAll({ - table: ddbEsEntryEntity.table, - items: ddbEsItemsToBatchWrite - }); - }; - - await executeWithRetry(executeDdbEs, { - onFailedAttempt: error => { - logger.warn( - `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - } - - status.stats.recordsUpdated += ddbItemsToBatchWrite.length; - } - - // Update checkpoint after every batch. - let lastEvaluatedKey: LastEvaluatedKey = true; - if (result.lastEvaluatedKey) { - lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; - } - - status.lastEvaluatedKey = lastEvaluatedKey; - - if (lastEvaluatedKey === true) { - return false; - } - - // Continue further scanning. - return true; - } - ); - - // Store status in tmp file. - logger.trace({ status }, "Segment processing completed. Saving status to tmp file..."); - const logFilePath = path.join( - os.tmpdir(), - `webiny-5-39-6-meta-fields-data-migration-log-${argv.runId}-${argv.segmentIndex}.log` - ); - - // Save segment processing stats to a file. - fs.writeFileSync(logFilePath, JSON.stringify(status.stats, null, 2)); - - logger.trace(`Segment processing stats saved in ${logFilePath}.`); -})(); From 3f17cf09364c7fefc3918e1ffa3b5859183b4a89 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 5 Jun 2024 16:52:17 +0200 Subject: [PATCH 32/56] chore: remove temp scripts --- .../5.39.6/001/ddb-es/MetaFieldsMigration.ts | 214 --------- .../5.39.6/001/ddb-es/SegmentProcessor.ts | 70 --- .../src/migrations/5.39.6/001/ddb-es/bin.ts | 78 --- ...teMetaFieldsDataMigrationDeploymentHook.ts | 94 ---- .../src/migrations/5.39.6/001/ddb-es/utils.ts | 14 - .../migrations/5.39.6/001/ddb-es/worker.ts | 447 ------------------ .../src/utils/elasticsearch/esListIndexes.ts | 25 - 7 files changed, 942 deletions(-) delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts delete mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts delete mode 100644 packages/migrations/src/utils/elasticsearch/esListIndexes.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts deleted file mode 100644 index fb60ab7da28..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { Logger } from "@webiny/logger"; -import { SegmentProcessor } from "./SegmentProcessor"; -import { - disableElasticsearchIndexing, - esListIndexes, - fetchOriginalElasticsearchSettings, - restoreOriginalElasticsearchSettings -} from "~/utils"; -import { createElasticsearchClient } from "@webiny/api-elasticsearch"; -import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import { - DEFAULT_ES_HEALTH_CHECKS_PARAMS, - EsHealthChecksParams -} from "~/migrations/5.39.6/001/ddb-es/utils"; -import path from "path"; -import os from "os"; -import fs from "fs"; -import glob from "fast-glob"; - -export interface MetaFieldsMigrationParams { - ddbTable: string; - ddbEsTable: string; - esEndpoint: string; - totalSegments: number; - logger: Logger; - - // Elasticsearch health check options. - esHealthChecks?: Partial; -} - -export class MetaFieldsMigration { - private readonly runId: string; - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly esEndpoint: string; - private readonly totalSegments: number; - private readonly logger: Logger; - - private readonly esHealthChecks: EsHealthChecksParams; - - constructor(params: MetaFieldsMigrationParams) { - this.runId = String(new Date().getTime()); - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.esEndpoint = params.esEndpoint; - this.totalSegments = params.totalSegments; - this.logger = params.logger; - this.esHealthChecks = { - ...DEFAULT_ES_HEALTH_CHECKS_PARAMS, - ...params.esHealthChecks - }; - } - - async execute() { - const scanProcessesPromises = []; - - const start = Date.now(); - const getDuration = () => { - return (Date.now() - start) / 1000; - }; - - this.logger.info("Starting 5.39.6-001 meta fields data migration..."); - this.logger.info( - { - ddbTable: this.ddbTable, - ddbEsTable: this.ddbEsTable, - esEndpoint: this.esEndpoint, - totalSegments: this.totalSegments, - esHealthChecks: this.esHealthChecks - }, - "Received the following parameters:" - ); - - const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${this.esEndpoint}` - }); - - this.logger.info("Checking Elasticsearch health status..."); - const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, this.esHealthChecks); - this.logger.info("Elasticsearch is healthy."); - - await waitUntilHealthy.wait(); - - const indexes = await esListIndexes({ elasticsearchClient, match: "-headless-cms-" }); - const indexSettings: Record = {}; - for (const indexName of indexes) { - this.logger.info(`Disabling indexing for Elasticsearch index "${indexName}"...`); - indexSettings[indexName] = await fetchOriginalElasticsearchSettings({ - elasticsearchClient, - index: indexName, - logger: this.logger - }); - - await disableElasticsearchIndexing({ - elasticsearchClient, - index: indexName, - logger: this.logger - }); - } - - this.logger.info("Proceeding with the migration..."); - - for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { - const segmentProcessor = new SegmentProcessor({ - segmentIndex, - runId: this.runId, - totalSegments: this.totalSegments, - ddbTable: this.ddbTable, - ddbEsTable: this.ddbEsTable, - esEndpoint: this.esEndpoint, - esHealthChecks: this.esHealthChecks - }); - - scanProcessesPromises.push(segmentProcessor.execute()); - } - - await Promise.all(scanProcessesPromises); - - this.logger.info("Restoring original Elasticsearch settings..."); - await restoreOriginalElasticsearchSettings({ - elasticsearchClient, - indexSettings, - logger: this.logger - }); - - const duration = getDuration(); - this.logger.info(`5.39.6-001 migration completed in ${duration}s, here are the results...`); - - // Wait for 1 second. - await new Promise(resolve => setTimeout(resolve, 1000)); - - this.logger.info( - { - totalSegments: this.totalSegments, - esHealthChecks: this.esHealthChecks - }, - "The migration was performed with the following following parameters:" - ); - - // Pickup all log files and print a summary of the migration. - const logFilePaths = await glob( - path.join( - os.tmpdir(), - `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}-*.log` - ) - ); - - const migrationStats = { - iterationsCount: 0, - avgIterationDuration: 0, - recordsScanned: 0, - avgRecordsScannedPerIteration: 0, - recordsScannedPerSecond: 0, - recordsUpdated: 0, - recordsSkipped: 0, - esHealthChecks: { - timeSpentWaiting: 0, - checksCount: 0, - unhealthyReasons: {} as Record - } - }; - - for (const logFilePath of logFilePaths) { - const logFileContent = fs.readFileSync(logFilePath, "utf-8"); - const logFile = JSON.parse(logFileContent); - - migrationStats.iterationsCount += logFile.iterationsCount; - migrationStats.recordsScanned += logFile.recordsScanned; - migrationStats.recordsUpdated += logFile.recordsUpdated; - migrationStats.recordsSkipped += logFile.recordsSkipped; - - migrationStats.esHealthChecks.timeSpentWaiting += - logFile.esHealthChecks.timeSpentWaiting; - migrationStats.esHealthChecks.checksCount += logFile.esHealthChecks.checksCount; - - for (const unhealthyReasonType in logFile.esHealthChecks.unhealthyReasons) { - if (!logFile.esHealthChecks.unhealthyReasons.hasOwnProperty(unhealthyReasonType)) { - continue; - } - - const hasCount = - unhealthyReasonType in migrationStats.esHealthChecks.unhealthyReasons; - if (hasCount) { - migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] += - logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; - } else { - migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] = - logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; - } - } - } - - migrationStats.avgIterationDuration = duration / migrationStats.iterationsCount; - - migrationStats.avgRecordsScannedPerIteration = - migrationStats.recordsScanned / migrationStats.iterationsCount; - - migrationStats.recordsScannedPerSecond = migrationStats.recordsScanned / duration; - - this.logger.info( - migrationStats, - `Migration summary (based on ${logFilePaths.length} generated logs):` - ); - - const logFilePath = path.join( - os.tmpdir(), - `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}.log` - ); - - // Save segment processing stats to a file. - fs.writeFileSync(logFilePath, JSON.stringify(migrationStats, null, 2)); - this.logger.trace(`Migration summary saved to "${logFilePath}".`); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts deleted file mode 100644 index 7199d35cf3b..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts +++ /dev/null @@ -1,70 +0,0 @@ -import execa from "execa"; -import path from "path"; -import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; - -interface SegmentProcessorParams { - runId: string; - ddbTable: string; - ddbEsTable: string; - esEndpoint: string; - segmentIndex: number; - totalSegments: number; - esHealthChecks: EsHealthChecksParams; -} - -export class SegmentProcessor { - private readonly runId: string; - private readonly ddbTable: string; - private readonly ddbEsTable: string; - private readonly esEndpoint: string; - private readonly segmentIndex: number; - private readonly totalSegments: number; - private readonly esHealthChecks: EsHealthChecksParams; - - constructor(params: SegmentProcessorParams) { - this.runId = params.runId; - this.ddbTable = params.ddbTable; - this.ddbEsTable = params.ddbEsTable; - this.esEndpoint = params.esEndpoint; - this.segmentIndex = params.segmentIndex; - this.totalSegments = params.totalSegments; - this.esHealthChecks = params.esHealthChecks; - } - - execute() { - return execa( - "node", - [ - path.join(__dirname, "worker"), - "--runId", - this.runId, - "--ddbTable", - this.ddbTable, - "--ddbEsTable", - this.ddbEsTable, - "--esEndpoint", - this.esEndpoint, - "--segmentIndex", - String(this.segmentIndex), - "--totalSegments", - String(this.totalSegments), - - // Elasticsearch health check options. - "--esHealthMinClusterHealthStatus", - this.esHealthChecks.minClusterHealthStatus, - "--esHealthMaxProcessorPercent", - String(this.esHealthChecks.maxProcessorPercent), - "--esHealthMaxRamPercent", - String(this.esHealthChecks.maxRamPercent), - "--esHealthMaxWaitingTime", - String(this.esHealthChecks.maxWaitingTime), - "--esHealthWaitingTimeStep", - String(this.esHealthChecks.waitingTimeStep) - ], - { - stdio: "inherit", - env: process.env - } - ); - } -} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts deleted file mode 100644 index f70fc2efe4d..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env node -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { MetaFieldsMigration } from "./MetaFieldsMigration"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import pinoPretty from "pino-pretty"; -import { - DEFAULT_ES_HEALTH_CHECKS_PARAMS, - EsHealthChecksParams -} from "~/migrations/5.39.6/001/ddb-es/utils"; - -const argv = yargs(hideBin(process.argv)) - .options({ - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - esEndpoint: { type: "string", demandOption: true }, - segments: { type: "number", demandOption: true }, - - // Elasticsearch health check options. - esHealthMinClusterHealthStatus: { - type: "string", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.minClusterHealthStatus, - description: `Minimum cluster health status to wait for before proceeding with the migration.` - }, - esHealthMaxProcessorPercent: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxProcessorPercent, - description: `Maximum CPU usage percentage to wait for before proceeding with the migration.` - }, - esHealthMaxRamPercent: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxRamPercent, - description: `Maximum RAM usage percentage to wait for before proceeding with the migration.` - }, - esHealthMaxWaitingTime: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxWaitingTime, - description: `Maximum time to wait (seconds) for before proceeding with the migration.` - }, - esHealthWaitingTimeStep: { - type: "number", - demandOption: false, - default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.waitingTimeStep, - description: `Time step (seconds) to wait before checking Elasticsearch health status again.` - } - }) - .parseSync(); - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const migration = new MetaFieldsMigration({ - totalSegments: argv.segments, - ddbTable: argv.ddbTable, - ddbEsTable: argv.ddbEsTable, - esEndpoint: argv.esEndpoint, - esHealthChecks: { - minClusterHealthStatus: - argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], - maxProcessorPercent: argv.esHealthMaxProcessorPercent, - maxRamPercent: argv.esHealthMaxRamPercent, - maxWaitingTime: argv.esHealthMaxWaitingTime, - waitingTimeStep: argv.esHealthWaitingTimeStep - }, - logger - }); - - await migration.execute(); -})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts deleted file mode 100644 index 7d2374cb712..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { CliContext } from "@webiny/cli/types"; -import { getStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import pinoPretty from "pino-pretty"; -import { - MetaFieldsMigrationParams, - MetaFieldsMigration -} from "~/migrations/5.39.6/001/ddb-es/MetaFieldsMigration"; - -interface CoreOutput { - primaryDynamodbTableName: string; - elasticsearchDynamodbTableName: string; - elasticsearchDomainEndpoint: string; -} - -const REQUIRED_AWS_ENV_VARS = [ - "AWS_REGION", - "AWS_ACCESS_KEY_ID", - "AWS_SECRET_ACCESS_KEY", - "AWS_SESSION_TOKEN" -]; - -const ensureAwsEnvVars = () => { - const missingAwsEnvVars = []; - for (const variable of REQUIRED_AWS_ENV_VARS) { - if (!process.env[variable]) { - missingAwsEnvVars.push(variable); - } - } - - if (missingAwsEnvVars.length > 0) { - throw new Error( - `Cannot run 5.39.6 meta fields data migration. Missing required environment variables: ${missingAwsEnvVars.join( - ", " - )}.` - ); - } -}; - -/** - * Creates an after-deployment hook that triggers the meta fields data migration. - * @param params - */ -export const createMetaFieldsDataMigrationDeploymentHook = ( - params: Pick -) => { - return { - type: "hook-after-deploy", - name: "hook-after-deploy-api-run-5-39-6-meta-fields-data-migrations", - async hook({ inputs, env, projectApplication }: Record, context: CliContext) { - // Only run migrations for `api` app - if (projectApplication.id !== "api") { - return; - } - - // No need to run migrations if we're doing a preview. - if (inputs.preview) { - return; - } - - if (process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS !== "true") { - context.info( - `Skipping meta fields data migration. Set %s to %s to enable.`, - "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", - "true" - ); - return; - } - - ensureAwsEnvVars(); - - const coreOutput = getStackOutput({ folder: "apps/core", env }); - - context.info("Executing 5.39.6-001 meta fields data migration..."); - - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const migration = new MetaFieldsMigration({ - ddbTable: coreOutput.primaryDynamodbTableName, - ddbEsTable: coreOutput.elasticsearchDynamodbTableName, - esEndpoint: coreOutput.elasticsearchDomainEndpoint, - ...params, - logger - }); - - await migration.execute(); - } - }; -}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts deleted file mode 100644 index 20ac331144c..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { - ElasticsearchCatClusterHealthStatus, - IWaitUntilHealthyParams -} from "@webiny/api-elasticsearch"; - -export type EsHealthChecksParams = Required; - -export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { - minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, - maxProcessorPercent: 90, - maxRamPercent: 100, - maxWaitingTime: 90, - waitingTimeStep: 2 -}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts deleted file mode 100644 index 9418f20702c..00000000000 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts +++ /dev/null @@ -1,447 +0,0 @@ -import { executeWithRetry } from "@webiny/utils"; -import { createPinoLogger, getLogLevel } from "@webiny/logger"; -import { createTable } from "@webiny/data-migration"; -import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; -import { createElasticsearchClient } from "@webiny/api-elasticsearch"; -import yargs from "yargs/yargs"; -import { hideBin } from "yargs/helpers"; -import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; -import { hasValidTypeFieldValue } from "~/migrations/5.39.0/001/utils/hasValidTypeFieldValue"; -import { hasAllNonNullableValues } from "~/migrations/5.39.0/001/utils/hasAllNonNullableValues"; -import { getOldestRevisionCreatedOn } from "~/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn"; -import { getFirstLastPublishedOnBy } from "~/migrations/5.39.0/001/utils/getFirstLastPublishedOn"; -import { assignNewMetaFields } from "~/migrations/5.39.0/001/utils/assignNewMetaFields"; -import { fixTypeFieldValue } from "~/migrations/5.39.0/001/utils/fixTypeFieldValue"; -import { getFallbackIdentity } from "~/migrations/5.39.0/001/utils/getFallbackIdentity"; -import { ensureAllNonNullableValues } from "~/migrations/5.39.0/001/utils/ensureAllNonNullableValues"; -import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; -import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; -import { CmsEntry } from "~/migrations/5.39.0/001/types"; -import { - createDdbEntryEntity, - createDdbEsEntryEntity -} from "~/migrations/5.39.0/001/entities/createEntryEntity"; -import { - batchReadAll, - BatchReadItem, - batchWriteAll, - BatchWriteItem, - ddbScanWithCallback -} from "~/utils"; -import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; -import pinoPretty from "pino-pretty"; -import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; -import path from "path"; -import os from "os"; -import fs from "fs"; -import { getNonNullableFieldsWithMissingValues } from "~/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues"; - -const argv = yargs(hideBin(process.argv)) - .options({ - runId: { type: "string", demandOption: true }, - ddbTable: { type: "string", demandOption: true }, - ddbEsTable: { type: "string", demandOption: true }, - esEndpoint: { type: "string", demandOption: true }, - segmentIndex: { type: "number", demandOption: true }, - totalSegments: { type: "number", demandOption: true }, - - // Elasticsearch health check options. - esHealthMinClusterHealthStatus: { type: "string", demandOption: true }, - esHealthMaxProcessorPercent: { type: "number", demandOption: true }, - esHealthMaxRamPercent: { type: "number", demandOption: true }, - esHealthMaxWaitingTime: { type: "number", demandOption: true }, - esHealthWaitingTimeStep: { type: "number", demandOption: true } - }) - .parseSync(); - -interface LastEvaluatedKeyObject { - PK: string; - SK: string; - GSI1_PK: string; - GSI1_SK: string; -} - -type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; - -interface MigrationStatus { - lastEvaluatedKey: LastEvaluatedKey; - stats: { - iterationsCount: number; - recordsScanned: number; - recordsUpdated: number; - recordsSkipped: number; - esHealthChecks: { - timeSpentWaiting: number; - checksCount: number; - unhealthyReasons: { - [key: string]: number; - }; - }; - }; -} - -interface DynamoDbElasticsearchRecord { - PK: string; - SK: string; - data: string; -} - -const createInitialStatus = (): MigrationStatus => { - return { - lastEvaluatedKey: null, - stats: { - iterationsCount: 0, - recordsScanned: 0, - recordsUpdated: 0, - recordsSkipped: 0, - esHealthChecks: { - timeSpentWaiting: 0, - checksCount: 0, - unhealthyReasons: {} - } - } - }; -}; - -(async () => { - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), - msgPrefix: `[segment #${argv.segmentIndex}] ` - }, - pinoPretty({ ignore: "pid,hostname" }) - ); - - const documentClient = getDocumentClient(); - const elasticsearchClient = createElasticsearchClient({ - endpoint: `https://${argv.esEndpoint}` - }); - - const primaryTable = createTable({ - name: argv.ddbTable, - documentClient - }); - const dynamoToEsTable = createTable({ - name: argv.ddbEsTable, - documentClient - }); - - const ddbEntryEntity = createDdbEntryEntity(primaryTable); - const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); - - const status = createInitialStatus(); - - const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { - minClusterHealthStatus: - argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], - maxProcessorPercent: argv.esHealthMaxProcessorPercent, - maxRamPercent: argv.esHealthMaxRamPercent, - maxWaitingTime: argv.esHealthMaxWaitingTime, - waitingTimeStep: argv.esHealthWaitingTimeStep - }); - - await ddbScanWithCallback( - { - entity: ddbEntryEntity, - options: { - segment: argv.segmentIndex, - segments: argv.totalSegments, - filters: [ - { - attr: "_et", - eq: "CmsEntries" - } - ], - startKey: status.lastEvaluatedKey || undefined, - limit: 100 - } - }, - async result => { - status.stats.iterationsCount++; - status.stats.recordsScanned += result.items.length; - - if (status.stats.iterationsCount % 5 === 0) { - // We log every 5th iteration. - logger.trace( - `[iteration #${status.stats.iterationsCount}] Reading ${result.items.length} record(s)...` - ); - } - - const ddbItemsToBatchWrite: BatchWriteItem[] = []; - const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; - const ddbEsItemsToBatchRead: Record = {}; - - const fallbackDateTime = new Date().toISOString(); - - // Update records in primary DynamoDB table. Also do preparations for - // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. - for (const item of result.items) { - const isFullyMigrated = - isMigratedEntry(item) && - hasValidTypeFieldValue(item) && - hasAllNonNullableValues(item); - - if (isFullyMigrated) { - status.stats.recordsSkipped++; - continue; - } - - // 1. Check if the data migration was ever performed. If not, let's perform it. - if (!isMigratedEntry(item)) { - // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. - const createdOn = await getOldestRevisionCreatedOn({ - entry: item, - entryEntity: ddbEntryEntity - }); - - const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ - entry: item, - entryEntity: ddbEntryEntity - }); - - assignNewMetaFields(item, { - createdOn, - ...firstLastPublishedOnByFields - }); - } - - // 2. We've noticed some of the records had an invalid `TYPE` field value - // in the database. This step addresses this issue. - if (!hasValidTypeFieldValue(item)) { - // Fixes the value of the `TYPE` field, if it's not valid. - fixTypeFieldValue(item); - } - - // 3. Finally, once both of the steps were performed, ensure that all - // new non-nullable meta fields have a value and nothing is missing. - if (!hasAllNonNullableValues(item)) { - logger.trace( - getNonNullableFieldsWithMissingValues(item), - `Detected an entry with missing values for non-nullable meta fields (${item.modelId}/${item.id}).` - ); - - try { - const fallbackIdentity = await getFallbackIdentity({ - entity: ddbEntryEntity, - tenant: item.tenant - }); - - ensureAllNonNullableValues(item, { - dateTime: fallbackDateTime, - identity: fallbackIdentity - }); - - logger.trace( - `Successfully ensured all non-nullable meta fields have values (${item.modelId}/${item.id}). Will be saving into the database soon.` - ); - } catch (e) { - logger.debug( - `Failed to ensure all non-nullable meta fields have values (${item.modelId}/${item.id}): ${e.message}` - ); - } - } - - ddbItemsToBatchWrite.push(ddbEntryEntity.putBatch(item)); - - /** - * Prepare the loading of DynamoDB Elasticsearch part of the records. - */ - - const ddbEsLatestRecordKey = `${item.entryId}:L`; - if (ddbEsItemsToBatchRead[ddbEsLatestRecordKey]) { - continue; - } - - ddbEsItemsToBatchRead[ddbEsLatestRecordKey] = ddbEsEntryEntity.getBatch({ - PK: item.PK, - SK: "L" - }); - - const ddbEsPublishedRecordKey = `${item.entryId}:P`; - if (item.status === "published" || !!item.locked) { - ddbEsItemsToBatchRead[ddbEsPublishedRecordKey] = ddbEsEntryEntity.getBatch({ - PK: item.PK, - SK: "P" - }); - } - } - - if (Object.keys(ddbEsItemsToBatchRead).length > 0) { - /** - * Get all the records from DynamoDB Elasticsearch. - */ - const ddbEsRecords = await batchReadAll({ - table: ddbEsEntryEntity.table, - items: Object.values(ddbEsItemsToBatchRead) - }); - - for (const ddbEsRecord of ddbEsRecords) { - const decompressedData = await getDecompressedData(ddbEsRecord.data); - if (!decompressedData) { - logger.trace( - `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` - ); - continue; - } - - // 1. Check if the data migration was ever performed. If not, let's perform it. - if (!isMigratedEntry(decompressedData)) { - // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. - const createdOn = await getOldestRevisionCreatedOn({ - entry: { ...decompressedData, PK: ddbEsRecord.PK }, - entryEntity: ddbEntryEntity - }); - - const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ - entry: { ...decompressedData, PK: ddbEsRecord.PK }, - entryEntity: ddbEntryEntity - }); - - assignNewMetaFields(decompressedData, { - createdOn, - ...firstLastPublishedOnByFields - }); - } - - // 2. Ensure new non-nullable meta fields have a value and nothing is missing. - if (!hasAllNonNullableValues(decompressedData)) { - logger.trace( - getNonNullableFieldsWithMissingValues(decompressedData), - [ - `[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields`, - `(${decompressedData.modelId}/${decompressedData.id}).` - ].join(" ") - ); - - try { - const fallbackIdentity = await getFallbackIdentity({ - entity: ddbEntryEntity, - tenant: decompressedData.tenant - }); - - ensureAllNonNullableValues(decompressedData, { - dateTime: fallbackDateTime, - identity: fallbackIdentity - }); - - logger.trace( - [ - `[DDB-ES Table] Successfully ensured all non-nullable meta fields`, - `have values (${decompressedData.modelId}/${decompressedData.id}).`, - "Will be saving the changes soon." - ].join(" ") - ); - } catch (e) { - logger.error( - [ - "[DDB-ES Table] Failed to ensure all non-nullable meta fields have values", - `(${decompressedData.modelId}/${decompressedData.id}): ${e.message}` - ].join(" ") - ); - } - } - - const compressedData = await getCompressedData(decompressedData); - - ddbEsItemsToBatchWrite.push( - ddbEsEntryEntity.putBatch({ - ...ddbEsRecord, - data: compressedData - }) - ); - } - } - - if (ddbItemsToBatchWrite.length) { - // Store data in primary DynamoDB table. - const execute = () => { - return batchWriteAll({ - table: ddbEntryEntity.table, - items: ddbItemsToBatchWrite - }); - }; - - logger.trace( - `Storing ${ddbItemsToBatchWrite.length} record(s) in primary DynamoDB table...` - ); - await executeWithRetry(execute, { - onFailedAttempt: error => { - logger.warn( - `Batch write attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - - if (ddbEsItemsToBatchWrite.length) { - logger.trace( - `Storing ${ddbEsItemsToBatchWrite.length} record(s) in DDB-ES DynamoDB table...` - ); - const results = await waitUntilHealthy.wait({ - async onUnhealthy(params) { - const shouldWaitReason = params.waitingReason.name; - - logger.warn( - `Cluster is unhealthy (${shouldWaitReason}). Waiting for the cluster to become healthy...`, - params - ); - - if (status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]) { - status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]++; - } else { - status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason] = 1; - } - } - }); - - status.stats.esHealthChecks.checksCount++; - status.stats.esHealthChecks.timeSpentWaiting += results.runningTime; - - // Store data in DDB-ES DynamoDB table. - const executeDdbEs = () => { - return batchWriteAll({ - table: ddbEsEntryEntity.table, - items: ddbEsItemsToBatchWrite - }); - }; - - await executeWithRetry(executeDdbEs, { - onFailedAttempt: error => { - logger.warn( - `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` - ); - } - }); - } - - status.stats.recordsUpdated += ddbItemsToBatchWrite.length; - } - - // Update checkpoint after every batch. - let lastEvaluatedKey: LastEvaluatedKey = true; - if (result.lastEvaluatedKey) { - lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; - } - - status.lastEvaluatedKey = lastEvaluatedKey; - - if (lastEvaluatedKey === true) { - return false; - } - - // Continue further scanning. - return true; - } - ); - - // Store status in tmp file. - logger.trace({ status }, "Segment processing completed. Saving status to tmp file..."); - const logFilePath = path.join( - os.tmpdir(), - `webiny-5-39-6-meta-fields-data-migration-log-${argv.runId}-${argv.segmentIndex}.log` - ); - - // Save segment processing stats to a file. - fs.writeFileSync(logFilePath, JSON.stringify(status.stats, null, 2)); - - logger.trace(`Segment processing stats saved in ${logFilePath}.`); -})(); diff --git a/packages/migrations/src/utils/elasticsearch/esListIndexes.ts b/packages/migrations/src/utils/elasticsearch/esListIndexes.ts deleted file mode 100644 index b5aaaf15e03..00000000000 --- a/packages/migrations/src/utils/elasticsearch/esListIndexes.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Client } from "@elastic/elasticsearch"; - -export interface ListIndexesParams { - elasticsearchClient: Client; - match?: string; -} - -type IndicesApiResponse = Array>; - -export const esListIndexes = async (params: ListIndexesParams): Promise => { - const { elasticsearchClient } = params; - - const response = await elasticsearchClient.cat.indices({ - format: "json" - }); - - const listOfIndexes = response.body.map(item => item.index); - - const match = params.match; - if (match) { - return listOfIndexes.filter(index => index.includes(match)); - } - - return listOfIndexes; -}; From c3696eacecb789855be1db671c465244e59b34b5 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 5 Jun 2024 16:55:31 +0200 Subject: [PATCH 33/56] chore: add migration files --- .../5.39.6/001/ddb-es/MetaFieldsMigration.ts | 214 +++++++++ .../5.39.6/001/ddb-es/SegmentProcessor.ts | 70 +++ .../src/migrations/5.39.6/001/ddb-es/bin.ts | 78 +++ ...teMetaFieldsDataMigrationDeploymentHook.ts | 94 ++++ .../src/migrations/5.39.6/001/ddb-es/utils.ts | 14 + .../migrations/5.39.6/001/ddb-es/worker.ts | 447 ++++++++++++++++++ .../src/utils/elasticsearch/esListIndexes.ts | 25 + 7 files changed, 942 insertions(+) create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts create mode 100644 packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts create mode 100644 packages/migrations/src/utils/elasticsearch/esListIndexes.ts diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts new file mode 100644 index 00000000000..fb60ab7da28 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts @@ -0,0 +1,214 @@ +import { Logger } from "@webiny/logger"; +import { SegmentProcessor } from "./SegmentProcessor"; +import { + disableElasticsearchIndexing, + esListIndexes, + fetchOriginalElasticsearchSettings, + restoreOriginalElasticsearchSettings +} from "~/utils"; +import { createElasticsearchClient } from "@webiny/api-elasticsearch"; +import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; +import { + DEFAULT_ES_HEALTH_CHECKS_PARAMS, + EsHealthChecksParams +} from "~/migrations/5.39.6/001/ddb-es/utils"; +import path from "path"; +import os from "os"; +import fs from "fs"; +import glob from "fast-glob"; + +export interface MetaFieldsMigrationParams { + ddbTable: string; + ddbEsTable: string; + esEndpoint: string; + totalSegments: number; + logger: Logger; + + // Elasticsearch health check options. + esHealthChecks?: Partial; +} + +export class MetaFieldsMigration { + private readonly runId: string; + private readonly ddbTable: string; + private readonly ddbEsTable: string; + private readonly esEndpoint: string; + private readonly totalSegments: number; + private readonly logger: Logger; + + private readonly esHealthChecks: EsHealthChecksParams; + + constructor(params: MetaFieldsMigrationParams) { + this.runId = String(new Date().getTime()); + this.ddbTable = params.ddbTable; + this.ddbEsTable = params.ddbEsTable; + this.esEndpoint = params.esEndpoint; + this.totalSegments = params.totalSegments; + this.logger = params.logger; + this.esHealthChecks = { + ...DEFAULT_ES_HEALTH_CHECKS_PARAMS, + ...params.esHealthChecks + }; + } + + async execute() { + const scanProcessesPromises = []; + + const start = Date.now(); + const getDuration = () => { + return (Date.now() - start) / 1000; + }; + + this.logger.info("Starting 5.39.6-001 meta fields data migration..."); + this.logger.info( + { + ddbTable: this.ddbTable, + ddbEsTable: this.ddbEsTable, + esEndpoint: this.esEndpoint, + totalSegments: this.totalSegments, + esHealthChecks: this.esHealthChecks + }, + "Received the following parameters:" + ); + + const elasticsearchClient = createElasticsearchClient({ + endpoint: `https://${this.esEndpoint}` + }); + + this.logger.info("Checking Elasticsearch health status..."); + const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, this.esHealthChecks); + this.logger.info("Elasticsearch is healthy."); + + await waitUntilHealthy.wait(); + + const indexes = await esListIndexes({ elasticsearchClient, match: "-headless-cms-" }); + const indexSettings: Record = {}; + for (const indexName of indexes) { + this.logger.info(`Disabling indexing for Elasticsearch index "${indexName}"...`); + indexSettings[indexName] = await fetchOriginalElasticsearchSettings({ + elasticsearchClient, + index: indexName, + logger: this.logger + }); + + await disableElasticsearchIndexing({ + elasticsearchClient, + index: indexName, + logger: this.logger + }); + } + + this.logger.info("Proceeding with the migration..."); + + for (let segmentIndex = 0; segmentIndex < this.totalSegments; segmentIndex++) { + const segmentProcessor = new SegmentProcessor({ + segmentIndex, + runId: this.runId, + totalSegments: this.totalSegments, + ddbTable: this.ddbTable, + ddbEsTable: this.ddbEsTable, + esEndpoint: this.esEndpoint, + esHealthChecks: this.esHealthChecks + }); + + scanProcessesPromises.push(segmentProcessor.execute()); + } + + await Promise.all(scanProcessesPromises); + + this.logger.info("Restoring original Elasticsearch settings..."); + await restoreOriginalElasticsearchSettings({ + elasticsearchClient, + indexSettings, + logger: this.logger + }); + + const duration = getDuration(); + this.logger.info(`5.39.6-001 migration completed in ${duration}s, here are the results...`); + + // Wait for 1 second. + await new Promise(resolve => setTimeout(resolve, 1000)); + + this.logger.info( + { + totalSegments: this.totalSegments, + esHealthChecks: this.esHealthChecks + }, + "The migration was performed with the following following parameters:" + ); + + // Pickup all log files and print a summary of the migration. + const logFilePaths = await glob( + path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}-*.log` + ) + ); + + const migrationStats = { + iterationsCount: 0, + avgIterationDuration: 0, + recordsScanned: 0, + avgRecordsScannedPerIteration: 0, + recordsScannedPerSecond: 0, + recordsUpdated: 0, + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} as Record + } + }; + + for (const logFilePath of logFilePaths) { + const logFileContent = fs.readFileSync(logFilePath, "utf-8"); + const logFile = JSON.parse(logFileContent); + + migrationStats.iterationsCount += logFile.iterationsCount; + migrationStats.recordsScanned += logFile.recordsScanned; + migrationStats.recordsUpdated += logFile.recordsUpdated; + migrationStats.recordsSkipped += logFile.recordsSkipped; + + migrationStats.esHealthChecks.timeSpentWaiting += + logFile.esHealthChecks.timeSpentWaiting; + migrationStats.esHealthChecks.checksCount += logFile.esHealthChecks.checksCount; + + for (const unhealthyReasonType in logFile.esHealthChecks.unhealthyReasons) { + if (!logFile.esHealthChecks.unhealthyReasons.hasOwnProperty(unhealthyReasonType)) { + continue; + } + + const hasCount = + unhealthyReasonType in migrationStats.esHealthChecks.unhealthyReasons; + if (hasCount) { + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] += + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } else { + migrationStats.esHealthChecks.unhealthyReasons[unhealthyReasonType] = + logFile.esHealthChecks.unhealthyReasons[unhealthyReasonType]; + } + } + } + + migrationStats.avgIterationDuration = duration / migrationStats.iterationsCount; + + migrationStats.avgRecordsScannedPerIteration = + migrationStats.recordsScanned / migrationStats.iterationsCount; + + migrationStats.recordsScannedPerSecond = migrationStats.recordsScanned / duration; + + this.logger.info( + migrationStats, + `Migration summary (based on ${logFilePaths.length} generated logs):` + ); + + const logFilePath = path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${this.runId}.log` + ); + + // Save segment processing stats to a file. + fs.writeFileSync(logFilePath, JSON.stringify(migrationStats, null, 2)); + this.logger.trace(`Migration summary saved to "${logFilePath}".`); + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts new file mode 100644 index 00000000000..7199d35cf3b --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/SegmentProcessor.ts @@ -0,0 +1,70 @@ +import execa from "execa"; +import path from "path"; +import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; + +interface SegmentProcessorParams { + runId: string; + ddbTable: string; + ddbEsTable: string; + esEndpoint: string; + segmentIndex: number; + totalSegments: number; + esHealthChecks: EsHealthChecksParams; +} + +export class SegmentProcessor { + private readonly runId: string; + private readonly ddbTable: string; + private readonly ddbEsTable: string; + private readonly esEndpoint: string; + private readonly segmentIndex: number; + private readonly totalSegments: number; + private readonly esHealthChecks: EsHealthChecksParams; + + constructor(params: SegmentProcessorParams) { + this.runId = params.runId; + this.ddbTable = params.ddbTable; + this.ddbEsTable = params.ddbEsTable; + this.esEndpoint = params.esEndpoint; + this.segmentIndex = params.segmentIndex; + this.totalSegments = params.totalSegments; + this.esHealthChecks = params.esHealthChecks; + } + + execute() { + return execa( + "node", + [ + path.join(__dirname, "worker"), + "--runId", + this.runId, + "--ddbTable", + this.ddbTable, + "--ddbEsTable", + this.ddbEsTable, + "--esEndpoint", + this.esEndpoint, + "--segmentIndex", + String(this.segmentIndex), + "--totalSegments", + String(this.totalSegments), + + // Elasticsearch health check options. + "--esHealthMinClusterHealthStatus", + this.esHealthChecks.minClusterHealthStatus, + "--esHealthMaxProcessorPercent", + String(this.esHealthChecks.maxProcessorPercent), + "--esHealthMaxRamPercent", + String(this.esHealthChecks.maxRamPercent), + "--esHealthMaxWaitingTime", + String(this.esHealthChecks.maxWaitingTime), + "--esHealthWaitingTimeStep", + String(this.esHealthChecks.waitingTimeStep) + ], + { + stdio: "inherit", + env: process.env + } + ); + } +} diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts new file mode 100644 index 00000000000..f70fc2efe4d --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/bin.ts @@ -0,0 +1,78 @@ +#!/usr/bin/env node +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { MetaFieldsMigration } from "./MetaFieldsMigration"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; +import { + DEFAULT_ES_HEALTH_CHECKS_PARAMS, + EsHealthChecksParams +} from "~/migrations/5.39.6/001/ddb-es/utils"; + +const argv = yargs(hideBin(process.argv)) + .options({ + ddbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + esEndpoint: { type: "string", demandOption: true }, + segments: { type: "number", demandOption: true }, + + // Elasticsearch health check options. + esHealthMinClusterHealthStatus: { + type: "string", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.minClusterHealthStatus, + description: `Minimum cluster health status to wait for before proceeding with the migration.` + }, + esHealthMaxProcessorPercent: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxProcessorPercent, + description: `Maximum CPU usage percentage to wait for before proceeding with the migration.` + }, + esHealthMaxRamPercent: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxRamPercent, + description: `Maximum RAM usage percentage to wait for before proceeding with the migration.` + }, + esHealthMaxWaitingTime: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.maxWaitingTime, + description: `Maximum time to wait (seconds) for before proceeding with the migration.` + }, + esHealthWaitingTimeStep: { + type: "number", + demandOption: false, + default: DEFAULT_ES_HEALTH_CHECKS_PARAMS.waitingTimeStep, + description: `Time step (seconds) to wait before checking Elasticsearch health status again.` + } + }) + .parseSync(); + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const migration = new MetaFieldsMigration({ + totalSegments: argv.segments, + ddbTable: argv.ddbTable, + ddbEsTable: argv.ddbEsTable, + esEndpoint: argv.esEndpoint, + esHealthChecks: { + minClusterHealthStatus: + argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], + maxProcessorPercent: argv.esHealthMaxProcessorPercent, + maxRamPercent: argv.esHealthMaxRamPercent, + maxWaitingTime: argv.esHealthMaxWaitingTime, + waitingTimeStep: argv.esHealthWaitingTimeStep + }, + logger + }); + + await migration.execute(); +})(); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts new file mode 100644 index 00000000000..7d2374cb712 --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts @@ -0,0 +1,94 @@ +import { CliContext } from "@webiny/cli/types"; +import { getStackOutput } from "@webiny/cli-plugin-deploy-pulumi/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import pinoPretty from "pino-pretty"; +import { + MetaFieldsMigrationParams, + MetaFieldsMigration +} from "~/migrations/5.39.6/001/ddb-es/MetaFieldsMigration"; + +interface CoreOutput { + primaryDynamodbTableName: string; + elasticsearchDynamodbTableName: string; + elasticsearchDomainEndpoint: string; +} + +const REQUIRED_AWS_ENV_VARS = [ + "AWS_REGION", + "AWS_ACCESS_KEY_ID", + "AWS_SECRET_ACCESS_KEY", + "AWS_SESSION_TOKEN" +]; + +const ensureAwsEnvVars = () => { + const missingAwsEnvVars = []; + for (const variable of REQUIRED_AWS_ENV_VARS) { + if (!process.env[variable]) { + missingAwsEnvVars.push(variable); + } + } + + if (missingAwsEnvVars.length > 0) { + throw new Error( + `Cannot run 5.39.6 meta fields data migration. Missing required environment variables: ${missingAwsEnvVars.join( + ", " + )}.` + ); + } +}; + +/** + * Creates an after-deployment hook that triggers the meta fields data migration. + * @param params + */ +export const createMetaFieldsDataMigrationDeploymentHook = ( + params: Pick +) => { + return { + type: "hook-after-deploy", + name: "hook-after-deploy-api-run-5-39-6-meta-fields-data-migrations", + async hook({ inputs, env, projectApplication }: Record, context: CliContext) { + // Only run migrations for `api` app + if (projectApplication.id !== "api") { + return; + } + + // No need to run migrations if we're doing a preview. + if (inputs.preview) { + return; + } + + if (process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS !== "true") { + context.info( + `Skipping meta fields data migration. Set %s to %s to enable.`, + "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", + "true" + ); + return; + } + + ensureAwsEnvVars(); + + const coreOutput = getStackOutput({ folder: "apps/core", env }); + + context.info("Executing 5.39.6-001 meta fields data migration..."); + + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const migration = new MetaFieldsMigration({ + ddbTable: coreOutput.primaryDynamodbTableName, + ddbEsTable: coreOutput.elasticsearchDynamodbTableName, + esEndpoint: coreOutput.elasticsearchDomainEndpoint, + ...params, + logger + }); + + await migration.execute(); + } + }; +}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts new file mode 100644 index 00000000000..20ac331144c --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts @@ -0,0 +1,14 @@ +import { + ElasticsearchCatClusterHealthStatus, + IWaitUntilHealthyParams +} from "@webiny/api-elasticsearch"; + +export type EsHealthChecksParams = Required; + +export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { + minClusterHealthStatus: ElasticsearchCatClusterHealthStatus.Yellow, + maxProcessorPercent: 90, + maxRamPercent: 100, + maxWaitingTime: 90, + waitingTimeStep: 2 +}; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts new file mode 100644 index 00000000000..9418f20702c --- /dev/null +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/worker.ts @@ -0,0 +1,447 @@ +import { executeWithRetry } from "@webiny/utils"; +import { createPinoLogger, getLogLevel } from "@webiny/logger"; +import { createTable } from "@webiny/data-migration"; +import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; +import { createElasticsearchClient } from "@webiny/api-elasticsearch"; +import yargs from "yargs/yargs"; +import { hideBin } from "yargs/helpers"; +import { isMigratedEntry } from "~/migrations/5.39.0/001/utils/isMigratedEntry"; +import { hasValidTypeFieldValue } from "~/migrations/5.39.0/001/utils/hasValidTypeFieldValue"; +import { hasAllNonNullableValues } from "~/migrations/5.39.0/001/utils/hasAllNonNullableValues"; +import { getOldestRevisionCreatedOn } from "~/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn"; +import { getFirstLastPublishedOnBy } from "~/migrations/5.39.0/001/utils/getFirstLastPublishedOn"; +import { assignNewMetaFields } from "~/migrations/5.39.0/001/utils/assignNewMetaFields"; +import { fixTypeFieldValue } from "~/migrations/5.39.0/001/utils/fixTypeFieldValue"; +import { getFallbackIdentity } from "~/migrations/5.39.0/001/utils/getFallbackIdentity"; +import { ensureAllNonNullableValues } from "~/migrations/5.39.0/001/utils/ensureAllNonNullableValues"; +import { getDecompressedData } from "~/migrations/5.39.0/001/utils/getDecompressedData"; +import { getCompressedData } from "~/migrations/5.39.0/001/utils/getCompressedData"; +import { CmsEntry } from "~/migrations/5.39.0/001/types"; +import { + createDdbEntryEntity, + createDdbEsEntryEntity +} from "~/migrations/5.39.0/001/entities/createEntryEntity"; +import { + batchReadAll, + BatchReadItem, + batchWriteAll, + BatchWriteItem, + ddbScanWithCallback +} from "~/utils"; +import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; +import pinoPretty from "pino-pretty"; +import { EsHealthChecksParams } from "~/migrations/5.39.6/001/ddb-es/utils"; +import path from "path"; +import os from "os"; +import fs from "fs"; +import { getNonNullableFieldsWithMissingValues } from "~/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues"; + +const argv = yargs(hideBin(process.argv)) + .options({ + runId: { type: "string", demandOption: true }, + ddbTable: { type: "string", demandOption: true }, + ddbEsTable: { type: "string", demandOption: true }, + esEndpoint: { type: "string", demandOption: true }, + segmentIndex: { type: "number", demandOption: true }, + totalSegments: { type: "number", demandOption: true }, + + // Elasticsearch health check options. + esHealthMinClusterHealthStatus: { type: "string", demandOption: true }, + esHealthMaxProcessorPercent: { type: "number", demandOption: true }, + esHealthMaxRamPercent: { type: "number", demandOption: true }, + esHealthMaxWaitingTime: { type: "number", demandOption: true }, + esHealthWaitingTimeStep: { type: "number", demandOption: true } + }) + .parseSync(); + +interface LastEvaluatedKeyObject { + PK: string; + SK: string; + GSI1_PK: string; + GSI1_SK: string; +} + +type LastEvaluatedKey = LastEvaluatedKeyObject | true | null; + +interface MigrationStatus { + lastEvaluatedKey: LastEvaluatedKey; + stats: { + iterationsCount: number; + recordsScanned: number; + recordsUpdated: number; + recordsSkipped: number; + esHealthChecks: { + timeSpentWaiting: number; + checksCount: number; + unhealthyReasons: { + [key: string]: number; + }; + }; + }; +} + +interface DynamoDbElasticsearchRecord { + PK: string; + SK: string; + data: string; +} + +const createInitialStatus = (): MigrationStatus => { + return { + lastEvaluatedKey: null, + stats: { + iterationsCount: 0, + recordsScanned: 0, + recordsUpdated: 0, + recordsSkipped: 0, + esHealthChecks: { + timeSpentWaiting: 0, + checksCount: 0, + unhealthyReasons: {} + } + } + }; +}; + +(async () => { + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace"), + msgPrefix: `[segment #${argv.segmentIndex}] ` + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const documentClient = getDocumentClient(); + const elasticsearchClient = createElasticsearchClient({ + endpoint: `https://${argv.esEndpoint}` + }); + + const primaryTable = createTable({ + name: argv.ddbTable, + documentClient + }); + const dynamoToEsTable = createTable({ + name: argv.ddbEsTable, + documentClient + }); + + const ddbEntryEntity = createDdbEntryEntity(primaryTable); + const ddbEsEntryEntity = createDdbEsEntryEntity(dynamoToEsTable); + + const status = createInitialStatus(); + + const waitUntilHealthy = createWaitUntilHealthy(elasticsearchClient, { + minClusterHealthStatus: + argv.esHealthMinClusterHealthStatus as EsHealthChecksParams["minClusterHealthStatus"], + maxProcessorPercent: argv.esHealthMaxProcessorPercent, + maxRamPercent: argv.esHealthMaxRamPercent, + maxWaitingTime: argv.esHealthMaxWaitingTime, + waitingTimeStep: argv.esHealthWaitingTimeStep + }); + + await ddbScanWithCallback( + { + entity: ddbEntryEntity, + options: { + segment: argv.segmentIndex, + segments: argv.totalSegments, + filters: [ + { + attr: "_et", + eq: "CmsEntries" + } + ], + startKey: status.lastEvaluatedKey || undefined, + limit: 100 + } + }, + async result => { + status.stats.iterationsCount++; + status.stats.recordsScanned += result.items.length; + + if (status.stats.iterationsCount % 5 === 0) { + // We log every 5th iteration. + logger.trace( + `[iteration #${status.stats.iterationsCount}] Reading ${result.items.length} record(s)...` + ); + } + + const ddbItemsToBatchWrite: BatchWriteItem[] = []; + const ddbEsItemsToBatchWrite: BatchWriteItem[] = []; + const ddbEsItemsToBatchRead: Record = {}; + + const fallbackDateTime = new Date().toISOString(); + + // Update records in primary DynamoDB table. Also do preparations for + // subsequent updates on DDB-ES DynamoDB table, and in Elasticsearch. + for (const item of result.items) { + const isFullyMigrated = + isMigratedEntry(item) && + hasValidTypeFieldValue(item) && + hasAllNonNullableValues(item); + + if (isFullyMigrated) { + status.stats.recordsSkipped++; + continue; + } + + // 1. Check if the data migration was ever performed. If not, let's perform it. + if (!isMigratedEntry(item)) { + // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. + const createdOn = await getOldestRevisionCreatedOn({ + entry: item, + entryEntity: ddbEntryEntity + }); + + const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ + entry: item, + entryEntity: ddbEntryEntity + }); + + assignNewMetaFields(item, { + createdOn, + ...firstLastPublishedOnByFields + }); + } + + // 2. We've noticed some of the records had an invalid `TYPE` field value + // in the database. This step addresses this issue. + if (!hasValidTypeFieldValue(item)) { + // Fixes the value of the `TYPE` field, if it's not valid. + fixTypeFieldValue(item); + } + + // 3. Finally, once both of the steps were performed, ensure that all + // new non-nullable meta fields have a value and nothing is missing. + if (!hasAllNonNullableValues(item)) { + logger.trace( + getNonNullableFieldsWithMissingValues(item), + `Detected an entry with missing values for non-nullable meta fields (${item.modelId}/${item.id}).` + ); + + try { + const fallbackIdentity = await getFallbackIdentity({ + entity: ddbEntryEntity, + tenant: item.tenant + }); + + ensureAllNonNullableValues(item, { + dateTime: fallbackDateTime, + identity: fallbackIdentity + }); + + logger.trace( + `Successfully ensured all non-nullable meta fields have values (${item.modelId}/${item.id}). Will be saving into the database soon.` + ); + } catch (e) { + logger.debug( + `Failed to ensure all non-nullable meta fields have values (${item.modelId}/${item.id}): ${e.message}` + ); + } + } + + ddbItemsToBatchWrite.push(ddbEntryEntity.putBatch(item)); + + /** + * Prepare the loading of DynamoDB Elasticsearch part of the records. + */ + + const ddbEsLatestRecordKey = `${item.entryId}:L`; + if (ddbEsItemsToBatchRead[ddbEsLatestRecordKey]) { + continue; + } + + ddbEsItemsToBatchRead[ddbEsLatestRecordKey] = ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "L" + }); + + const ddbEsPublishedRecordKey = `${item.entryId}:P`; + if (item.status === "published" || !!item.locked) { + ddbEsItemsToBatchRead[ddbEsPublishedRecordKey] = ddbEsEntryEntity.getBatch({ + PK: item.PK, + SK: "P" + }); + } + } + + if (Object.keys(ddbEsItemsToBatchRead).length > 0) { + /** + * Get all the records from DynamoDB Elasticsearch. + */ + const ddbEsRecords = await batchReadAll({ + table: ddbEsEntryEntity.table, + items: Object.values(ddbEsItemsToBatchRead) + }); + + for (const ddbEsRecord of ddbEsRecords) { + const decompressedData = await getDecompressedData(ddbEsRecord.data); + if (!decompressedData) { + logger.trace( + `[DDB-ES Table] Skipping record "${ddbEsRecord.PK}" as it is not a valid CMS entry...` + ); + continue; + } + + // 1. Check if the data migration was ever performed. If not, let's perform it. + if (!isMigratedEntry(decompressedData)) { + // Get the oldest revision's `createdOn` value. We use that to set the entry-level `createdOn` value. + const createdOn = await getOldestRevisionCreatedOn({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: ddbEntryEntity + }); + + const firstLastPublishedOnByFields = await getFirstLastPublishedOnBy({ + entry: { ...decompressedData, PK: ddbEsRecord.PK }, + entryEntity: ddbEntryEntity + }); + + assignNewMetaFields(decompressedData, { + createdOn, + ...firstLastPublishedOnByFields + }); + } + + // 2. Ensure new non-nullable meta fields have a value and nothing is missing. + if (!hasAllNonNullableValues(decompressedData)) { + logger.trace( + getNonNullableFieldsWithMissingValues(decompressedData), + [ + `[DDB-ES Table] Detected an entry with missing values for non-nullable meta fields`, + `(${decompressedData.modelId}/${decompressedData.id}).` + ].join(" ") + ); + + try { + const fallbackIdentity = await getFallbackIdentity({ + entity: ddbEntryEntity, + tenant: decompressedData.tenant + }); + + ensureAllNonNullableValues(decompressedData, { + dateTime: fallbackDateTime, + identity: fallbackIdentity + }); + + logger.trace( + [ + `[DDB-ES Table] Successfully ensured all non-nullable meta fields`, + `have values (${decompressedData.modelId}/${decompressedData.id}).`, + "Will be saving the changes soon." + ].join(" ") + ); + } catch (e) { + logger.error( + [ + "[DDB-ES Table] Failed to ensure all non-nullable meta fields have values", + `(${decompressedData.modelId}/${decompressedData.id}): ${e.message}` + ].join(" ") + ); + } + } + + const compressedData = await getCompressedData(decompressedData); + + ddbEsItemsToBatchWrite.push( + ddbEsEntryEntity.putBatch({ + ...ddbEsRecord, + data: compressedData + }) + ); + } + } + + if (ddbItemsToBatchWrite.length) { + // Store data in primary DynamoDB table. + const execute = () => { + return batchWriteAll({ + table: ddbEntryEntity.table, + items: ddbItemsToBatchWrite + }); + }; + + logger.trace( + `Storing ${ddbItemsToBatchWrite.length} record(s) in primary DynamoDB table...` + ); + await executeWithRetry(execute, { + onFailedAttempt: error => { + logger.warn( + `Batch write attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + + if (ddbEsItemsToBatchWrite.length) { + logger.trace( + `Storing ${ddbEsItemsToBatchWrite.length} record(s) in DDB-ES DynamoDB table...` + ); + const results = await waitUntilHealthy.wait({ + async onUnhealthy(params) { + const shouldWaitReason = params.waitingReason.name; + + logger.warn( + `Cluster is unhealthy (${shouldWaitReason}). Waiting for the cluster to become healthy...`, + params + ); + + if (status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]) { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason]++; + } else { + status.stats.esHealthChecks.unhealthyReasons[shouldWaitReason] = 1; + } + } + }); + + status.stats.esHealthChecks.checksCount++; + status.stats.esHealthChecks.timeSpentWaiting += results.runningTime; + + // Store data in DDB-ES DynamoDB table. + const executeDdbEs = () => { + return batchWriteAll({ + table: ddbEsEntryEntity.table, + items: ddbEsItemsToBatchWrite + }); + }; + + await executeWithRetry(executeDdbEs, { + onFailedAttempt: error => { + logger.warn( + `[DDB-ES Table] Batch write attempt #${error.attemptNumber} failed: ${error.message}` + ); + } + }); + } + + status.stats.recordsUpdated += ddbItemsToBatchWrite.length; + } + + // Update checkpoint after every batch. + let lastEvaluatedKey: LastEvaluatedKey = true; + if (result.lastEvaluatedKey) { + lastEvaluatedKey = result.lastEvaluatedKey as unknown as LastEvaluatedKeyObject; + } + + status.lastEvaluatedKey = lastEvaluatedKey; + + if (lastEvaluatedKey === true) { + return false; + } + + // Continue further scanning. + return true; + } + ); + + // Store status in tmp file. + logger.trace({ status }, "Segment processing completed. Saving status to tmp file..."); + const logFilePath = path.join( + os.tmpdir(), + `webiny-5-39-6-meta-fields-data-migration-log-${argv.runId}-${argv.segmentIndex}.log` + ); + + // Save segment processing stats to a file. + fs.writeFileSync(logFilePath, JSON.stringify(status.stats, null, 2)); + + logger.trace(`Segment processing stats saved in ${logFilePath}.`); +})(); diff --git a/packages/migrations/src/utils/elasticsearch/esListIndexes.ts b/packages/migrations/src/utils/elasticsearch/esListIndexes.ts new file mode 100644 index 00000000000..b5aaaf15e03 --- /dev/null +++ b/packages/migrations/src/utils/elasticsearch/esListIndexes.ts @@ -0,0 +1,25 @@ +import { Client } from "@elastic/elasticsearch"; + +export interface ListIndexesParams { + elasticsearchClient: Client; + match?: string; +} + +type IndicesApiResponse = Array>; + +export const esListIndexes = async (params: ListIndexesParams): Promise => { + const { elasticsearchClient } = params; + + const response = await elasticsearchClient.cat.indices({ + format: "json" + }); + + const listOfIndexes = response.body.map(item => item.index); + + const match = params.match; + if (match) { + return listOfIndexes.filter(index => index.includes(match)); + } + + return listOfIndexes; +}; From 202dfa10a099e9335568bccd4469c820d17c1d37 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 5 Jun 2024 16:58:33 +0200 Subject: [PATCH 34/56] chore: remove migration files --- packages/migrations/src/utils/elasticsearch/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/migrations/src/utils/elasticsearch/index.ts b/packages/migrations/src/utils/elasticsearch/index.ts index ff9fc8a1caf..e2c58d4628f 100644 --- a/packages/migrations/src/utils/elasticsearch/index.ts +++ b/packages/migrations/src/utils/elasticsearch/index.ts @@ -3,7 +3,6 @@ export * from "./esFindOne"; export * from "./esGetIndexExist"; export * from "./esGetIndexName"; export * from "./esGetIndexSettings"; -export * from "./esListIndexes"; export * from "./esPutIndexSettings"; export * from "./esQueryAllWithCallback"; export * from "./esQueryAll"; From 0d2934b0ea2d5f9e47dbc405db4e7db077eec2a7 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Wed, 5 Jun 2024 16:59:57 +0200 Subject: [PATCH 35/56] chore: add migration files --- packages/migrations/src/utils/elasticsearch/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/migrations/src/utils/elasticsearch/index.ts b/packages/migrations/src/utils/elasticsearch/index.ts index e2c58d4628f..64235c94f5f 100644 --- a/packages/migrations/src/utils/elasticsearch/index.ts +++ b/packages/migrations/src/utils/elasticsearch/index.ts @@ -6,7 +6,7 @@ export * from "./esGetIndexSettings"; export * from "./esPutIndexSettings"; export * from "./esQueryAllWithCallback"; export * from "./esQueryAll"; - +export * from "./esListIndexes"; export * from "./disableEsIndexing"; export * from "./fetchOriginalEsSettings"; export * from "./restoreOriginalEsSettings"; From 6683c99d2227045dbd2cb2eb60471b82d4a78d42 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 09:17:06 +0200 Subject: [PATCH 36/56] chore: update deps --- packages/migrations/package.json | 7 +------ yarn.lock | 5 ----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/migrations/package.json b/packages/migrations/package.json index d9fb975aa62..8805655d905 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -10,20 +10,15 @@ "@elastic/elasticsearch": "7.12.0", "@webiny/api-elasticsearch": "0.0.0", "@webiny/aws-sdk": "0.0.0", - "@webiny/cli-plugin-deploy-pulumi": "0.0.0", "@webiny/data-migration": "0.0.0", "@webiny/db-dynamodb": "0.0.0", "@webiny/error": "0.0.0", "@webiny/ioc": "0.0.0", "@webiny/logger": "0.0.0", "@webiny/utils": "0.0.0", - "execa": "^5.0.0", - "fast-glob": "^3.2.7", "jsonpack": "^1.1.5", "lodash": "^4.17.21", - "pino-pretty": "^9.4.0", - "pluralize": "^8.0.0", - "yargs": "^17.4.0" + "pluralize": "^8.0.0" }, "publishConfig": { "access": "public", diff --git a/yarn.lock b/yarn.lock index eec9ca56019..3bd1858232c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18761,7 +18761,6 @@ __metadata: "@webiny/api-headless-cms-ddb-es": 0.0.0 "@webiny/aws-sdk": 0.0.0 "@webiny/cli": 0.0.0 - "@webiny/cli-plugin-deploy-pulumi": 0.0.0 "@webiny/data-migration": 0.0.0 "@webiny/db-dynamodb": 0.0.0 "@webiny/error": 0.0.0 @@ -18772,16 +18771,12 @@ __metadata: "@webiny/project-utils": 0.0.0 "@webiny/utils": 0.0.0 elastic-ts: ^0.8.0 - execa: ^5.0.0 - fast-glob: ^3.2.7 jest-dynalite: ^3.2.0 jsonpack: ^1.1.5 lodash: ^4.17.21 - pino-pretty: ^9.4.0 pluralize: ^8.0.0 ttypescript: ^1.5.13 typescript: 4.7.4 - yargs: ^17.4.0 languageName: unknown linkType: soft From d784e08e9e6587c9d473dc51a528de4bcea8ff37 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 09:20:12 +0200 Subject: [PATCH 37/56] chore: update deps --- packages/migrations/package.json | 7 ++++++- yarn.lock | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 8805655d905..d9fb975aa62 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -10,15 +10,20 @@ "@elastic/elasticsearch": "7.12.0", "@webiny/api-elasticsearch": "0.0.0", "@webiny/aws-sdk": "0.0.0", + "@webiny/cli-plugin-deploy-pulumi": "0.0.0", "@webiny/data-migration": "0.0.0", "@webiny/db-dynamodb": "0.0.0", "@webiny/error": "0.0.0", "@webiny/ioc": "0.0.0", "@webiny/logger": "0.0.0", "@webiny/utils": "0.0.0", + "execa": "^5.0.0", + "fast-glob": "^3.2.7", "jsonpack": "^1.1.5", "lodash": "^4.17.21", - "pluralize": "^8.0.0" + "pino-pretty": "^9.4.0", + "pluralize": "^8.0.0", + "yargs": "^17.4.0" }, "publishConfig": { "access": "public", diff --git a/yarn.lock b/yarn.lock index 3bd1858232c..eec9ca56019 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18761,6 +18761,7 @@ __metadata: "@webiny/api-headless-cms-ddb-es": 0.0.0 "@webiny/aws-sdk": 0.0.0 "@webiny/cli": 0.0.0 + "@webiny/cli-plugin-deploy-pulumi": 0.0.0 "@webiny/data-migration": 0.0.0 "@webiny/db-dynamodb": 0.0.0 "@webiny/error": 0.0.0 @@ -18771,12 +18772,16 @@ __metadata: "@webiny/project-utils": 0.0.0 "@webiny/utils": 0.0.0 elastic-ts: ^0.8.0 + execa: ^5.0.0 + fast-glob: ^3.2.7 jest-dynalite: ^3.2.0 jsonpack: ^1.1.5 lodash: ^4.17.21 + pino-pretty: ^9.4.0 pluralize: ^8.0.0 ttypescript: ^1.5.13 typescript: 4.7.4 + yargs: ^17.4.0 languageName: unknown linkType: soft From 8499e1ab0a3ae4b6f2efe2e925d19d906bc77f6a Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 13:29:15 +0200 Subject: [PATCH 38/56] fix: add migration skipped ddb entry --- .../5.39.6/001/ddb-es/MetaFieldsMigration.ts | 24 ++++- ...teMetaFieldsDataMigrationDeploymentHook.ts | 93 +++++++++++-------- .../src/migrations/5.39.6/001/ddb-es/utils.ts | 50 ++++++++++ 3 files changed, 129 insertions(+), 38 deletions(-) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts index fb60ab7da28..79faf5f4a9a 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.ts @@ -10,12 +10,15 @@ import { createElasticsearchClient } from "@webiny/api-elasticsearch"; import { createWaitUntilHealthy } from "@webiny/api-elasticsearch/utils/waitUntilHealthy"; import { DEFAULT_ES_HEALTH_CHECKS_PARAMS, - EsHealthChecksParams + EsHealthChecksParams, + migrationSkippedDdbRecordExists, + createMigrationSkippedDdbRecord } from "~/migrations/5.39.6/001/ddb-es/utils"; import path from "path"; import os from "os"; import fs from "fs"; import glob from "fast-glob"; +import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb"; export interface MetaFieldsMigrationParams { ddbTable: string; @@ -59,6 +62,19 @@ export class MetaFieldsMigration { return (Date.now() - start) / 1000; }; + const documentClient = getDocumentClient(); + + // Was the migration already executed? + const dataMigrationRecordExists = await migrationSkippedDdbRecordExists({ + documentClient, + ddbTable: this.ddbTable + }); + + if (dataMigrationRecordExists) { + this.logger.info("5.39.6-001 migration has already been executed. Exiting..."); + return; + } + this.logger.info("Starting 5.39.6-001 meta fields data migration..."); this.logger.info( { @@ -123,6 +139,12 @@ export class MetaFieldsMigration { logger: this.logger }); + // Insert a record that the migration was executed. + await createMigrationSkippedDdbRecord({ + documentClient, + ddbTable: this.ddbTable + }); + const duration = getDuration(); this.logger.info(`5.39.6-001 migration completed in ${duration}s, here are the results...`); diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts index 7d2374cb712..f8d0574c1dd 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts @@ -37,6 +37,8 @@ const ensureAwsEnvVars = () => { } }; +const MIGRATION_ENV_VAR = process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS; + /** * Creates an after-deployment hook that triggers the meta fields data migration. * @param params @@ -44,51 +46,68 @@ const ensureAwsEnvVars = () => { export const createMetaFieldsDataMigrationDeploymentHook = ( params: Pick ) => { - return { - type: "hook-after-deploy", - name: "hook-after-deploy-api-run-5-39-6-meta-fields-data-migrations", - async hook({ inputs, env, projectApplication }: Record, context: CliContext) { - // Only run migrations for `api` app - if (projectApplication.id !== "api") { - return; - } + return [ + { + type: "hook-before-deploy", + name: "hook-before-deploy-skip-5-39-6-001-migration", + async hook({ projectApplication }: Record) { + // Only run migrations for `api` app + if (projectApplication.id !== "api") { + return; + } - // No need to run migrations if we're doing a preview. - if (inputs.preview) { - return; + process.env.WEBINY_MIGRATION_SKIP_5_39_6_001 = "true"; } + }, + { + type: "hook-after-deploy", + name: "hook-after-deploy-api-run-5-39-6-meta-fields-data-migrations", + async hook( + { inputs, env, projectApplication }: Record, + context: CliContext + ) { + // Only run migrations for `api` app + if (projectApplication.id !== "api") { + return; + } - if (process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS !== "true") { - context.info( - `Skipping meta fields data migration. Set %s to %s to enable.`, - "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", - "true" - ); - return; - } + // No need to run migrations if we're doing a preview. + if (inputs.preview) { + return; + } - ensureAwsEnvVars(); + if (MIGRATION_ENV_VAR !== "true") { + context.info( + `Skipping meta fields data migration. Set %s to %s to enable.`, + "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", + "true" + ); + return; + } - const coreOutput = getStackOutput({ folder: "apps/core", env }); + ensureAwsEnvVars(); - context.info("Executing 5.39.6-001 meta fields data migration..."); + const coreOutput = getStackOutput({ folder: "apps/core", env }); - const logger = createPinoLogger( - { - level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") - }, - pinoPretty({ ignore: "pid,hostname" }) - ); + context.info("Executing 5.39.6-001 meta fields data migration..."); - const migration = new MetaFieldsMigration({ - ddbTable: coreOutput.primaryDynamodbTableName, - ddbEsTable: coreOutput.elasticsearchDynamodbTableName, - esEndpoint: coreOutput.elasticsearchDomainEndpoint, - ...params, - logger - }); + const logger = createPinoLogger( + { + level: getLogLevel(process.env.MIGRATIONS_LOG_LEVEL, "trace") + }, + pinoPretty({ ignore: "pid,hostname" }) + ); + + const migration = new MetaFieldsMigration({ + ddbTable: coreOutput.primaryDynamodbTableName, + ddbEsTable: coreOutput.elasticsearchDynamodbTableName, + esEndpoint: coreOutput.elasticsearchDomainEndpoint, + ...params, + logger + }); - await migration.execute(); + await migration.execute(); + } } - }; + ]; }; diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts index 20ac331144c..87bb8d59a8a 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/utils.ts @@ -1,3 +1,4 @@ +import { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb"; import { ElasticsearchCatClusterHealthStatus, IWaitUntilHealthyParams @@ -12,3 +13,52 @@ export const DEFAULT_ES_HEALTH_CHECKS_PARAMS: EsHealthChecksParams = { maxWaitingTime: 90, waitingTimeStep: 2 }; + +export const migrationSkippedDdbRecord = { + PK: "MIGRATION#5.39.6-001", + SK: "A", + data: { + description: "Meta fields data migration (skipped via improved meta fields migration)", + finishedOn: "2024-06-01T12:00:00.000Z", + id: "5.39.6-001", + reason: "skipped", + startedOn: "2024-06-01T12:00:00.000Z" + }, + GSI1_PK: "MIGRATIONS", + GSI1_SK: "5.39.6-001", + TYPE: "migration", + _ct: "2024-06-01T12:00:00.000Z", + _et: "Migration", + _md: "2024-06-01T12:00:00.000Z" +}; + +interface MigrationSkippedDdbRecordParams { + documentClient: DynamoDBDocument; + ddbTable: string; +} + +export const migrationSkippedDdbRecordExists = async ({ + documentClient, + ddbTable +}: MigrationSkippedDdbRecordParams) => { + // Was the migration already executed? + const { Item } = await documentClient.get({ + TableName: ddbTable, + Key: { + PK: "MIGRATION#5.39.6-001", + SK: "A" + } + }); + + return !!Item; +}; + +export const createMigrationSkippedDdbRecord = async ({ + documentClient, + ddbTable +}: MigrationSkippedDdbRecordParams) => { + await documentClient.put({ + TableName: ddbTable, + Item: migrationSkippedDdbRecord + }); +}; From d28ad57a5d50545aa76698a8072ce7f81134793c Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 13:46:32 +0200 Subject: [PATCH 39/56] fix: remove WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS --- .../createMetaFieldsDataMigrationDeploymentHook.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts index f8d0574c1dd..9d6e22fb61d 100644 --- a/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts +++ b/packages/migrations/src/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.ts @@ -37,8 +37,6 @@ const ensureAwsEnvVars = () => { } }; -const MIGRATION_ENV_VAR = process.env.WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS; - /** * Creates an after-deployment hook that triggers the meta fields data migration. * @param params @@ -76,15 +74,6 @@ export const createMetaFieldsDataMigrationDeploymentHook = ( return; } - if (MIGRATION_ENV_VAR !== "true") { - context.info( - `Skipping meta fields data migration. Set %s to %s to enable.`, - "WEBINY_MIGRATION_RUN_5_39_6_META_FIELDS_DATA_MIGRATIONS", - "true" - ); - return; - } - ensureAwsEnvVars(); const coreOutput = getStackOutput({ folder: "apps/core", env }); From a1d7cf3ee4bcd95de25e791923e0dfb7d187e627 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 14:01:53 +0200 Subject: [PATCH 40/56] fix: bring back `publishedOn` and `ownedBy` GQL fields, make new GQL meta fields nullable --- .../src/graphql/schema/contentEntries.ts | 5 ++--- .../src/graphql/schema/createManageSDL.ts | 8 +++++--- .../src/graphql/schema/createReadSDL.ts | 12 +++++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/api-headless-cms/src/graphql/schema/contentEntries.ts b/packages/api-headless-cms/src/graphql/schema/contentEntries.ts index 4e82f68c218..0c8afa159fa 100644 --- a/packages/api-headless-cms/src/graphql/schema/contentEntries.ts +++ b/packages/api-headless-cms/src/graphql/schema/contentEntries.ts @@ -8,7 +8,7 @@ import { getEntryDescription } from "~/utils/getEntryDescription"; import { getEntryImage } from "~/utils/getEntryImage"; import { entryFieldFromStorageTransform } from "~/utils/entryStorage"; import { Resolvers } from "@webiny/handler-graphql/types"; -import { ENTRY_META_FIELDS, isNullableEntryMetaField, isDateTimeEntryMetaField } from "~/constants"; +import { ENTRY_META_FIELDS, isDateTimeEntryMetaField } from "~/constants"; interface EntriesByModel { [key: string]: string[]; @@ -321,10 +321,9 @@ export const createContentEntriesSchema = ({ } const onByMetaFields = ENTRY_META_FIELDS.map(field => { - const isNullable = isNullableEntryMetaField(field) ? "" : "!"; const fieldType = isDateTimeEntryMetaField(field) ? "DateTime" : "CmsIdentity"; - return `${field}: ${fieldType}${isNullable}`; + return `${field}: ${fieldType}`; }).join("\n"); const plugin = new CmsGraphQLSchemaPlugin({ diff --git a/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts b/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts index 21e1ffd0265..3a7494ad190 100644 --- a/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts +++ b/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts @@ -5,7 +5,7 @@ import { renderGetFilterFields } from "~/utils/renderGetFilterFields"; import { renderInputFields } from "~/utils/renderInputFields"; import { renderFields } from "~/utils/renderFields"; import { CmsGraphQLSchemaSorterPlugin } from "~/plugins"; -import { ENTRY_META_FIELDS, isDateTimeEntryMetaField, isNullableEntryMetaField } from "~/constants"; +import { ENTRY_META_FIELDS, isDateTimeEntryMetaField } from "~/constants"; interface CreateManageSDLParams { models: CmsModel[]; @@ -70,10 +70,9 @@ export const createManageSDL: CreateManageSDL = ({ }).join("\n"); const onByMetaGqlFields = ENTRY_META_FIELDS.map(field => { - const isNullable = isNullableEntryMetaField(field) ? "" : "!"; const fieldType = isDateTimeEntryMetaField(field) ? "DateTime" : "CmsIdentity"; - return `${field}: ${fieldType}${isNullable}`; + return `${field}: ${fieldType}`; }).join("\n"); // Had to remove /* GraphQL */ because prettier would not format the code correctly. @@ -85,6 +84,9 @@ export const createManageSDL: CreateManageSDL = ({ ${onByMetaGqlFields} + publishedOn: DateTime @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field.") + ownedBy: CmsIdentityInput @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + meta: ${singularName}Meta ${fields.map(f => f.fields).join("\n")} # Advanced Content Organization - make required in 5.38.0 diff --git a/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts b/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts index 8fac945cdcf..57acade06a7 100644 --- a/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts +++ b/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts @@ -4,7 +4,7 @@ import { renderSortEnum } from "~/utils/renderSortEnum"; import { renderFields } from "~/utils/renderFields"; import { renderGetFilterFields } from "~/utils/renderGetFilterFields"; import { CmsGraphQLSchemaSorterPlugin } from "~/plugins"; -import { ENTRY_META_FIELDS, isDateTimeEntryMetaField, isNullableEntryMetaField } from "~/constants"; +import { ENTRY_META_FIELDS, isDateTimeEntryMetaField } from "~/constants"; interface CreateReadSDLParams { models: CmsModel[]; @@ -57,11 +57,10 @@ export const createReadSDL: CreateReadSDL = ({ const { singularApiName: singularName, pluralApiName: pluralName } = model; - const onByMetaFields = ENTRY_META_FIELDS.map(field => { - const isNullable = isNullableEntryMetaField(field) ? "" : "!"; + const onByMetaGqlFields = ENTRY_META_FIELDS.map(field => { const fieldType = isDateTimeEntryMetaField(field) ? "DateTime" : "CmsIdentity"; - return `${field}: ${fieldType}${isNullable}`; + return `${field}: ${fieldType}`; }).join("\n"); return ` @@ -71,7 +70,10 @@ export const createReadSDL: CreateReadSDL = ({ entryId: String! ${hasModelIdField ? "" : "modelId: String!"} - ${onByMetaFields} + ${onByMetaGqlFields} + + publishedOn: DateTime @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field.") + ownedBy: CmsIdentityInput @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") ${fieldsRender.map(f => f.fields).join("\n")} } From bc77f169f55c8c063b62eb6bb6d84aa6cbbf3e3e Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 14:13:51 +0200 Subject: [PATCH 41/56] fix: move `api-dynamodb-to-elasticsearch` into `ddb-es` / `ddb-os` tests --- .github/workflows/wac/utils/listPackagesWithJestTests.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/wac/utils/listPackagesWithJestTests.ts b/.github/workflows/wac/utils/listPackagesWithJestTests.ts index 325d862c6b4..8435338a7dd 100644 --- a/.github/workflows/wac/utils/listPackagesWithJestTests.ts +++ b/.github/workflows/wac/utils/listPackagesWithJestTests.ts @@ -202,6 +202,14 @@ const CUSTOM_HANDLERS: Record Array> = { } ]; }, + "api-dynamodb-to-elasticsearch": () => { + return [ + { + cmd: "packages/api-dynamodb-to-elasticsearch", + storage: ["ddb-es", "ddb-os"] + } + ]; + }, tasks: () => { return [ { cmd: "packages/tasks --storage=ddb", storage: "ddb" }, From 5833b21d54a177c6c3491033a5d5f6ac72b760bd Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 14:14:17 +0200 Subject: [PATCH 42/56] fix: move `api-dynamodb-to-elasticsearch` into `ddb-es` / `ddb-os` tests --- .github/workflows/pullRequests.yml | 6 +++--- .github/workflows/pushDev.yml | 6 +++--- .github/workflows/pushNext.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pullRequests.yml b/.github/workflows/pullRequests.yml index 75a4bf1a310..8ca658a06d0 100644 --- a/.github/workflows/pullRequests.yml +++ b/.github/workflows/pullRequests.yml @@ -177,7 +177,7 @@ jobs: - 18 package: >- ${{ - fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-dynamodb-to-elasticsearch","id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') + fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-headless-cms-es-tasks","id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') }} runs-on: ${{ matrix.os }} env: @@ -281,7 +281,7 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-aco_ddb-es_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-es,ddb","storage":"ddb-es","id":"api-elasticsearch-tasks_ddb-es_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-es,ddb","storage":"ddb-es","id":"api-file-manager_ddb-es_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es @@ -348,7 +348,7 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-aco_ddb-os_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-os,ddb","storage":"ddb-os","id":"api-elasticsearch-tasks_ddb-os_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-os,ddb","storage":"ddb-os","id":"api-file-manager_ddb-os_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es diff --git a/.github/workflows/pushDev.yml b/.github/workflows/pushDev.yml index 7f7bae78712..d38b4a1495b 100644 --- a/.github/workflows/pushDev.yml +++ b/.github/workflows/pushDev.yml @@ -143,7 +143,7 @@ jobs: - 18 package: >- ${{ - fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-dynamodb-to-elasticsearch","id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') + fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-headless-cms-es-tasks","id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') }} runs-on: ${{ matrix.os }} env: @@ -247,7 +247,7 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-aco_ddb-es_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-es,ddb","storage":"ddb-es","id":"api-elasticsearch-tasks_ddb-es_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-es,ddb","storage":"ddb-es","id":"api-file-manager_ddb-es_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es @@ -313,7 +313,7 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-aco_ddb-os_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-os,ddb","storage":"ddb-os","id":"api-elasticsearch-tasks_ddb-os_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-os,ddb","storage":"ddb-os","id":"api-file-manager_ddb-os_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es diff --git a/.github/workflows/pushNext.yml b/.github/workflows/pushNext.yml index ba7a91bf11d..9c93a0c12e5 100644 --- a/.github/workflows/pushNext.yml +++ b/.github/workflows/pushNext.yml @@ -143,7 +143,7 @@ jobs: - 18 package: >- ${{ - fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-dynamodb-to-elasticsearch","id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') + fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-headless-cms-es-tasks","id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') }} runs-on: ${{ matrix.os }} env: @@ -247,7 +247,7 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-aco_ddb-es_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-es,ddb","storage":"ddb-es","id":"api-elasticsearch-tasks_ddb-es_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-es,ddb","storage":"ddb-es","id":"api-file-manager_ddb-es_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es @@ -313,7 +313,7 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-aco_ddb-os_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-os,ddb","storage":"ddb-os","id":"api-elasticsearch-tasks_ddb-os_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-os,ddb","storage":"ddb-os","id":"api-file-manager_ddb-os_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es From 5c67559bb988135fe2fedabfe9306b1af23dc1c0 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 15:07:42 +0200 Subject: [PATCH 43/56] chore: skip prepublish build if `WEBINY_SERVERLESS_CMS_AWS_SKIP_PREPUBLISH_ONLY` --- packages/serverless-cms-aws/webiny.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/serverless-cms-aws/webiny.config.js b/packages/serverless-cms-aws/webiny.config.js index 4bf68f857df..461c22199a5 100644 --- a/packages/serverless-cms-aws/webiny.config.js +++ b/packages/serverless-cms-aws/webiny.config.js @@ -4,6 +4,11 @@ const { Listr } = require("listr2"); const { createWatchPackage, createBuildPackage } = require("@webiny/project-utils"); async function buildHandlers(options) { + if (process.env.WEBINY_SERVERLESS_CMS_AWS_SKIP_PREPUBLISH_ONLY === 'true') { + console.log('Skipping building of handlers...') + return; + } + // Bundle all handlers. These are then used directly in real Webiny projects. const handlerPaths = glob.sync(`${__dirname}/handlers/**/webiny.config.js`); From 09f0caa96487b67cc2eb8c0d4f9c2a11fe0456c1 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 15:24:43 +0200 Subject: [PATCH 44/56] fix: move `api-headless-cms-es-tasks` into `ddb-es` / `ddb-os` tests --- .github/workflows/wac/utils/listPackagesWithJestTests.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/wac/utils/listPackagesWithJestTests.ts b/.github/workflows/wac/utils/listPackagesWithJestTests.ts index 8435338a7dd..f4f2fad3bff 100644 --- a/.github/workflows/wac/utils/listPackagesWithJestTests.ts +++ b/.github/workflows/wac/utils/listPackagesWithJestTests.ts @@ -210,6 +210,14 @@ const CUSTOM_HANDLERS: Record Array> = { } ]; }, + "api-headless-cms-es-tasks": () => { + return [ + { + cmd: "packages/api-headless-cms-es-tasks", + storage: ["ddb-es", "ddb-os"] + } + ]; + }, tasks: () => { return [ { cmd: "packages/tasks --storage=ddb", storage: "ddb" }, From 20e73c0d8cc2fdee08b735d25b773b0e9353fd79 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 15:35:15 +0200 Subject: [PATCH 45/56] chore: remove `private: true` --- packages/migrations/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/migrations/package.json b/packages/migrations/package.json index d9fb975aa62..5ff5ff2df1a 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -1,7 +1,6 @@ { "name": "@webiny/migrations", "version": "0.0.0", - "private": true, "scripts": { "build": "yarn webiny run build", "watch": "yarn webiny run watch" From 23071d56a6e72bc35979795bb1633ca94b0dd454 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 16:12:06 +0200 Subject: [PATCH 46/56] chore: remove `private: true`cxzzxczxc --- .../api-headless-cms/src/graphql/schema/createManageSDL.ts | 2 +- packages/api-headless-cms/src/graphql/schema/createReadSDL.ts | 2 +- .../views/contentEntries/ContentEntry/RevisionListItem.tsx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts b/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts index 3a7494ad190..2a15c226a65 100644 --- a/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts +++ b/packages/api-headless-cms/src/graphql/schema/createManageSDL.ts @@ -85,7 +85,7 @@ export const createManageSDL: CreateManageSDL = ({ ${onByMetaGqlFields} publishedOn: DateTime @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field.") - ownedBy: CmsIdentityInput @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + ownedBy: CmsIdentity @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") meta: ${singularName}Meta ${fields.map(f => f.fields).join("\n")} diff --git a/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts b/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts index 57acade06a7..58daebfda8f 100644 --- a/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts +++ b/packages/api-headless-cms/src/graphql/schema/createReadSDL.ts @@ -73,7 +73,7 @@ export const createReadSDL: CreateReadSDL = ({ ${onByMetaGqlFields} publishedOn: DateTime @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field.") - ownedBy: CmsIdentityInput @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + ownedBy: CmsIdentity @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") ${fieldsRender.map(f => f.fields).join("\n")} } diff --git a/packages/app-headless-cms/src/admin/views/contentEntries/ContentEntry/RevisionListItem.tsx b/packages/app-headless-cms/src/admin/views/contentEntries/ContentEntry/RevisionListItem.tsx index dff359cda42..9e448d4c45c 100644 --- a/packages/app-headless-cms/src/admin/views/contentEntries/ContentEntry/RevisionListItem.tsx +++ b/packages/app-headless-cms/src/admin/views/contentEntries/ContentEntry/RevisionListItem.tsx @@ -102,7 +102,8 @@ const RevisionListItem = ({ revision }: RevisionListItemProps) => { {revision.meta.title || t`N/A`} {t`Last modified by {author} on {time} (#{version})`({ - author: revision.revisionCreatedBy.displayName, + // Added this because revisionCreatedBy can be returned as null from GraphQL. + author: revision.revisionCreatedBy?.displayName, time: , version: revision.meta.version })} From 62becf8c039efdf5e813f1871079c9b3c569827c Mon Sep 17 00:00:00 2001 From: adrians5j Date: Thu, 6 Jun 2024 16:21:30 +0200 Subject: [PATCH 47/56] chore: remove `private: true`cxzzxczxc --- .github/workflows/pullRequests.yml | 6 +++--- .github/workflows/pushDev.yml | 6 +++--- .github/workflows/pushNext.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pullRequests.yml b/.github/workflows/pullRequests.yml index 8ca658a06d0..6328a1e7b53 100644 --- a/.github/workflows/pullRequests.yml +++ b/.github/workflows/pullRequests.yml @@ -177,7 +177,7 @@ jobs: - 18 package: >- ${{ - fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-headless-cms-es-tasks","id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') + fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') }} runs-on: ${{ matrix.os }} env: @@ -287,7 +287,7 @@ jobs: --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder-so-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-mailer + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer --storage=ddb-es,ddb","storage":"ddb-es","id":"api-mailer_ddb-es_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder_ddb-es_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder-aco_ddb-es_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es @@ -354,7 +354,7 @@ jobs: --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder-so-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-mailer + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer --storage=ddb-os,ddb","storage":"ddb-os","id":"api-mailer_ddb-os_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder_ddb-os_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder-aco_ddb-os_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es diff --git a/.github/workflows/pushDev.yml b/.github/workflows/pushDev.yml index d38b4a1495b..ab3fc4f121b 100644 --- a/.github/workflows/pushDev.yml +++ b/.github/workflows/pushDev.yml @@ -143,7 +143,7 @@ jobs: - 18 package: >- ${{ - fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-headless-cms-es-tasks","id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') + fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') }} runs-on: ${{ matrix.os }} env: @@ -253,7 +253,7 @@ jobs: --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder-so-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-mailer + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer --storage=ddb-es,ddb","storage":"ddb-es","id":"api-mailer_ddb-es_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder_ddb-es_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder-aco_ddb-es_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es @@ -319,7 +319,7 @@ jobs: --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder-so-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-mailer + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer --storage=ddb-os,ddb","storage":"ddb-os","id":"api-mailer_ddb-os_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder_ddb-os_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder-aco_ddb-os_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es diff --git a/.github/workflows/pushNext.yml b/.github/workflows/pushNext.yml index 9c93a0c12e5..115721a4cad 100644 --- a/.github/workflows/pushNext.yml +++ b/.github/workflows/pushNext.yml @@ -143,7 +143,7 @@ jobs: - 18 package: >- ${{ - fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-headless-cms-es-tasks","id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') + fromJson('[{"cmd":"packages/api","id":"api"},{"cmd":"packages/api-admin-settings","id":"api-admin-settings"},{"cmd":"packages/api-authentication","id":"api-authentication"},{"cmd":"packages/api-authentication-cognito","id":"api-authentication-cognito"},{"cmd":"packages/api-headless-cms-ddb","id":"api-headless-cms-ddb"},{"cmd":"packages/api-wcp","id":"api-wcp"},{"cmd":"packages/app-aco","id":"app-aco"},{"cmd":"packages/app-admin","id":"app-admin"},{"cmd":"packages/cwp-template-aws","id":"cwp-template-aws"},{"cmd":"packages/data-migration","id":"data-migration"},{"cmd":"packages/db-dynamodb","id":"db-dynamodb"},{"cmd":"packages/form","id":"form"},{"cmd":"packages/handler","id":"handler"},{"cmd":"packages/handler-aws","id":"handler-aws"},{"cmd":"packages/handler-graphql","id":"handler-graphql"},{"cmd":"packages/handler-logs","id":"handler-logs"},{"cmd":"packages/ioc","id":"ioc"},{"cmd":"packages/lexical-converter","id":"lexical-converter"},{"cmd":"packages/plugins","id":"plugins"},{"cmd":"packages/pubsub","id":"pubsub"},{"cmd":"packages/react-composition","id":"react-composition"},{"cmd":"packages/react-properties","id":"react-properties"},{"cmd":"packages/react-rich-text-lexical-renderer","id":"react-rich-text-lexical-renderer"},{"cmd":"packages/utils","id":"utils"},{"cmd":"packages/validation","id":"validation"}]') }} runs-on: ${{ matrix.os }} env: @@ -253,7 +253,7 @@ jobs: --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder-so-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-mailer + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer --storage=ddb-es,ddb","storage":"ddb-es","id":"api-mailer_ddb-es_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder_ddb-es_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder-aco_ddb-es_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es @@ -319,7 +319,7 @@ jobs: --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder-so-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-mailer + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer --storage=ddb-os,ddb","storage":"ddb-os","id":"api-mailer_ddb-os_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder_ddb-os_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder-aco_ddb-os_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es From 32482c25dd2580e0b61b94044457a278f0e3012d Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 7 Jun 2024 06:27:27 +0200 Subject: [PATCH 48/56] chore: run prettier --- packages/serverless-cms-aws/webiny.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/serverless-cms-aws/webiny.config.js b/packages/serverless-cms-aws/webiny.config.js index 461c22199a5..54680f28c53 100644 --- a/packages/serverless-cms-aws/webiny.config.js +++ b/packages/serverless-cms-aws/webiny.config.js @@ -4,8 +4,8 @@ const { Listr } = require("listr2"); const { createWatchPackage, createBuildPackage } = require("@webiny/project-utils"); async function buildHandlers(options) { - if (process.env.WEBINY_SERVERLESS_CMS_AWS_SKIP_PREPUBLISH_ONLY === 'true') { - console.log('Skipping building of handlers...') + if (process.env.WEBINY_SERVERLESS_CMS_AWS_SKIP_PREPUBLISH_ONLY === "true") { + console.log("Skipping building of handlers..."); return; } From ade6e03f0ec9ba6fb2e5201126bcb140c6b7f0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Fri, 7 Jun 2024 08:55:06 +0200 Subject: [PATCH 49/56] fix: github workflows --- .../workflows/wac/utils/listPackagesWithJestTests.ts | 10 +++++++--- .../__tests__/context/helpers.ts | 4 ++-- .../__tests__/context/tenancySecurity.ts | 8 ++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wac/utils/listPackagesWithJestTests.ts b/.github/workflows/wac/utils/listPackagesWithJestTests.ts index f4f2fad3bff..19223c1aad5 100644 --- a/.github/workflows/wac/utils/listPackagesWithJestTests.ts +++ b/.github/workflows/wac/utils/listPackagesWithJestTests.ts @@ -213,8 +213,12 @@ const CUSTOM_HANDLERS: Record Array> = { "api-headless-cms-es-tasks": () => { return [ { - cmd: "packages/api-headless-cms-es-tasks", - storage: ["ddb-es", "ddb-os"] + cmd: "packages/api-headless-cms-es-tasks --storage=ddb-es,ddb", + storage: ["ddb-es"] + }, + { + cmd: "packages/api-headless-cms-es-tasks --storage=ddb-os,ddb", + storage: ["ddb-os"] } ]; }, @@ -266,7 +270,7 @@ function hasTestFiles(packageFolderPath: string) { } const files = fs.readdirSync(packageFolderPath); - for (let filename of files) { + for (const filename of files) { const filepath = path.join(packageFolderPath, filename); if (fs.statSync(filepath).isDirectory()) { const hasTFiles = hasTestFiles(filepath); diff --git a/packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts b/packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts index 7cbae8e31cf..688a4588b86 100644 --- a/packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts +++ b/packages/api-headless-cms-es-tasks/__tests__/context/helpers.ts @@ -1,6 +1,6 @@ import { SecurityIdentity } from "@webiny/api-security/types"; import { ContextPlugin } from "@webiny/api"; -import { CmsContext } from "~/types"; +import { Context } from "~/types"; export interface PermissionsArg { name: string; @@ -65,7 +65,7 @@ export const createIdentity = (identity?: SecurityIdentity) => { }; export const createDummyLocales = () => { - return new ContextPlugin(async context => { + return new ContextPlugin(async context => { const { i18n, security } = context; await security.authenticate(""); diff --git a/packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts b/packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts index 1b4a213eecd..cf869285b1f 100644 --- a/packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts +++ b/packages/api-headless-cms-es-tasks/__tests__/context/tenancySecurity.ts @@ -8,7 +8,7 @@ import { } from "@webiny/api-security/types"; import { ContextPlugin } from "@webiny/api"; import { BeforeHandlerPlugin } from "@webiny/handler"; -import { CmsContext } from "~/types"; +import { Context } from "~/types"; import { getStorageOps } from "@webiny/project-utils/testing/environment"; import { TenancyStorageOperations, Tenant } from "@webiny/api-tenancy/types"; @@ -37,7 +37,7 @@ export const createTenancyAndSecurity = ({ setupGraphQL ? createTenancyGraphQL() : null, createSecurityContext({ storageOperations: securityStorage.storageOperations }), setupGraphQL ? createSecurityGraphQL() : null, - new ContextPlugin(async context => { + new ContextPlugin(async context => { await context.tenancy.createTenant({ id: "root", name: "Root", @@ -70,7 +70,7 @@ export const createTenancyAndSecurity = ({ tags: [] }); }), - new ContextPlugin(async context => { + new ContextPlugin(async context => { context.tenancy.setCurrentTenant({ id: "root", name: "Root", @@ -90,7 +90,7 @@ export const createTenancyAndSecurity = ({ return permissions || [{ name: "*" }]; }); }), - new BeforeHandlerPlugin(context => { + new BeforeHandlerPlugin(context => { const { headers = {} } = context.request || {}; if (headers["authorization"]) { return context.security.authenticate(headers["authorization"]); From 2079fef0d587876449d4e308c7aa0599a38d9cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Fri, 7 Jun 2024 09:49:56 +0200 Subject: [PATCH 50/56] fix: github workflows --- .github/workflows/pullRequests.yml | 6 ++++-- .github/workflows/pushDev.yml | 6 ++++-- .github/workflows/pushNext.yml | 6 ++++-- packages/api-dynamodb-to-elasticsearch/src/index.ts | 1 - 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pullRequests.yml b/.github/workflows/pullRequests.yml index 6328a1e7b53..63e28896173 100644 --- a/.github/workflows/pullRequests.yml +++ b/.github/workflows/pullRequests.yml @@ -287,7 +287,8 @@ jobs: --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder-so-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks + --storage=ddb-es,ddb","storage":["ddb-es"],"id":"api-headless-cms-es-tasks_ddb-es_ddb"},{"cmd":"packages/api-mailer --storage=ddb-es,ddb","storage":"ddb-es","id":"api-mailer_ddb-es_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder_ddb-es_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder-aco_ddb-es_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es @@ -354,7 +355,8 @@ jobs: --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder-so-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks + --storage=ddb-os,ddb","storage":["ddb-os"],"id":"api-headless-cms-es-tasks_ddb-os_ddb"},{"cmd":"packages/api-mailer --storage=ddb-os,ddb","storage":"ddb-os","id":"api-mailer_ddb-os_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder_ddb-os_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder-aco_ddb-os_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es diff --git a/.github/workflows/pushDev.yml b/.github/workflows/pushDev.yml index ab3fc4f121b..aa86ca367f9 100644 --- a/.github/workflows/pushDev.yml +++ b/.github/workflows/pushDev.yml @@ -253,7 +253,8 @@ jobs: --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder-so-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks + --storage=ddb-es,ddb","storage":["ddb-es"],"id":"api-headless-cms-es-tasks_ddb-es_ddb"},{"cmd":"packages/api-mailer --storage=ddb-es,ddb","storage":"ddb-es","id":"api-mailer_ddb-es_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder_ddb-es_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder-aco_ddb-es_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es @@ -319,7 +320,8 @@ jobs: --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder-so-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks + --storage=ddb-os,ddb","storage":["ddb-os"],"id":"api-headless-cms-es-tasks_ddb-os_ddb"},{"cmd":"packages/api-mailer --storage=ddb-os,ddb","storage":"ddb-os","id":"api-mailer_ddb-os_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder_ddb-os_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder-aco_ddb-os_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es diff --git a/.github/workflows/pushNext.yml b/.github/workflows/pushNext.yml index 115721a4cad..346081bc968 100644 --- a/.github/workflows/pushNext.yml +++ b/.github/workflows/pushNext.yml @@ -253,7 +253,8 @@ jobs: --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder-so-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-headless-cms-ddb-es_ddb-es_ddb"},{"cmd":"packages/api-headless-cms-es-tasks + --storage=ddb-es,ddb","storage":["ddb-es"],"id":"api-headless-cms-es-tasks_ddb-es_ddb"},{"cmd":"packages/api-mailer --storage=ddb-es,ddb","storage":"ddb-es","id":"api-mailer_ddb-es_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder_ddb-es_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-page-builder-aco_ddb-es_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es @@ -319,7 +320,8 @@ jobs: --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder-so-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-ddb-es - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks","storage":["ddb-es","ddb-os"],"id":"api-headless-cms-es-tasks"},{"cmd":"packages/api-mailer + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-headless-cms-ddb-es_ddb-os_ddb"},{"cmd":"packages/api-headless-cms-es-tasks + --storage=ddb-os,ddb","storage":["ddb-os"],"id":"api-headless-cms-es-tasks_ddb-os_ddb"},{"cmd":"packages/api-mailer --storage=ddb-os,ddb","storage":"ddb-os","id":"api-mailer_ddb-os_ddb"},{"cmd":"packages/api-page-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder_ddb-os_ddb"},{"cmd":"packages/api-page-builder-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-page-builder-aco_ddb-os_ddb"},{"cmd":"packages/api-page-builder-so-ddb-es diff --git a/packages/api-dynamodb-to-elasticsearch/src/index.ts b/packages/api-dynamodb-to-elasticsearch/src/index.ts index 89e4beb5dbb..212dec152c0 100644 --- a/packages/api-dynamodb-to-elasticsearch/src/index.ts +++ b/packages/api-dynamodb-to-elasticsearch/src/index.ts @@ -297,7 +297,6 @@ export const createEventHandler = () => { console.info( `Transferred ${operations.length / 2} record operations to Elasticsearch.` ); - console.log(operationIdList); }; const maxRetryTime = getNumberEnvVariable( From 9226e114e1fece1fc74d057d5f12323e3c3bf2f1 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 7 Jun 2024 10:01:47 +0200 Subject: [PATCH 51/56] ci: fix list of packages --- .github/workflows/pullRequests.yml | 6 ++++-- .github/workflows/pushDev.yml | 6 ++++-- .github/workflows/pushNext.yml | 6 ++++-- .github/workflows/wac/utils/listPackagesWithJestTests.ts | 8 ++++++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pullRequests.yml b/.github/workflows/pullRequests.yml index 63e28896173..d3db887983a 100644 --- a/.github/workflows/pullRequests.yml +++ b/.github/workflows/pullRequests.yml @@ -281,7 +281,8 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-aco_ddb-es_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch + --storage=ddb-es,ddb","storage":["ddb-es"],"id":"api-dynamodb-to-elasticsearch_ddb-es_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-es,ddb","storage":"ddb-es","id":"api-elasticsearch-tasks_ddb-es_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-es,ddb","storage":"ddb-es","id":"api-file-manager_ddb-es_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es @@ -349,7 +350,8 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-aco_ddb-os_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch + --storage=ddb-os,ddb","storage":["ddb-os"],"id":"api-dynamodb-to-elasticsearch_ddb-os_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-os,ddb","storage":"ddb-os","id":"api-elasticsearch-tasks_ddb-os_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-os,ddb","storage":"ddb-os","id":"api-file-manager_ddb-os_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es diff --git a/.github/workflows/pushDev.yml b/.github/workflows/pushDev.yml index aa86ca367f9..f1c6199c1f0 100644 --- a/.github/workflows/pushDev.yml +++ b/.github/workflows/pushDev.yml @@ -247,7 +247,8 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-aco_ddb-es_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch + --storage=ddb-es,ddb","storage":["ddb-es"],"id":"api-dynamodb-to-elasticsearch_ddb-es_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-es,ddb","storage":"ddb-es","id":"api-elasticsearch-tasks_ddb-es_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-es,ddb","storage":"ddb-es","id":"api-file-manager_ddb-es_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es @@ -314,7 +315,8 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-aco_ddb-os_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch + --storage=ddb-os,ddb","storage":["ddb-os"],"id":"api-dynamodb-to-elasticsearch_ddb-os_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-os,ddb","storage":"ddb-os","id":"api-elasticsearch-tasks_ddb-os_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-os,ddb","storage":"ddb-os","id":"api-file-manager_ddb-os_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es diff --git a/.github/workflows/pushNext.yml b/.github/workflows/pushNext.yml index 346081bc968..ececef094c5 100644 --- a/.github/workflows/pushNext.yml +++ b/.github/workflows/pushNext.yml @@ -247,7 +247,8 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-es,ddb","storage":"ddb-es","id":"api-aco_ddb-es_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-es,ddb","storage":"ddb-es","id":"api-audit-logs_ddb-es_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch + --storage=ddb-es,ddb","storage":["ddb-es"],"id":"api-dynamodb-to-elasticsearch_ddb-es_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-es,ddb","storage":"ddb-es","id":"api-elasticsearch-tasks_ddb-es_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-es,ddb","storage":"ddb-es","id":"api-file-manager_ddb-es_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-es,ddb","storage":"ddb-es","id":"api-form-builder_ddb-es_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es @@ -314,7 +315,8 @@ jobs: package: >- ${{ fromJson('[{"cmd":"packages/api-aco --storage=ddb-os,ddb","storage":"ddb-os","id":"api-aco_ddb-os_ddb"},{"cmd":"packages/api-audit-logs - --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-dynamodb-to-elasticsearch"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks + --storage=ddb-os,ddb","storage":"ddb-os","id":"api-audit-logs_ddb-os_ddb"},{"cmd":"packages/api-dynamodb-to-elasticsearch + --storage=ddb-os,ddb","storage":["ddb-os"],"id":"api-dynamodb-to-elasticsearch_ddb-os_ddb"},{"cmd":"packages/api-elasticsearch","storage":["ddb-es","ddb-os"],"id":"api-elasticsearch"},{"cmd":"packages/api-elasticsearch-tasks --storage=ddb-os,ddb","storage":"ddb-os","id":"api-elasticsearch-tasks_ddb-os_ddb"},{"cmd":"packages/api-file-manager --storage=ddb-os,ddb","storage":"ddb-os","id":"api-file-manager_ddb-os_ddb"},{"cmd":"packages/api-form-builder --storage=ddb-os,ddb","storage":"ddb-os","id":"api-form-builder_ddb-os_ddb"},{"cmd":"packages/api-form-builder-so-ddb-es diff --git a/.github/workflows/wac/utils/listPackagesWithJestTests.ts b/.github/workflows/wac/utils/listPackagesWithJestTests.ts index 19223c1aad5..ca92079a1da 100644 --- a/.github/workflows/wac/utils/listPackagesWithJestTests.ts +++ b/.github/workflows/wac/utils/listPackagesWithJestTests.ts @@ -205,8 +205,12 @@ const CUSTOM_HANDLERS: Record Array> = { "api-dynamodb-to-elasticsearch": () => { return [ { - cmd: "packages/api-dynamodb-to-elasticsearch", - storage: ["ddb-es", "ddb-os"] + cmd: "packages/api-dynamodb-to-elasticsearch --storage=ddb-es,ddb", + storage: ["ddb-es"] + }, + { + cmd: "packages/api-dynamodb-to-elasticsearch --storage=ddb-os,ddb", + storage: ["ddb-os"] } ]; }, From 3c7a80dd838c5cb673485b1b4f2ea72db5774197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Zori=C4=87?= Date: Fri, 7 Jun 2024 11:47:26 +0200 Subject: [PATCH 52/56] fix(api-headless-cms-ddb-es): more detailed error log --- .../api-headless-cms-ddb-es/src/operations/entry/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/api-headless-cms-ddb-es/src/operations/entry/index.ts b/packages/api-headless-cms-ddb-es/src/operations/entry/index.ts index 7cb3a077268..9742c42422a 100644 --- a/packages/api-headless-cms-ddb-es/src/operations/entry/index.ts +++ b/packages/api-headless-cms-ddb-es/src/operations/entry/index.ts @@ -68,10 +68,14 @@ const IGNORED_ES_SEARCH_EXCEPTIONS = [ "search_phase_execution_exception" ]; -const shouldIgnoreElasticsearchException = (ex: Pick) => { +const shouldIgnoreElasticsearchException = (ex: WebinyError) => { if (IGNORED_ES_SEARCH_EXCEPTIONS.includes(ex.message)) { console.log(`Ignoring Elasticsearch exception: ${ex.message}`); - console.log(ex); + console.log({ + code: ex.code, + data: ex.data, + stack: ex.stack + }); return true; } return false; From 952b3e01cba0b99901414cbfae5bef48e016be5b Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 7 Jun 2024 12:46:53 +0200 Subject: [PATCH 53/56] test: increase timeout --- .../__tests__/tasks/mockDataCreatorTask.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts index 5cef6129d41..cc9afce3dcb 100644 --- a/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts +++ b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts @@ -14,6 +14,7 @@ import { import { CARS_MODEL_ID } from "~/tasks/MockDataManager/constants"; import { disableIndexing, enableIndexing } from "~/utils"; +jest.setTimeout(120000) describe("mock data creator task", () => { it("should create a mock data creator task", async () => { const { handler } = useHandler(); From 69bbfec6f38d412bfefb6a2357010f373c48e847 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 7 Jun 2024 12:47:06 +0200 Subject: [PATCH 54/56] test: increase timeout --- .../__tests__/tasks/mockDataCreatorTask.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts index cc9afce3dcb..472057bdd8a 100644 --- a/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts +++ b/packages/api-headless-cms-es-tasks/__tests__/tasks/mockDataCreatorTask.test.ts @@ -14,7 +14,8 @@ import { import { CARS_MODEL_ID } from "~/tasks/MockDataManager/constants"; import { disableIndexing, enableIndexing } from "~/utils"; -jest.setTimeout(120000) +jest.setTimeout(120000); + describe("mock data creator task", () => { it("should create a mock data creator task", async () => { const { handler } = useHandler(); From 5073c4161e13d2f5126c4bce5c39ba9c6759ef31 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 7 Jun 2024 14:39:35 +0200 Subject: [PATCH 55/56] test: update GQL snapshots --- .../contentAPI/snapshots/category.manage.ts | 736 +++++----- .../contentAPI/snapshots/category.read.ts | 457 +++--- .../contentAPI/snapshots/page.manage.ts | 1260 +++++++++-------- .../contentAPI/snapshots/page.read.ts | 727 +++++----- .../contentAPI/snapshots/product.manage.ts | 1111 ++++++++------- .../contentAPI/snapshots/product.read.ts | 821 +++++------ .../contentAPI/snapshots/review.manage.ts | 731 +++++----- .../contentAPI/snapshots/review.read.ts | 469 +++--- 8 files changed, 3201 insertions(+), 3111 deletions(-) diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts index 3c23c7b336c..1ecfc60877c 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts @@ -1,365 +1,373 @@ -export default /* GraphQL */ ` - """ - Product category - """ - type CategoryApiNameWhichIsABitDifferentThanModelId { - id: ID! - entryId: String! - - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - meta: CategoryApiNameWhichIsABitDifferentThanModelIdMeta - title: String - slug: String - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation - } - - type CategoryApiNameWhichIsABitDifferentThanModelIdMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [CategoryApiNameWhichIsABitDifferentThanModelId!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON - } - - input CategoryApiNameWhichIsABitDifferentThanModelIdInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - title: String - slug: String - } - - input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { - id: ID - entryId: String - title: String - slug: String - } - - input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String - - slug: String - slug_not: String - slug_in: [String] - slug_not_in: [String] - slug_contains: String - slug_not_contains: String - slug_startsWith: String - slug_not_startsWith: String - - AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] - OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] - } - - type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { - data: CategoryApiNameWhichIsABitDifferentThanModelId - error: CmsError - } - - type CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse { - data: Boolean - error: CmsError - } - - type CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse { - data: [CategoryApiNameWhichIsABitDifferentThanModelId] - error: CmsError - } - - type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { - data: [CategoryApiNameWhichIsABitDifferentThanModelId] - meta: CmsListMeta - error: CmsError - } - - enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - slug_ASC - slug_DESC - } - - extend type Query { - getCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - getCategoryApiNameWhichIsABitDifferentThanModelIdRevisions( - id: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse - - getCategoriesApiModelByIds( - revisions: [ID!]! - ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse - - listCategoriesApiModel( - where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput - sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] - limit: Int - after: String - search: String - ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse - } - - extend type Mutation { - createCategoryApiNameWhichIsABitDifferentThanModelId( - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! - options: CreateCmsEntryOptionsInput - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - createCategoryApiNameWhichIsABitDifferentThanModelIdFrom( - revision: ID! - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput - options: CreateRevisionCmsEntryOptionsInput - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - updateCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! - options: UpdateCmsEntryOptionsInput - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - validateCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! - ): CmsEntryValidationResponse! - - moveCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - folderId: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse - - deleteCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - options: CmsDeleteEntryOptions - ): CmsDeleteResponse - - deleteMultipleCategoriesApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! - - publishCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - republishCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - unpublishCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - } +export default /* GraphQL */ `""" +Product category +""" +type CategoryApiNameWhichIsABitDifferentThanModelId { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) + + meta: CategoryApiNameWhichIsABitDifferentThanModelIdMeta + title: String + slug: String + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation +} + +type CategoryApiNameWhichIsABitDifferentThanModelIdMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [CategoryApiNameWhichIsABitDifferentThanModelId!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON +} + +input CategoryApiNameWhichIsABitDifferentThanModelIdInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + title: String + slug: String +} + +input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { + id: ID + entryId: String + title: String + slug: String +} + +input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String + + slug: String + slug_not: String + slug_in: [String] + slug_not_in: [String] + slug_contains: String + slug_not_contains: String + slug_startsWith: String + slug_not_startsWith: String + + AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] + OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] +} + +type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { + data: CategoryApiNameWhichIsABitDifferentThanModelId + error: CmsError +} + +type CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse { + data: Boolean + error: CmsError +} + +type CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse { + data: [CategoryApiNameWhichIsABitDifferentThanModelId] + error: CmsError +} + +type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { + data: [CategoryApiNameWhichIsABitDifferentThanModelId] + meta: CmsListMeta + error: CmsError +} + +enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + slug_ASC + slug_DESC +} + +extend type Query { + getCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + getCategoryApiNameWhichIsABitDifferentThanModelIdRevisions( + id: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse + + getCategoriesApiModelByIds( + revisions: [ID!]! + ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse + + listCategoriesApiModel( + where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput + sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] + limit: Int + after: String + search: String + ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse +} + +extend type Mutation { + createCategoryApiNameWhichIsABitDifferentThanModelId( + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! + options: CreateCmsEntryOptionsInput + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + createCategoryApiNameWhichIsABitDifferentThanModelIdFrom( + revision: ID! + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput + options: CreateRevisionCmsEntryOptionsInput + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + updateCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! + options: UpdateCmsEntryOptionsInput + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + validateCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! + ): CmsEntryValidationResponse! + + moveCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + folderId: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse + + deleteCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + options: CmsDeleteEntryOptions + ): CmsDeleteResponse + + deleteMultipleCategoriesApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! + + publishCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + republishCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + unpublishCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse +} `; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts index f90117705f3..7cc79f3a1aa 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts @@ -1,237 +1,244 @@ -export default /* GraphQL */ ` - """ - Product category - """ - type CategoryApiNameWhichIsABitDifferentThanModelId { - id: ID! - entryId: String! - modelId: String! +export default /* GraphQL */ `""" +Product category +""" +type CategoryApiNameWhichIsABitDifferentThanModelId { + id: ID! + entryId: String! + modelId: String! - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity - title: String - slug: String - } + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) - input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { - id: ID - entryId: String - title: String - slug: String - } + title: String + slug: String +} - input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] +input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { + id: ID + entryId: String + title: String + slug: String +} - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String +input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] - slug: String - slug_not: String - slug_in: [String] - slug_not_in: [String] - slug_contains: String - slug_not_contains: String - slug_startsWith: String - slug_not_startsWith: String + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String - AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] - OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] - } + slug: String + slug_not: String + slug_in: [String] + slug_not_in: [String] + slug_contains: String + slug_not_contains: String + slug_startsWith: String + slug_not_startsWith: String - enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - slug_ASC - slug_DESC - } + AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] + OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] +} - type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { - data: CategoryApiNameWhichIsABitDifferentThanModelId - error: CmsError - } +enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + slug_ASC + slug_DESC +} - type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { - data: [CategoryApiNameWhichIsABitDifferentThanModelId] - meta: CmsListMeta - error: CmsError - } +type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { + data: CategoryApiNameWhichIsABitDifferentThanModelId + error: CmsError +} - extend type Query { - getCategoryApiNameWhichIsABitDifferentThanModelId( - where: CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse +type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { + data: [CategoryApiNameWhichIsABitDifferentThanModelId] + meta: CmsListMeta + error: CmsError +} - listCategoriesApiModel( - where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput - sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] - limit: Int - after: String - search: String - ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse - } -`; +extend type Query { + getCategoryApiNameWhichIsABitDifferentThanModelId( + where: CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + listCategoriesApiModel( + where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput + sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] + limit: Int + after: String + search: String + ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse +}`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts index 5e32beeeeaa..c2430378d7d 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts @@ -1,624 +1,638 @@ -export default /* GraphQL */ ` - """ - Page - """ - type PageModelApiName { - id: ID! - entryId: String! - - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - meta: PageModelApiNameMeta - content: [PageModelApiName_Content!] - header: PageModelApiName_Header - objective: PageModelApiName_Objective - reference: PageModelApiName_Reference - references1: PageModelApiName_References1 - references2: [PageModelApiName_References2!] - ghostObject: PageModelApiName_GhostObject - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation - } - - type PageModelApiNameMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [PageModelApiName!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON - } - - union PageModelApiName_Content = - PageModelApiName_Content_Hero - | PageModelApiName_Content_SimpleText - | PageModelApiName_Content_Objecting - | PageModelApiName_Content_Author - - type PageModelApiName_Content_Hero { - title: String - } - - type PageModelApiName_Content_SimpleText { - text: String - } - - type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String - } - - input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String - } - - type PageModelApiName_Content_Objecting_NestedObject { - objectTitle: String - objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] - } - - input PageModelApiName_Content_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput - } - - union PageModelApiName_Content_Objecting_DynamicZone = - PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject - - type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { - authors: [RefField!] - } - - extend type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { - _templateId: ID! - } - - type PageModelApiName_Content_Objecting { - nestedObject: PageModelApiName_Content_Objecting_NestedObject - dynamicZone: PageModelApiName_Content_Objecting_DynamicZone - } - - type PageModelApiName_Content_Author { - author: RefField - authors: [RefField!] - } - - extend type PageModelApiName_Content_Hero { - _templateId: ID! - } - - extend type PageModelApiName_Content_SimpleText { - _templateId: ID! - } - - extend type PageModelApiName_Content_Objecting { - _templateId: ID! - } - - extend type PageModelApiName_Content_Author { - _templateId: ID! - } - - union PageModelApiName_Header = - PageModelApiName_Header_TextHeader - | PageModelApiName_Header_ImageHeader - - type PageModelApiName_Header_TextHeader { - title: String - } - - type PageModelApiName_Header_ImageHeader { - title: String - image: String - } - - extend type PageModelApiName_Header_TextHeader { - _templateId: ID! - } - - extend type PageModelApiName_Header_ImageHeader { - _templateId: ID! - } - - union PageModelApiName_Objective = PageModelApiName_Objective_Objecting - - type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String - } - - input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String - } - - type PageModelApiName_Objective_Objecting_NestedObject { - objectTitle: String - objectBody: JSON - objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] - } - - input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput - } - - type PageModelApiName_Objective_Objecting { - nestedObject: PageModelApiName_Objective_Objecting_NestedObject - } - - extend type PageModelApiName_Objective_Objecting { - _templateId: ID! - } - - union PageModelApiName_Reference = PageModelApiName_Reference_Author - - type PageModelApiName_Reference_Author { - author: RefField - } - - extend type PageModelApiName_Reference_Author { - _templateId: ID! - } - - union PageModelApiName_References1 = PageModelApiName_References1_Authors - - type PageModelApiName_References1_Authors { - authors: [RefField!] - } - - extend type PageModelApiName_References1_Authors { - _templateId: ID! - } - - union PageModelApiName_References2 = PageModelApiName_References2_Author - - type PageModelApiName_References2_Author { - author: RefField - } - - extend type PageModelApiName_References2_Author { - _templateId: ID! - } - - type PageModelApiName_GhostObject { - _empty: String - } - - input PageModelApiName_GhostObjectWhereInput { - _empty: String - } - - input PageModelApiName_Content_HeroInput { - title: String - } - - input PageModelApiName_Content_SimpleTextInput { - text: String - } - - input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput { - nestedObjectNestedTitle: String - } - - input PageModelApiName_Content_Objecting_NestedObjectInput { - objectTitle: String - objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput!] - } - - input PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput { - authors: [RefFieldInput] - } - - input PageModelApiName_Content_Objecting_DynamicZoneInput { - SuperNestedObject: PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput - } - - input PageModelApiName_Content_ObjectingInput { - nestedObject: PageModelApiName_Content_Objecting_NestedObjectInput - dynamicZone: PageModelApiName_Content_Objecting_DynamicZoneInput - } - - input PageModelApiName_Content_AuthorInput { - author: RefFieldInput - authors: [RefFieldInput!] - } - - input PageModelApiName_ContentInput { - Hero: PageModelApiName_Content_HeroInput - SimpleText: PageModelApiName_Content_SimpleTextInput - Objecting: PageModelApiName_Content_ObjectingInput - Author: PageModelApiName_Content_AuthorInput - } - - input PageModelApiName_Header_TextHeaderInput { - title: String - } - - input PageModelApiName_Header_ImageHeaderInput { - title: String - image: String - } - - input PageModelApiName_HeaderInput { - TextHeader: PageModelApiName_Header_TextHeaderInput - ImageHeader: PageModelApiName_Header_ImageHeaderInput - } - - input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput { - nestedObjectNestedTitle: String - } - - input PageModelApiName_Objective_Objecting_NestedObjectInput { - objectTitle: String - objectBody: JSON - objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput!] - } - - input PageModelApiName_Objective_ObjectingInput { - nestedObject: PageModelApiName_Objective_Objecting_NestedObjectInput - } - - input PageModelApiName_ObjectiveInput { - Objecting: PageModelApiName_Objective_ObjectingInput - } - - input PageModelApiName_Reference_AuthorInput { - author: RefFieldInput - } - - input PageModelApiName_ReferenceInput { - Author: PageModelApiName_Reference_AuthorInput - } - - input PageModelApiName_References1_AuthorsInput { - authors: [RefFieldInput] - } - - input PageModelApiName_References1Input { - Authors: PageModelApiName_References1_AuthorsInput - } - - input PageModelApiName_References2_AuthorInput { - author: RefFieldInput - } - - input PageModelApiName_References2Input { - Author: PageModelApiName_References2_AuthorInput - } - - input PageModelApiName_GhostObjectInput { - _empty: String - } - - input PageModelApiNameInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - content: [PageModelApiName_ContentInput] - header: PageModelApiName_HeaderInput - objective: PageModelApiName_ObjectiveInput - reference: PageModelApiName_ReferenceInput - references1: PageModelApiName_References1Input - references2: [PageModelApiName_References2Input] - ghostObject: PageModelApiName_GhostObjectInput - } - - input PageModelApiNameGetWhereInput { - id: ID - entryId: String - } - - input PageModelApiNameListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - ghostObject: PageModelApiName_GhostObjectWhereInput - AND: [PageModelApiNameListWhereInput!] - OR: [PageModelApiNameListWhereInput!] - } - - type PageModelApiNameResponse { - data: PageModelApiName - error: CmsError - } - - type PageModelApiNameMoveResponse { - data: Boolean - error: CmsError - } - - type PageModelApiNameArrayResponse { - data: [PageModelApiName] - error: CmsError - } - - type PageModelApiNameListResponse { - data: [PageModelApiName] - meta: CmsListMeta - error: CmsError - } - - enum PageModelApiNameListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - } - - extend type Query { - getPageModelApiName( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): PageModelApiNameResponse - - getPageModelApiNameRevisions(id: ID!): PageModelApiNameArrayResponse - - getPagesModelApiNameByIds(revisions: [ID!]!): PageModelApiNameArrayResponse - - listPagesModelApiName( - where: PageModelApiNameListWhereInput - sort: [PageModelApiNameListSorter] - limit: Int - after: String - search: String - ): PageModelApiNameListResponse - } - - extend type Mutation { - createPageModelApiName( - data: PageModelApiNameInput! - options: CreateCmsEntryOptionsInput - ): PageModelApiNameResponse - - createPageModelApiNameFrom( - revision: ID! - data: PageModelApiNameInput - options: CreateRevisionCmsEntryOptionsInput - ): PageModelApiNameResponse - - updatePageModelApiName( - revision: ID! - data: PageModelApiNameInput! - options: UpdateCmsEntryOptionsInput - ): PageModelApiNameResponse - - validatePageModelApiName( - revision: ID - data: PageModelApiNameInput! - ): CmsEntryValidationResponse! - - movePageModelApiName(revision: ID!, folderId: ID!): PageModelApiNameMoveResponse - - deletePageModelApiName(revision: ID!, options: CmsDeleteEntryOptions): CmsDeleteResponse - - deleteMultiplePagesModelApiName(entries: [ID!]!): CmsDeleteMultipleResponse! - - publishPageModelApiName(revision: ID!): PageModelApiNameResponse - - republishPageModelApiName(revision: ID!): PageModelApiNameResponse - - unpublishPageModelApiName(revision: ID!): PageModelApiNameResponse - } +export default /* GraphQL */ `""" +Page +""" +type PageModelApiName { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) + + meta: PageModelApiNameMeta + content: [PageModelApiName_Content!] + header: PageModelApiName_Header + objective: PageModelApiName_Objective + reference: PageModelApiName_Reference + references1: PageModelApiName_References1 + references2: [PageModelApiName_References2!] + ghostObject: PageModelApiName_GhostObject + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation +} + +type PageModelApiNameMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [PageModelApiName!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON +} + +union PageModelApiName_Content = + PageModelApiName_Content_Hero + | PageModelApiName_Content_SimpleText + | PageModelApiName_Content_Objecting + | PageModelApiName_Content_Author + +type PageModelApiName_Content_Hero { + title: String +} + +type PageModelApiName_Content_SimpleText { + text: String +} + +type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String +} + +input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String +} + +type PageModelApiName_Content_Objecting_NestedObject { + objectTitle: String + objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] +} + +input PageModelApiName_Content_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput +} + +union PageModelApiName_Content_Objecting_DynamicZone = + PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject + +type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { + authors: [RefField!] +} + +extend type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { + _templateId: ID! +} + +type PageModelApiName_Content_Objecting { + nestedObject: PageModelApiName_Content_Objecting_NestedObject + dynamicZone: PageModelApiName_Content_Objecting_DynamicZone +} + +type PageModelApiName_Content_Author { + author: RefField + authors: [RefField!] +} + +extend type PageModelApiName_Content_Hero { + _templateId: ID! +} + +extend type PageModelApiName_Content_SimpleText { + _templateId: ID! +} + +extend type PageModelApiName_Content_Objecting { + _templateId: ID! +} + +extend type PageModelApiName_Content_Author { + _templateId: ID! +} + +union PageModelApiName_Header = + PageModelApiName_Header_TextHeader + | PageModelApiName_Header_ImageHeader + +type PageModelApiName_Header_TextHeader { + title: String +} + +type PageModelApiName_Header_ImageHeader { + title: String + image: String +} + +extend type PageModelApiName_Header_TextHeader { + _templateId: ID! +} + +extend type PageModelApiName_Header_ImageHeader { + _templateId: ID! +} + +union PageModelApiName_Objective = PageModelApiName_Objective_Objecting + +type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String +} + +input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String +} + +type PageModelApiName_Objective_Objecting_NestedObject { + objectTitle: String + objectBody: JSON + objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] +} + +input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput +} + +type PageModelApiName_Objective_Objecting { + nestedObject: PageModelApiName_Objective_Objecting_NestedObject +} + +extend type PageModelApiName_Objective_Objecting { + _templateId: ID! +} + +union PageModelApiName_Reference = PageModelApiName_Reference_Author + +type PageModelApiName_Reference_Author { + author: RefField +} + +extend type PageModelApiName_Reference_Author { + _templateId: ID! +} + +union PageModelApiName_References1 = PageModelApiName_References1_Authors + +type PageModelApiName_References1_Authors { + authors: [RefField!] +} + +extend type PageModelApiName_References1_Authors { + _templateId: ID! +} + +union PageModelApiName_References2 = PageModelApiName_References2_Author + +type PageModelApiName_References2_Author { + author: RefField +} + +extend type PageModelApiName_References2_Author { + _templateId: ID! +} + +type PageModelApiName_GhostObject { + _empty: String +} + +input PageModelApiName_GhostObjectWhereInput { + _empty: String +} + +input PageModelApiName_Content_HeroInput { + title: String +} + +input PageModelApiName_Content_SimpleTextInput { + text: String +} + +input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput { + nestedObjectNestedTitle: String +} + +input PageModelApiName_Content_Objecting_NestedObjectInput { + objectTitle: String + objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput!] +} + +input PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput { + authors: [RefFieldInput] +} + +input PageModelApiName_Content_Objecting_DynamicZoneInput { + SuperNestedObject: PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput +} + +input PageModelApiName_Content_ObjectingInput { + nestedObject: PageModelApiName_Content_Objecting_NestedObjectInput + dynamicZone: PageModelApiName_Content_Objecting_DynamicZoneInput +} + +input PageModelApiName_Content_AuthorInput { + author: RefFieldInput + authors: [RefFieldInput!] +} + +input PageModelApiName_ContentInput { + Hero: PageModelApiName_Content_HeroInput + SimpleText: PageModelApiName_Content_SimpleTextInput + Objecting: PageModelApiName_Content_ObjectingInput + Author: PageModelApiName_Content_AuthorInput +} + +input PageModelApiName_Header_TextHeaderInput { + title: String +} + +input PageModelApiName_Header_ImageHeaderInput { + title: String + image: String +} + +input PageModelApiName_HeaderInput { + TextHeader: PageModelApiName_Header_TextHeaderInput + ImageHeader: PageModelApiName_Header_ImageHeaderInput +} + +input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput { + nestedObjectNestedTitle: String +} + +input PageModelApiName_Objective_Objecting_NestedObjectInput { + objectTitle: String + objectBody: JSON + objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput!] +} + +input PageModelApiName_Objective_ObjectingInput { + nestedObject: PageModelApiName_Objective_Objecting_NestedObjectInput +} + +input PageModelApiName_ObjectiveInput { + Objecting: PageModelApiName_Objective_ObjectingInput +} + +input PageModelApiName_Reference_AuthorInput { + author: RefFieldInput +} + +input PageModelApiName_ReferenceInput { + Author: PageModelApiName_Reference_AuthorInput +} + +input PageModelApiName_References1_AuthorsInput { + authors: [RefFieldInput] +} + +input PageModelApiName_References1Input { + Authors: PageModelApiName_References1_AuthorsInput +} + +input PageModelApiName_References2_AuthorInput { + author: RefFieldInput +} + +input PageModelApiName_References2Input { + Author: PageModelApiName_References2_AuthorInput +} + +input PageModelApiName_GhostObjectInput { + _empty: String +} + +input PageModelApiNameInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + content: [PageModelApiName_ContentInput] + header: PageModelApiName_HeaderInput + objective: PageModelApiName_ObjectiveInput + reference: PageModelApiName_ReferenceInput + references1: PageModelApiName_References1Input + references2: [PageModelApiName_References2Input] + ghostObject: PageModelApiName_GhostObjectInput +} + +input PageModelApiNameGetWhereInput { + id: ID + entryId: String +} + +input PageModelApiNameListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + ghostObject: PageModelApiName_GhostObjectWhereInput + AND: [PageModelApiNameListWhereInput!] + OR: [PageModelApiNameListWhereInput!] +} + +type PageModelApiNameResponse { + data: PageModelApiName + error: CmsError +} + +type PageModelApiNameMoveResponse { + data: Boolean + error: CmsError +} + +type PageModelApiNameArrayResponse { + data: [PageModelApiName] + error: CmsError +} + +type PageModelApiNameListResponse { + data: [PageModelApiName] + meta: CmsListMeta + error: CmsError +} + +enum PageModelApiNameListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC +} + +extend type Query { + getPageModelApiName( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): PageModelApiNameResponse + + getPageModelApiNameRevisions(id: ID!): PageModelApiNameArrayResponse + + getPagesModelApiNameByIds(revisions: [ID!]!): PageModelApiNameArrayResponse + + listPagesModelApiName( + where: PageModelApiNameListWhereInput + sort: [PageModelApiNameListSorter] + limit: Int + after: String + search: String + ): PageModelApiNameListResponse +} + +extend type Mutation { + createPageModelApiName( + data: PageModelApiNameInput! + options: CreateCmsEntryOptionsInput + ): PageModelApiNameResponse + + createPageModelApiNameFrom( + revision: ID! + data: PageModelApiNameInput + options: CreateRevisionCmsEntryOptionsInput + ): PageModelApiNameResponse + + updatePageModelApiName( + revision: ID! + data: PageModelApiNameInput! + options: UpdateCmsEntryOptionsInput + ): PageModelApiNameResponse + + validatePageModelApiName( + revision: ID + data: PageModelApiNameInput! + ): CmsEntryValidationResponse! + + movePageModelApiName( + revision: ID! + folderId: ID! + ): PageModelApiNameMoveResponse + + deletePageModelApiName( + revision: ID! + options: CmsDeleteEntryOptions + ): CmsDeleteResponse + + deleteMultiplePagesModelApiName(entries: [ID!]!): CmsDeleteMultipleResponse! + + publishPageModelApiName(revision: ID!): PageModelApiNameResponse + + republishPageModelApiName(revision: ID!): PageModelApiNameResponse + + unpublishPageModelApiName(revision: ID!): PageModelApiNameResponse +} `; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts index 076f8eb527f..40e17fc53b4 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts @@ -1,359 +1,368 @@ -export default /* GraphQL */ ` - """ - Page - """ - type PageModelApiName { - id: ID! - entryId: String! - modelId: String! - - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - content: [PageModelApiName_Content!] - header: PageModelApiName_Header - objective: PageModelApiName_Objective - reference: PageModelApiName_Reference - references1: PageModelApiName_References1 - references2: [PageModelApiName_References2!] - ghostObject: PageModelApiName_GhostObject - } - - union PageModelApiName_Content = - PageModelApiName_Content_Hero - | PageModelApiName_Content_SimpleText - | PageModelApiName_Content_Objecting - | PageModelApiName_Content_Author - - type PageModelApiName_Content_Hero { - title: String - } - - type PageModelApiName_Content_SimpleText { - text: String - } - - type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String - } - - input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String - } - - type PageModelApiName_Content_Objecting_NestedObject { - objectTitle: String - objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] - } - - input PageModelApiName_Content_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput - } - - union PageModelApiName_Content_Objecting_DynamicZone = - PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject - - type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { - authors(populate: Boolean = true): [AuthorApiModel!] - } - - type PageModelApiName_Content_Objecting { - nestedObject: PageModelApiName_Content_Objecting_NestedObject - dynamicZone: PageModelApiName_Content_Objecting_DynamicZone - } - - type PageModelApiName_Content_Author { - author(populate: Boolean = true): AuthorApiModel - authors(populate: Boolean = true): [AuthorApiModel!] - } - - union PageModelApiName_Header = - PageModelApiName_Header_TextHeader - | PageModelApiName_Header_ImageHeader - - type PageModelApiName_Header_TextHeader { - title: String - } - - type PageModelApiName_Header_ImageHeader { - title: String - image: String - } - - union PageModelApiName_Objective = PageModelApiName_Objective_Objecting - - type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String - } - - input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String - } - - type PageModelApiName_Objective_Objecting_NestedObject { - objectTitle: String - objectBody(format: String): JSON - objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] - } - - input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput - } - - type PageModelApiName_Objective_Objecting { - nestedObject: PageModelApiName_Objective_Objecting_NestedObject - } - - union PageModelApiName_Reference = PageModelApiName_Reference_Author - - type PageModelApiName_Reference_Author { - author(populate: Boolean = true): AuthorApiModel - } - - union PageModelApiName_References1 = PageModelApiName_References1_Authors - - type PageModelApiName_References1_Authors { - authors(populate: Boolean = true): [AuthorApiModel!] - } - - union PageModelApiName_References2 = PageModelApiName_References2_Author - - type PageModelApiName_References2_Author { - author(populate: Boolean = true): AuthorApiModel - } - - type PageModelApiName_GhostObject { - _empty: String - } - - input PageModelApiName_GhostObjectWhereInput { - _empty: String - } - - input PageModelApiNameGetWhereInput { - id: ID - entryId: String - } - - input PageModelApiNameListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - ghostObject: PageModelApiName_GhostObjectWhereInput - AND: [PageModelApiNameListWhereInput!] - OR: [PageModelApiNameListWhereInput!] - } - - enum PageModelApiNameListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - } - - type PageModelApiNameResponse { - data: PageModelApiName - error: CmsError - } - - type PageModelApiNameListResponse { - data: [PageModelApiName] - meta: CmsListMeta - error: CmsError - } - - extend type Query { - getPageModelApiName(where: PageModelApiNameGetWhereInput!): PageModelApiNameResponse - - listPagesModelApiName( - where: PageModelApiNameListWhereInput - sort: [PageModelApiNameListSorter] - limit: Int - after: String - search: String - ): PageModelApiNameListResponse - } -`; +export default /* GraphQL */ `""" +Page +""" +type PageModelApiName { + id: ID! + entryId: String! + modelId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) + + content: [PageModelApiName_Content!] + header: PageModelApiName_Header + objective: PageModelApiName_Objective + reference: PageModelApiName_Reference + references1: PageModelApiName_References1 + references2: [PageModelApiName_References2!] + ghostObject: PageModelApiName_GhostObject +} + +union PageModelApiName_Content = + PageModelApiName_Content_Hero + | PageModelApiName_Content_SimpleText + | PageModelApiName_Content_Objecting + | PageModelApiName_Content_Author + +type PageModelApiName_Content_Hero { + title: String +} + +type PageModelApiName_Content_SimpleText { + text: String +} + +type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String +} + +input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String +} + +type PageModelApiName_Content_Objecting_NestedObject { + objectTitle: String + objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] +} + +input PageModelApiName_Content_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput +} + +union PageModelApiName_Content_Objecting_DynamicZone = + PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject + +type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { + authors(populate: Boolean = true): [AuthorApiModel!] +} + +type PageModelApiName_Content_Objecting { + nestedObject: PageModelApiName_Content_Objecting_NestedObject + dynamicZone: PageModelApiName_Content_Objecting_DynamicZone +} + +type PageModelApiName_Content_Author { + author(populate: Boolean = true): AuthorApiModel + authors(populate: Boolean = true): [AuthorApiModel!] +} + +union PageModelApiName_Header = + PageModelApiName_Header_TextHeader + | PageModelApiName_Header_ImageHeader + +type PageModelApiName_Header_TextHeader { + title: String +} + +type PageModelApiName_Header_ImageHeader { + title: String + image: String +} + +union PageModelApiName_Objective = PageModelApiName_Objective_Objecting + +type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String +} + +input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String +} + +type PageModelApiName_Objective_Objecting_NestedObject { + objectTitle: String + objectBody(format: String): JSON + objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] +} + +input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput +} + +type PageModelApiName_Objective_Objecting { + nestedObject: PageModelApiName_Objective_Objecting_NestedObject +} + +union PageModelApiName_Reference = PageModelApiName_Reference_Author + +type PageModelApiName_Reference_Author { + author(populate: Boolean = true): AuthorApiModel +} + +union PageModelApiName_References1 = PageModelApiName_References1_Authors + +type PageModelApiName_References1_Authors { + authors(populate: Boolean = true): [AuthorApiModel!] +} + +union PageModelApiName_References2 = PageModelApiName_References2_Author + +type PageModelApiName_References2_Author { + author(populate: Boolean = true): AuthorApiModel +} + +type PageModelApiName_GhostObject { + _empty: String +} + +input PageModelApiName_GhostObjectWhereInput { + _empty: String +} + +input PageModelApiNameGetWhereInput { + id: ID + entryId: String +} + +input PageModelApiNameListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + ghostObject: PageModelApiName_GhostObjectWhereInput + AND: [PageModelApiNameListWhereInput!] + OR: [PageModelApiNameListWhereInput!] +} + +enum PageModelApiNameListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC +} + +type PageModelApiNameResponse { + data: PageModelApiName + error: CmsError +} + +type PageModelApiNameListResponse { + data: [PageModelApiName] + meta: CmsListMeta + error: CmsError +} + +extend type Query { + getPageModelApiName( + where: PageModelApiNameGetWhereInput! + ): PageModelApiNameResponse + + listPagesModelApiName( + where: PageModelApiNameListWhereInput + sort: [PageModelApiNameListSorter] + limit: Int + after: String + search: String + ): PageModelApiNameListResponse +}`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts index 1723f40791f..41ff21488b7 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts @@ -1,547 +1,564 @@ -export default /* GraphQL */ ` - """ - Products being sold in our webshop - """ - type ProductApiSingular { - id: ID! - entryId: String! - - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - meta: ProductApiSingularMeta - title: String - category: RefField - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: [String] - image: String - richText: JSON - variant: ProductApiSingular_Variant - fieldsObject: ProductApiSingular_FieldsObject - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation - } - - type ProductApiSingularMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [ProductApiSingular!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON - } - - type ProductApiSingular_Variant_Options { - name: String - price: Number - image: String - category: RefField - categories: [RefField!] - longText: [String] - } - - input ProductApiSingular_Variant_OptionsWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - categories: RefFieldWhereInput - - longText_contains: String - longText_not_contains: String - } - - type ProductApiSingular_Variant { - name: String - price: Number - images: [String] - category: RefField - options: [ProductApiSingular_Variant_Options!] - } - - input ProductApiSingular_VariantWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - options: ProductApiSingular_Variant_OptionsWhereInput - } - - type ProductApiSingular_FieldsObject { - text: String - } - - input ProductApiSingular_FieldsObjectWhereInput { - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String - } - - input ProductApiSingular_Variant_OptionsInput { - name: String - price: Number - image: String - category: RefFieldInput - categories: [RefFieldInput] - longText: [String] - } - - input ProductApiSingular_VariantInput { - name: String - price: Number - images: [String] - category: RefFieldInput - options: [ProductApiSingular_Variant_OptionsInput!] - } - - input ProductApiSingular_FieldsObjectInput { - text: String - } - - input ProductApiSingularInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - title: String - category: RefFieldInput - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: [String!] - image: String - richText: JSON - variant: ProductApiSingular_VariantInput - fieldsObject: ProductApiSingular_FieldsObjectInput - } - - input ProductApiSingularGetWhereInput { - id: ID - entryId: String - title: String - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: String - } - - input ProductApiSingularListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String - - category: RefFieldWhereInput - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - inStock: Boolean - inStock_not: Boolean - - itemsInStock: Number - itemsInStock_not: Number - itemsInStock_in: [Number] - itemsInStock_not_in: [Number] - itemsInStock_lt: Number - itemsInStock_lte: Number - itemsInStock_gt: Number - itemsInStock_gte: Number - # there must be two numbers sent in the array - itemsInStock_between: [Number!] - # there must be two numbers sent in the array - itemsInStock_not_between: [Number!] - - availableOn: Date - availableOn_not: Date - availableOn_in: [Date] - availableOn_not_in: [Date] - availableOn_lt: Date - availableOn_lte: Date - availableOn_gt: Date - availableOn_gte: Date - - color: String - color_not: String - color_in: [String] - color_not_in: [String] - color_contains: String - color_not_contains: String - color_startsWith: String - color_not_startsWith: String - - availableSizes: String - availableSizes_not: String - availableSizes_in: [String] - availableSizes_not_in: [String] - availableSizes_contains: String - availableSizes_not_contains: String - availableSizes_startsWith: String - availableSizes_not_startsWith: String - - variant: ProductApiSingular_VariantWhereInput - fieldsObject: ProductApiSingular_FieldsObjectWhereInput - AND: [ProductApiSingularListWhereInput!] - OR: [ProductApiSingularListWhereInput!] - } - - type ProductApiSingularResponse { - data: ProductApiSingular - error: CmsError - } - - type ProductApiSingularMoveResponse { - data: Boolean - error: CmsError - } - - type ProductApiSingularArrayResponse { - data: [ProductApiSingular] - error: CmsError - } - - type ProductApiSingularListResponse { - data: [ProductApiSingular] - meta: CmsListMeta - error: CmsError - } - - enum ProductApiSingularListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - price_ASC - price_DESC - inStock_ASC - inStock_DESC - itemsInStock_ASC - itemsInStock_DESC - availableOn_ASC - availableOn_DESC - color_ASC - color_DESC - availableSizes_ASC - availableSizes_DESC - } - - extend type Query { - getProductApiSingular( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): ProductApiSingularResponse - - getProductApiSingularRevisions(id: ID!): ProductApiSingularArrayResponse - - getProductPluralApiNameByIds(revisions: [ID!]!): ProductApiSingularArrayResponse - - listProductPluralApiName( - where: ProductApiSingularListWhereInput - sort: [ProductApiSingularListSorter] - limit: Int - after: String - search: String - ): ProductApiSingularListResponse - } - - extend type Mutation { - createProductApiSingular( - data: ProductApiSingularInput! - options: CreateCmsEntryOptionsInput - ): ProductApiSingularResponse - - createProductApiSingularFrom( - revision: ID! - data: ProductApiSingularInput - options: CreateRevisionCmsEntryOptionsInput - ): ProductApiSingularResponse - - updateProductApiSingular( - revision: ID! - data: ProductApiSingularInput! - options: UpdateCmsEntryOptionsInput - ): ProductApiSingularResponse - - validateProductApiSingular( - revision: ID - data: ProductApiSingularInput! - ): CmsEntryValidationResponse! - - moveProductApiSingular(revision: ID!, folderId: ID!): ProductApiSingularMoveResponse - - deleteProductApiSingular(revision: ID!, options: CmsDeleteEntryOptions): CmsDeleteResponse - - deleteMultipleProductPluralApiName(entries: [ID!]!): CmsDeleteMultipleResponse! - - publishProductApiSingular(revision: ID!): ProductApiSingularResponse - - republishProductApiSingular(revision: ID!): ProductApiSingularResponse - - unpublishProductApiSingular(revision: ID!): ProductApiSingularResponse - } -`; +export default /* GraphQL */ `""" +Products being sold in our webshop +""" +type ProductApiSingular { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) + + meta: ProductApiSingularMeta + title: String + category: RefField + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: [String] + image: String + richText: JSON + variant: ProductApiSingular_Variant + fieldsObject: ProductApiSingular_FieldsObject + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation +} + +type ProductApiSingularMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [ProductApiSingular!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON +} + +type ProductApiSingular_Variant_Options { + name: String + price: Number + image: String + category: RefField + categories: [RefField!] + longText: [String] +} + +input ProductApiSingular_Variant_OptionsWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + categories: RefFieldWhereInput + + longText_contains: String + longText_not_contains: String +} + +type ProductApiSingular_Variant { + name: String + price: Number + images: [String] + category: RefField + options: [ProductApiSingular_Variant_Options!] +} + +input ProductApiSingular_VariantWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + options: ProductApiSingular_Variant_OptionsWhereInput +} + +type ProductApiSingular_FieldsObject { + text: String +} + +input ProductApiSingular_FieldsObjectWhereInput { + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String +} + +input ProductApiSingular_Variant_OptionsInput { + name: String + price: Number + image: String + category: RefFieldInput + categories: [RefFieldInput] + longText: [String] +} + +input ProductApiSingular_VariantInput { + name: String + price: Number + images: [String] + category: RefFieldInput + options: [ProductApiSingular_Variant_OptionsInput!] +} + +input ProductApiSingular_FieldsObjectInput { + text: String +} + +input ProductApiSingularInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + title: String + category: RefFieldInput + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: [String!] + image: String + richText: JSON + variant: ProductApiSingular_VariantInput + fieldsObject: ProductApiSingular_FieldsObjectInput +} + +input ProductApiSingularGetWhereInput { + id: ID + entryId: String + title: String + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: String +} + +input ProductApiSingularListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String + + category: RefFieldWhereInput + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + inStock: Boolean + inStock_not: Boolean + + itemsInStock: Number + itemsInStock_not: Number + itemsInStock_in: [Number] + itemsInStock_not_in: [Number] + itemsInStock_lt: Number + itemsInStock_lte: Number + itemsInStock_gt: Number + itemsInStock_gte: Number + # there must be two numbers sent in the array + itemsInStock_between: [Number!] + # there must be two numbers sent in the array + itemsInStock_not_between: [Number!] + + availableOn: Date + availableOn_not: Date + availableOn_in: [Date] + availableOn_not_in: [Date] + availableOn_lt: Date + availableOn_lte: Date + availableOn_gt: Date + availableOn_gte: Date + + color: String + color_not: String + color_in: [String] + color_not_in: [String] + color_contains: String + color_not_contains: String + color_startsWith: String + color_not_startsWith: String + + availableSizes: String + availableSizes_not: String + availableSizes_in: [String] + availableSizes_not_in: [String] + availableSizes_contains: String + availableSizes_not_contains: String + availableSizes_startsWith: String + availableSizes_not_startsWith: String + + variant: ProductApiSingular_VariantWhereInput + fieldsObject: ProductApiSingular_FieldsObjectWhereInput + AND: [ProductApiSingularListWhereInput!] + OR: [ProductApiSingularListWhereInput!] +} + +type ProductApiSingularResponse { + data: ProductApiSingular + error: CmsError +} + +type ProductApiSingularMoveResponse { + data: Boolean + error: CmsError +} + +type ProductApiSingularArrayResponse { + data: [ProductApiSingular] + error: CmsError +} + +type ProductApiSingularListResponse { + data: [ProductApiSingular] + meta: CmsListMeta + error: CmsError +} + +enum ProductApiSingularListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + price_ASC + price_DESC + inStock_ASC + inStock_DESC + itemsInStock_ASC + itemsInStock_DESC + availableOn_ASC + availableOn_DESC + color_ASC + color_DESC + availableSizes_ASC + availableSizes_DESC +} + +extend type Query { + getProductApiSingular( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): ProductApiSingularResponse + + getProductApiSingularRevisions(id: ID!): ProductApiSingularArrayResponse + + getProductPluralApiNameByIds( + revisions: [ID!]! + ): ProductApiSingularArrayResponse + + listProductPluralApiName( + where: ProductApiSingularListWhereInput + sort: [ProductApiSingularListSorter] + limit: Int + after: String + search: String + ): ProductApiSingularListResponse +} + +extend type Mutation { + createProductApiSingular( + data: ProductApiSingularInput! + options: CreateCmsEntryOptionsInput + ): ProductApiSingularResponse + + createProductApiSingularFrom( + revision: ID! + data: ProductApiSingularInput + options: CreateRevisionCmsEntryOptionsInput + ): ProductApiSingularResponse + + updateProductApiSingular( + revision: ID! + data: ProductApiSingularInput! + options: UpdateCmsEntryOptionsInput + ): ProductApiSingularResponse + + validateProductApiSingular( + revision: ID + data: ProductApiSingularInput! + ): CmsEntryValidationResponse! + + moveProductApiSingular( + revision: ID! + folderId: ID! + ): ProductApiSingularMoveResponse + + deleteProductApiSingular( + revision: ID! + options: CmsDeleteEntryOptions + ): CmsDeleteResponse + + deleteMultipleProductPluralApiName( + entries: [ID!]! + ): CmsDeleteMultipleResponse! + + publishProductApiSingular(revision: ID!): ProductApiSingularResponse + + republishProductApiSingular(revision: ID!): ProductApiSingularResponse + + unpublishProductApiSingular(revision: ID!): ProductApiSingularResponse +}`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts index 1d5de91a282..6162267808a 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts @@ -1,402 +1,419 @@ -export default /* GraphQL */ ` - """ - Products being sold in our webshop - """ - type ProductApiSingular { - id: ID! - entryId: String! - modelId: String! - - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - title: String - category(populate: Boolean = true): CategoryApiNameWhichIsABitDifferentThanModelId - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: [String] - image: String - richText(format: String): JSON - variant: ProductApiSingular_Variant - fieldsObject: ProductApiSingular_FieldsObject - } - - type ProductApiSingular_Variant_Options { - name: String - price: Number - image: String - category(populate: Boolean = true): CategoryApiNameWhichIsABitDifferentThanModelId - categories(populate: Boolean = true): [CategoryApiNameWhichIsABitDifferentThanModelId!] - longText: [String] - } - - input ProductApiSingular_Variant_OptionsWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - categories: RefFieldWhereInput - - longText_contains: String - longText_not_contains: String - } - - type ProductApiSingular_Variant { - name: String - price: Number - images: [String] - category(populate: Boolean = true): CategoryApiNameWhichIsABitDifferentThanModelId - options: [ProductApiSingular_Variant_Options!] - } - - input ProductApiSingular_VariantWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - options: ProductApiSingular_Variant_OptionsWhereInput - } - - type ProductApiSingular_FieldsObject { - text: String - } - - input ProductApiSingular_FieldsObjectWhereInput { - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String - } - - input ProductApiSingularGetWhereInput { - id: ID - entryId: String - title: String - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: String - } - - input ProductApiSingularListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String - - category: RefFieldWhereInput - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - inStock: Boolean - inStock_not: Boolean - - itemsInStock: Number - itemsInStock_not: Number - itemsInStock_in: [Number] - itemsInStock_not_in: [Number] - itemsInStock_lt: Number - itemsInStock_lte: Number - itemsInStock_gt: Number - itemsInStock_gte: Number - # there must be two numbers sent in the array - itemsInStock_between: [Number!] - # there must be two numbers sent in the array - itemsInStock_not_between: [Number!] - - availableOn: Date - availableOn_not: Date - availableOn_in: [Date] - availableOn_not_in: [Date] - availableOn_lt: Date - availableOn_lte: Date - availableOn_gt: Date - availableOn_gte: Date - - color: String - color_not: String - color_in: [String] - color_not_in: [String] - color_contains: String - color_not_contains: String - color_startsWith: String - color_not_startsWith: String - - availableSizes: String - availableSizes_not: String - availableSizes_in: [String] - availableSizes_not_in: [String] - availableSizes_contains: String - availableSizes_not_contains: String - availableSizes_startsWith: String - availableSizes_not_startsWith: String - - variant: ProductApiSingular_VariantWhereInput - fieldsObject: ProductApiSingular_FieldsObjectWhereInput - AND: [ProductApiSingularListWhereInput!] - OR: [ProductApiSingularListWhereInput!] - } - - enum ProductApiSingularListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - price_ASC - price_DESC - inStock_ASC - inStock_DESC - itemsInStock_ASC - itemsInStock_DESC - availableOn_ASC - availableOn_DESC - color_ASC - color_DESC - availableSizes_ASC - availableSizes_DESC - } - - type ProductApiSingularResponse { - data: ProductApiSingular - error: CmsError - } - - type ProductApiSingularListResponse { - data: [ProductApiSingular] - meta: CmsListMeta - error: CmsError - } - - extend type Query { - getProductApiSingular(where: ProductApiSingularGetWhereInput!): ProductApiSingularResponse - - listProductPluralApiName( - where: ProductApiSingularListWhereInput - sort: [ProductApiSingularListSorter] - limit: Int - after: String - search: String - ): ProductApiSingularListResponse - } -`; +export default /* GraphQL */ `""" +Products being sold in our webshop +""" +type ProductApiSingular { + id: ID! + entryId: String! + modelId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) + + title: String + category( + populate: Boolean = true + ): CategoryApiNameWhichIsABitDifferentThanModelId + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: [String] + image: String + richText(format: String): JSON + variant: ProductApiSingular_Variant + fieldsObject: ProductApiSingular_FieldsObject +} + +type ProductApiSingular_Variant_Options { + name: String + price: Number + image: String + category( + populate: Boolean = true + ): CategoryApiNameWhichIsABitDifferentThanModelId + categories( + populate: Boolean = true + ): [CategoryApiNameWhichIsABitDifferentThanModelId!] + longText: [String] +} + +input ProductApiSingular_Variant_OptionsWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + categories: RefFieldWhereInput + + longText_contains: String + longText_not_contains: String +} + +type ProductApiSingular_Variant { + name: String + price: Number + images: [String] + category( + populate: Boolean = true + ): CategoryApiNameWhichIsABitDifferentThanModelId + options: [ProductApiSingular_Variant_Options!] +} + +input ProductApiSingular_VariantWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + options: ProductApiSingular_Variant_OptionsWhereInput +} + +type ProductApiSingular_FieldsObject { + text: String +} + +input ProductApiSingular_FieldsObjectWhereInput { + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String +} + +input ProductApiSingularGetWhereInput { + id: ID + entryId: String + title: String + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: String +} + +input ProductApiSingularListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String + + category: RefFieldWhereInput + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + inStock: Boolean + inStock_not: Boolean + + itemsInStock: Number + itemsInStock_not: Number + itemsInStock_in: [Number] + itemsInStock_not_in: [Number] + itemsInStock_lt: Number + itemsInStock_lte: Number + itemsInStock_gt: Number + itemsInStock_gte: Number + # there must be two numbers sent in the array + itemsInStock_between: [Number!] + # there must be two numbers sent in the array + itemsInStock_not_between: [Number!] + + availableOn: Date + availableOn_not: Date + availableOn_in: [Date] + availableOn_not_in: [Date] + availableOn_lt: Date + availableOn_lte: Date + availableOn_gt: Date + availableOn_gte: Date + + color: String + color_not: String + color_in: [String] + color_not_in: [String] + color_contains: String + color_not_contains: String + color_startsWith: String + color_not_startsWith: String + + availableSizes: String + availableSizes_not: String + availableSizes_in: [String] + availableSizes_not_in: [String] + availableSizes_contains: String + availableSizes_not_contains: String + availableSizes_startsWith: String + availableSizes_not_startsWith: String + + variant: ProductApiSingular_VariantWhereInput + fieldsObject: ProductApiSingular_FieldsObjectWhereInput + AND: [ProductApiSingularListWhereInput!] + OR: [ProductApiSingularListWhereInput!] +} + +enum ProductApiSingularListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + price_ASC + price_DESC + inStock_ASC + inStock_DESC + itemsInStock_ASC + itemsInStock_DESC + availableOn_ASC + availableOn_DESC + color_ASC + color_DESC + availableSizes_ASC + availableSizes_DESC +} + +type ProductApiSingularResponse { + data: ProductApiSingular + error: CmsError +} + +type ProductApiSingularListResponse { + data: [ProductApiSingular] + meta: CmsListMeta + error: CmsError +} + +extend type Query { + getProductApiSingular( + where: ProductApiSingularGetWhereInput! + ): ProductApiSingularResponse + + listProductPluralApiName( + where: ProductApiSingularListWhereInput + sort: [ProductApiSingularListSorter] + limit: Int + after: String + search: String + ): ProductApiSingularListResponse +}`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts index a608d0bdff7..ae4607acc1f 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts @@ -1,361 +1,372 @@ -export default /* GraphQL */ ` - """ - Product review - """ - type ReviewApiModel { - id: ID! - entryId: String! - - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - meta: ReviewApiModelMeta - text: String - product: RefField - rating: Number - author: RefField - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation - } - - type ReviewApiModelMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [ReviewApiModel!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON - } - - input ReviewApiModelInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - text: String - product: RefFieldInput - rating: Number - author: RefFieldInput - } - - input ReviewApiModelGetWhereInput { - id: ID - entryId: String - text: String - rating: Number - } - - input ReviewApiModelListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String - - product: RefFieldWhereInput - - rating: Number - rating_not: Number - rating_in: [Number] - rating_not_in: [Number] - rating_lt: Number - rating_lte: Number - rating_gt: Number - rating_gte: Number - # there must be two numbers sent in the array - rating_between: [Number!] - # there must be two numbers sent in the array - rating_not_between: [Number!] - - author: RefFieldWhereInput - - AND: [ReviewApiModelListWhereInput!] - OR: [ReviewApiModelListWhereInput!] - } - - type ReviewApiModelResponse { - data: ReviewApiModel - error: CmsError - } - - type ReviewApiModelMoveResponse { - data: Boolean - error: CmsError - } - - type ReviewApiModelArrayResponse { - data: [ReviewApiModel] - error: CmsError - } - - type ReviewApiModelListResponse { - data: [ReviewApiModel] - meta: CmsListMeta - error: CmsError - } - - enum ReviewApiModelListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - text_ASC - text_DESC - rating_ASC - rating_DESC - } - - extend type Query { - getReviewApiModel( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): ReviewApiModelResponse - - getReviewApiModelRevisions(id: ID!): ReviewApiModelArrayResponse - - getReviewsApiModelByIds(revisions: [ID!]!): ReviewApiModelArrayResponse - - listReviewsApiModel( - where: ReviewApiModelListWhereInput - sort: [ReviewApiModelListSorter] - limit: Int - after: String - search: String - ): ReviewApiModelListResponse - } - - extend type Mutation { - createReviewApiModel( - data: ReviewApiModelInput! - options: CreateCmsEntryOptionsInput - ): ReviewApiModelResponse - - createReviewApiModelFrom( - revision: ID! - data: ReviewApiModelInput - options: CreateRevisionCmsEntryOptionsInput - ): ReviewApiModelResponse - - updateReviewApiModel( - revision: ID! - data: ReviewApiModelInput! - options: UpdateCmsEntryOptionsInput - ): ReviewApiModelResponse - - validateReviewApiModel( - revision: ID - data: ReviewApiModelInput! - ): CmsEntryValidationResponse! - - moveReviewApiModel(revision: ID!, folderId: ID!): ReviewApiModelMoveResponse - - deleteReviewApiModel(revision: ID!, options: CmsDeleteEntryOptions): CmsDeleteResponse - - deleteMultipleReviewsApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! - - publishReviewApiModel(revision: ID!): ReviewApiModelResponse - - republishReviewApiModel(revision: ID!): ReviewApiModelResponse - - unpublishReviewApiModel(revision: ID!): ReviewApiModelResponse - } +export default /* GraphQL */ `""" +Product review +""" +type ReviewApiModel { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) + + meta: ReviewApiModelMeta + text: String + product: RefField + rating: Number + author: RefField + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation +} + +type ReviewApiModelMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [ReviewApiModel!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON +} + +input ReviewApiModelInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + text: String + product: RefFieldInput + rating: Number + author: RefFieldInput +} + +input ReviewApiModelGetWhereInput { + id: ID + entryId: String + text: String + rating: Number +} + +input ReviewApiModelListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String + + product: RefFieldWhereInput + + rating: Number + rating_not: Number + rating_in: [Number] + rating_not_in: [Number] + rating_lt: Number + rating_lte: Number + rating_gt: Number + rating_gte: Number + # there must be two numbers sent in the array + rating_between: [Number!] + # there must be two numbers sent in the array + rating_not_between: [Number!] + + author: RefFieldWhereInput + + AND: [ReviewApiModelListWhereInput!] + OR: [ReviewApiModelListWhereInput!] +} + +type ReviewApiModelResponse { + data: ReviewApiModel + error: CmsError +} + +type ReviewApiModelMoveResponse { + data: Boolean + error: CmsError +} + +type ReviewApiModelArrayResponse { + data: [ReviewApiModel] + error: CmsError +} + +type ReviewApiModelListResponse { + data: [ReviewApiModel] + meta: CmsListMeta + error: CmsError +} + +enum ReviewApiModelListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + text_ASC + text_DESC + rating_ASC + rating_DESC +} + +extend type Query { + getReviewApiModel( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): ReviewApiModelResponse + + getReviewApiModelRevisions(id: ID!): ReviewApiModelArrayResponse + + getReviewsApiModelByIds(revisions: [ID!]!): ReviewApiModelArrayResponse + + listReviewsApiModel( + where: ReviewApiModelListWhereInput + sort: [ReviewApiModelListSorter] + limit: Int + after: String + search: String + ): ReviewApiModelListResponse +} + +extend type Mutation { + createReviewApiModel( + data: ReviewApiModelInput! + options: CreateCmsEntryOptionsInput + ): ReviewApiModelResponse + + createReviewApiModelFrom( + revision: ID! + data: ReviewApiModelInput + options: CreateRevisionCmsEntryOptionsInput + ): ReviewApiModelResponse + + updateReviewApiModel( + revision: ID! + data: ReviewApiModelInput! + options: UpdateCmsEntryOptionsInput + ): ReviewApiModelResponse + + validateReviewApiModel( + revision: ID + data: ReviewApiModelInput! + ): CmsEntryValidationResponse! + + moveReviewApiModel(revision: ID!, folderId: ID!): ReviewApiModelMoveResponse + + deleteReviewApiModel( + revision: ID! + options: CmsDeleteEntryOptions + ): CmsDeleteResponse + + deleteMultipleReviewsApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! + + publishReviewApiModel(revision: ID!): ReviewApiModelResponse + + republishReviewApiModel(revision: ID!): ReviewApiModelResponse + + unpublishReviewApiModel(revision: ID!): ReviewApiModelResponse +} `; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts index d194fb3c122..1c0a5490a66 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts @@ -1,245 +1,252 @@ -export default /* GraphQL */ ` - """ - Product review - """ - type ReviewApiModel { - id: ID! - entryId: String! - modelId: String! +export default /* GraphQL */ `""" +Product review +""" +type ReviewApiModel { + id: ID! + entryId: String! + modelId: String! - createdOn: DateTime! - modifiedOn: DateTime - savedOn: DateTime! - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity! - modifiedBy: CmsIdentity - savedBy: CmsIdentity! - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime! - revisionModifiedOn: DateTime - revisionSavedOn: DateTime! - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity! - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity! - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity - text: String - product(populate: Boolean = true): ProductApiSingular - rating: Number - author(populate: Boolean = true): AuthorApiModel - } + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." + ) - input ReviewApiModelGetWhereInput { - id: ID - entryId: String - text: String - rating: Number - } + text: String + product(populate: Boolean = true): ProductApiSingular + rating: Number + author(populate: Boolean = true): AuthorApiModel +} - input ReviewApiModelListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] +input ReviewApiModelGetWhereInput { + id: ID + entryId: String + text: String + rating: Number +} - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String +input ReviewApiModelListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] - product: RefFieldWhereInput + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String - rating: Number - rating_not: Number - rating_in: [Number] - rating_not_in: [Number] - rating_lt: Number - rating_lte: Number - rating_gt: Number - rating_gte: Number - # there must be two numbers sent in the array - rating_between: [Number!] - # there must be two numbers sent in the array - rating_not_between: [Number!] + product: RefFieldWhereInput - author: RefFieldWhereInput + rating: Number + rating_not: Number + rating_in: [Number] + rating_not_in: [Number] + rating_lt: Number + rating_lte: Number + rating_gt: Number + rating_gte: Number + # there must be two numbers sent in the array + rating_between: [Number!] + # there must be two numbers sent in the array + rating_not_between: [Number!] - AND: [ReviewApiModelListWhereInput!] - OR: [ReviewApiModelListWhereInput!] - } + author: RefFieldWhereInput - enum ReviewApiModelListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - text_ASC - text_DESC - rating_ASC - rating_DESC - } + AND: [ReviewApiModelListWhereInput!] + OR: [ReviewApiModelListWhereInput!] +} - type ReviewApiModelResponse { - data: ReviewApiModel - error: CmsError - } +enum ReviewApiModelListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + text_ASC + text_DESC + rating_ASC + rating_DESC +} - type ReviewApiModelListResponse { - data: [ReviewApiModel] - meta: CmsListMeta - error: CmsError - } +type ReviewApiModelResponse { + data: ReviewApiModel + error: CmsError +} - extend type Query { - getReviewApiModel(where: ReviewApiModelGetWhereInput!): ReviewApiModelResponse +type ReviewApiModelListResponse { + data: [ReviewApiModel] + meta: CmsListMeta + error: CmsError +} - listReviewsApiModel( - where: ReviewApiModelListWhereInput - sort: [ReviewApiModelListSorter] - limit: Int - after: String - search: String - ): ReviewApiModelListResponse - } -`; +extend type Query { + getReviewApiModel(where: ReviewApiModelGetWhereInput!): ReviewApiModelResponse + + listReviewsApiModel( + where: ReviewApiModelListWhereInput + sort: [ReviewApiModelListSorter] + limit: Int + after: String + search: String + ): ReviewApiModelListResponse +}`; From 97c46d55f81901f810cefb50393e71682da120c1 Mon Sep 17 00:00:00 2001 From: adrians5j Date: Fri, 7 Jun 2024 14:40:25 +0200 Subject: [PATCH 56/56] test: update GQL snapshots --- .../contentAPI/snapshots/category.manage.ts | 743 +++++----- .../contentAPI/snapshots/category.read.ts | 462 +++--- .../contentAPI/snapshots/page.manage.ts | 1267 ++++++++--------- .../contentAPI/snapshots/page.read.ts | 734 +++++----- .../contentAPI/snapshots/product.manage.ts | 1118 +++++++-------- .../contentAPI/snapshots/product.read.ts | 828 ++++++----- .../contentAPI/snapshots/review.manage.ts | 738 +++++----- .../contentAPI/snapshots/review.read.ts | 474 +++--- 8 files changed, 3165 insertions(+), 3199 deletions(-) diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts index 1ecfc60877c..c3f64894029 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.manage.ts @@ -1,373 +1,372 @@ -export default /* GraphQL */ `""" -Product category -""" -type CategoryApiNameWhichIsABitDifferentThanModelId { - id: ID! - entryId: String! - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) - - meta: CategoryApiNameWhichIsABitDifferentThanModelIdMeta - title: String - slug: String - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation -} - -type CategoryApiNameWhichIsABitDifferentThanModelIdMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [CategoryApiNameWhichIsABitDifferentThanModelId!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON -} - -input CategoryApiNameWhichIsABitDifferentThanModelIdInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - title: String - slug: String -} - -input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { - id: ID - entryId: String - title: String - slug: String -} - -input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String - - slug: String - slug_not: String - slug_in: [String] - slug_not_in: [String] - slug_contains: String - slug_not_contains: String - slug_startsWith: String - slug_not_startsWith: String - - AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] - OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] -} - -type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { - data: CategoryApiNameWhichIsABitDifferentThanModelId - error: CmsError -} - -type CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse { - data: Boolean - error: CmsError -} - -type CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse { - data: [CategoryApiNameWhichIsABitDifferentThanModelId] - error: CmsError -} - -type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { - data: [CategoryApiNameWhichIsABitDifferentThanModelId] - meta: CmsListMeta - error: CmsError -} - -enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - slug_ASC - slug_DESC -} - -extend type Query { - getCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - getCategoryApiNameWhichIsABitDifferentThanModelIdRevisions( - id: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse - - getCategoriesApiModelByIds( - revisions: [ID!]! - ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse - - listCategoriesApiModel( - where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput - sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] - limit: Int - after: String - search: String - ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse -} - -extend type Mutation { - createCategoryApiNameWhichIsABitDifferentThanModelId( - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! - options: CreateCmsEntryOptionsInput - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - createCategoryApiNameWhichIsABitDifferentThanModelIdFrom( - revision: ID! - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput - options: CreateRevisionCmsEntryOptionsInput - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - updateCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! - options: UpdateCmsEntryOptionsInput - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - validateCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID - data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! - ): CmsEntryValidationResponse! - - moveCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - folderId: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse - - deleteCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - options: CmsDeleteEntryOptions - ): CmsDeleteResponse - - deleteMultipleCategoriesApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! - - publishCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - republishCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - - unpublishCategoryApiNameWhichIsABitDifferentThanModelId( - revision: ID! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse -} +export default /* GraphQL */ ` + """ + Product category + """ + type CategoryApiNameWhichIsABitDifferentThanModelId { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + + meta: CategoryApiNameWhichIsABitDifferentThanModelIdMeta + title: String + slug: String + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation + } + + type CategoryApiNameWhichIsABitDifferentThanModelIdMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [CategoryApiNameWhichIsABitDifferentThanModelId!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON + } + + input CategoryApiNameWhichIsABitDifferentThanModelIdInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + title: String + slug: String + } + + input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { + id: ID + entryId: String + title: String + slug: String + } + + input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String + + slug: String + slug_not: String + slug_in: [String] + slug_not_in: [String] + slug_contains: String + slug_not_contains: String + slug_startsWith: String + slug_not_startsWith: String + + AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] + OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] + } + + type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { + data: CategoryApiNameWhichIsABitDifferentThanModelId + error: CmsError + } + + type CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse { + data: Boolean + error: CmsError + } + + type CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse { + data: [CategoryApiNameWhichIsABitDifferentThanModelId] + error: CmsError + } + + type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { + data: [CategoryApiNameWhichIsABitDifferentThanModelId] + meta: CmsListMeta + error: CmsError + } + + enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + slug_ASC + slug_DESC + } + + extend type Query { + getCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + getCategoryApiNameWhichIsABitDifferentThanModelIdRevisions( + id: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse + + getCategoriesApiModelByIds( + revisions: [ID!]! + ): CategoryApiNameWhichIsABitDifferentThanModelIdArrayResponse + + listCategoriesApiModel( + where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput + sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] + limit: Int + after: String + search: String + ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse + } + + extend type Mutation { + createCategoryApiNameWhichIsABitDifferentThanModelId( + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! + options: CreateCmsEntryOptionsInput + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + createCategoryApiNameWhichIsABitDifferentThanModelIdFrom( + revision: ID! + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput + options: CreateRevisionCmsEntryOptionsInput + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + updateCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! + options: UpdateCmsEntryOptionsInput + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + validateCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID + data: CategoryApiNameWhichIsABitDifferentThanModelIdInput! + ): CmsEntryValidationResponse! + + moveCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + folderId: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdMoveResponse + + deleteCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + options: CmsDeleteEntryOptions + ): CmsDeleteResponse + + deleteMultipleCategoriesApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! + + publishCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + republishCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + + unpublishCategoryApiNameWhichIsABitDifferentThanModelId( + revision: ID! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + } `; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts index 7cc79f3a1aa..7de8f2863aa 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/category.read.ts @@ -1,244 +1,244 @@ -export default /* GraphQL */ `""" -Product category -""" -type CategoryApiNameWhichIsABitDifferentThanModelId { - id: ID! - entryId: String! - modelId: String! +export default /* GraphQL */ ` + """ + Product category + """ + type CategoryApiNameWhichIsABitDifferentThanModelId { + id: ID! + entryId: String! + modelId: String! - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") - title: String - slug: String -} + title: String + slug: String + } -input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { - id: ID - entryId: String - title: String - slug: String -} + input CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput { + id: ID + entryId: String + title: String + slug: String + } -input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] + input CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String - slug: String - slug_not: String - slug_in: [String] - slug_not_in: [String] - slug_contains: String - slug_not_contains: String - slug_startsWith: String - slug_not_startsWith: String + slug: String + slug_not: String + slug_in: [String] + slug_not_in: [String] + slug_contains: String + slug_not_contains: String + slug_startsWith: String + slug_not_startsWith: String - AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] - OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] -} + AND: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] + OR: [CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput!] + } -enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - slug_ASC - slug_DESC -} + enum CategoryApiNameWhichIsABitDifferentThanModelIdListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + slug_ASC + slug_DESC + } -type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { - data: CategoryApiNameWhichIsABitDifferentThanModelId - error: CmsError -} + type CategoryApiNameWhichIsABitDifferentThanModelIdResponse { + data: CategoryApiNameWhichIsABitDifferentThanModelId + error: CmsError + } -type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { - data: [CategoryApiNameWhichIsABitDifferentThanModelId] - meta: CmsListMeta - error: CmsError -} + type CategoryApiNameWhichIsABitDifferentThanModelIdListResponse { + data: [CategoryApiNameWhichIsABitDifferentThanModelId] + meta: CmsListMeta + error: CmsError + } -extend type Query { - getCategoryApiNameWhichIsABitDifferentThanModelId( - where: CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput! - ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse + extend type Query { + getCategoryApiNameWhichIsABitDifferentThanModelId( + where: CategoryApiNameWhichIsABitDifferentThanModelIdGetWhereInput! + ): CategoryApiNameWhichIsABitDifferentThanModelIdResponse - listCategoriesApiModel( - where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput - sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] - limit: Int - after: String - search: String - ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse -}`; + listCategoriesApiModel( + where: CategoryApiNameWhichIsABitDifferentThanModelIdListWhereInput + sort: [CategoryApiNameWhichIsABitDifferentThanModelIdListSorter] + limit: Int + after: String + search: String + ): CategoryApiNameWhichIsABitDifferentThanModelIdListResponse + } +`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts index c2430378d7d..6b5e46dd221 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.manage.ts @@ -1,638 +1,631 @@ -export default /* GraphQL */ `""" -Page -""" -type PageModelApiName { - id: ID! - entryId: String! - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) - - meta: PageModelApiNameMeta - content: [PageModelApiName_Content!] - header: PageModelApiName_Header - objective: PageModelApiName_Objective - reference: PageModelApiName_Reference - references1: PageModelApiName_References1 - references2: [PageModelApiName_References2!] - ghostObject: PageModelApiName_GhostObject - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation -} - -type PageModelApiNameMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [PageModelApiName!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON -} - -union PageModelApiName_Content = - PageModelApiName_Content_Hero - | PageModelApiName_Content_SimpleText - | PageModelApiName_Content_Objecting - | PageModelApiName_Content_Author - -type PageModelApiName_Content_Hero { - title: String -} - -type PageModelApiName_Content_SimpleText { - text: String -} - -type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String -} - -input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String -} - -type PageModelApiName_Content_Objecting_NestedObject { - objectTitle: String - objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] -} - -input PageModelApiName_Content_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput -} - -union PageModelApiName_Content_Objecting_DynamicZone = - PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject - -type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { - authors: [RefField!] -} - -extend type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { - _templateId: ID! -} - -type PageModelApiName_Content_Objecting { - nestedObject: PageModelApiName_Content_Objecting_NestedObject - dynamicZone: PageModelApiName_Content_Objecting_DynamicZone -} - -type PageModelApiName_Content_Author { - author: RefField - authors: [RefField!] -} - -extend type PageModelApiName_Content_Hero { - _templateId: ID! -} - -extend type PageModelApiName_Content_SimpleText { - _templateId: ID! -} - -extend type PageModelApiName_Content_Objecting { - _templateId: ID! -} - -extend type PageModelApiName_Content_Author { - _templateId: ID! -} - -union PageModelApiName_Header = - PageModelApiName_Header_TextHeader - | PageModelApiName_Header_ImageHeader - -type PageModelApiName_Header_TextHeader { - title: String -} - -type PageModelApiName_Header_ImageHeader { - title: String - image: String -} - -extend type PageModelApiName_Header_TextHeader { - _templateId: ID! -} - -extend type PageModelApiName_Header_ImageHeader { - _templateId: ID! -} - -union PageModelApiName_Objective = PageModelApiName_Objective_Objecting - -type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String -} - -input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String -} - -type PageModelApiName_Objective_Objecting_NestedObject { - objectTitle: String - objectBody: JSON - objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] -} - -input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput -} - -type PageModelApiName_Objective_Objecting { - nestedObject: PageModelApiName_Objective_Objecting_NestedObject -} - -extend type PageModelApiName_Objective_Objecting { - _templateId: ID! -} - -union PageModelApiName_Reference = PageModelApiName_Reference_Author - -type PageModelApiName_Reference_Author { - author: RefField -} - -extend type PageModelApiName_Reference_Author { - _templateId: ID! -} - -union PageModelApiName_References1 = PageModelApiName_References1_Authors - -type PageModelApiName_References1_Authors { - authors: [RefField!] -} - -extend type PageModelApiName_References1_Authors { - _templateId: ID! -} - -union PageModelApiName_References2 = PageModelApiName_References2_Author - -type PageModelApiName_References2_Author { - author: RefField -} - -extend type PageModelApiName_References2_Author { - _templateId: ID! -} - -type PageModelApiName_GhostObject { - _empty: String -} - -input PageModelApiName_GhostObjectWhereInput { - _empty: String -} - -input PageModelApiName_Content_HeroInput { - title: String -} - -input PageModelApiName_Content_SimpleTextInput { - text: String -} - -input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput { - nestedObjectNestedTitle: String -} - -input PageModelApiName_Content_Objecting_NestedObjectInput { - objectTitle: String - objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput!] -} - -input PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput { - authors: [RefFieldInput] -} - -input PageModelApiName_Content_Objecting_DynamicZoneInput { - SuperNestedObject: PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput -} - -input PageModelApiName_Content_ObjectingInput { - nestedObject: PageModelApiName_Content_Objecting_NestedObjectInput - dynamicZone: PageModelApiName_Content_Objecting_DynamicZoneInput -} - -input PageModelApiName_Content_AuthorInput { - author: RefFieldInput - authors: [RefFieldInput!] -} - -input PageModelApiName_ContentInput { - Hero: PageModelApiName_Content_HeroInput - SimpleText: PageModelApiName_Content_SimpleTextInput - Objecting: PageModelApiName_Content_ObjectingInput - Author: PageModelApiName_Content_AuthorInput -} - -input PageModelApiName_Header_TextHeaderInput { - title: String -} - -input PageModelApiName_Header_ImageHeaderInput { - title: String - image: String -} - -input PageModelApiName_HeaderInput { - TextHeader: PageModelApiName_Header_TextHeaderInput - ImageHeader: PageModelApiName_Header_ImageHeaderInput -} - -input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput { - nestedObjectNestedTitle: String -} - -input PageModelApiName_Objective_Objecting_NestedObjectInput { - objectTitle: String - objectBody: JSON - objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput!] -} - -input PageModelApiName_Objective_ObjectingInput { - nestedObject: PageModelApiName_Objective_Objecting_NestedObjectInput -} - -input PageModelApiName_ObjectiveInput { - Objecting: PageModelApiName_Objective_ObjectingInput -} - -input PageModelApiName_Reference_AuthorInput { - author: RefFieldInput -} - -input PageModelApiName_ReferenceInput { - Author: PageModelApiName_Reference_AuthorInput -} - -input PageModelApiName_References1_AuthorsInput { - authors: [RefFieldInput] -} - -input PageModelApiName_References1Input { - Authors: PageModelApiName_References1_AuthorsInput -} - -input PageModelApiName_References2_AuthorInput { - author: RefFieldInput -} - -input PageModelApiName_References2Input { - Author: PageModelApiName_References2_AuthorInput -} - -input PageModelApiName_GhostObjectInput { - _empty: String -} - -input PageModelApiNameInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - content: [PageModelApiName_ContentInput] - header: PageModelApiName_HeaderInput - objective: PageModelApiName_ObjectiveInput - reference: PageModelApiName_ReferenceInput - references1: PageModelApiName_References1Input - references2: [PageModelApiName_References2Input] - ghostObject: PageModelApiName_GhostObjectInput -} - -input PageModelApiNameGetWhereInput { - id: ID - entryId: String -} - -input PageModelApiNameListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - ghostObject: PageModelApiName_GhostObjectWhereInput - AND: [PageModelApiNameListWhereInput!] - OR: [PageModelApiNameListWhereInput!] -} - -type PageModelApiNameResponse { - data: PageModelApiName - error: CmsError -} - -type PageModelApiNameMoveResponse { - data: Boolean - error: CmsError -} - -type PageModelApiNameArrayResponse { - data: [PageModelApiName] - error: CmsError -} - -type PageModelApiNameListResponse { - data: [PageModelApiName] - meta: CmsListMeta - error: CmsError -} - -enum PageModelApiNameListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC -} - -extend type Query { - getPageModelApiName( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): PageModelApiNameResponse - - getPageModelApiNameRevisions(id: ID!): PageModelApiNameArrayResponse - - getPagesModelApiNameByIds(revisions: [ID!]!): PageModelApiNameArrayResponse - - listPagesModelApiName( - where: PageModelApiNameListWhereInput - sort: [PageModelApiNameListSorter] - limit: Int - after: String - search: String - ): PageModelApiNameListResponse -} - -extend type Mutation { - createPageModelApiName( - data: PageModelApiNameInput! - options: CreateCmsEntryOptionsInput - ): PageModelApiNameResponse - - createPageModelApiNameFrom( - revision: ID! - data: PageModelApiNameInput - options: CreateRevisionCmsEntryOptionsInput - ): PageModelApiNameResponse - - updatePageModelApiName( - revision: ID! - data: PageModelApiNameInput! - options: UpdateCmsEntryOptionsInput - ): PageModelApiNameResponse - - validatePageModelApiName( - revision: ID - data: PageModelApiNameInput! - ): CmsEntryValidationResponse! - - movePageModelApiName( - revision: ID! - folderId: ID! - ): PageModelApiNameMoveResponse - - deletePageModelApiName( - revision: ID! - options: CmsDeleteEntryOptions - ): CmsDeleteResponse - - deleteMultiplePagesModelApiName(entries: [ID!]!): CmsDeleteMultipleResponse! - - publishPageModelApiName(revision: ID!): PageModelApiNameResponse - - republishPageModelApiName(revision: ID!): PageModelApiNameResponse - - unpublishPageModelApiName(revision: ID!): PageModelApiNameResponse -} +export default /* GraphQL */ ` + """ + Page + """ + type PageModelApiName { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + + meta: PageModelApiNameMeta + content: [PageModelApiName_Content!] + header: PageModelApiName_Header + objective: PageModelApiName_Objective + reference: PageModelApiName_Reference + references1: PageModelApiName_References1 + references2: [PageModelApiName_References2!] + ghostObject: PageModelApiName_GhostObject + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation + } + + type PageModelApiNameMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [PageModelApiName!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON + } + + union PageModelApiName_Content = + PageModelApiName_Content_Hero + | PageModelApiName_Content_SimpleText + | PageModelApiName_Content_Objecting + | PageModelApiName_Content_Author + + type PageModelApiName_Content_Hero { + title: String + } + + type PageModelApiName_Content_SimpleText { + text: String + } + + type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String + } + + input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String + } + + type PageModelApiName_Content_Objecting_NestedObject { + objectTitle: String + objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] + } + + input PageModelApiName_Content_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput + } + + union PageModelApiName_Content_Objecting_DynamicZone = + PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject + + type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { + authors: [RefField!] + } + + extend type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { + _templateId: ID! + } + + type PageModelApiName_Content_Objecting { + nestedObject: PageModelApiName_Content_Objecting_NestedObject + dynamicZone: PageModelApiName_Content_Objecting_DynamicZone + } + + type PageModelApiName_Content_Author { + author: RefField + authors: [RefField!] + } + + extend type PageModelApiName_Content_Hero { + _templateId: ID! + } + + extend type PageModelApiName_Content_SimpleText { + _templateId: ID! + } + + extend type PageModelApiName_Content_Objecting { + _templateId: ID! + } + + extend type PageModelApiName_Content_Author { + _templateId: ID! + } + + union PageModelApiName_Header = + PageModelApiName_Header_TextHeader + | PageModelApiName_Header_ImageHeader + + type PageModelApiName_Header_TextHeader { + title: String + } + + type PageModelApiName_Header_ImageHeader { + title: String + image: String + } + + extend type PageModelApiName_Header_TextHeader { + _templateId: ID! + } + + extend type PageModelApiName_Header_ImageHeader { + _templateId: ID! + } + + union PageModelApiName_Objective = PageModelApiName_Objective_Objecting + + type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String + } + + input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String + } + + type PageModelApiName_Objective_Objecting_NestedObject { + objectTitle: String + objectBody: JSON + objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] + } + + input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput + } + + type PageModelApiName_Objective_Objecting { + nestedObject: PageModelApiName_Objective_Objecting_NestedObject + } + + extend type PageModelApiName_Objective_Objecting { + _templateId: ID! + } + + union PageModelApiName_Reference = PageModelApiName_Reference_Author + + type PageModelApiName_Reference_Author { + author: RefField + } + + extend type PageModelApiName_Reference_Author { + _templateId: ID! + } + + union PageModelApiName_References1 = PageModelApiName_References1_Authors + + type PageModelApiName_References1_Authors { + authors: [RefField!] + } + + extend type PageModelApiName_References1_Authors { + _templateId: ID! + } + + union PageModelApiName_References2 = PageModelApiName_References2_Author + + type PageModelApiName_References2_Author { + author: RefField + } + + extend type PageModelApiName_References2_Author { + _templateId: ID! + } + + type PageModelApiName_GhostObject { + _empty: String + } + + input PageModelApiName_GhostObjectWhereInput { + _empty: String + } + + input PageModelApiName_Content_HeroInput { + title: String + } + + input PageModelApiName_Content_SimpleTextInput { + text: String + } + + input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput { + nestedObjectNestedTitle: String + } + + input PageModelApiName_Content_Objecting_NestedObjectInput { + objectTitle: String + objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectInput!] + } + + input PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput { + authors: [RefFieldInput] + } + + input PageModelApiName_Content_Objecting_DynamicZoneInput { + SuperNestedObject: PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObjectInput + } + + input PageModelApiName_Content_ObjectingInput { + nestedObject: PageModelApiName_Content_Objecting_NestedObjectInput + dynamicZone: PageModelApiName_Content_Objecting_DynamicZoneInput + } + + input PageModelApiName_Content_AuthorInput { + author: RefFieldInput + authors: [RefFieldInput!] + } + + input PageModelApiName_ContentInput { + Hero: PageModelApiName_Content_HeroInput + SimpleText: PageModelApiName_Content_SimpleTextInput + Objecting: PageModelApiName_Content_ObjectingInput + Author: PageModelApiName_Content_AuthorInput + } + + input PageModelApiName_Header_TextHeaderInput { + title: String + } + + input PageModelApiName_Header_ImageHeaderInput { + title: String + image: String + } + + input PageModelApiName_HeaderInput { + TextHeader: PageModelApiName_Header_TextHeaderInput + ImageHeader: PageModelApiName_Header_ImageHeaderInput + } + + input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput { + nestedObjectNestedTitle: String + } + + input PageModelApiName_Objective_Objecting_NestedObjectInput { + objectTitle: String + objectBody: JSON + objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectInput!] + } + + input PageModelApiName_Objective_ObjectingInput { + nestedObject: PageModelApiName_Objective_Objecting_NestedObjectInput + } + + input PageModelApiName_ObjectiveInput { + Objecting: PageModelApiName_Objective_ObjectingInput + } + + input PageModelApiName_Reference_AuthorInput { + author: RefFieldInput + } + + input PageModelApiName_ReferenceInput { + Author: PageModelApiName_Reference_AuthorInput + } + + input PageModelApiName_References1_AuthorsInput { + authors: [RefFieldInput] + } + + input PageModelApiName_References1Input { + Authors: PageModelApiName_References1_AuthorsInput + } + + input PageModelApiName_References2_AuthorInput { + author: RefFieldInput + } + + input PageModelApiName_References2Input { + Author: PageModelApiName_References2_AuthorInput + } + + input PageModelApiName_GhostObjectInput { + _empty: String + } + + input PageModelApiNameInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + content: [PageModelApiName_ContentInput] + header: PageModelApiName_HeaderInput + objective: PageModelApiName_ObjectiveInput + reference: PageModelApiName_ReferenceInput + references1: PageModelApiName_References1Input + references2: [PageModelApiName_References2Input] + ghostObject: PageModelApiName_GhostObjectInput + } + + input PageModelApiNameGetWhereInput { + id: ID + entryId: String + } + + input PageModelApiNameListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + ghostObject: PageModelApiName_GhostObjectWhereInput + AND: [PageModelApiNameListWhereInput!] + OR: [PageModelApiNameListWhereInput!] + } + + type PageModelApiNameResponse { + data: PageModelApiName + error: CmsError + } + + type PageModelApiNameMoveResponse { + data: Boolean + error: CmsError + } + + type PageModelApiNameArrayResponse { + data: [PageModelApiName] + error: CmsError + } + + type PageModelApiNameListResponse { + data: [PageModelApiName] + meta: CmsListMeta + error: CmsError + } + + enum PageModelApiNameListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + } + + extend type Query { + getPageModelApiName( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): PageModelApiNameResponse + + getPageModelApiNameRevisions(id: ID!): PageModelApiNameArrayResponse + + getPagesModelApiNameByIds(revisions: [ID!]!): PageModelApiNameArrayResponse + + listPagesModelApiName( + where: PageModelApiNameListWhereInput + sort: [PageModelApiNameListSorter] + limit: Int + after: String + search: String + ): PageModelApiNameListResponse + } + + extend type Mutation { + createPageModelApiName( + data: PageModelApiNameInput! + options: CreateCmsEntryOptionsInput + ): PageModelApiNameResponse + + createPageModelApiNameFrom( + revision: ID! + data: PageModelApiNameInput + options: CreateRevisionCmsEntryOptionsInput + ): PageModelApiNameResponse + + updatePageModelApiName( + revision: ID! + data: PageModelApiNameInput! + options: UpdateCmsEntryOptionsInput + ): PageModelApiNameResponse + + validatePageModelApiName( + revision: ID + data: PageModelApiNameInput! + ): CmsEntryValidationResponse! + + movePageModelApiName(revision: ID!, folderId: ID!): PageModelApiNameMoveResponse + + deletePageModelApiName(revision: ID!, options: CmsDeleteEntryOptions): CmsDeleteResponse + + deleteMultiplePagesModelApiName(entries: [ID!]!): CmsDeleteMultipleResponse! + + publishPageModelApiName(revision: ID!): PageModelApiNameResponse + + republishPageModelApiName(revision: ID!): PageModelApiNameResponse + + unpublishPageModelApiName(revision: ID!): PageModelApiNameResponse + } `; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts index 40e17fc53b4..e7126235413 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/page.read.ts @@ -1,368 +1,366 @@ -export default /* GraphQL */ `""" -Page -""" -type PageModelApiName { - id: ID! - entryId: String! - modelId: String! - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) - - content: [PageModelApiName_Content!] - header: PageModelApiName_Header - objective: PageModelApiName_Objective - reference: PageModelApiName_Reference - references1: PageModelApiName_References1 - references2: [PageModelApiName_References2!] - ghostObject: PageModelApiName_GhostObject -} - -union PageModelApiName_Content = - PageModelApiName_Content_Hero - | PageModelApiName_Content_SimpleText - | PageModelApiName_Content_Objecting - | PageModelApiName_Content_Author - -type PageModelApiName_Content_Hero { - title: String -} - -type PageModelApiName_Content_SimpleText { - text: String -} - -type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String -} - -input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String -} - -type PageModelApiName_Content_Objecting_NestedObject { - objectTitle: String - objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] -} - -input PageModelApiName_Content_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput -} - -union PageModelApiName_Content_Objecting_DynamicZone = - PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject - -type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { - authors(populate: Boolean = true): [AuthorApiModel!] -} - -type PageModelApiName_Content_Objecting { - nestedObject: PageModelApiName_Content_Objecting_NestedObject - dynamicZone: PageModelApiName_Content_Objecting_DynamicZone -} - -type PageModelApiName_Content_Author { - author(populate: Boolean = true): AuthorApiModel - authors(populate: Boolean = true): [AuthorApiModel!] -} - -union PageModelApiName_Header = - PageModelApiName_Header_TextHeader - | PageModelApiName_Header_ImageHeader - -type PageModelApiName_Header_TextHeader { - title: String -} - -type PageModelApiName_Header_ImageHeader { - title: String - image: String -} - -union PageModelApiName_Objective = PageModelApiName_Objective_Objecting - -type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { - nestedObjectNestedTitle: String -} - -input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { - nestedObjectNestedTitle: String - nestedObjectNestedTitle_not: String - nestedObjectNestedTitle_in: [String] - nestedObjectNestedTitle_not_in: [String] - nestedObjectNestedTitle_contains: String - nestedObjectNestedTitle_not_contains: String - nestedObjectNestedTitle_startsWith: String - nestedObjectNestedTitle_not_startsWith: String -} - -type PageModelApiName_Objective_Objecting_NestedObject { - objectTitle: String - objectBody(format: String): JSON - objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] -} - -input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { - objectTitle: String - objectTitle_not: String - objectTitle_in: [String] - objectTitle_not_in: [String] - objectTitle_contains: String - objectTitle_not_contains: String - objectTitle_startsWith: String - objectTitle_not_startsWith: String - - objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput -} - -type PageModelApiName_Objective_Objecting { - nestedObject: PageModelApiName_Objective_Objecting_NestedObject -} - -union PageModelApiName_Reference = PageModelApiName_Reference_Author - -type PageModelApiName_Reference_Author { - author(populate: Boolean = true): AuthorApiModel -} - -union PageModelApiName_References1 = PageModelApiName_References1_Authors - -type PageModelApiName_References1_Authors { - authors(populate: Boolean = true): [AuthorApiModel!] -} - -union PageModelApiName_References2 = PageModelApiName_References2_Author - -type PageModelApiName_References2_Author { - author(populate: Boolean = true): AuthorApiModel -} - -type PageModelApiName_GhostObject { - _empty: String -} - -input PageModelApiName_GhostObjectWhereInput { - _empty: String -} - -input PageModelApiNameGetWhereInput { - id: ID - entryId: String -} - -input PageModelApiNameListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - ghostObject: PageModelApiName_GhostObjectWhereInput - AND: [PageModelApiNameListWhereInput!] - OR: [PageModelApiNameListWhereInput!] -} - -enum PageModelApiNameListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC -} - -type PageModelApiNameResponse { - data: PageModelApiName - error: CmsError -} - -type PageModelApiNameListResponse { - data: [PageModelApiName] - meta: CmsListMeta - error: CmsError -} - -extend type Query { - getPageModelApiName( - where: PageModelApiNameGetWhereInput! - ): PageModelApiNameResponse - - listPagesModelApiName( - where: PageModelApiNameListWhereInput - sort: [PageModelApiNameListSorter] - limit: Int - after: String - search: String - ): PageModelApiNameListResponse -}`; +export default /* GraphQL */ ` + """ + Page + """ + type PageModelApiName { + id: ID! + entryId: String! + modelId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + + content: [PageModelApiName_Content!] + header: PageModelApiName_Header + objective: PageModelApiName_Objective + reference: PageModelApiName_Reference + references1: PageModelApiName_References1 + references2: [PageModelApiName_References2!] + ghostObject: PageModelApiName_GhostObject + } + + union PageModelApiName_Content = + PageModelApiName_Content_Hero + | PageModelApiName_Content_SimpleText + | PageModelApiName_Content_Objecting + | PageModelApiName_Content_Author + + type PageModelApiName_Content_Hero { + title: String + } + + type PageModelApiName_Content_SimpleText { + text: String + } + + type PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String + } + + input PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String + } + + type PageModelApiName_Content_Objecting_NestedObject { + objectTitle: String + objectNestedObject: [PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObject!] + } + + input PageModelApiName_Content_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Content_Objecting_NestedObject_ObjectNestedObjectWhereInput + } + + union PageModelApiName_Content_Objecting_DynamicZone = + PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject + + type PageModelApiName_Content_Objecting_DynamicZone_SuperNestedObject { + authors(populate: Boolean = true): [AuthorApiModel!] + } + + type PageModelApiName_Content_Objecting { + nestedObject: PageModelApiName_Content_Objecting_NestedObject + dynamicZone: PageModelApiName_Content_Objecting_DynamicZone + } + + type PageModelApiName_Content_Author { + author(populate: Boolean = true): AuthorApiModel + authors(populate: Boolean = true): [AuthorApiModel!] + } + + union PageModelApiName_Header = + PageModelApiName_Header_TextHeader + | PageModelApiName_Header_ImageHeader + + type PageModelApiName_Header_TextHeader { + title: String + } + + type PageModelApiName_Header_ImageHeader { + title: String + image: String + } + + union PageModelApiName_Objective = PageModelApiName_Objective_Objecting + + type PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject { + nestedObjectNestedTitle: String + } + + input PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput { + nestedObjectNestedTitle: String + nestedObjectNestedTitle_not: String + nestedObjectNestedTitle_in: [String] + nestedObjectNestedTitle_not_in: [String] + nestedObjectNestedTitle_contains: String + nestedObjectNestedTitle_not_contains: String + nestedObjectNestedTitle_startsWith: String + nestedObjectNestedTitle_not_startsWith: String + } + + type PageModelApiName_Objective_Objecting_NestedObject { + objectTitle: String + objectBody(format: String): JSON + objectNestedObject: [PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObject!] + } + + input PageModelApiName_Objective_Objecting_NestedObjectWhereInput { + objectTitle: String + objectTitle_not: String + objectTitle_in: [String] + objectTitle_not_in: [String] + objectTitle_contains: String + objectTitle_not_contains: String + objectTitle_startsWith: String + objectTitle_not_startsWith: String + + objectNestedObject: PageModelApiName_Objective_Objecting_NestedObject_ObjectNestedObjectWhereInput + } + + type PageModelApiName_Objective_Objecting { + nestedObject: PageModelApiName_Objective_Objecting_NestedObject + } + + union PageModelApiName_Reference = PageModelApiName_Reference_Author + + type PageModelApiName_Reference_Author { + author(populate: Boolean = true): AuthorApiModel + } + + union PageModelApiName_References1 = PageModelApiName_References1_Authors + + type PageModelApiName_References1_Authors { + authors(populate: Boolean = true): [AuthorApiModel!] + } + + union PageModelApiName_References2 = PageModelApiName_References2_Author + + type PageModelApiName_References2_Author { + author(populate: Boolean = true): AuthorApiModel + } + + type PageModelApiName_GhostObject { + _empty: String + } + + input PageModelApiName_GhostObjectWhereInput { + _empty: String + } + + input PageModelApiNameGetWhereInput { + id: ID + entryId: String + } + + input PageModelApiNameListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + ghostObject: PageModelApiName_GhostObjectWhereInput + AND: [PageModelApiNameListWhereInput!] + OR: [PageModelApiNameListWhereInput!] + } + + enum PageModelApiNameListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + } + + type PageModelApiNameResponse { + data: PageModelApiName + error: CmsError + } + + type PageModelApiNameListResponse { + data: [PageModelApiName] + meta: CmsListMeta + error: CmsError + } + + extend type Query { + getPageModelApiName(where: PageModelApiNameGetWhereInput!): PageModelApiNameResponse + + listPagesModelApiName( + where: PageModelApiNameListWhereInput + sort: [PageModelApiNameListSorter] + limit: Int + after: String + search: String + ): PageModelApiNameListResponse + } +`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts index 41ff21488b7..5573282aff8 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.manage.ts @@ -1,564 +1,554 @@ -export default /* GraphQL */ `""" -Products being sold in our webshop -""" -type ProductApiSingular { - id: ID! - entryId: String! - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) - - meta: ProductApiSingularMeta - title: String - category: RefField - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: [String] - image: String - richText: JSON - variant: ProductApiSingular_Variant - fieldsObject: ProductApiSingular_FieldsObject - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation -} - -type ProductApiSingularMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [ProductApiSingular!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON -} - -type ProductApiSingular_Variant_Options { - name: String - price: Number - image: String - category: RefField - categories: [RefField!] - longText: [String] -} - -input ProductApiSingular_Variant_OptionsWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - categories: RefFieldWhereInput - - longText_contains: String - longText_not_contains: String -} - -type ProductApiSingular_Variant { - name: String - price: Number - images: [String] - category: RefField - options: [ProductApiSingular_Variant_Options!] -} - -input ProductApiSingular_VariantWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - options: ProductApiSingular_Variant_OptionsWhereInput -} - -type ProductApiSingular_FieldsObject { - text: String -} - -input ProductApiSingular_FieldsObjectWhereInput { - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String -} - -input ProductApiSingular_Variant_OptionsInput { - name: String - price: Number - image: String - category: RefFieldInput - categories: [RefFieldInput] - longText: [String] -} - -input ProductApiSingular_VariantInput { - name: String - price: Number - images: [String] - category: RefFieldInput - options: [ProductApiSingular_Variant_OptionsInput!] -} - -input ProductApiSingular_FieldsObjectInput { - text: String -} - -input ProductApiSingularInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - title: String - category: RefFieldInput - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: [String!] - image: String - richText: JSON - variant: ProductApiSingular_VariantInput - fieldsObject: ProductApiSingular_FieldsObjectInput -} - -input ProductApiSingularGetWhereInput { - id: ID - entryId: String - title: String - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: String -} - -input ProductApiSingularListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String - - category: RefFieldWhereInput - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - inStock: Boolean - inStock_not: Boolean - - itemsInStock: Number - itemsInStock_not: Number - itemsInStock_in: [Number] - itemsInStock_not_in: [Number] - itemsInStock_lt: Number - itemsInStock_lte: Number - itemsInStock_gt: Number - itemsInStock_gte: Number - # there must be two numbers sent in the array - itemsInStock_between: [Number!] - # there must be two numbers sent in the array - itemsInStock_not_between: [Number!] - - availableOn: Date - availableOn_not: Date - availableOn_in: [Date] - availableOn_not_in: [Date] - availableOn_lt: Date - availableOn_lte: Date - availableOn_gt: Date - availableOn_gte: Date - - color: String - color_not: String - color_in: [String] - color_not_in: [String] - color_contains: String - color_not_contains: String - color_startsWith: String - color_not_startsWith: String - - availableSizes: String - availableSizes_not: String - availableSizes_in: [String] - availableSizes_not_in: [String] - availableSizes_contains: String - availableSizes_not_contains: String - availableSizes_startsWith: String - availableSizes_not_startsWith: String - - variant: ProductApiSingular_VariantWhereInput - fieldsObject: ProductApiSingular_FieldsObjectWhereInput - AND: [ProductApiSingularListWhereInput!] - OR: [ProductApiSingularListWhereInput!] -} - -type ProductApiSingularResponse { - data: ProductApiSingular - error: CmsError -} - -type ProductApiSingularMoveResponse { - data: Boolean - error: CmsError -} - -type ProductApiSingularArrayResponse { - data: [ProductApiSingular] - error: CmsError -} - -type ProductApiSingularListResponse { - data: [ProductApiSingular] - meta: CmsListMeta - error: CmsError -} - -enum ProductApiSingularListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - price_ASC - price_DESC - inStock_ASC - inStock_DESC - itemsInStock_ASC - itemsInStock_DESC - availableOn_ASC - availableOn_DESC - color_ASC - color_DESC - availableSizes_ASC - availableSizes_DESC -} - -extend type Query { - getProductApiSingular( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): ProductApiSingularResponse - - getProductApiSingularRevisions(id: ID!): ProductApiSingularArrayResponse - - getProductPluralApiNameByIds( - revisions: [ID!]! - ): ProductApiSingularArrayResponse - - listProductPluralApiName( - where: ProductApiSingularListWhereInput - sort: [ProductApiSingularListSorter] - limit: Int - after: String - search: String - ): ProductApiSingularListResponse -} - -extend type Mutation { - createProductApiSingular( - data: ProductApiSingularInput! - options: CreateCmsEntryOptionsInput - ): ProductApiSingularResponse - - createProductApiSingularFrom( - revision: ID! - data: ProductApiSingularInput - options: CreateRevisionCmsEntryOptionsInput - ): ProductApiSingularResponse - - updateProductApiSingular( - revision: ID! - data: ProductApiSingularInput! - options: UpdateCmsEntryOptionsInput - ): ProductApiSingularResponse - - validateProductApiSingular( - revision: ID - data: ProductApiSingularInput! - ): CmsEntryValidationResponse! - - moveProductApiSingular( - revision: ID! - folderId: ID! - ): ProductApiSingularMoveResponse - - deleteProductApiSingular( - revision: ID! - options: CmsDeleteEntryOptions - ): CmsDeleteResponse - - deleteMultipleProductPluralApiName( - entries: [ID!]! - ): CmsDeleteMultipleResponse! - - publishProductApiSingular(revision: ID!): ProductApiSingularResponse - - republishProductApiSingular(revision: ID!): ProductApiSingularResponse - - unpublishProductApiSingular(revision: ID!): ProductApiSingularResponse -}`; +export default /* GraphQL */ ` + """ + Products being sold in our webshop + """ + type ProductApiSingular { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + + meta: ProductApiSingularMeta + title: String + category: RefField + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: [String] + image: String + richText: JSON + variant: ProductApiSingular_Variant + fieldsObject: ProductApiSingular_FieldsObject + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation + } + + type ProductApiSingularMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [ProductApiSingular!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON + } + + type ProductApiSingular_Variant_Options { + name: String + price: Number + image: String + category: RefField + categories: [RefField!] + longText: [String] + } + + input ProductApiSingular_Variant_OptionsWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + categories: RefFieldWhereInput + + longText_contains: String + longText_not_contains: String + } + + type ProductApiSingular_Variant { + name: String + price: Number + images: [String] + category: RefField + options: [ProductApiSingular_Variant_Options!] + } + + input ProductApiSingular_VariantWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + options: ProductApiSingular_Variant_OptionsWhereInput + } + + type ProductApiSingular_FieldsObject { + text: String + } + + input ProductApiSingular_FieldsObjectWhereInput { + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String + } + + input ProductApiSingular_Variant_OptionsInput { + name: String + price: Number + image: String + category: RefFieldInput + categories: [RefFieldInput] + longText: [String] + } + + input ProductApiSingular_VariantInput { + name: String + price: Number + images: [String] + category: RefFieldInput + options: [ProductApiSingular_Variant_OptionsInput!] + } + + input ProductApiSingular_FieldsObjectInput { + text: String + } + + input ProductApiSingularInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + title: String + category: RefFieldInput + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: [String!] + image: String + richText: JSON + variant: ProductApiSingular_VariantInput + fieldsObject: ProductApiSingular_FieldsObjectInput + } + + input ProductApiSingularGetWhereInput { + id: ID + entryId: String + title: String + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: String + } + + input ProductApiSingularListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String + + category: RefFieldWhereInput + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + inStock: Boolean + inStock_not: Boolean + + itemsInStock: Number + itemsInStock_not: Number + itemsInStock_in: [Number] + itemsInStock_not_in: [Number] + itemsInStock_lt: Number + itemsInStock_lte: Number + itemsInStock_gt: Number + itemsInStock_gte: Number + # there must be two numbers sent in the array + itemsInStock_between: [Number!] + # there must be two numbers sent in the array + itemsInStock_not_between: [Number!] + + availableOn: Date + availableOn_not: Date + availableOn_in: [Date] + availableOn_not_in: [Date] + availableOn_lt: Date + availableOn_lte: Date + availableOn_gt: Date + availableOn_gte: Date + + color: String + color_not: String + color_in: [String] + color_not_in: [String] + color_contains: String + color_not_contains: String + color_startsWith: String + color_not_startsWith: String + + availableSizes: String + availableSizes_not: String + availableSizes_in: [String] + availableSizes_not_in: [String] + availableSizes_contains: String + availableSizes_not_contains: String + availableSizes_startsWith: String + availableSizes_not_startsWith: String + + variant: ProductApiSingular_VariantWhereInput + fieldsObject: ProductApiSingular_FieldsObjectWhereInput + AND: [ProductApiSingularListWhereInput!] + OR: [ProductApiSingularListWhereInput!] + } + + type ProductApiSingularResponse { + data: ProductApiSingular + error: CmsError + } + + type ProductApiSingularMoveResponse { + data: Boolean + error: CmsError + } + + type ProductApiSingularArrayResponse { + data: [ProductApiSingular] + error: CmsError + } + + type ProductApiSingularListResponse { + data: [ProductApiSingular] + meta: CmsListMeta + error: CmsError + } + + enum ProductApiSingularListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + price_ASC + price_DESC + inStock_ASC + inStock_DESC + itemsInStock_ASC + itemsInStock_DESC + availableOn_ASC + availableOn_DESC + color_ASC + color_DESC + availableSizes_ASC + availableSizes_DESC + } + + extend type Query { + getProductApiSingular( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): ProductApiSingularResponse + + getProductApiSingularRevisions(id: ID!): ProductApiSingularArrayResponse + + getProductPluralApiNameByIds(revisions: [ID!]!): ProductApiSingularArrayResponse + + listProductPluralApiName( + where: ProductApiSingularListWhereInput + sort: [ProductApiSingularListSorter] + limit: Int + after: String + search: String + ): ProductApiSingularListResponse + } + + extend type Mutation { + createProductApiSingular( + data: ProductApiSingularInput! + options: CreateCmsEntryOptionsInput + ): ProductApiSingularResponse + + createProductApiSingularFrom( + revision: ID! + data: ProductApiSingularInput + options: CreateRevisionCmsEntryOptionsInput + ): ProductApiSingularResponse + + updateProductApiSingular( + revision: ID! + data: ProductApiSingularInput! + options: UpdateCmsEntryOptionsInput + ): ProductApiSingularResponse + + validateProductApiSingular( + revision: ID + data: ProductApiSingularInput! + ): CmsEntryValidationResponse! + + moveProductApiSingular(revision: ID!, folderId: ID!): ProductApiSingularMoveResponse + + deleteProductApiSingular(revision: ID!, options: CmsDeleteEntryOptions): CmsDeleteResponse + + deleteMultipleProductPluralApiName(entries: [ID!]!): CmsDeleteMultipleResponse! + + publishProductApiSingular(revision: ID!): ProductApiSingularResponse + + republishProductApiSingular(revision: ID!): ProductApiSingularResponse + + unpublishProductApiSingular(revision: ID!): ProductApiSingularResponse + } +`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts index 6162267808a..2d0c7afcb75 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/product.read.ts @@ -1,419 +1,409 @@ -export default /* GraphQL */ `""" -Products being sold in our webshop -""" -type ProductApiSingular { - id: ID! - entryId: String! - modelId: String! - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) - - title: String - category( - populate: Boolean = true - ): CategoryApiNameWhichIsABitDifferentThanModelId - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: [String] - image: String - richText(format: String): JSON - variant: ProductApiSingular_Variant - fieldsObject: ProductApiSingular_FieldsObject -} - -type ProductApiSingular_Variant_Options { - name: String - price: Number - image: String - category( - populate: Boolean = true - ): CategoryApiNameWhichIsABitDifferentThanModelId - categories( - populate: Boolean = true - ): [CategoryApiNameWhichIsABitDifferentThanModelId!] - longText: [String] -} - -input ProductApiSingular_Variant_OptionsWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - categories: RefFieldWhereInput - - longText_contains: String - longText_not_contains: String -} - -type ProductApiSingular_Variant { - name: String - price: Number - images: [String] - category( - populate: Boolean = true - ): CategoryApiNameWhichIsABitDifferentThanModelId - options: [ProductApiSingular_Variant_Options!] -} - -input ProductApiSingular_VariantWhereInput { - name: String - name_not: String - name_in: [String] - name_not_in: [String] - name_contains: String - name_not_contains: String - name_startsWith: String - name_not_startsWith: String - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - category: RefFieldWhereInput - - options: ProductApiSingular_Variant_OptionsWhereInput -} - -type ProductApiSingular_FieldsObject { - text: String -} - -input ProductApiSingular_FieldsObjectWhereInput { - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String -} - -input ProductApiSingularGetWhereInput { - id: ID - entryId: String - title: String - price: Number - inStock: Boolean - itemsInStock: Number - availableOn: Date - color: String - availableSizes: String -} - -input ProductApiSingularListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - - title: String - title_not: String - title_in: [String] - title_not_in: [String] - title_contains: String - title_not_contains: String - title_startsWith: String - title_not_startsWith: String - - category: RefFieldWhereInput - - price: Number - price_not: Number - price_in: [Number] - price_not_in: [Number] - price_lt: Number - price_lte: Number - price_gt: Number - price_gte: Number - # there must be two numbers sent in the array - price_between: [Number!] - # there must be two numbers sent in the array - price_not_between: [Number!] - - inStock: Boolean - inStock_not: Boolean - - itemsInStock: Number - itemsInStock_not: Number - itemsInStock_in: [Number] - itemsInStock_not_in: [Number] - itemsInStock_lt: Number - itemsInStock_lte: Number - itemsInStock_gt: Number - itemsInStock_gte: Number - # there must be two numbers sent in the array - itemsInStock_between: [Number!] - # there must be two numbers sent in the array - itemsInStock_not_between: [Number!] - - availableOn: Date - availableOn_not: Date - availableOn_in: [Date] - availableOn_not_in: [Date] - availableOn_lt: Date - availableOn_lte: Date - availableOn_gt: Date - availableOn_gte: Date - - color: String - color_not: String - color_in: [String] - color_not_in: [String] - color_contains: String - color_not_contains: String - color_startsWith: String - color_not_startsWith: String - - availableSizes: String - availableSizes_not: String - availableSizes_in: [String] - availableSizes_not_in: [String] - availableSizes_contains: String - availableSizes_not_contains: String - availableSizes_startsWith: String - availableSizes_not_startsWith: String - - variant: ProductApiSingular_VariantWhereInput - fieldsObject: ProductApiSingular_FieldsObjectWhereInput - AND: [ProductApiSingularListWhereInput!] - OR: [ProductApiSingularListWhereInput!] -} - -enum ProductApiSingularListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - title_ASC - title_DESC - price_ASC - price_DESC - inStock_ASC - inStock_DESC - itemsInStock_ASC - itemsInStock_DESC - availableOn_ASC - availableOn_DESC - color_ASC - color_DESC - availableSizes_ASC - availableSizes_DESC -} - -type ProductApiSingularResponse { - data: ProductApiSingular - error: CmsError -} - -type ProductApiSingularListResponse { - data: [ProductApiSingular] - meta: CmsListMeta - error: CmsError -} - -extend type Query { - getProductApiSingular( - where: ProductApiSingularGetWhereInput! - ): ProductApiSingularResponse - - listProductPluralApiName( - where: ProductApiSingularListWhereInput - sort: [ProductApiSingularListSorter] - limit: Int - after: String - search: String - ): ProductApiSingularListResponse -}`; +export default /* GraphQL */ ` + """ + Products being sold in our webshop + """ + type ProductApiSingular { + id: ID! + entryId: String! + modelId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + + title: String + category(populate: Boolean = true): CategoryApiNameWhichIsABitDifferentThanModelId + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: [String] + image: String + richText(format: String): JSON + variant: ProductApiSingular_Variant + fieldsObject: ProductApiSingular_FieldsObject + } + + type ProductApiSingular_Variant_Options { + name: String + price: Number + image: String + category(populate: Boolean = true): CategoryApiNameWhichIsABitDifferentThanModelId + categories(populate: Boolean = true): [CategoryApiNameWhichIsABitDifferentThanModelId!] + longText: [String] + } + + input ProductApiSingular_Variant_OptionsWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + categories: RefFieldWhereInput + + longText_contains: String + longText_not_contains: String + } + + type ProductApiSingular_Variant { + name: String + price: Number + images: [String] + category(populate: Boolean = true): CategoryApiNameWhichIsABitDifferentThanModelId + options: [ProductApiSingular_Variant_Options!] + } + + input ProductApiSingular_VariantWhereInput { + name: String + name_not: String + name_in: [String] + name_not_in: [String] + name_contains: String + name_not_contains: String + name_startsWith: String + name_not_startsWith: String + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + category: RefFieldWhereInput + + options: ProductApiSingular_Variant_OptionsWhereInput + } + + type ProductApiSingular_FieldsObject { + text: String + } + + input ProductApiSingular_FieldsObjectWhereInput { + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String + } + + input ProductApiSingularGetWhereInput { + id: ID + entryId: String + title: String + price: Number + inStock: Boolean + itemsInStock: Number + availableOn: Date + color: String + availableSizes: String + } + + input ProductApiSingularListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + + title: String + title_not: String + title_in: [String] + title_not_in: [String] + title_contains: String + title_not_contains: String + title_startsWith: String + title_not_startsWith: String + + category: RefFieldWhereInput + + price: Number + price_not: Number + price_in: [Number] + price_not_in: [Number] + price_lt: Number + price_lte: Number + price_gt: Number + price_gte: Number + # there must be two numbers sent in the array + price_between: [Number!] + # there must be two numbers sent in the array + price_not_between: [Number!] + + inStock: Boolean + inStock_not: Boolean + + itemsInStock: Number + itemsInStock_not: Number + itemsInStock_in: [Number] + itemsInStock_not_in: [Number] + itemsInStock_lt: Number + itemsInStock_lte: Number + itemsInStock_gt: Number + itemsInStock_gte: Number + # there must be two numbers sent in the array + itemsInStock_between: [Number!] + # there must be two numbers sent in the array + itemsInStock_not_between: [Number!] + + availableOn: Date + availableOn_not: Date + availableOn_in: [Date] + availableOn_not_in: [Date] + availableOn_lt: Date + availableOn_lte: Date + availableOn_gt: Date + availableOn_gte: Date + + color: String + color_not: String + color_in: [String] + color_not_in: [String] + color_contains: String + color_not_contains: String + color_startsWith: String + color_not_startsWith: String + + availableSizes: String + availableSizes_not: String + availableSizes_in: [String] + availableSizes_not_in: [String] + availableSizes_contains: String + availableSizes_not_contains: String + availableSizes_startsWith: String + availableSizes_not_startsWith: String + + variant: ProductApiSingular_VariantWhereInput + fieldsObject: ProductApiSingular_FieldsObjectWhereInput + AND: [ProductApiSingularListWhereInput!] + OR: [ProductApiSingularListWhereInput!] + } + + enum ProductApiSingularListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + title_ASC + title_DESC + price_ASC + price_DESC + inStock_ASC + inStock_DESC + itemsInStock_ASC + itemsInStock_DESC + availableOn_ASC + availableOn_DESC + color_ASC + color_DESC + availableSizes_ASC + availableSizes_DESC + } + + type ProductApiSingularResponse { + data: ProductApiSingular + error: CmsError + } + + type ProductApiSingularListResponse { + data: [ProductApiSingular] + meta: CmsListMeta + error: CmsError + } + + extend type Query { + getProductApiSingular(where: ProductApiSingularGetWhereInput!): ProductApiSingularResponse + + listProductPluralApiName( + where: ProductApiSingularListWhereInput + sort: [ProductApiSingularListSorter] + limit: Int + after: String + search: String + ): ProductApiSingularListResponse + } +`; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts index ae4607acc1f..4f2ebc9ad92 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.manage.ts @@ -1,372 +1,368 @@ -export default /* GraphQL */ `""" -Product review -""" -type ReviewApiModel { - id: ID! - entryId: String! - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity - - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) - - meta: ReviewApiModelMeta - text: String - product: RefField - rating: Number - author: RefField - # Advanced Content Organization - make required in 5.38.0 - wbyAco_location: WbyAcoLocation -} - -type ReviewApiModelMeta { - modelId: String - version: Int - locked: Boolean - - status: String - """ - CAUTION: this field is resolved by making an extra query to DB. - RECOMMENDATION: Use it only with "get" queries (avoid in "list") - """ - revisions: [ReviewApiModel!] - title: String - description: String - image: String - """ - Custom meta data stored in the root of the entry object. - """ - data: JSON -} - -input ReviewApiModelInput { - id: ID - - # Set status of the entry. - status: String - - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentityInput - modifiedBy: CmsIdentityInput - savedBy: CmsIdentityInput - firstPublishedBy: CmsIdentityInput - lastPublishedBy: CmsIdentityInput - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentityInput - revisionModifiedBy: CmsIdentityInput - revisionSavedBy: CmsIdentityInput - revisionFirstPublishedBy: CmsIdentityInput - revisionLastPublishedBy: CmsIdentityInput - - wbyAco_location: WbyAcoLocationInput - - text: String - product: RefFieldInput - rating: Number - author: RefFieldInput -} - -input ReviewApiModelGetWhereInput { - id: ID - entryId: String - text: String - rating: Number -} - -input ReviewApiModelListWhereInput { - wbyAco_location: WbyAcoLocationWhereInput - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] - status: String - status_not: String - status_in: [String!] - status_not_in: [String!] - - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String - - product: RefFieldWhereInput - - rating: Number - rating_not: Number - rating_in: [Number] - rating_not_in: [Number] - rating_lt: Number - rating_lte: Number - rating_gt: Number - rating_gte: Number - # there must be two numbers sent in the array - rating_between: [Number!] - # there must be two numbers sent in the array - rating_not_between: [Number!] - - author: RefFieldWhereInput - - AND: [ReviewApiModelListWhereInput!] - OR: [ReviewApiModelListWhereInput!] -} - -type ReviewApiModelResponse { - data: ReviewApiModel - error: CmsError -} - -type ReviewApiModelMoveResponse { - data: Boolean - error: CmsError -} - -type ReviewApiModelArrayResponse { - data: [ReviewApiModel] - error: CmsError -} - -type ReviewApiModelListResponse { - data: [ReviewApiModel] - meta: CmsListMeta - error: CmsError -} - -enum ReviewApiModelListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - text_ASC - text_DESC - rating_ASC - rating_DESC -} - -extend type Query { - getReviewApiModel( - revision: ID - entryId: ID - status: CmsEntryStatusType - ): ReviewApiModelResponse - - getReviewApiModelRevisions(id: ID!): ReviewApiModelArrayResponse - - getReviewsApiModelByIds(revisions: [ID!]!): ReviewApiModelArrayResponse - - listReviewsApiModel( - where: ReviewApiModelListWhereInput - sort: [ReviewApiModelListSorter] - limit: Int - after: String - search: String - ): ReviewApiModelListResponse -} - -extend type Mutation { - createReviewApiModel( - data: ReviewApiModelInput! - options: CreateCmsEntryOptionsInput - ): ReviewApiModelResponse - - createReviewApiModelFrom( - revision: ID! - data: ReviewApiModelInput - options: CreateRevisionCmsEntryOptionsInput - ): ReviewApiModelResponse - - updateReviewApiModel( - revision: ID! - data: ReviewApiModelInput! - options: UpdateCmsEntryOptionsInput - ): ReviewApiModelResponse - - validateReviewApiModel( - revision: ID - data: ReviewApiModelInput! - ): CmsEntryValidationResponse! - - moveReviewApiModel(revision: ID!, folderId: ID!): ReviewApiModelMoveResponse - - deleteReviewApiModel( - revision: ID! - options: CmsDeleteEntryOptions - ): CmsDeleteResponse - - deleteMultipleReviewsApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! - - publishReviewApiModel(revision: ID!): ReviewApiModelResponse - - republishReviewApiModel(revision: ID!): ReviewApiModelResponse - - unpublishReviewApiModel(revision: ID!): ReviewApiModelResponse -} +export default /* GraphQL */ ` + """ + Product review + """ + type ReviewApiModel { + id: ID! + entryId: String! + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity + + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") + + meta: ReviewApiModelMeta + text: String + product: RefField + rating: Number + author: RefField + # Advanced Content Organization - make required in 5.38.0 + wbyAco_location: WbyAcoLocation + } + + type ReviewApiModelMeta { + modelId: String + version: Int + locked: Boolean + + status: String + """ + CAUTION: this field is resolved by making an extra query to DB. + RECOMMENDATION: Use it only with "get" queries (avoid in "list") + """ + revisions: [ReviewApiModel!] + title: String + description: String + image: String + """ + Custom meta data stored in the root of the entry object. + """ + data: JSON + } + + input ReviewApiModelInput { + id: ID + + # Set status of the entry. + status: String + + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentityInput + modifiedBy: CmsIdentityInput + savedBy: CmsIdentityInput + firstPublishedBy: CmsIdentityInput + lastPublishedBy: CmsIdentityInput + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentityInput + revisionModifiedBy: CmsIdentityInput + revisionSavedBy: CmsIdentityInput + revisionFirstPublishedBy: CmsIdentityInput + revisionLastPublishedBy: CmsIdentityInput + + wbyAco_location: WbyAcoLocationInput + + text: String + product: RefFieldInput + rating: Number + author: RefFieldInput + } + + input ReviewApiModelGetWhereInput { + id: ID + entryId: String + text: String + rating: Number + } + + input ReviewApiModelListWhereInput { + wbyAco_location: WbyAcoLocationWhereInput + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] + status: String + status_not: String + status_in: [String!] + status_not_in: [String!] + + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String + + product: RefFieldWhereInput + + rating: Number + rating_not: Number + rating_in: [Number] + rating_not_in: [Number] + rating_lt: Number + rating_lte: Number + rating_gt: Number + rating_gte: Number + # there must be two numbers sent in the array + rating_between: [Number!] + # there must be two numbers sent in the array + rating_not_between: [Number!] + + author: RefFieldWhereInput + + AND: [ReviewApiModelListWhereInput!] + OR: [ReviewApiModelListWhereInput!] + } + + type ReviewApiModelResponse { + data: ReviewApiModel + error: CmsError + } + + type ReviewApiModelMoveResponse { + data: Boolean + error: CmsError + } + + type ReviewApiModelArrayResponse { + data: [ReviewApiModel] + error: CmsError + } + + type ReviewApiModelListResponse { + data: [ReviewApiModel] + meta: CmsListMeta + error: CmsError + } + + enum ReviewApiModelListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + text_ASC + text_DESC + rating_ASC + rating_DESC + } + + extend type Query { + getReviewApiModel( + revision: ID + entryId: ID + status: CmsEntryStatusType + ): ReviewApiModelResponse + + getReviewApiModelRevisions(id: ID!): ReviewApiModelArrayResponse + + getReviewsApiModelByIds(revisions: [ID!]!): ReviewApiModelArrayResponse + + listReviewsApiModel( + where: ReviewApiModelListWhereInput + sort: [ReviewApiModelListSorter] + limit: Int + after: String + search: String + ): ReviewApiModelListResponse + } + + extend type Mutation { + createReviewApiModel( + data: ReviewApiModelInput! + options: CreateCmsEntryOptionsInput + ): ReviewApiModelResponse + + createReviewApiModelFrom( + revision: ID! + data: ReviewApiModelInput + options: CreateRevisionCmsEntryOptionsInput + ): ReviewApiModelResponse + + updateReviewApiModel( + revision: ID! + data: ReviewApiModelInput! + options: UpdateCmsEntryOptionsInput + ): ReviewApiModelResponse + + validateReviewApiModel( + revision: ID + data: ReviewApiModelInput! + ): CmsEntryValidationResponse! + + moveReviewApiModel(revision: ID!, folderId: ID!): ReviewApiModelMoveResponse + + deleteReviewApiModel(revision: ID!, options: CmsDeleteEntryOptions): CmsDeleteResponse + + deleteMultipleReviewsApiModel(entries: [ID!]!): CmsDeleteMultipleResponse! + + publishReviewApiModel(revision: ID!): ReviewApiModelResponse + + republishReviewApiModel(revision: ID!): ReviewApiModelResponse + + unpublishReviewApiModel(revision: ID!): ReviewApiModelResponse + } `; diff --git a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts index 1c0a5490a66..96dea2264f1 100644 --- a/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts +++ b/packages/api-headless-cms/__tests__/contentAPI/snapshots/review.read.ts @@ -1,252 +1,252 @@ -export default /* GraphQL */ `""" -Product review -""" -type ReviewApiModel { - id: ID! - entryId: String! - modelId: String! +export default /* GraphQL */ ` + """ + Product review + """ + type ReviewApiModel { + id: ID! + entryId: String! + modelId: String! - createdOn: DateTime - modifiedOn: DateTime - savedOn: DateTime - firstPublishedOn: DateTime - lastPublishedOn: DateTime - createdBy: CmsIdentity - modifiedBy: CmsIdentity - savedBy: CmsIdentity - firstPublishedBy: CmsIdentity - lastPublishedBy: CmsIdentity - revisionCreatedOn: DateTime - revisionModifiedOn: DateTime - revisionSavedOn: DateTime - revisionFirstPublishedOn: DateTime - revisionLastPublishedOn: DateTime - revisionCreatedBy: CmsIdentity - revisionModifiedBy: CmsIdentity - revisionSavedBy: CmsIdentity - revisionFirstPublishedBy: CmsIdentity - revisionLastPublishedBy: CmsIdentity + createdOn: DateTime + modifiedOn: DateTime + savedOn: DateTime + firstPublishedOn: DateTime + lastPublishedOn: DateTime + createdBy: CmsIdentity + modifiedBy: CmsIdentity + savedBy: CmsIdentity + firstPublishedBy: CmsIdentity + lastPublishedBy: CmsIdentity + revisionCreatedOn: DateTime + revisionModifiedOn: DateTime + revisionSavedOn: DateTime + revisionFirstPublishedOn: DateTime + revisionLastPublishedOn: DateTime + revisionCreatedBy: CmsIdentity + revisionModifiedBy: CmsIdentity + revisionSavedBy: CmsIdentity + revisionFirstPublishedBy: CmsIdentity + revisionLastPublishedBy: CmsIdentity - publishedOn: DateTime - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." - ) - ownedBy: CmsIdentity - @deprecated( - reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field." - ) + publishedOn: DateTime + @deprecated( + reason: "Field was removed with the 5.39.0 release. Use 'firstPublishedOn' or 'lastPublishedOn' field." + ) + ownedBy: CmsIdentity + @deprecated(reason: "Field was removed with the 5.39.0 release. Use 'createdBy' field.") - text: String - product(populate: Boolean = true): ProductApiSingular - rating: Number - author(populate: Boolean = true): AuthorApiModel -} + text: String + product(populate: Boolean = true): ProductApiSingular + rating: Number + author(populate: Boolean = true): AuthorApiModel + } -input ReviewApiModelGetWhereInput { - id: ID - entryId: String - text: String - rating: Number -} + input ReviewApiModelGetWhereInput { + id: ID + entryId: String + text: String + rating: Number + } -input ReviewApiModelListWhereInput { - id: ID - id_not: ID - id_in: [ID!] - id_not_in: [ID!] - entryId: String - entryId_not: String - entryId_in: [String!] - entryId_not_in: [String!] - createdOn: DateTime - createdOn_gt: DateTime - createdOn_gte: DateTime - createdOn_lt: DateTime - createdOn_lte: DateTime - createdOn_between: [DateTime!] - createdOn_not_between: [DateTime!] - modifiedOn: DateTime - modifiedOn_gt: DateTime - modifiedOn_gte: DateTime - modifiedOn_lt: DateTime - modifiedOn_lte: DateTime - modifiedOn_between: [DateTime!] - modifiedOn_not_between: [DateTime!] - savedOn: DateTime - savedOn_gt: DateTime - savedOn_gte: DateTime - savedOn_lt: DateTime - savedOn_lte: DateTime - savedOn_between: [DateTime!] - savedOn_not_between: [DateTime!] - firstPublishedOn: DateTime - firstPublishedOn_gt: DateTime - firstPublishedOn_gte: DateTime - firstPublishedOn_lt: DateTime - firstPublishedOn_lte: DateTime - firstPublishedOn_between: [DateTime!] - firstPublishedOn_not_between: [DateTime!] - lastPublishedOn: DateTime - lastPublishedOn_gt: DateTime - lastPublishedOn_gte: DateTime - lastPublishedOn_lt: DateTime - lastPublishedOn_lte: DateTime - lastPublishedOn_between: [DateTime!] - lastPublishedOn_not_between: [DateTime!] - createdBy: ID - createdBy_not: ID - createdBy_in: [ID!] - createdBy_not_in: [ID!] - modifiedBy: ID - modifiedBy_not: ID - modifiedBy_in: [ID!] - modifiedBy_not_in: [ID!] - savedBy: ID - savedBy_not: ID - savedBy_in: [ID!] - savedBy_not_in: [ID!] - firstPublishedBy: ID - firstPublishedBy_not: ID - firstPublishedBy_in: [ID!] - firstPublishedBy_not_in: [ID!] - lastPublishedBy: ID - lastPublishedBy_not: ID - lastPublishedBy_in: [ID!] - lastPublishedBy_not_in: [ID!] - revisionCreatedOn: DateTime - revisionCreatedOn_gt: DateTime - revisionCreatedOn_gte: DateTime - revisionCreatedOn_lt: DateTime - revisionCreatedOn_lte: DateTime - revisionCreatedOn_between: [DateTime!] - revisionCreatedOn_not_between: [DateTime!] - revisionModifiedOn: DateTime - revisionModifiedOn_gt: DateTime - revisionModifiedOn_gte: DateTime - revisionModifiedOn_lt: DateTime - revisionModifiedOn_lte: DateTime - revisionModifiedOn_between: [DateTime!] - revisionModifiedOn_not_between: [DateTime!] - revisionSavedOn: DateTime - revisionSavedOn_gt: DateTime - revisionSavedOn_gte: DateTime - revisionSavedOn_lt: DateTime - revisionSavedOn_lte: DateTime - revisionSavedOn_between: [DateTime!] - revisionSavedOn_not_between: [DateTime!] - revisionFirstPublishedOn: DateTime - revisionFirstPublishedOn_gt: DateTime - revisionFirstPublishedOn_gte: DateTime - revisionFirstPublishedOn_lt: DateTime - revisionFirstPublishedOn_lte: DateTime - revisionFirstPublishedOn_between: [DateTime!] - revisionFirstPublishedOn_not_between: [DateTime!] - revisionLastPublishedOn: DateTime - revisionLastPublishedOn_gt: DateTime - revisionLastPublishedOn_gte: DateTime - revisionLastPublishedOn_lt: DateTime - revisionLastPublishedOn_lte: DateTime - revisionLastPublishedOn_between: [DateTime!] - revisionLastPublishedOn_not_between: [DateTime!] - revisionCreatedBy: ID - revisionCreatedBy_not: ID - revisionCreatedBy_in: [ID!] - revisionCreatedBy_not_in: [ID!] - revisionModifiedBy: ID - revisionModifiedBy_not: ID - revisionModifiedBy_in: [ID!] - revisionModifiedBy_not_in: [ID!] - revisionSavedBy: ID - revisionSavedBy_not: ID - revisionSavedBy_in: [ID!] - revisionSavedBy_not_in: [ID!] - revisionFirstPublishedBy: ID - revisionFirstPublishedBy_not: ID - revisionFirstPublishedBy_in: [ID!] - revisionFirstPublishedBy_not_in: [ID!] - revisionLastPublishedBy: ID - revisionLastPublishedBy_not: ID - revisionLastPublishedBy_in: [ID!] - revisionLastPublishedBy_not_in: [ID!] + input ReviewApiModelListWhereInput { + id: ID + id_not: ID + id_in: [ID!] + id_not_in: [ID!] + entryId: String + entryId_not: String + entryId_in: [String!] + entryId_not_in: [String!] + createdOn: DateTime + createdOn_gt: DateTime + createdOn_gte: DateTime + createdOn_lt: DateTime + createdOn_lte: DateTime + createdOn_between: [DateTime!] + createdOn_not_between: [DateTime!] + modifiedOn: DateTime + modifiedOn_gt: DateTime + modifiedOn_gte: DateTime + modifiedOn_lt: DateTime + modifiedOn_lte: DateTime + modifiedOn_between: [DateTime!] + modifiedOn_not_between: [DateTime!] + savedOn: DateTime + savedOn_gt: DateTime + savedOn_gte: DateTime + savedOn_lt: DateTime + savedOn_lte: DateTime + savedOn_between: [DateTime!] + savedOn_not_between: [DateTime!] + firstPublishedOn: DateTime + firstPublishedOn_gt: DateTime + firstPublishedOn_gte: DateTime + firstPublishedOn_lt: DateTime + firstPublishedOn_lte: DateTime + firstPublishedOn_between: [DateTime!] + firstPublishedOn_not_between: [DateTime!] + lastPublishedOn: DateTime + lastPublishedOn_gt: DateTime + lastPublishedOn_gte: DateTime + lastPublishedOn_lt: DateTime + lastPublishedOn_lte: DateTime + lastPublishedOn_between: [DateTime!] + lastPublishedOn_not_between: [DateTime!] + createdBy: ID + createdBy_not: ID + createdBy_in: [ID!] + createdBy_not_in: [ID!] + modifiedBy: ID + modifiedBy_not: ID + modifiedBy_in: [ID!] + modifiedBy_not_in: [ID!] + savedBy: ID + savedBy_not: ID + savedBy_in: [ID!] + savedBy_not_in: [ID!] + firstPublishedBy: ID + firstPublishedBy_not: ID + firstPublishedBy_in: [ID!] + firstPublishedBy_not_in: [ID!] + lastPublishedBy: ID + lastPublishedBy_not: ID + lastPublishedBy_in: [ID!] + lastPublishedBy_not_in: [ID!] + revisionCreatedOn: DateTime + revisionCreatedOn_gt: DateTime + revisionCreatedOn_gte: DateTime + revisionCreatedOn_lt: DateTime + revisionCreatedOn_lte: DateTime + revisionCreatedOn_between: [DateTime!] + revisionCreatedOn_not_between: [DateTime!] + revisionModifiedOn: DateTime + revisionModifiedOn_gt: DateTime + revisionModifiedOn_gte: DateTime + revisionModifiedOn_lt: DateTime + revisionModifiedOn_lte: DateTime + revisionModifiedOn_between: [DateTime!] + revisionModifiedOn_not_between: [DateTime!] + revisionSavedOn: DateTime + revisionSavedOn_gt: DateTime + revisionSavedOn_gte: DateTime + revisionSavedOn_lt: DateTime + revisionSavedOn_lte: DateTime + revisionSavedOn_between: [DateTime!] + revisionSavedOn_not_between: [DateTime!] + revisionFirstPublishedOn: DateTime + revisionFirstPublishedOn_gt: DateTime + revisionFirstPublishedOn_gte: DateTime + revisionFirstPublishedOn_lt: DateTime + revisionFirstPublishedOn_lte: DateTime + revisionFirstPublishedOn_between: [DateTime!] + revisionFirstPublishedOn_not_between: [DateTime!] + revisionLastPublishedOn: DateTime + revisionLastPublishedOn_gt: DateTime + revisionLastPublishedOn_gte: DateTime + revisionLastPublishedOn_lt: DateTime + revisionLastPublishedOn_lte: DateTime + revisionLastPublishedOn_between: [DateTime!] + revisionLastPublishedOn_not_between: [DateTime!] + revisionCreatedBy: ID + revisionCreatedBy_not: ID + revisionCreatedBy_in: [ID!] + revisionCreatedBy_not_in: [ID!] + revisionModifiedBy: ID + revisionModifiedBy_not: ID + revisionModifiedBy_in: [ID!] + revisionModifiedBy_not_in: [ID!] + revisionSavedBy: ID + revisionSavedBy_not: ID + revisionSavedBy_in: [ID!] + revisionSavedBy_not_in: [ID!] + revisionFirstPublishedBy: ID + revisionFirstPublishedBy_not: ID + revisionFirstPublishedBy_in: [ID!] + revisionFirstPublishedBy_not_in: [ID!] + revisionLastPublishedBy: ID + revisionLastPublishedBy_not: ID + revisionLastPublishedBy_in: [ID!] + revisionLastPublishedBy_not_in: [ID!] - text: String - text_not: String - text_in: [String] - text_not_in: [String] - text_contains: String - text_not_contains: String - text_startsWith: String - text_not_startsWith: String + text: String + text_not: String + text_in: [String] + text_not_in: [String] + text_contains: String + text_not_contains: String + text_startsWith: String + text_not_startsWith: String - product: RefFieldWhereInput + product: RefFieldWhereInput - rating: Number - rating_not: Number - rating_in: [Number] - rating_not_in: [Number] - rating_lt: Number - rating_lte: Number - rating_gt: Number - rating_gte: Number - # there must be two numbers sent in the array - rating_between: [Number!] - # there must be two numbers sent in the array - rating_not_between: [Number!] + rating: Number + rating_not: Number + rating_in: [Number] + rating_not_in: [Number] + rating_lt: Number + rating_lte: Number + rating_gt: Number + rating_gte: Number + # there must be two numbers sent in the array + rating_between: [Number!] + # there must be two numbers sent in the array + rating_not_between: [Number!] - author: RefFieldWhereInput + author: RefFieldWhereInput - AND: [ReviewApiModelListWhereInput!] - OR: [ReviewApiModelListWhereInput!] -} + AND: [ReviewApiModelListWhereInput!] + OR: [ReviewApiModelListWhereInput!] + } -enum ReviewApiModelListSorter { - id_ASC - id_DESC - createdOn_ASC - createdOn_DESC - modifiedOn_ASC - modifiedOn_DESC - savedOn_ASC - savedOn_DESC - firstPublishedOn_ASC - firstPublishedOn_DESC - lastPublishedOn_ASC - lastPublishedOn_DESC - revisionCreatedOn_ASC - revisionCreatedOn_DESC - revisionModifiedOn_ASC - revisionModifiedOn_DESC - revisionSavedOn_ASC - revisionSavedOn_DESC - revisionFirstPublishedOn_ASC - revisionFirstPublishedOn_DESC - revisionLastPublishedOn_ASC - revisionLastPublishedOn_DESC - text_ASC - text_DESC - rating_ASC - rating_DESC -} + enum ReviewApiModelListSorter { + id_ASC + id_DESC + createdOn_ASC + createdOn_DESC + modifiedOn_ASC + modifiedOn_DESC + savedOn_ASC + savedOn_DESC + firstPublishedOn_ASC + firstPublishedOn_DESC + lastPublishedOn_ASC + lastPublishedOn_DESC + revisionCreatedOn_ASC + revisionCreatedOn_DESC + revisionModifiedOn_ASC + revisionModifiedOn_DESC + revisionSavedOn_ASC + revisionSavedOn_DESC + revisionFirstPublishedOn_ASC + revisionFirstPublishedOn_DESC + revisionLastPublishedOn_ASC + revisionLastPublishedOn_DESC + text_ASC + text_DESC + rating_ASC + rating_DESC + } -type ReviewApiModelResponse { - data: ReviewApiModel - error: CmsError -} + type ReviewApiModelResponse { + data: ReviewApiModel + error: CmsError + } -type ReviewApiModelListResponse { - data: [ReviewApiModel] - meta: CmsListMeta - error: CmsError -} + type ReviewApiModelListResponse { + data: [ReviewApiModel] + meta: CmsListMeta + error: CmsError + } -extend type Query { - getReviewApiModel(where: ReviewApiModelGetWhereInput!): ReviewApiModelResponse + extend type Query { + getReviewApiModel(where: ReviewApiModelGetWhereInput!): ReviewApiModelResponse - listReviewsApiModel( - where: ReviewApiModelListWhereInput - sort: [ReviewApiModelListSorter] - limit: Int - after: String - search: String - ): ReviewApiModelListResponse -}`; + listReviewsApiModel( + where: ReviewApiModelListWhereInput + sort: [ReviewApiModelListSorter] + limit: Int + after: String + search: String + ): ReviewApiModelListResponse + } +`;