Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -5,12 +5,12 @@ import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import bcrypt from "bcryptjs";
|
||||
import { entitlementPlanIds } from "@toolctrl/entitlements";
|
||||
import { syncDefaultRolesAndPermissions } from "@toolctrl/db/permissions-seed.server";
|
||||
import { getDbClient, type DbClient } from "@toolctrl/db/client.server";
|
||||
import { deriveLegacyApiKeyHashMetadata } from "@toolctrl/db/api-keys.server";
|
||||
import type { PluginManifest } from "@toolctrl/plugin-runtime";
|
||||
import type { SequenceStep } from "@toolctrl/email-sequences";
|
||||
import { entitlementPlanIds } from "@hivegrid/entitlements";
|
||||
import { syncDefaultRolesAndPermissions } from "@hivegrid/db/permissions-seed.server";
|
||||
import { getDbClient, type DbClient } from "@hivegrid/db/client.server";
|
||||
import { deriveLegacyApiKeyHashMetadata } from "@hivegrid/db/api-keys.server";
|
||||
import type { PluginManifest } from "@hivegrid/plugin-runtime";
|
||||
import type { SequenceStep } from "@hivegrid/email-sequences";
|
||||
|
||||
export const E2E_READINESS_USER_EMAIL = "e2e.readiness@example.test";
|
||||
export const E2E_READINESS_USER_PASSWORD = "ReadinessPass123!";
|
||||
@@ -40,9 +40,9 @@ export const E2E_READINESS_WAITING_WORKFLOW_ID = "wf_waiting_123";
|
||||
export const E2E_READINESS_WAITING_WORKFLOW_NAME = "E2E Readiness Waiting Workflow";
|
||||
export const E2E_READINESS_WAITING_EXECUTION_ID = "wfe_waiting_123";
|
||||
export const E2E_READINESS_WAITING_MANUAL_BLOCK_EXECUTION_ID = "wfbe_waiting_manual_123";
|
||||
export const E2E_READINESS_PLUGIN_ID = "com.toolctrl.e2e-readiness";
|
||||
export const E2E_READINESS_PLUGIN_ID = "com.hivegrid.e2e-readiness";
|
||||
export const E2E_READINESS_PLUGIN_VERSION = "1.0.0";
|
||||
export const E2E_READINESS_LIFECYCLE_PLUGIN_ID = "com.toolctrl.e2e-lifecycle";
|
||||
export const E2E_READINESS_LIFECYCLE_PLUGIN_ID = "com.hivegrid.e2e-lifecycle";
|
||||
export const E2E_READINESS_LIFECYCLE_PLUGIN_VERSION = "1.0.0";
|
||||
// Must match WORKSPACE_ROLES_FEATURE_FLAG in workspaceRoles.server.ts.
|
||||
export const E2E_READINESS_WORKSPACE_ROLES_FLAG = "workspace-roles";
|
||||
@@ -51,10 +51,10 @@ export const E2E_READINESS_API_LOG_ENDPOINT = "/v1/e2e-readiness";
|
||||
export const E2E_READINESS_API_LOG_METHOD = "GET";
|
||||
export const E2E_READINESS_PORTAL_SUBDOMAIN = "e2e-readiness";
|
||||
export const E2E_READINESS_PORTAL_TITLE = "E2E Readiness Portal";
|
||||
export const E2E_READINESS_SUBSCRIPTION_PLAN_STRIPE_ID = "e2e_readiness_plan";
|
||||
export const E2E_READINESS_SUBSCRIPTION_PRICE_STRIPE_ID = "e2e_readiness_price_monthly";
|
||||
export const E2E_READINESS_UPGRADE_PLAN_STRIPE_ID = "e2e_readiness_upgrade_plan";
|
||||
export const E2E_READINESS_UPGRADE_PRICE_STRIPE_ID = "e2e_readiness_upgrade_price_monthly";
|
||||
export const E2E_READINESS_SUBSCRIPTION_PLAN_BILLING_PROVIDER_ID = "e2e_readiness_plan";
|
||||
export const E2E_READINESS_SUBSCRIPTION_PRICE_BILLING_PROVIDER_ID = "e2e_readiness_price_monthly";
|
||||
export const E2E_READINESS_UPGRADE_PLAN_BILLING_PROVIDER_ID = "e2e_readiness_upgrade_plan";
|
||||
export const E2E_READINESS_UPGRADE_PRICE_BILLING_PROVIDER_ID = "e2e_readiness_upgrade_price_monthly";
|
||||
// Entitlement plan granted to the seeded tenant's active subscription product so
|
||||
// per-feature gates (workflow engine, API, advanced builder, ...) resolve as allowed
|
||||
// instead of redirecting to /plan-required. "business" grants the widest feature set.
|
||||
@@ -237,8 +237,6 @@ export function buildE2eReadinessEnv(fixture: ReadinessFixture): Record<string,
|
||||
E2E_TENANT_LOG_EVENTS_PATH: appFixturePath(fixture.tenantSlug, "settings/logs/events"),
|
||||
E2E_TENANT_AUDIT_EXPORT_PATH: appFixturePath(fixture.tenantSlug, "settings/audit-export"),
|
||||
E2E_TENANT_PRIVACY_PATH: appFixturePath(fixture.tenantSlug, "settings/privacy"),
|
||||
E2E_TENANT_CHATBOT_PATH: appFixturePath(fixture.tenantSlug, "settings/chatbot"),
|
||||
E2E_TENANT_AI_USAGE_PATH: appFixturePath(fixture.tenantSlug, "settings/ai-usage"),
|
||||
E2E_TENANT_API_PATH: appFixturePath(fixture.tenantSlug, "settings/api"),
|
||||
E2E_TENANT_API_KEYS_PATH: appFixturePath(fixture.tenantSlug, "settings/api/keys"),
|
||||
E2E_TENANT_API_DOCS_PATH: appFixturePath(fixture.tenantSlug, "settings/api/docs"),
|
||||
@@ -747,10 +745,10 @@ async function seedSubscription(db: DbClient, tenantId: string) {
|
||||
periodEnd.setUTCMonth(periodEnd.getUTCMonth() + 1);
|
||||
|
||||
const product =
|
||||
(await db.subscriptionProduct.findFirst({ where: { stripeId: E2E_READINESS_SUBSCRIPTION_PLAN_STRIPE_ID } })) ??
|
||||
(await db.subscriptionProduct.findFirst({ where: { billingProviderId: E2E_READINESS_SUBSCRIPTION_PLAN_BILLING_PROVIDER_ID } })) ??
|
||||
(await db.subscriptionProduct.create({
|
||||
data: {
|
||||
stripeId: E2E_READINESS_SUBSCRIPTION_PLAN_STRIPE_ID,
|
||||
billingProviderId: E2E_READINESS_SUBSCRIPTION_PLAN_BILLING_PROVIDER_ID,
|
||||
order: 1,
|
||||
title: "E2E Readiness Plan",
|
||||
active: true,
|
||||
@@ -779,11 +777,11 @@ async function seedSubscription(db: DbClient, tenantId: string) {
|
||||
}
|
||||
|
||||
const price =
|
||||
(await db.subscriptionPrice.findFirst({ where: { subscriptionProductId: product.id, stripeId: E2E_READINESS_SUBSCRIPTION_PRICE_STRIPE_ID } })) ??
|
||||
(await db.subscriptionPrice.findFirst({ where: { subscriptionProductId: product.id, billingProviderId: E2E_READINESS_SUBSCRIPTION_PRICE_BILLING_PROVIDER_ID } })) ??
|
||||
(await db.subscriptionPrice.create({
|
||||
data: {
|
||||
subscriptionProductId: product.id,
|
||||
stripeId: E2E_READINESS_SUBSCRIPTION_PRICE_STRIPE_ID,
|
||||
billingProviderId: E2E_READINESS_SUBSCRIPTION_PRICE_BILLING_PROVIDER_ID,
|
||||
type: 0,
|
||||
billingPeriod: 3,
|
||||
price: "19",
|
||||
@@ -799,10 +797,10 @@ async function seedSubscription(db: DbClient, tenantId: string) {
|
||||
});
|
||||
|
||||
const upgradeProduct =
|
||||
(await db.subscriptionProduct.findFirst({ where: { stripeId: E2E_READINESS_UPGRADE_PLAN_STRIPE_ID } })) ??
|
||||
(await db.subscriptionProduct.findFirst({ where: { billingProviderId: E2E_READINESS_UPGRADE_PLAN_BILLING_PROVIDER_ID } })) ??
|
||||
(await db.subscriptionProduct.create({
|
||||
data: {
|
||||
stripeId: E2E_READINESS_UPGRADE_PLAN_STRIPE_ID,
|
||||
billingProviderId: E2E_READINESS_UPGRADE_PLAN_BILLING_PROVIDER_ID,
|
||||
order: 2,
|
||||
title: "E2E Readiness Upgrade Plan",
|
||||
active: true,
|
||||
@@ -828,12 +826,12 @@ async function seedSubscription(db: DbClient, tenantId: string) {
|
||||
|
||||
const upgradePrice =
|
||||
(await db.subscriptionPrice.findFirst({
|
||||
where: { subscriptionProductId: upgradeProduct.id, stripeId: E2E_READINESS_UPGRADE_PRICE_STRIPE_ID },
|
||||
where: { subscriptionProductId: upgradeProduct.id, billingProviderId: E2E_READINESS_UPGRADE_PRICE_BILLING_PROVIDER_ID },
|
||||
})) ??
|
||||
(await db.subscriptionPrice.create({
|
||||
data: {
|
||||
subscriptionProductId: upgradeProduct.id,
|
||||
stripeId: E2E_READINESS_UPGRADE_PRICE_STRIPE_ID,
|
||||
billingProviderId: E2E_READINESS_UPGRADE_PRICE_BILLING_PROVIDER_ID,
|
||||
type: 0,
|
||||
billingPeriod: 3,
|
||||
price: "29",
|
||||
@@ -850,7 +848,7 @@ async function seedSubscription(db: DbClient, tenantId: string) {
|
||||
|
||||
const tenantSubscription = await db.tenantSubscription.upsert({
|
||||
where: { tenantId },
|
||||
create: { tenantId, stripeCustomerId: null },
|
||||
create: { tenantId, billingProviderCustomerId: null },
|
||||
update: {},
|
||||
});
|
||||
|
||||
@@ -1027,7 +1025,7 @@ async function seedPortal(db: DbClient, tenantId: string, userId: string) {
|
||||
// mounted; this fixture lets the readiness lane exercise the tenant portal
|
||||
// management surfaces (analytics + settings) once the env opt-in is set. A
|
||||
// minimal published portal is enough — the pages render their empty-state /
|
||||
// form without any Stripe/analytics data.
|
||||
// form without any Mollie/analytics data.
|
||||
await db.portal.upsert({
|
||||
where: { subdomain: E2E_READINESS_PORTAL_SUBDOMAIN },
|
||||
create: {
|
||||
|
||||
Reference in new issue
Block a user