Repository navigation
chore(deps): update dependency @tailor-platform/sdk to v2.49.0 - #235
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/tailor-platform-sdk-and-erp-kit-packages
branch
from
November 23, 2026 06:08
ef633f3 to
41ac12b
Compare
renovate
Bot
force-pushed
the
renovate/tailor-platform-sdk-and-erp-kit-packages
branch
from
November 23, 2026 12:40
41ac12b to
cc82c09
Compare
renovate
Bot
force-pushed
the
renovate/tailor-platform-sdk-and-erp-kit-packages
branch
2 times, most recently
from
November 27, 2026 03:13
030866a to
a65b8b8
Compare
renovate
Bot
force-pushed
the
renovate/tailor-platform-sdk-and-erp-kit-packages
branch
from
November 29, 2026 02:31
a65b8b8 to
059172a
Compare
renovate
Bot
force-pushed
the
renovate/tailor-platform-sdk-and-erp-kit-packages
branch
from
November 30, 2026 06:25
059172a to
9e4eaaf
Compare
renovate
Bot
force-pushed
the
renovate/tailor-platform-sdk-and-erp-kit-packages
branch
from
December 1, 2026 01:41
9e4eaaf to
6964fc7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
2.42.0→2.49.0Release Notes
tailor-platform/sdk (@tailor-platform/sdk)
v2.49.0Compare Source
Minor Changes
#3193
020444eThanks @toiroakr! - Add@tailor-platform/sdk-plugin-studio, a CLI plugin that serves a local web UI shell withtailor studio.The shell opens one port on
127.0.0.1(default 7777, the next free port when taken) and serves CLI plugin UIs under/plugins/<id>/, so plugins no longer need a server and port of their own. For now the shell has one built-in tab, the ERD viewer. It is built with AppShell, the UI base of the Console. Requests are accepted only for the127.0.0.1/localhosthosts on the shell's port, and any request other thanGET/HEADmust be markedSec-Fetch-Site: same-origin, a mark a browser sets itself, and anOriginit carries must be a local one. Requests a browser marks as coming from another site (cross-siteorsame-site) are rejected, so a page open in the same browser cannot trigger a tab's work. The server does not authenticate clients on the same machine, so it is meant for a machine used by one person.A bar at the top of the page shows the selected profile and workspace and switches them for every tab; when the choice is changed in one browser window, the bar of every other open window follows. The choice is remembered per project. The bar also creates profiles.
@tailor-platform/sdk/cliexportslistProfileInfos(the profiles of the platform configuration),createProfile(whattailor profile createruns),listLoggedInUsersandlistWorkspacesOfUserfor it, andplatformConfigFromEnv, which returns the settings ofTAILOR_PLATFORM_URLand its siblings that differ from the default platform. The platform is taken from the environment whentailor studiostarts.The default tab is
@tailor-platform/sdk-plugin-tailordb-erd. When it is not installed the tab shows the install command, and when the installed version does not provide a UI yet the tab says so.tailor studiois also added to the install hint that the CLI prints when a plugin executable is missing.#3321
e1d6a20Thanks @dqn! - ExportdefineWorkspace()anddefineApp()(beta) from@tailor-platform/sdk, with their config typesWorkspaceConfigandAppDefinition. AdefineWorkspace()config declares every service of a workspace in onetailor.config.tsand lists the services each application exposes;defineApp()is its single-application form,defineConfig()withoutidandexternal. The new Workspace Configuration guide (docs/workspace.md) describes how to write, deploy, and move to one.With such a config:
tailor deploydeploys the whole workspace. Its first deploy over resources thatdefineConfig()configs deployed lists them and asks before taking them over. Installing@tailor-platform/sdkwrites the config'stailor.d.ts.query,tailordb truncate, thetailordb migrationcommands,function runandscript,workflow runandstart,api,seed, and themachineuserandoauth2clientcommands run on it. For the several Auth services such a config can have, a machine user or OAuth2 client can be written as<auth>/<name>,startWorkflow()and seedPlugin'smachineUserNametake{ namespace, machineUserName }, andloadSeedContext()returnsresolveMachineUser()andappName.tailor showandtailor opentake--app, andtailor showwithout it, for a config with several applications, lists the deployed ones and warns about the others.tailor data cloneclones its only application, andtailor removestops and points totailor deployandtailor workspace delete. For adefineConfig()config,--appaccepts only the config's own name.tailor setup cigenerates one deploy for the whole workspace, records the config underworkspacesin.github/tailor.lock, rejects--erd-preview, and takes--migration-testonly when the config deploys one application that lists every TailorDB namespace with migrations.tailor setup --seedreads a seedPluginmachineUserNamegiven as{ namespace, machineUserName }.CLI help shows the
<auth>/<name>form, and the READMEs of the seed, frontend, and TailorDB ERD plugins describe workspace configs.#3320
01ef061Thanks @dragon3! - Addtailor tailordb replicationcommands:listlists the workspace's replications,destination listlists their destinations with each one's state and the service account to grant,status <name>shows the state of each table a replication writes, andrepair <name> [--type <type>...]rewrites the tables inERROR, or the tables of the named types after confirmation.#3300
1eb84c0Thanks @dragon3! - Replicate TailorDB tables into a BigQuery dataset you own. Define datasets withdefineTailorDBReplicationDestination(), declare a namespace's replications in itsreplicationsconfig, and choose the tables and fields to copy with.replication()on each table;tailor deploycreates, updates, and deletes them. A destination is deployed with the replications that use it, anddbReplicationDestinationskeeps one no replication uses yet.deployprints the service account to grant access to the dataset, and checks the grant again on each deploy until it is in place.Patch Changes
#3315
85b4512Thanks @dqn! -.default("now")ondb.date()anddb.time()fields now fills in the UTC date (YYYY-MM-DD) and UTC time (HH:mm) of the operation. Before, a record created without the field was stored with it empty, so reading a required field failed withCannot return null for non-nullable field, and seed validation rejected a row that omitted the field. The nexttailor deployupdates the tables that use it. Records created before then keep the empty value until you set the field on them: an update that leaves the field out does not fill it. A table-level create hook now receives these fields as strings, as their types declare, andcreateTailorDBHookandtailor seed fill --fieldsreturn and write these values in place of a full datetime.Seed validation also accepts a row that omits a
db.datetime()field with a fixedDatedefault, including aDatearray on an array field, a row whose field create hook returns aDatearray, and a row whose table create hook returnsDates inside an array or object. It rejected these as not ISO datetimes.createTailorDBHooknow returns theseDates as ISO strings.The PGlite
CREATE TABLEscript thatkyselyTypePluginwrites topgliteSchemaPathnow fills a time field's"now"default to the minute, as a deployed table stores it, in place of the time with seconds; runtailor generateto update it. A migration'sdb.pglite.tswritten from now on does the same.#3261
f493045Thanks @dqn! - Add the v3 codemodsv3/config-to-appandv3/config-to-workspace, whichtailor upgraderuns on the upgrade to v3.v3/config-to-apprewrites adefineConfig()config deployed on its own todefineApp().v3/config-to-workspacemerges the configs deployed to one workspace into onedefineWorkspace()config in the upgraded directory and deletes them. Both record the config underworkspacesin.github/tailor.lock, and report what they leave for a manual change.tailor upgradenow lists the files the codemods deleted.#3319
36067abThanks @dqn! - The ERD preview job thattailor setup ci branch --erd-previewgenerates now installs Corepack itself when the base branch uses yarn, so it no longer fails withcorepack: command not foundon runners or container images without one, such as those with only Node.js 25 or later. When the head branch uses pnpm, the job also runs the pnpm that the head's setup installs instead of a Corepack pnpm shim. Runtailor setup updateto regenerate existing workflows.#2998
0685207Thanks @toiroakr! - FixgetExtendedTableandgetGeneratedTablefor a table with.plugin()that is imported under a URL with a query string, as the generated seed schema files are whentailor seed studioloads them:getExtendedTablefailed withCould not resolve namespace for table, andgetGeneratedTablereturned the table generated from an earlier definition after the source table was imported again. A table added to a namespace file while the process is running is found too, where the namespace file used to be read from its first import.#3312
ea284a8Thanks @dqn! - Fixtailor deploykeeping a TailorDB table and its records when its pending migrations remove or rename away the table and a later one adds it back. For example, with the workspace at0000,0001adds an optional fieldf2toItemwith amigrate.tsthat writes it,0002removesItem, and0004adds it back: themigrate.tsof0001failed withfield 'f2' not foundbecause the field was never added, and without that script the deploy finished withItemstill holding the records it had before0002.The migration that removes or renames away such a table now deletes it with its records once its checkpoint is committed, and the migration that adds it back creates it again, the same as deploying each migration on its own; the migrations before the removal apply their schema changes to it. When the workspace has the table, the deploy plan lists it as deleted and created, so a deploy without
--yesasks to confirm the deletion. With--no-schema-check, a table that a pending migration removes or renames away is deleted the same way even when the local definitions still have it; unless a later pending migration adds it back, its local definition creates it again.A table whose definition a pending migration changes and a later one changes back now also gets the definition of each migration while the migrations run. Before, it kept the deployed definition, so a
migrate.tsthat wrote a field such a migration added failed.#3221
e6f404aThanks @renovate! - fix(deps): update dependency lines-db to v0.19.3Seed loading now reads a JSONL row surrounded by a non-breaking space or a second byte order mark the same way
lines-db validatedoes, instead of failing withInvalid JSON. It prints a warning with the file and line of each such row.#3286
62221a0Thanks @renovate! - fix(deps): update dependency @badgateway/oauth2-client to v3.4.0#3313
173521fThanks @dqn! - Fixtailor deployfailing withtable '<name>' not foundwhen one deploy applies a TailorDB migration that adds a table and a later migration that removes it again or renames it away. For example,0001adds tableArchiveand itsmigrate.tswrites to it, and0002removesArchive: the deploy never createdArchive, because the final schema does not have it, so the script of0001failed. The same happened to a table that a migration adds back after an earlier migration of the same deploy removed it, when a later migration removes it again.The deploy now creates such a table before the script of the migration that adds it, and deletes it once the checkpoint of the migration that removes or renames it away is committed.
The deploy also creates the GraphQL permission such a table has in its migration, as it now does for a table of the checkpoint that a later migration removes. Previously, when a deploy stopped partway through a migration while such a table existed, the next deploy stopped with
MIGRATION_REMOTE_DRIFT("GQL permission changed") instead of resuming the migration.#3316
c82e196Thanks @dqn! - Type theinputof TailorDB hooks with the values the Platform passes when a create or update leaves a field out. A field's.hooks()createandupdatereceiveundefinedfor a field the input leaves out, andnullonly when the input sets it to null, soinputis nowT | null | undefined. In a table's.hooks()create,inputhasidonly when the input sets one (string | null | undefined), has an optional field only when the input sets it or a field hook or default fills it, and no longer lists.serial()fields.Some code that type-checked before now fails type checking:
input !== nullbefore using the value, usesinput.idas a string, or reads a.serial()field. Once deployed, such code threw or readundefinedwhen the input left the field out. Checkinput != null(orinput.id != null) first, and drop reads of.serial()fields.inputparameter is annotated asT | null, or code that passesinput, or an optional field of a table create hook'sinput, whereT | nullis expected. Widen the type toT | null | undefined.inputas is. In an update hook, returninput ?? oldValueto keep the stored value when the update leaves the field out; returningnullclears it.#3322
5ee0fb0Thanks @dqn! -tailor workflow runandtailor function run --asyncno longer wait indefinitely after a run when the Platform does not answer the removal of its temporary resources. A removal that gets no answer within 30 seconds is given up on, together with the removals after it: the command prints the result and warns which resources may remain, andtailor workflow pruneremoves them. The same limit applies, and the command goes on, whentailor workflow pruneremoves finished runs; whentailor deploy,tailor tailordb migration test,tailor workflow run, andtailor function run --asyncremove the resources of earlier finished runs; whentailor seed applyremoves the resources of a seed script it ran; and whentailor deployandtailor removeremove the temporary resources of a TailorDB migration that could not start or that failed before any of its steps committed.#2998
564ebaaThanks @toiroakr! - Declare the row type of the seed schema of a table a plugin generates, so a table with no rows in its JSONL file is listed bytailor seed studio.#2998
7269e5fThanks @toiroakr! -createStandardSchemanow declares the row type through~standard.types. Tools that read a seed schema file, such as the lines-db studio, can list a table whose JSONL file has no rows and offer to add its first row.#3299
1331622Thanks @dqn! - A migration'sdb.pglite.tsnow leaves nullable a required integer serial field that the migration adds to an existing table, asdb.tsalready allows, so a migration test can stage existing rows with that column null. ThepgliteSchemaPathoutput ofkyselyTypePluginlikewise leaves nullable an integer serial field made optional with.clone({ optional: true })orpickFields(..., { optional: true }). Adb.pglite.tswritten before upgrading is not rewritten and keeps the column NOT NULL.v2.48.0Compare Source
Minor Changes
#3271
d94954eThanks @dqn! -@tailor-platform/sdk/cliexports the betagenerateWorkspaceUserTypes(), which writestailor.d.tsfor a config thatloadConfigFile()loads as a workspace.Internal: installing
@tailor-platform/sdkwritestailor.d.tsfor a config defined withdefineWorkspace()ordefineApp(), which is not exported yet.#3244
9f1c657Thanks @dqn! - Breaking change (beta):DeployedContextnow requiresstaticWebsites, so code that builds the context itself, such as a plugin test that callsonDeployed, fails to type-check until it addsstaticWebsites: the registering config's sites keyed by name, the same ones itsapplication.staticWebsitesheld.#3244
9f1c657Thanks @dqn! - The context of theonDeployedplugin hook now hasstaticWebsites, the static websites of the config that registers the plugin keyed by name, which the plugin canpublishto. Itsapplicationis deprecated and will be removed in v3: read the registering config's applications fromapplications, picking those whoseconfigPathequals the context'sconfigPath.tailor upgradeto v3 runs thev3/plugin-context-applicationcodemod, which reports plugins that readapplicationfor a manual change.#3250
723c727Thanks @dqn! -@tailor-platform/sdk/cliexportslockVersionFor()andparseLockWorkspaces()for.github/tailor.lock, and the betaloadConfigFile(), which loadstailor.config.tsand its plugins for SDK plugins that read the config themselves.TAILOR_LOCK_VERSIONis now 3, the newest lock version the SDK reads. A lock that records no workspace config is still written as version 2, so older SDKs keep reading it.#3268
630f717Thanks @toiroakr! - Addtailor function run --async, which runs the function as an asynchronous job instead of a synchronous run, so the time limit of a synchronous run does not stop it (the Platform still ends a job after 5 minutes). The command registers the function as a temporary resource, starts it, waits for it to finish, prints its logs and result the way a synchronous run does, and removes the resource.--timeoutlimits how long the command waits, not how long the function may run, and--intervalsets how often it checks. When the wait stops (--timeoutelapsed, or Ctrl+C), the function keeps running and its resource stays:tailor function logs <execution ID>reads the outcome, andtailor workflow pruneremoves the resources of runs that have finished.--asynccannot be combined with--watchor--name, and--timeoutand--intervalneed--async.When a synchronous
function runis stopped by the Platform's time limit, its error is now followed by the same command line with--asyncadded, and--jsoncarries it assuggestion.#3259
3866c02Thanks @toiroakr! -tailor function run --nameis deprecated and will be removed in v3. It keeps working and prints a deprecation warning when used. Usetailor workflow run <file> --job <name>instead, which also runs the jobs the job starts with.start()and accepts only a JSON object ornullas its argument.tailor upgradereports each use offunction run --namefor a manual change through thev3/function-run-name-to-workflow-runcodemod.#3260
4e0d088Thanks @toiroakr! - Addtailor function scaffold, which scaffolds a one-off script to run withfunction run, and deprecatetailor function script.scaffoldtakes the same arguments and behaves asscriptdid, matchingtailor workflow scaffold.scriptkeeps working as an alias that prints a deprecation warning, and is removed in v3. Adb.tswritten byfunction scriptis still refreshed when you scaffold over it, and the file now saysGenerated by tailor function scaffold.tailor upgradeoffers thev3/function-script-renamecodemod to rewritefunction scriptinvocations in package.json scripts, shell scripts, YAML, Markdown, and commands written as strings in TypeScript and JavaScript files.#3250
16c0913Thanks @dqn! -tailor showlists the services the application's GraphQL API exposes undersubgraphs, andshow()returns them inShowInfo.subgraphs.#3249
a9151f5Thanks @dqn! -tailor machineuser listandtailor oauth2client listshow the Auth service of each entry, asauthNamespacein--json.#3249
a9151f5Thanks @dqn! -tailor querytakes--namespaceto run a SQL query in that TailorDB namespace without inferring it from the tables the query names, and--appto name the application a GraphQL query runs against;query()takesnamespaceandappthe same way.tailor tailordb truncateandtruncate()accept a namespace together with table names, to look the tables up in that namespace only. When several namespaces have a table of the name given (compared with the same case, or ignoring case when no namespace has it with the same case),tailor queryandtailor tailordb truncatenow stop withTAILORDB_TABLE_NAMESPACE_AMBIGUOUSinstead of using the first namespace that has it.Patch Changes
#3267
eaea547Thanks @toiroakr! - Accept an explicitundefinedfor the optional properties of the IdP, Auth, and TailorDB service config types.#3248
2698bf9Thanks @dqn! - Errors about a missing or unknown Auth service, IdP, invoker, migration machine user, or executor trigger target now point at the file to fix.tailor deployandtailor tailordb migration testprefix the message with that file, put it inerror.context.file, and annotate it in GitHub Actions;tailor tailordb migration validateprefixes the failed check's message in its report with it and puts it in that check'serror.context.file. A service or machine user the config lacks (AUTH_CONFIG_REQUIRED,MACHINE_USER_REQUIRED,MACHINE_USER_NOT_FOUND,AUTH_MACHINE_USER_NOT_FOUND,EXECUTOR_IDP_REQUIRED), and an external Auth service a string invoker resolves through that does not exist (INVOKER_AUTH_NOT_FOUND), point at the config; an error about a value an executor or resolver names (EXECUTOR_AUTH_NOT_FOUND,EXECUTOR_IDP_AMBIGUOUS,INVOKER_AUTH_REQUIRED,INVOKER_AUTH_NOT_FOUNDfor an object invoker,INVOKER_MACHINE_USER_NOT_FOUND,EVENT_SUBSCRIPTION_OWNER_NOT_FOUND,DEPLOY_RESOURCE_NAMESPACE_AMBIGUOUS) points at that executor or resolver file.DEPLOY_RESOURCE_NAMESPACE_AMBIGUOUSnow also names the executor,INVOKER_AUTH_REQUIREDsuggests naming the Auth service withinvoker: { namespace, machineUserName }, and theAUTH_CONFIG_REQUIREDerror for an executor with anauthAccessTokentrigger names the executor and suggests defining an Auth service in the config.#3302
5999be0Thanks @anukiransolur! - Fix the link from thekyselyTypePlugincontentMappersection of the configuration docs to "Type Definitions Withouttailor generate", which pointed to an anchor some Markdown renderers do not resolve.#3244
7f461b2Thanks @dqn! - In a config without an Auth service,tailor deploynow stops withWORKFLOW_START_INVOKER_AUTH_REQUIREDat a workflow.start()whoseinvokeris a string literal, instead of deploying a start that runs the workflow without the machine user. Name the Auth service instead:{ invoker: { namespace: "<auth>", machineUserName: "<machine user>" } }. A string invoker that is not a literal in the call (a variable, a conditional, or a function call, for example) is not caught, and the workflow still runs without the machine user.#3244
c7c71c4Thanks @dqn! - Internal:tailor deploybuilds, plans, and applies a workspace config defined withdefineWorkspace()ordefineApp(), which is not exported yet. Nothing changes for adefineConfig()config.#3292
42ad3d9Thanks @dqn! -tailor deploynow records its SDK version on the workspace as thesdk-versionlabel after applying, keeping the workspace's other labels, so the version is recorded even for a config that deploys no application, such as one with only static websites. When the label cannot be recorded, such as when the workspace has no room for more labels, the deploy still succeeds, prints a warning, and adds aworkspaceSdkVersionNotRecordedentry to the--jsonresult'swarnings.#3270
01fc6e4Thanks @dqn! - Internal refactoring: stop exporting a function and types that only their own modules use. No user-facing behavior change.#3294
f22bcdeThanks @dqn! - WhenTAILOR_BUILD_OUTPUT_DIRis an absolute path or points outside the config file's directory (such as../out),tailor deployandtailor tailordb migration testnow save the selected workspace in that directory under a name unique to each config file. Previously an absolute path was recreated under the config file's directory, and config files in different directories that shared../outread each other's selection. A selection that an earlier version saved in these setups is not reused: the next deploy that does not name a workspace (--workspace-id,TAILOR_PLATFORM_WORKSPACE_ID, or a profile) selects one as on a first deploy, and a non-interactive run stops withWORKSPACE_SELECTION_REQUIREDuntil one run names it. For an absolute path, you can delete the copy of that path that earlier versions created under the config file's directory (for exampletmp/tailor-out/for/tmp/tailor-out).#3296
31a90e7Thanks @dqn! - Report the checkpoint reset that the next deploy makes intailor tailordb migration status, instead of a migration history mismatch, for a namespace still at the checkpoint and migration history thatmigration rebaselinereplaced. The command now exits zero in that case, lists the migrations after0000as pending, and reports the reset ascheckpointRepairin--jsonoutput. When such a namespace records a migration in progress, it reports the error the next deploy stops with.For such a namespace,
tailor deploy,tailor tailordb migration validate,migration status, andmigration testnow report an in-progress record that cannot be read asMIGRATION_IN_PROGRESS_INVALID, whose suggestion applies to it, instead ofMIGRATION_IN_PROGRESS_CONFLICT;migration testreports either error instead ofMIGRATION_TEST_SOURCE_REPAIR_PENDINGwhen any source namespace waiting for the reset records a migration in progress.#3276
ff9cc29Thanks @toiroakr! - Stop exporting three internal helpers that no other file uses.#3258
1f51e32Thanks @renovate! - fix(deps): update dependency @enlumine/graphql to v0.2.1#3262
071a8a3Thanks @renovate! - fix(deps): update dependency @enlumine/sql to v0.2.1#3263
0657a99Thanks @renovate! - fix(deps): update dependency @enlumine/terminal to v0.2.1#3265
39f812eThanks @renovate! - fix(deps): update dependency @politty/zod to v0.7.8#3283
7f2d4ddThanks @renovate! - fix(deps): update dependency @inquirer/prompts to v8.8.1#3298
4374f22Thanks @renovate! - fix(deps): update dependency @secretlint/core to v14.1.0#3269
39b20f6Thanks @toiroakr! -tailor seed applynow inserts rows of a table with a self-referencing foreign key in groups instead of one row at a time. Rows whose parents are all in earlier groups share one INSERT statement (up to 100 rows each), so rows spread over a few levels take a handful of statements instead of one per row. Rows in a cycle, tables with missing or duplicate ids, and tables whose self-reference fields are unknown are still inserted one by one.#3287
39c624eThanks @dqn! - Internal: name the object types of function parameters that were written inline. No behavior changes.#3249
a9151f5Thanks @dqn! - Internal:query,tailordb truncate, thetailordb migrationcommands,function runandscript,workflow runandstart,api,seed, and themachineuserandoauth2clientcommands run on a workspace config defined withdefineWorkspace()ordefineApp(), which is not exported yet. For the several Auth services such a config can have, a machine user or OAuth2 client can be written as<auth>/<name>,startWorkflow()and seedPlugin'smachineUserNametake{ namespace, machineUserName }, andloadSeedContext()returnsresolveMachineUser()andappName. With such a config,tailordb migration test --data clonerequires a single application that lists every namespace with pending migrations and exists in the source workspace, and checks this before it sets up the target workspace.#3297
cea7dc3Thanks @dragon3! -tailor apican inspect and callRepairTailorDBReplication.#3250
723c727Thanks @dqn! - Internal: for a workspace config defined withdefineWorkspace()ordefineApp(), which is not exported yet,tailor showandtailor opentake--app,tailor showwithout it, for a config with several applications, lists the deployed ones and warns about the others,tailor data cloneclones its only application,tailor removestops and points totailor deployandtailor workspace delete, andtailor setup cigenerates one deploy for the whole workspace, records the config underworkspacesin.github/tailor.lock, rejects--erd-preview, and takes--migration-testonly when the config deploys one application that lists every TailorDB namespace with migrations. For adefineConfig()config,--appaccepts only the config's own name, and nothing else changes.v2.47.0Compare Source
Minor Changes
#3241
2d302e2Thanks @dqn! - Resolvers, executor operations, andworkflow.start()acceptinvoker: { namespace, machineUserName }to name the Auth service of the machine user.tailor deploychecks the invoker of each resolver and executor operation against the machine users of that Auth service; an object invoker was not checked before. It stops withINVOKER_MACHINE_USER_NOT_FOUNDwhen the machine user does not exist, and withINVOKER_AUTH_NOT_FOUNDwhen the Auth service does not exist, including for a string invoker whose external Auth service does not exist, which gotINVOKER_MACHINE_USER_NOT_FOUNDbefore. Fix the name, or deploy the config that defines the Auth service first or in the same run.#3232
6fdc372Thanks @dqn! - Breaking change (beta):TailorDBReadyContext,ResolverReadyContext, andExecutorReadyContextnow requireauths, so code that builds one of these contexts itself, such as a plugin test that calls a hook, fails to type-check until it addsauths:{}for a config without an Auth service, or{ [auth.name]: auth }for the one it passed asauth.#3218
bdfae2cThanks @toiroakr! -tailor tailordb migration resolve --maintenancetakes the tables of a namespace out of the maintenance mode a deploy left in place after committing a migration, without settling a migration or moving the checkpoint.tailor tailordb migration statusreports such a record and the command that releases it, andtailor tailordb migration syncremoves it.tailor tailordb migration rebaselinenow refuses to run while such a record remains and points to the new option. Before, it moved the checkpoint to0000and left the record at the old checkpoint, so the nexttailor deploystopped withMIGRATION_REMOTE_DRIFT(settings changed) until you ranmigration sync 0000.#3232
15f56c9Thanks @dqn! - WithkyselyTypePlugin({ contentMapper: true }),createScopedGetDBfrom@tailor-platform/sdk/plugin/kysely-type/dbreturns agetDBthat type-checks only for the TailorDB namespaces you name, such ascreateScopedGetDB<"customer-db" | "order-db">(). To keep part of your code to those namespaces, export thatgetDBfrom a module of your own and forbid importing the SDK's withno-restricted-imports. It restricts nothing at runtime.The context of the generation hooks
onTailorDBReady,onResolverReady, andonExecutorReadynow hasauths, every Auth service of the config keyed by its name. Theirauthis deprecated and will be removed in v3.tailor upgradeto v3 runs thev3/plugin-context-authscodemod, which reports plugins that readauthfor a manual change.#3240
58ba791Thanks @dqn! - Add anauthoption to the authAccessToken triggers (authAccessTokenIssuedTrigger({ auth: "my-auth" })and the others) that names the Auth service the trigger subscribes to. It must name the Auth service the config uses;deployfails for any other name.#3196
fab9f44Thanks @toiroakr! - Addtailor workflow run <file>, which runs a workflow job as a temporary workflow without deploying it. The main job of the workflow the file exports as default (or the only job of the file;--jobselects another one) becomes the first job of the temporary workflow, and every job it starts with.start()is registered under a name of its own, so the deployed jobs of the same name are never touched. A job that calls.start()is suspended until the started job finishes, so work that does not fit in one job (the Platform ends a job after 5 minutes) can be split across jobs. A file that defines no workflow job is refused. The command waits until the run ends (--timeoutlimits the wait), prints the logs of every job and the result of the first job, and removes the temporary resources.tailor workflow pruneremoves the resources of runs whose wait was cut short (--timeout), and warns about resources namedtmp-run-…that carry no label;--include-unlabeledremoves those too.tailor deployalso removes the resources of finished runs at its end, and never fails because of it.tailor workflow scaffold <file>scaffolds a workflow definition (two jobs and acreateWorkflow) to run withworkflow run.Patch Changes
#3234
ce477c3Thanks @dqn! - Internal: deploy can plan resources for a whole workspace, taking over the ones an application config deployed, for the upcoming workspace configs. Deploying adefineConfig()config is unchanged.#3229
5a3415fThanks @dqn! - Internal refactoring: the CLI builds the services of a config through one path that can also hold several Auth services, in preparation for workspace configs. No user-facing behavior change.#3224
6e24ed0Thanks @dqn! - CLI plugins now receive the user's email inTAILOR_PLATFORM_USERwhen the profile orTAILOR_PLATFORM_URLselects a platform other than the default, as they already did on the default platform. They previously received the user ID.When a profile's
platform_urldiffers fromTAILOR_PLATFORM_URL(or the default) and its user has no login saved for that platform, plugins now receive the user ID instead of the email from a login not tied to a platform. No token is injected in that case, as before.#3247
524efd8Thanks @dqn! - Most errors and warnings that quote a failure's message, such as the TailorDB migration and temporary resource cleanup warnings, now end with it, so a message that already ends with a period no longer gets a second one (Build failed..).DEPLOYED_HOOK_FAILEDlists the hooks that did not run in its details instead of its message.#3227
a24ae12Thanks @dqn! -tailor deploynow rewrites the SDK labels of a resource whose configuration is unchanged when they differ from the ones the deploy sets, such as the application name label after renaming an application that keeps its id. Only the labels are written. Workflow job functions still get their labels only when their workflow is created or updated. The plan summary'slabelRefreshesnow counts these resources, apart from TailorDB tables and resolvers, instead of only function scripts.#3217
861b57eThanks @renovate! - fix(deps): update dependency @secretlint/core to v14.0.1#3225
a0411a7Thanks @renovate! - fix(deps): update oxc#3242 [
ce9c159](https://redirect.github.com/tailor-platform/sdk/commit/cConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.