diff --git a/ci-templates/azure-devops/azure-pipelines.yml b/ci-templates/azure-devops/azure-pipelines.yml index cc572f4..10eed32 100644 --- a/ci-templates/azure-devops/azure-pipelines.yml +++ b/ci-templates/azure-devops/azure-pipelines.yml @@ -33,7 +33,7 @@ stages: version: 22.x # An exact version: change it when you upgrade, as # https://docs.ingestron.io/docs/how-to/upgrade#choose-the-version-you-run says. - - script: npm install -g ingestron@2.1.0 + - script: npm install -g ingestron@2.2.0 displayName: Install Ingestron - script: ingestron check displayName: ingestron check diff --git a/ci-templates/azure-devops/ingestron-check.yml b/ci-templates/azure-devops/ingestron-check.yml index 9b7f902..a32ac45 100644 --- a/ci-templates/azure-devops/ingestron-check.yml +++ b/ci-templates/azure-devops/ingestron-check.yml @@ -15,7 +15,7 @@ steps: version: 22.x # An exact version: change it when you upgrade, as # https://docs.ingestron.io/docs/how-to/upgrade#choose-the-version-you-run says. - - script: npm install -g ingestron@2.1.0 + - script: npm install -g ingestron@2.2.0 displayName: Install Ingestron - script: ingestron check displayName: ingestron check diff --git a/ci-templates/github-actions/deploy.yml b/ci-templates/github-actions/deploy.yml index 90b3457..fec6a14 100644 --- a/ci-templates/github-actions/deploy.yml +++ b/ci-templates/github-actions/deploy.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 22 - - run: npm install -g ingestron@2.1.0 + - run: npm install -g ingestron@2.2.0 - run: ingestron check build: diff --git a/ci-templates/github-actions/ingestron-check.yml b/ci-templates/github-actions/ingestron-check.yml index 26869ca..d01ca94 100644 --- a/ci-templates/github-actions/ingestron-check.yml +++ b/ci-templates/github-actions/ingestron-check.yml @@ -18,5 +18,5 @@ jobs: - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 22 - - run: npm install -g ingestron@2.1.0 + - run: npm install -g ingestron@2.2.0 - run: ingestron check diff --git a/components/reference/built-in-templates.tsx b/components/reference/built-in-templates.tsx index 64b71bf..2fa7246 100644 --- a/components/reference/built-in-templates.tsx +++ b/components/reference/built-in-templates.tsx @@ -1,5 +1,5 @@ // The templates `ingestron init` offers, from the CLI itself. -import { builtInTemplates } from "@ingestron/cli"; +import { builtInTemplates } from "@ingestron/core"; import { TableFrame } from "@/components/table-frame"; /** One row per built-in template: its name and what it sets up. `init` asks none of them anything. */ diff --git a/components/reference/connector-facts.tsx b/components/reference/connector-facts.tsx index 603fce9..79bc78c 100644 --- a/components/reference/connector-facts.tsx +++ b/components/reference/connector-facts.tsx @@ -1,6 +1,6 @@ // Routes stay in package metadata; the sections below them on the page give the detail. import { Fragment, type ReactNode } from "react"; -import { projectRoutes } from "@ingestron/cli"; +import { projectRoutes } from "@ingestron/core"; import { ingestionRows } from "@/lib/connector-settings"; import { listExamples } from "@/lib/examples"; import { connectorEntries, packName, type ConnectorEntry } from "@/lib/reference"; diff --git a/components/reference/project-sources.tsx b/components/reference/project-sources.tsx index 38ab8a0..8f37689 100644 --- a/components/reference/project-sources.tsx +++ b/components/reference/project-sources.tsx @@ -1,6 +1,6 @@ // Discovery uses the same metadata as the CLI and New project wizard. Headings // are MDX's own, so a jump to a category clears the sticky header. -import { projectSources, projectRoutes } from "@ingestron/cli"; +import { projectSources, projectRoutes } from "@ingestron/core"; import { Heading } from "fumadocs-ui/components/heading"; import { categoryAnchor, sourceCategories } from "@/lib/connector-page"; diff --git a/components/reference/related-setup.tsx b/components/reference/related-setup.tsx index bce4f77..abbc005 100644 --- a/components/reference/related-setup.tsx +++ b/components/reference/related-setup.tsx @@ -1,5 +1,5 @@ // The routes and their packs come from New project's metadata; link text is each page's title. -import { projectRoutes } from "@ingestron/cli"; +import { projectRoutes } from "@ingestron/core"; import { connectorEntries, packName, packs, pageTitle, routePacks } from "@/lib/reference"; import { routeGuides } from "@/lib/routes"; diff --git a/components/reference/route-comparison.tsx b/components/reference/route-comparison.tsx index f1edac7..69d91fd 100644 --- a/components/reference/route-comparison.tsx +++ b/components/reference/route-comparison.tsx @@ -1,5 +1,5 @@ // A compact comparison uses the same supported routes as New project. -import { projectRoutes, projectSources } from "@ingestron/cli"; +import { projectRoutes, projectSources } from "@ingestron/core"; import { allRoutes } from "@/lib/reference"; import { TableFrame } from "@/components/table-frame"; diff --git a/components/reference/versions.tsx b/components/reference/versions.tsx index 16cad87..40096f0 100644 --- a/components/reference/versions.tsx +++ b/components/reference/versions.tsx @@ -30,6 +30,7 @@ function found(text: string, pattern: RegExp, what: string): string { export function PackageVersions() { const rows: [string, string][] = [ ["@ingestron/cli", "the `ingestron` command"], + ["@ingestron/core", "the API the command is built on"], ["@ingestron/definitions", "loading and resolving definitions"], ["@ingestron/authoring", "editor features"], ...packs.map((pack): [string, string] => [ diff --git a/components/reference/vscode-extension.json b/components/reference/vscode-extension.json index 78259a4..3c04cdb 100644 --- a/components/reference/vscode-extension.json +++ b/components/reference/vscode-extension.json @@ -1,3 +1,3 @@ { - "version": "1.8.0" + "version": "2.1.4" } diff --git a/content/docs/(reference)/reference/cli.mdx b/content/docs/(reference)/reference/cli.mdx index a9c5f4b..3f1b7a9 100644 --- a/content/docs/(reference)/reference/cli.mdx +++ b/content/docs/(reference)/reference/cli.mdx @@ -59,10 +59,14 @@ as `databricks → build/databricks (dev, prod)`; see ## Use the command from code The CLI package is also a library: `run` takes the same arguments as the -command, `generatedOutputs` gives every output folder's files as `plan` would -write them, and `projectSources`, `projectRoutes` and `projectRecipe` return -the sources, routes and recipes that `init` and **Ingestron: New project** -offer. +command. The +[`@ingestron/cli` README](https://github.com/ingestron/ingestron/tree/main/packages/cli#in-code) +describes it. + +The command is built on `@ingestron/core`, which your code can use too: +`generatedOutputs` gives every output folder's files as `plan` would write +them, and `projectSources`, `projectRoutes` and `projectRecipe` return the +sources, routes and recipes that `init` and **Ingestron: New project** offer. The -[`@ingestron/cli` README](https://github.com/ingestron/ingestron/tree/main/packages/cli#project-builder-api) +[`@ingestron/core` README](https://github.com/ingestron/ingestron/tree/main/packages/core) describes them. diff --git a/content/docs/(reference)/reference/versions.mdx b/content/docs/(reference)/reference/versions.mdx index dee9726..2f64233 100644 --- a/content/docs/(reference)/reference/versions.mdx +++ b/content/docs/(reference)/reference/versions.mdx @@ -29,5 +29,5 @@ Connector maturity, such as Public Preview or Beta, is shown on each The [deployment templates](/docs/how-to/deploy-through-environments) pin the tools their stages run: `@microsoft/azure-data-factory-utilities` 1.0.3, the Databricks CLI v1.23.0, and sqlcmd (Go) v1.10.0. Their check stage installs -`ingestron@2.1.0`, and each GitHub action is pinned to a commit, with its +`ingestron@2.2.0`, and each GitHub action is pinned to a commit, with its version beside it. diff --git a/content/docs/how-to/(build)/check-in-ci.mdx b/content/docs/how-to/(build)/check-in-ci.mdx index fe59428..8b449e5 100644 --- a/content/docs/how-to/(build)/check-in-ci.mdx +++ b/content/docs/how-to/(build)/check-in-ci.mdx @@ -8,7 +8,7 @@ from the definitions project folder on every pull request: it fails when someone changed the definitions without generating, so the files you deploy are always what the definitions say. It needs only Node.js 22.13 or later: each template installs an exact version of the command from npm, -`npm install -g ingestron@2.1.0`, then runs it. Change the version when you +`npm install -g ingestron@2.2.0`, then runs it. Change the version when you upgrade, as [Upgrade Ingestron and its packs](/docs/how-to/upgrade#choose-the-version-you-run) shows, so a new release never fails a pull request that changed nothing. diff --git a/content/docs/how-to/(build)/deploy-through-environments.mdx b/content/docs/how-to/(build)/deploy-through-environments.mdx index 0242a19..0952e03 100644 --- a/content/docs/how-to/(build)/deploy-through-environments.mdx +++ b/content/docs/how-to/(build)/deploy-through-environments.mdx @@ -43,7 +43,7 @@ The tools are pinned: Microsoft's `@microsoft/azure-data-factory-utilities` 1.0.3, the Databricks CLI v1.23.0 and sqlcmd (Go) v1.10.0, each download checked by its SHA-256 where the template downloads it. Each GitHub action is pinned to a full commit, with its version beside it, and the check installs an -exact Ingestron, `ingestron@2.1.0`: change them when you upgrade. The ADF +exact Ingestron, `ingestron@2.2.0`: change them when you upgrade. The ADF build fetches its build tool from `adf.azure.com`, so the build stage needs network access there. diff --git a/content/docs/how-to/(standards)/upgrade.mdx b/content/docs/how-to/(standards)/upgrade.mdx index 9c9f138..4a14349 100644 --- a/content/docs/how-to/(standards)/upgrade.mdx +++ b/content/docs/how-to/(standards)/upgrade.mdx @@ -46,7 +46,7 @@ choose to upgrade. The [CI templates](/docs/how-to/check-in-ci) and the [deployment templates](/docs/how-to/deploy-through-environments) do: ```sh -npm install -g ingestron@2.1.0 +npm install -g ingestron@2.2.0 ``` `npm ls -g ingestron` shows the version a computer has installed. @@ -95,7 +95,7 @@ next; see [Deploy through environments](/docs/how-to/deploy-through-environments ### The standard and the folders -1. Install `ingestron@2.1.0` and plan. Every pack is version 2, so a standard that +1. Install `ingestron@2.2.0` and plan. Every pack is version 2, so a standard that names `databricks@1`, `adf@1`, `synapse@1` or `duckdb@1` stops with `PACK_VERSION`, once for all the environments that have it: @@ -135,7 +135,7 @@ next; see [Deploy through environments](/docs/how-to/deploy-through-environments [`DEPLOY_VALUE`](/docs/reference/errors#DEPLOY_VALUE): write it in `project.yaml` for each environment. See [Supplied when deploying](/docs/concepts/yaml-references#supplied-when-deploying). -5. Change CI: the check templates install `ingestron@2.1.0`, and the deploy +5. Change CI: the check templates install `ingestron@2.2.0`, and the deploy pipelines deploy `build//` by target, parameter file or script, as [Deploy through environments](/docs/how-to/deploy-through-environments) shows. @@ -327,9 +327,29 @@ Factory: `ingestron plan` to see the linked service change. - For code that calls the packages: `@ingestron/definitions` 1.11 adds the `REPLACE_ME` code and the `replaceMe` resolve option, which `check` sets to - `error`; the CLI's `Io` gains an optional `now()`, the day `init` writes; - and the [`@ingestron/cli` README](https://github.com/ingestron/ingestron/tree/main/packages/cli) - describes `generatedOutputs`. + `error`; and the CLI's `Io` gains an optional `now()`, the day `init` + writes. + +## Upgrade to 2.2 [#upgrade-to-2-2] + +2.2 generates, prints and checks exactly what 2.1 does, and the VS Code +extension works as before. Only code that calls the packages changes: + +- `@ingestron/core` 1.0 is the API the command is built on. + `@ingestron/cli` now exports only `run`, `commands` and `flags`. Import + everything else it exported in 2.1, such as `generatedOutputs`, + `projectRoutes`, `platformRequest` and `packs`, from `@ingestron/core`, + under the same names. The + [`@ingestron/core` README](https://github.com/ingestron/ingestron/tree/main/packages/core) + describes them. +- In `@ingestron/authoring`, open a project with `ProjectSnapshot.open(folder)` + in place of `openProject`, and call the snapshot's methods. Each function + that took the project first is now a method with the same name: + `problems(project, "dev")` becomes `snapshot.problems("dev")`. Three are + renamed: `projectSymbols` is `symbols`, `compareEnvironments` is `compare` + and `platformRequest` is `request`. The + [`@ingestron/authoring` README](https://github.com/ingestron/ingestron/tree/main/packages/authoring) + shows an example. ## What changed in a release diff --git a/lib/connector-page.ts b/lib/connector-page.ts index c9106d9..c394abf 100644 --- a/lib/connector-page.ts +++ b/lib/connector-page.ts @@ -4,7 +4,7 @@ // in one of the page's slots. import { readFileSync } from "node:fs"; import { join } from "node:path"; -import { projectRoutes, projectSources } from "@ingestron/cli"; +import { projectRoutes, projectSources } from "@ingestron/core"; import type { TOCItemType } from "fumadocs-core/toc"; import { parse } from "yaml"; import { exampleFiles, listExamples, readExampleFile } from "./examples"; diff --git a/lib/examples.ts b/lib/examples.ts index b854135..3a2a4d0 100644 --- a/lib/examples.ts +++ b/lib/examples.ts @@ -7,14 +7,14 @@ import { existsSync, mkdtempSync, readdirSync, readFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join, relative, resolve } from "node:path"; +import { run } from "@ingestron/cli"; import { listSamples, readSample, - run, sampleFacts, type Sample, type SampleFacts, -} from "@ingestron/cli"; +} from "@ingestron/core"; import { recipesFolder } from "@ingestron/pack-adf"; import { parse } from "yaml"; import { pickLines, pickPath } from "./extract"; diff --git a/lib/reference.ts b/lib/reference.ts index a03838f..4f386c7 100644 --- a/lib/reference.ts +++ b/lib/reference.ts @@ -1,7 +1,7 @@ // Reference data read from the packages at build time, so pages match the code. import { readFileSync } from "node:fs"; import { join } from "node:path"; -import { projectRecipe, projectRoutes, projectSources, type ProjectRoute } from "@ingestron/cli"; +import { projectRecipe, projectRoutes, projectSources, type ProjectRoute } from "@ingestron/core"; import { documentReference, methodReference, diff --git a/lib/routes.ts b/lib/routes.ts index 2aa2877..3646825 100644 --- a/lib/routes.ts +++ b/lib/routes.ts @@ -2,7 +2,7 @@ // project offers. Titles, `--via` values and packs come from the CLI; what // each route is for, and its guide, are written here, and a route the CLI // adds without them fails the build. -import { builtInTemplates, sampleFacts } from "@ingestron/cli"; +import { builtInTemplates, sampleFacts } from "@ingestron/core"; import { allRoutes, routePacks } from "@/lib/reference"; /** One way to start a project, and what it gives you. */ diff --git a/lib/search.ts b/lib/search.ts index 6a481ee..c87bf43 100644 --- a/lib/search.ts +++ b/lib/search.ts @@ -1,6 +1,7 @@ // Search entries for reference rendered from code, which the MDX indexer // cannot see: error codes, method settings, CLI commands and connector pages. -import { commands, flags, projectSources } from "@ingestron/cli"; +import { commands, flags } from "@ingestron/cli"; +import { projectSources } from "@ingestron/core"; import { codeHelp } from "@ingestron/definitions"; import type { StructuredData } from "fumadocs-core/mdx-plugins"; import { ingestionRows } from "./connector-settings"; diff --git a/package.json b/package.json index 4cdd8c2..052d842 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,9 @@ "sync:vscode": "node scripts/sync-vscode-commands.mjs" }, "dependencies": { - "@ingestron/authoring": "^2.1.0", - "@ingestron/cli": "^2.1.0", + "@ingestron/authoring": "^2.2.0", + "@ingestron/cli": "^2.2.0", + "@ingestron/core": "^1.0.0", "@ingestron/definitions": "^1.11.0", "@ingestron/pack-adf": "^2.1.0", "@ingestron/pack-databricks": "^2.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a3c7bb..ee9f2f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,14 @@ importers: .: dependencies: '@ingestron/authoring': - specifier: ^2.1.0 - version: 2.1.0 + specifier: ^2.2.0 + version: 2.2.0 '@ingestron/cli': - specifier: ^2.1.0 - version: 2.1.0 + specifier: ^2.2.0 + version: 2.2.0 + '@ingestron/core': + specifier: ^1.0.0 + version: 1.0.0 '@ingestron/definitions': specifier: ^1.11.0 version: 1.11.0 @@ -783,12 +786,12 @@ packages: cpu: [x64] os: [win32] - '@ingestron/authoring@2.1.0': - resolution: {integrity: sha512-fLz3nzjlWWEYNixDY9nC1dLnBuJ6XMV3pcnmdWpNcIlbn+UflgGsMle8YNBjHB72PcP3gpyoekbJMZpcX5C2hQ==} + '@ingestron/authoring@2.2.0': + resolution: {integrity: sha512-XkKNbuM8hR+X08oyvXJSEJmQZb/03O6WkQNI/vTfOxVT+L/y/hf3+o19v3ulTblrFkmr2CwGqXFHOQZnMULbpg==} engines: {node: '>=22.13.0'} - '@ingestron/cli@2.1.0': - resolution: {integrity: sha512-Wfk6cT5SngGL9D0LlLOGVDRk+CLcN6GSTNfJFU9sxLLPcbPTwArl/78QMt9soGnqwL+f0MSLCUx5kag2e8GBTw==} + '@ingestron/cli@2.2.0': + resolution: {integrity: sha512-GSp3tNWykrHxRET87Sz25wfSkhajHl5wcedJQf3erknMEAcTjySnSM62BRzQg4GPOyx+gLExuqAoBo2bOhoEAg==} engines: {node: '>=22.13.0'} hasBin: true @@ -796,12 +799,24 @@ packages: resolution: {integrity: sha512-944AP9ehRUE4PL2GfUc8qEsadugYwWgCV3E9KNEcYRwGZYEU+iR8bgLUxjlETphV/dv2EkdP0B6x2Pq1c6BaRw==} engines: {node: '>=22.13.0'} + '@ingestron/config@1.6.0': + resolution: {integrity: sha512-Jz1XOgeh9uv5GgzNCNB3l1U44Bd5Gkf9UbyEWyBhJ4x85+OMV91Pjss8t4Mtz7RRGVtmYCV1uagUzOC+CLaHhg==} + engines: {node: '>=22.13.0'} + + '@ingestron/core@1.0.0': + resolution: {integrity: sha512-1kTD6Tre/+3FUaEEwN7a5RIw4JffOXSSb10GzSzqmpPIyvTNLxyrc3zQjAtKQlans0/qqwW7LcIbdQSDknjXsw==} + engines: {node: '>=22.13.0'} + '@ingestron/definitions@1.11.0': resolution: {integrity: sha512-+llUPmc2v9B7iIrajrDldxHETAa0swcrOAE4rzJWQ48gmK1wrpPOtmI4Nh8WFJQHBWeon3xM1zjmaiQhTOFDAg==} engines: {node: '>=22.13.0'} - '@ingestron/generate@1.0.1': - resolution: {integrity: sha512-xJGEAYV1dtoy0bajHwthzo7XPx1GQvcRgfz3FFK9578OOQolUF2W+Uu3VXxM+3hoZ1CDPhA+hcHlq6GZo3oPoQ==} + '@ingestron/definitions@1.12.0': + resolution: {integrity: sha512-ZC1tQx46SsuwkqbMm2wDuExfNk6GN8rvi28PBQHyqUmtCi/ON+aASYZs7o9XtqLR1td5ajutJGT48fKR/TKmIw==} + engines: {node: '>=22.13.0'} + + '@ingestron/generate@1.1.0': + resolution: {integrity: sha512-Ouhps0spdV4ueubGYbx2ZGenTkAyA8YvuhuDpHi19uX33RfxlM5ILRSUwnZhg91lPcmJmxYrHnGyfuU98bp2Vw==} engines: {node: '>=22.13.0'} '@ingestron/pack-adf@2.1.0': @@ -810,24 +825,48 @@ packages: peerDependencies: '@ingestron/definitions': ^1.9.0 + '@ingestron/pack-adf@2.2.0': + resolution: {integrity: sha512-1J+M4DlF/ybDkVmDxKyDLWv/VFUHNnuMUBg9oB99JrWwsxDO2BoLQCVRrJWVMGi4J8jxvc48bZuYlxVNW5mEHw==} + engines: {node: '>=22.13.0'} + peerDependencies: + '@ingestron/definitions': ^1.9.0 + '@ingestron/pack-databricks@2.1.0': resolution: {integrity: sha512-kMRq2IO8uagIuQdaE+EgLVhL1tD4yD+Xxdz3dJToQS7Kyf42q78EBphA5mkfukVgZHvEUmpw9ZR9vQg5lRaQog==} engines: {node: '>=22.13.0'} peerDependencies: '@ingestron/definitions': ^1.9.0 + '@ingestron/pack-databricks@2.2.0': + resolution: {integrity: sha512-mJbbqknqH6Ve+lKJQHrag6nsVozug4wSh5WZlw/OXvua7FXSXvmYCvIGoORWXYdW9+fH5SZKEwXpOCgK+INGHQ==} + engines: {node: '>=22.13.0'} + peerDependencies: + '@ingestron/definitions': ^1.9.0 + '@ingestron/pack-duckdb@2.0.0': resolution: {integrity: sha512-GVQpprSyw7+vKdSF0xkj/uX6Z/1Cblco/qIgnGLvUXaRnYUE6UaMj4Q3qFP0wiA1DxguJIYw002kYm6SF5HIWA==} engines: {node: '>=22.13.0'} peerDependencies: '@ingestron/definitions': ^1.3.1 + '@ingestron/pack-duckdb@2.1.0': + resolution: {integrity: sha512-XmIGJ+vaYvT3cm/BQTGVZ0wNyhBKkPSsCuA/Pc4zehw0xbG4uKMV15EnFdo52dri3cqxnk0wIzyGE0a41rcsWQ==} + engines: {node: '>=22.13.0'} + peerDependencies: + '@ingestron/definitions': ^1.3.1 + '@ingestron/pack-synapse@2.0.0': resolution: {integrity: sha512-R15xhzEt4ptoww23WKVw2JGDmurL4RbEHmv1hEtVefj/cStqicA5HnddGx0LU8ZA7Y+SVpLCW44OlyLenUh8Eg==} engines: {node: '>=22.13.0'} peerDependencies: '@ingestron/definitions': ^1.9.0 + '@ingestron/pack-synapse@2.1.0': + resolution: {integrity: sha512-uIOy0yqUwYSIIUVFH6n4xKnoUI2Lw0KTtvSZvg4l/qQTxwm1JvbQneJWVqTpCNh/RSfqc4bO6+HPva7LIQ10Qw==} + engines: {node: '>=22.13.0'} + peerDependencies: + '@ingestron/definitions': ^1.9.0 + '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -3320,23 +3359,20 @@ snapshots: '@img/sharp-win32-x64@0.35.5': optional: true - '@ingestron/authoring@2.1.0': + '@ingestron/authoring@2.2.0': dependencies: - '@ingestron/cli': 2.1.0 - '@ingestron/config': 1.5.0 - '@ingestron/definitions': 1.11.0 - '@ingestron/generate': 1.0.1 + '@ingestron/config': 1.6.0 + '@ingestron/core': 1.0.0 + '@ingestron/definitions': 1.12.0 + '@ingestron/generate': 1.1.0 yaml: 2.9.1 - '@ingestron/cli@2.1.0': + '@ingestron/cli@2.2.0': dependencies: - '@ingestron/config': 1.5.0 - '@ingestron/definitions': 1.11.0 - '@ingestron/generate': 1.0.1 - '@ingestron/pack-adf': 2.1.0(@ingestron/definitions@1.11.0) - '@ingestron/pack-databricks': 2.1.0(@ingestron/definitions@1.11.0) - '@ingestron/pack-duckdb': 2.0.0(@ingestron/definitions@1.11.0) - '@ingestron/pack-synapse': 2.0.0(@ingestron/definitions@1.11.0) + '@ingestron/config': 1.6.0 + '@ingestron/core': 1.0.0 + '@ingestron/definitions': 1.12.0 + '@ingestron/generate': 1.1.0 yaml: 2.9.1 '@ingestron/config@1.5.0': @@ -3344,6 +3380,22 @@ snapshots: ajv: 8.20.0 yaml: 2.9.1 + '@ingestron/config@1.6.0': + dependencies: + ajv: 8.20.0 + yaml: 2.9.1 + + '@ingestron/core@1.0.0': + dependencies: + '@ingestron/config': 1.6.0 + '@ingestron/definitions': 1.12.0 + '@ingestron/generate': 1.1.0 + '@ingestron/pack-adf': 2.2.0(@ingestron/definitions@1.12.0) + '@ingestron/pack-databricks': 2.2.0(@ingestron/definitions@1.12.0) + '@ingestron/pack-duckdb': 2.1.0(@ingestron/definitions@1.12.0) + '@ingestron/pack-synapse': 2.1.0(@ingestron/definitions@1.12.0) + yaml: 2.9.1 + '@ingestron/definitions@1.11.0': dependencies: '@ingestron/config': 1.5.0 @@ -3351,26 +3403,51 @@ snapshots: liquidjs: 10.30.0 yaml: 2.9.1 - '@ingestron/generate@1.0.1': {} + '@ingestron/definitions@1.12.0': + dependencies: + '@ingestron/config': 1.6.0 + ajv: 8.20.0 + liquidjs: 10.30.0 + yaml: 2.9.1 + + '@ingestron/generate@1.1.0': {} '@ingestron/pack-adf@2.1.0(@ingestron/definitions@1.11.0)': dependencies: '@ingestron/definitions': 1.11.0 + '@ingestron/pack-adf@2.2.0(@ingestron/definitions@1.12.0)': + dependencies: + '@ingestron/definitions': 1.12.0 + '@ingestron/pack-databricks@2.1.0(@ingestron/definitions@1.11.0)': dependencies: '@ingestron/definitions': 1.11.0 liquidjs: 10.30.0 yaml: 2.9.1 + '@ingestron/pack-databricks@2.2.0(@ingestron/definitions@1.12.0)': + dependencies: + '@ingestron/definitions': 1.12.0 + liquidjs: 10.30.0 + yaml: 2.9.1 + '@ingestron/pack-duckdb@2.0.0(@ingestron/definitions@1.11.0)': dependencies: '@ingestron/definitions': 1.11.0 + '@ingestron/pack-duckdb@2.1.0(@ingestron/definitions@1.12.0)': + dependencies: + '@ingestron/definitions': 1.12.0 + '@ingestron/pack-synapse@2.0.0(@ingestron/definitions@1.11.0)': dependencies: '@ingestron/definitions': 1.11.0 + '@ingestron/pack-synapse@2.1.0(@ingestron/definitions@1.12.0)': + dependencies: + '@ingestron/definitions': 1.12.0 + '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.6.0 diff --git a/scripts/ci-templates.test.mjs b/scripts/ci-templates.test.mjs index 981a19c..db4561a 100644 --- a/scripts/ci-templates.test.mjs +++ b/scripts/ci-templates.test.mjs @@ -58,7 +58,7 @@ test("every YAML template parses, and the folder holds no other kind of file", ( * The ingestron bundle the templates install: an exact version, the one the * docs build with (test/standards-and-teams.test.ts checks the cli's version). */ -const bundle = "2.1.0"; +const bundle = "2.2.0"; test("each check installs an exact ingestron from npm, then runs ingestron check", () => { for (const file of [...checks, "github-actions/deploy.yml", "azure-devops/azure-pipelines.yml"]) { diff --git a/test/areas.test.ts b/test/areas.test.ts index 9eb143b..30346c6 100644 --- a/test/areas.test.ts +++ b/test/areas.test.ts @@ -3,7 +3,7 @@ // area, the home page to none, and no page's URL moved when the areas came in. import { readdirSync, readFileSync } from "node:fs"; import { join } from "node:path"; -import { projectSources } from "@ingestron/cli"; +import { projectSources } from "@ingestron/core"; import { findPath, findProjection, flattenTree, type Folder } from "fumadocs-core/page-tree"; import { getLayoutTabs } from "fumadocs-ui/layouts/shared"; import { createElement } from "react"; diff --git a/test/connector-chapters.test.ts b/test/connector-chapters.test.ts index f4c501f..d0b3481 100644 --- a/test/connector-chapters.test.ts +++ b/test/connector-chapters.test.ts @@ -3,7 +3,7 @@ // chapters and category pages are gone, and the area's page tree holds every page once. import { existsSync, readdirSync, readFileSync } from "node:fs"; import { join } from "node:path"; -import { projectSources } from "@ingestron/cli"; +import { projectSources } from "@ingestron/core"; import { expect, it } from "vitest"; import { parse } from "yaml"; import { categoryAnchor, sourceCategories } from "../lib/connector-page.js"; diff --git a/test/connector-pages.test.ts b/test/connector-pages.test.ts index cabffa4..978e791 100644 --- a/test/connector-pages.test.ts +++ b/test/connector-pages.test.ts @@ -16,7 +16,7 @@ import { } from "../lib/connector-page.js"; import { connectorEntries, connectorIds } from "../lib/reference.js"; import { redirectFor } from "../worker/redirects.js"; -import { openProject, referenceForDocs } from "@ingestron/authoring"; +import { ProjectSnapshot } from "@ingestron/authoring"; import { exampleFolder } from "../lib/examples.js"; // The code blocks render asynchronously in the site; here each shows its file's name. @@ -94,9 +94,9 @@ describe("connector pages", () => { }, 30_000); it("put #settings on the fields of the pack whose settings the editor's Reference view lists", () => { - const project = openProject(exampleFolder("minimal"), new Map()); + const project = ProjectSnapshot.open(exampleFolder("minimal")); for (const id of connectorIds()) { - const entry = referenceForDocs(project, `/docs/connectors/${id}`, "dev"); + const entry = project.referenceForDocs(`/docs/connectors/${id}`, "dev"); const [first] = connectorEntries(id); // The editor lists the first pack's settings, each linked to #settings. expect( diff --git a/test/look-up.test.ts b/test/look-up.test.ts index 4300be6..dde5499 100644 --- a/test/look-up.test.ts +++ b/test/look-up.test.ts @@ -4,7 +4,7 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { builtInTemplates, listSamples } from "@ingestron/cli"; +import { builtInTemplates, listSamples } from "@ingestron/core"; import { createElement } from "react"; import { renderToStaticMarkup } from "react-dom/server"; import { describe, expect, it } from "vitest"; @@ -54,12 +54,13 @@ describe("reference/cli", () => { ); }); - it("sends the builder API to the package README and no longer holds it", () => { + it("sends the API to the package READMEs and no longer holds it", () => { expect(page).not.toContain("projectRecipe("); expect(page).not.toContain("ProjectSource"); expect(page).toContain( - "(https://github.com/ingestron/ingestron/tree/main/packages/cli#project-builder-api)", + "(https://github.com/ingestron/ingestron/tree/main/packages/cli#in-code)", ); + expect(page).toContain("(https://github.com/ingestron/ingestron/tree/main/packages/core)"); }); it("works on a project from outside it when both paths are set, and not with --definitions alone", () => { diff --git a/test/platform-pages.test.ts b/test/platform-pages.test.ts index 9a39dfe..6c203fe 100644 --- a/test/platform-pages.test.ts +++ b/test/platform-pages.test.ts @@ -291,6 +291,6 @@ describe("reference/versions", () => { expect(tools).toContain(`\`@microsoft/azure-data-factory-utilities\` ${adf}`); expect(tools).toContain(`Databricks CLI ${databricks}`); expect(tools).toContain(`sqlcmd (Go) ${sqlcmd}`); - expect(tools).toContain("`ingestron@2.1.0`"); + expect(tools).toContain("`ingestron@2.2.0`"); }); }); diff --git a/test/reader-journeys.test.ts b/test/reader-journeys.test.ts index 35c5b25..b651d9c 100644 --- a/test/reader-journeys.test.ts +++ b/test/reader-journeys.test.ts @@ -13,7 +13,7 @@ import { } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; -import { projectRoutes } from "@ingestron/cli"; +import { projectRoutes } from "@ingestron/core"; import { createElement } from "react"; import { renderToStaticMarkup } from "react-dom/server"; import { describe, expect, it, vi } from "vitest"; diff --git a/test/route-wording.test.ts b/test/route-wording.test.ts index fac9b08..89ece56 100644 --- a/test/route-wording.test.ts +++ b/test/route-wording.test.ts @@ -3,7 +3,7 @@ // reaches: in its description, its sections, its notes and its related setup. import { readFileSync } from "node:fs"; import { join } from "node:path"; -import { projectRoutes } from "@ingestron/cli"; +import { projectRoutes } from "@ingestron/core"; import { createElement } from "react"; import { renderToStaticMarkup } from "react-dom/server"; import { expect, it, vi } from "vitest"; diff --git a/test/site-journey.test.ts b/test/site-journey.test.ts index 4f8b553..699e6ec 100644 --- a/test/site-journey.test.ts +++ b/test/site-journey.test.ts @@ -1,6 +1,6 @@ import { existsSync, readdirSync, readFileSync } from "node:fs"; import { join } from "node:path"; -import { projectRoutes } from "@ingestron/cli"; +import { projectRoutes } from "@ingestron/core"; import { createElement } from "react"; import { renderToStaticMarkup } from "react-dom/server"; import { expect, it } from "vitest"; diff --git a/test/standards-and-teams.test.ts b/test/standards-and-teams.test.ts index e729e8a..c6d7f03 100644 --- a/test/standards-and-teams.test.ts +++ b/test/standards-and-teams.test.ts @@ -324,7 +324,7 @@ describe("how-to/upgrade", () => { it("pins the exact bundle these pages describe, as the templates install it", () => { // The ingestron bundle these pages describe: the installed cli's version. - const bundle = "2.1.0"; + const bundle = "2.2.0"; const choose = section(page, "## Choose the version you run"); const version = JSON.parse( readFileSync(join(process.cwd(), "node_modules/@ingestron/cli/package.json"), "utf8"), diff --git a/test/troubleshooting.test.ts b/test/troubleshooting.test.ts index 8c2e001..c1c3dd9 100644 --- a/test/troubleshooting.test.ts +++ b/test/troubleshooting.test.ts @@ -15,7 +15,7 @@ import { writeFileSync, } from "node:fs"; import { join } from "node:path"; -import { openProject, problems } from "@ingestron/authoring"; +import { ProjectSnapshot } from "@ingestron/authoring"; import { codeHelp, loadingCodeHelp } from "@ingestron/definitions"; import { describe, expect, it } from "vitest"; import { redirectFor } from "../worker/redirects.js"; @@ -194,7 +194,7 @@ describe("generated files", () => { // Not produced: a file that cannot be restored needs a second failure. From the shipped writer. // pnpm puts the CLI's own dependencies beside it. const cliFolder = realpathSync(join(process.cwd(), "node_modules/@ingestron/cli")); - const writer = readFileSync(join(cliFolder, "../generate/dist/apply.js"), "utf8"); + const writer = readFileSync(join(cliFolder, "../generate/dist/apply/apply.js"), "utf8"); expect(writer).toContain("Some files could not be put back."); expect(writer).toContain("Nothing was changed."); expect(entry("An apply stopped part-way")).toContain("`Some files could not be put back.`"); @@ -273,9 +273,9 @@ describe("definitions", () => { transform.replace("id: more", "id: other"), ); const before = cli(project, ["plan"]); - const found = problems(openProject(project, new Map()), "dev").filter( - (problem) => problem.code === "NOT_IMPORTED", - ); + const found = ProjectSnapshot.open(project) + .problems("dev") + .filter((problem) => problem.code === "NOT_IMPORTED"); expect(found.map((problem) => problem.file)).toEqual([ "transforms/finance/more.yaml", "transforms/other.yml", @@ -291,9 +291,9 @@ describe("definitions", () => { expect(before.output).not.toContain("other"); // The quick fix: the folder's pattern in imports. edit(project, "project.yaml", (text) => `${text} - transforms/finance/*.yaml\n`); - const fixed = problems(openProject(project, new Map()), "dev").filter( - (problem) => problem.code === "NOT_IMPORTED", - ); + const fixed = ProjectSnapshot.open(project) + .problems("dev") + .filter((problem) => problem.code === "NOT_IMPORTED"); expect(fixed.map((problem) => problem.file)).toEqual(["transforms/other.yml"]); // The code is the editor's alone: Errors has no entry for it. expect("NOT_IMPORTED" in { ...codeHelp, ...loadingCodeHelp }).toBe(false); @@ -371,7 +371,7 @@ describe("environment variables and .env", () => { quotes("A variable is not set", output, [ "SAMPLES_DIR isn't set; add it to .env.dev or set it before running Ingestron.", ]); - const found = problems(openProject(project, new Map()), "dev"); + const found = ProjectSnapshot.open(project).problems("dev"); // The variable is information; what plan then finds, the link, shows beside it. expect(found.map((problem) => [problem.code, problem.severity])).toEqual([ ["ENVVAR_MISSING", "information"], @@ -389,20 +389,20 @@ describe("environment variables and .env", () => { expect(cli(project, ["plan"]).output).toContain("ENVVAR_MISSING"); writeFileSync(join(project, ".env.dev"), "SAMPLES_DIR=./samples\n"); expect(cli(project, ["plan"]).code).toBe(0); - expect(problems(openProject(project, new Map()), "dev")).toEqual([]); + expect(ProjectSnapshot.open(project).problems("dev")).toEqual([]); // A variable in the editor's own environment is seen, one exported later is not. rmSync(join(project, ".env.dev")); rmSync(join(project, ".env")); process.env.SAMPLES_DIR = "./samples"; try { - expect(problems(openProject(project, new Map()), "dev")).toEqual([]); + expect(ProjectSnapshot.open(project).problems("dev")).toEqual([]); } finally { delete process.env.SAMPLES_DIR; } expect( - problems(openProject(project, new Map()), "dev").filter( - (problem) => problem.code === "ENVVAR_MISSING", - ), + ProjectSnapshot.open(project) + .problems("dev") + .filter((problem) => problem.code === "ENVVAR_MISSING"), ).toHaveLength(1); }, 30_000);