chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Canonical entry point for everything integrations-related. Landing
|
||||
* `/integrations`, workspace integrations, and the sitemap all import from
|
||||
* here so the data shape and helpers stay in lockstep.
|
||||
*
|
||||
* `INTEGRATIONS` is the serialized projection of `BlockConfig` written by
|
||||
* `scripts/generate-docs.ts` whenever a block changes.
|
||||
*
|
||||
* `POPULAR_WORKFLOWS` is derived from each block's `*BlockMeta` export (see
|
||||
* `apps/sim/blocks/registry.ts`, which now hosts both the execution
|
||||
* `BlockConfig` lookups and the presentation `BlockMeta` lookups). Block
|
||||
* files are the source of truth for both surfaces.
|
||||
*/
|
||||
|
||||
import { stripVersionSuffix } from '@sim/utils/string'
|
||||
import integrationsJson from '@/lib/integrations/integrations.json'
|
||||
import type { Integration } from '@/lib/integrations/types'
|
||||
import { getAllBlockMeta } from '@/blocks/registry'
|
||||
|
||||
/** All integrations surfaced in the catalog, ordered by `scripts/generate-docs.ts`. */
|
||||
export const INTEGRATIONS: readonly Integration[] =
|
||||
integrationsJson.integrations as readonly Integration[]
|
||||
|
||||
/**
|
||||
* ISO date of the last real catalog change, stamped by `scripts/generate-docs.ts`.
|
||||
* Drives sitemap `lastModified`, JSON-LD `dateModified`, and the visible
|
||||
* last-updated line on integration pages.
|
||||
*/
|
||||
export const INTEGRATIONS_UPDATED_AT: string = integrationsJson.updatedAt
|
||||
|
||||
/** A curated `from → to` block-pair workflow surfaced on the landing page. */
|
||||
export interface PopularWorkflow {
|
||||
/** Integration display name (matches `Integration.name`). */
|
||||
from: string
|
||||
/** Integration display name. */
|
||||
to: string
|
||||
headline: string
|
||||
description: string
|
||||
}
|
||||
|
||||
const TYPE_TO_NAME = new Map<string, string>()
|
||||
for (const integration of INTEGRATIONS) {
|
||||
TYPE_TO_NAME.set(integration.type, integration.name)
|
||||
TYPE_TO_NAME.set(stripVersionSuffix(integration.type), integration.name)
|
||||
}
|
||||
|
||||
/**
|
||||
* Curated popular workflow pairs (templates flagged `featured: true` that
|
||||
* reference at least one other integration). Derived from per-block meta —
|
||||
* each entry's `from` is the owner block, `to` is the first
|
||||
* `alsoIntegrations` entry, and `headline`/`description` come from the
|
||||
* template title and prompt.
|
||||
*/
|
||||
export const POPULAR_WORKFLOWS: readonly PopularWorkflow[] = (() => {
|
||||
const pairs: PopularWorkflow[] = []
|
||||
for (const [ownerType, meta] of Object.entries(getAllBlockMeta())) {
|
||||
for (const template of meta.templates ?? []) {
|
||||
if (!template.featured) continue
|
||||
const toType = template.alsoIntegrations?.[0]
|
||||
if (!toType) continue
|
||||
const from = TYPE_TO_NAME.get(ownerType) ?? TYPE_TO_NAME.get(stripVersionSuffix(ownerType))
|
||||
const to = TYPE_TO_NAME.get(toType) ?? TYPE_TO_NAME.get(stripVersionSuffix(toType))
|
||||
if (!from || !to) continue
|
||||
pairs.push({ from, to, headline: template.title, description: template.prompt })
|
||||
}
|
||||
}
|
||||
return pairs
|
||||
})()
|
||||
|
||||
export { blockTypeToIconMap } from '@/lib/integrations/icon-mapping'
|
||||
export {
|
||||
type OAuthServiceMatch,
|
||||
resolveOAuthServiceForIntegration,
|
||||
resolveOAuthServiceForSlug,
|
||||
} from '@/lib/integrations/oauth-service'
|
||||
export type { AuthType, FAQItem, Integration } from '@/lib/integrations/types'
|
||||
export { getAllBlockMeta, getBlockMeta, getTemplatesForBlock } from '@/blocks/registry'
|
||||
export type { BlockMeta, BlockTemplate } from '@/blocks/types'
|
||||
export { formatIntegrationType } from '@/blocks/types'
|
||||
Reference in New Issue
Block a user