Repository navigation
v0.0.2-alpha.81
Pre-releaseReleased 22 packages at 0.0.2-alpha.81 in lockstep. Every package below ships at this version.
What's changed
Patch Changes
-
#5119
48e70fbThanks @aqib-rx! - A blank migration's-- Parent:and-- Merges:lines are read in its header only, above-- UP, bymigrate:check,nextly migrateandmigrate:createalike; a line among its statements places nothing. A dialect's variant (<name>.mysql.sql) is read with its migration:migrate:checkpairs it with that migration's snapshot instead of reporting it MISSING_SNAPSHOT, and the history check no longer counts a variant of a blank migration as a second branch. -
#5118
4c87b4fThanks @mobeenabdullah! - A collection can declare that its entries are private files, with afilesoption (experimental): the accepted types, the largest size, and how a download is answered. It gains the fields each file needs (filename,mimeType,size,sha256,storageKey,fileStatus,rejectReason,uploadedByKind,uploadedById), which no caller can write through a checked path, and the storage key is never returned to one. The option is refused beside drafts, versions, localization, a public address or a read rule oftrue, and the Public role is granted nothing on such a collection at boot. Uploading and downloading the files come in a later release. -
#5120
971fc22Thanks @aqib-rx! - A code-first collection or Single can no longer give a field that stores no column of its own (a component, a many-to-many relationship or a virtual field) the exact nametitleorslug.defineCollectionanddefineSingleadd their own texttitleandslugbeside such a field, and the two shared one document key, so a write could be lost. Such a configuration is now refused when it loads, naming the field: rename it, or declaretitleorslugas a text field to replace Nextly's own. A name in another letter case (Slug) and a field inside a group or repeater are accepted as before. -
#5151
c640cb6Thanks @aqib-rx! -nextly db:sync --demoteand--promotenow hold the schema lock on a database where no run has made the lock's table yet: they make the lock's tables first, as a development start ornextly db:syncdoes (nextly_schema_lock, and beside it the earliernextly_field_group_lockand, on PostgreSQL,nextly_migrate_lock, which they may also bring up to date), so a sync started at the same time waits for them instead of writing the same collection's registry record in between. Where the database refuses the role those tables, they go on as before and say so in one warning; any other failure stops them as it did. -
#5122
3ab74e2Thanks @aqib-rx! - A collectionnextly db:sync --demotehanded to the Schema Builder now follows the Builder's definition while its entry is still innextly.config.ts:db:sync, a configuration reload undernext devandnextly migrateignore that entry (and warn once to remove it). The demote keeps the stored timestamps setting of a record it replaces, and refuses a collection a plugin contributes (DEMOTE_PLUGIN_COLLECTION). -
#5149
d6c29b4Thanks @aqib-rx! - Every reader of the migrations folder now reads a dialect's variant (0003_seed.mysql.sql) together with its migration, as the runner does.- A migration states that it is blank, and its place in the history, once. A variant that states nothing follows its base file, so
nextly migrate:checkpasses a hand-written variant beside amigrate:create --blankfile. A blank mark that only a variant carries marks the whole migration. - A
-- Parent:line stated only in a variant now places the migration in the history. - When a base file and a variant state different places,
nextly migrate,nextly migrate:create,nextly migrate:checkand a Schema Builder save refuse, naming both files. This is the newMIGRATION_PLACE_STATED_TWICEcode. - Settling a Builder save that was left part-way names a later blank migration once, by its own name, and no longer reads a variant of a migration that has a snapshot as a blank migration of its own.
nextly migrate:check's statement check judges a variant against its migration's snapshot, so the next file's DESTRUCTIVE warnings are judged against the right schema.
- A migration states that it is blank, and its place in the history, once. A variant that states nothing follows its base file, so
-
#5001
84f880dThanks @faisal-rx! - A development schema push on SQLite now runs in one transaction: a statement that fails takes back every statement of the push before it, so the database is left exactly as it was and the save keeps no migration file. Foreign-key enforcement is still switched off for the whole push, before the transaction opens. A push that finds nothing to change opens no transaction. -
#5125
57df632Thanks @faisal-rx! - A Schema Builder save that changes the type of a field inside a named group or a repeater judges each value the field holds, as it judges a field kept on the row. Nothing converts a value held inside JSON, so a value is kept only where the new field reads it as it is stored. Where a value cannot be read as the new type, or would first have to be rewritten into its form (the text "1" under a number field), the save is refused before anything changes, naming the field by its path (such asdetails.price) and the rows by their keys with a count, never by their values. The schema dialog, the collection update andnextly migrategive the same judgement in the same words. The code-first reload undernext devandnextly db:syncnow judge the same way, in the same words, the type changes their own rule never saw: a field inside a group's or a repeater's JSON, and a field whose column keeps its type. The reload holds the entity back andnextly db:syncrefuses, naming the field by its path. Before, the save went through and left those values in the group's or the repeater's stored JSON under a type that cannot read them. -
#5114
6d69dd4Thanks @faisal-rx! - A field moved into or out of a group in a code-first config keeps its values:nextly migrate:createasks about each field that looks moved (or, with no terminal, carries every one with--accept-moves) and writes statements that copy its values to the new place, and back in theDOWN. A working draft holding the field at its old place stops the migration before it changes anything. Undernext dev, such a change is held back, naming the field, rather than deleting its values or leaving them where nothing reads them. -
#5153
07150ebThanks @aqib-rx! - A collectionnextly db:sync --demotehanded to the Schema Builder is now ignored by every pass that readsnextly.config.tswhile its entry is still there: itslocalizedsetting no longer creates or restores a translations table, and a pair of fields added to it no longer stops a start. A reload records a plugin's collection as the plugin's, and the demote's note names the columns the Schema Builder's rules change at the next sync and says its compound indexes go then. -
#5154
dc0518aThanks @aqib-rx! - On SQLite, the registry write ofnextly db:sync --demoteand--promotewaits for a database another connection holds, as every other schema command's write does: it takes the schema lock first, retries withinNEXTLY_LOCK_TIMEOUT/NEXTLY_LOCK_TIMEOUT_TOTAL, and then stops withNEXTLY_TABLE_BUSY, rather than ending at once with SQLite's own "database is locked" while it checked for the lock's table. On PostgreSQL and MySQL nothing changes: where the lock's table is there, they still create nothing. -
#5167
c75373aThanks @nextly-agent! - A Nextly shut down in development stops watching its configuration. Before, the watcher kept running aftershutdown(), so a later save, or removing the folder that held the config, reloaded the configuration into whatever Nextly started next in the same process. -
#5138
7956714Thanks @nextly-agent! - The page builder's Add panel reads the places a block may go once per page and selection, rather than again on every redraw, such as each letter typed into its search. -
#5142
c3bc894Thanks @faisal-rx! - A saved field can be moved into and out of a named group in the Schema Builder, by drag, by key or with Move to…, and the save keeps every entry's value: the Builder sends each move with its preview and its save, and the review lists it as moved with its values kept, with what the move does not carry. A field moved and renamed or retyped in one save is refused before it is sent, and a move into or out of repeating rows is still refused. A move the save refuses is marked at its field, with the reason: on its row, in the error count beside Save, and at the top of its settings. A field kept per language (text-like fields are, by default) does not move into a group yet. -
#5016
c7b482dThanks @faisal-rx! - A block in a written email can be shown only when a variable has a value, is yes or is no (@experimental): choose Show only when in the block's menu. The block carries its condition as a label that can be removed. The variables offered there, and for a link, include every declared path, nested fields too.A saved written email can be converted to code from the workbench's menu. The dialog says the change can't be undone, shows the HTML and Liquid the email becomes, and waits until unsaved edits are saved; the server writes the code from the saved blocks, keeping every variable, condition and list as Liquid. For this, the draft preview of a written email now also returns
source: { html, text }, its compiled code before any data.allowedUrl, the check a save applies to a written email's link and image addresses, is exported fromnextly/api/email-template-preview-types, so an editor can check an address with the same rule.In a written email's plain-text body, a link across a bold word, a chip or a line break now gives its address once, after the whole phrase, instead of after each part of it.
A chip inside a list with no items is marked as showing nothing, whatever it holds. A chip that stands for an image address counts only a complete address.
-
#5029
0b8d26aThanks @faisal-rx! - On MySQL, a Schema Builder save that deletes a field's values now holds its collection from its count of those values until its migration is over, as a collection delete does, so a value written while the save runs is either counted (and the save refused for the new count) or written after the field is gone; before, an entry write that was under way when the save counted could be dropped uncounted. The admin's Schema Builder now sends the counts its review showed with the save, so its deletions are counted and held this way; a count that changed since the review refuses the save, naming the new count. An entry write to a collection now waits while another change of that collection holds it, a hold that waits past 30 seconds is refused before anything changes, and a write that waited while its collection was deleted, or deleted and made again under its slug, is refused rather than written into what took its place. A collection delete or entry write that meets a schema change in progress now answersCOLLECTION_BEING_CHANGED(409) instead ofCONFLICT, so a caller can tell the refusal is safe to try again. The hold also costs fewer statements: the database's name is read once per connection pool, and its named locks are taken in one statement and released in one. A hold that fails part way releases every lock it may have taken. A save refused after part of it applied, which MySQL can meet once an earlier statement has committed, now answersNEXTLY_MIGRATION_PARTIALLY_APPLIEDrather than the refusal's own code, and says it stopped part way; a refusal it names is underdata.refused, notdata.errors. -
#5113
007359aThanks @aqib-rx! - Everynextlycommand prints its first line as soon as it starts, before its own code loads, which takes seconds. A command that uses a database names it there (Database: SQLite ./data.db (development; DATABASE_URL from .env)); one that does not prints a short line saying what it is starting, such asReading the configuration.... Both go to standard error, so--jsonoutput stays one document, and--quietkeeps them back. How long a command takes in all is unchanged. -
#5162
6380ba4Thanks @mobeenabdullah! - Two saves of entries in the same collection on MySQL no longer deadlock when each records something in the entry's history. One of them used to be rolled back and run again. A history write now takes its collection's registry row with a shared lock rather than an exclusive one, which still keeps it in order with deleting the collection. -
#5140
eb1f125Thanks @mobeenabdullah! - An accounts invitation email can greet the person by name and say when its link stops working. Its template now receivesname,expiresAt(ISO 8601, UTC),expiresAtText(such as "30 November 2026, 5:00 PM") andtimeZone, and the default template uses them. The time is written in the newtimeZoneoption ofaccounts()(an IANA name such asAsia/Karachi), UTC when it is not set. Inviting the same address again sends the new link's expiry. -
#5161
4f38335Thanks @mobeenabdullah! - Two first changes to the site's languages made at the same moment both apply on MySQL, instead of one failing with a database deadlock. -
#5139
436bd23Thanks @mobeenabdullah! - A production start that does not run migrations at start publishes the cache tag expiry ledger as soon as it has checked the database is set up, before it reads the schema, the field-group storage names and the plugins' install states. A stored page, the admin's included, waits for the ledger before it is served, so it no longer waits for those reads: on a database 100 ms away the admin page's first byte came about 1.3 s after the server's first answer, and now about 0.55 s. A start that runs migrations at start still publishes it after them, as they record their own expiries. -
#5143
69d88d5Thanks @muzzamil-rx! - On a site with more than one language, a collection list shows each document's languages as labelled chips (live, changes, out of date, draft, missing), with a key above the table, in place of the language dots. Each chip names its language by code and its state in words, and opens the document in that language. The list filters by "Missing in " and "Out of date in " (the_translatedfilter'smissingandstalestates, kept in the address as?pf=nextly.language:<state>.<code>like the other list filters), and replaces "Translated in". Where the title is translated, a "Titles in" control shows titles in a chosen language, read in that language alone with no fallback: a row with no title there keeps its default-language title, marked as such, and each title carries its language'slanganddir. The chips and the filter are offered only to a reader who may read every language's state; a site with one language shows none of it. -
#5042
a9eb6dfThanks @faisal-rx! -nextly migratesettles a Builder save left part-way before its run, as a development start does, and judges a save made outside development by its files: complete files run, and a save stopped before its definition was written has its own unapplied files withdrawn. A file the database has applied is never removed. What cannot be settled refuses the run before its first file. A production start that runs migrations settles nothing: it refuses while a save is left part-way, removing no file and leavingui-schema.jsonas it is.migrate:check,migrate:createanddb:syncrefuse while such a save stands, and every refusal namesnextly migrateas a way to settle it. -
#5134
9f766a0Thanks @mobeenabdullah! - Private files can be downloaded (experimental).GET /admin/api/files/:slug/:id/downloadreads the file's entry as the caller, by the collection's access rules, and answers a file they may not read, a missing one and one not yet confirmed with the same 404; a ready file is streamed as an attachment, or answered with a 303 to a link that lasts a minute, and no cache may keep either. Every download writes an audit row of kindfile.downloaded. Server code opens files withnextly.files.download, which refuses a call naming no caller unless it saysoverrideAccess: true. Two confirms of one upload that overlap now keep one copy of the file. A response's ownContent-Security-PolicyandReferrer-Policyare no longer replaced by the site's defaults. New guide: Private Files. -
#5126
3700351Thanks @mobeenabdullah! - Private files can be uploaded (experimental).POST /admin/api/files/:slug/uploadschecks the caller may create in the collection, judges the file's name, type and size against itsfilesoption, and answers a link that lasts five minutes for sending the bytes straight to storage;POST /admin/api/files/:slug/uploads/:id/completereads the stored bytes back and accepts them only when their size and content match what was claimed, deleting them otherwise. Staff, API keys (by their own scope) and signed-in people of the kinds a collection lists in the newfiles.principalsare judged by the collection's access rules alike. Uploads never confirmed are rejected and their bytes deleted once the collection's wait has passed, by a job the job runner runs. An app whose private collection has no storage that keeps files private now refuses to start. -
#5115
07b83beThanks @mobeenabdullah! - Storage can now hold a collection's private files, which no public address ever serves (experimental groundwork; collections opt in in a later release). A collection marked private is never written to the local disk: with no storage plugin that can keep files private, it is refused rather than served from/uploads, andupload(), public URLs, client uploads and signed downloads are refused for it.@nextlyhq/storage-s3stores private files under keys that name no file, never cached, with short upload and download links, and needs nopublicUrlfor them, on Cloudflare R2 too. A public upload on R2 with nopublicUrlis now refused before the file is stored, rather than after. -
#5164
63c1f82Thanks @nextly-agent! - A production start finds the collections a demote handed to the Schema Builder in the registry rows it has already read, rather than reading the registry again. That second read was one more wait on the database before the start resolved. -
#5133
b831526Thanks @mobeenabdullah! -nextly migrate, and a start, no longer tell a database that an earlier release migrated but never started that its visitors lost reads. Since 0.0.2-alpha.75nextly migratemakes the preset roles, so a database it migrated, with no start since, read as one seeded by a release from before the Public role, and was told "Before this upgrade they could read these" of collections and Singles with no read rule, which its visitors could not read before the upgrade either. A database whose preset roles' grants a release recorded (preset_grants_release, written only bynextly migratefrom 0.0.2-alpha.75 on) is now recorded as not due the notice. A database seeded by a release from before the Public role is still told once. Only the notice's own record changes: no role, permission or grant is touched. -
#5131
7276d00Thanks @mobeenabdullah! - An accounts email's one-time link or code is no longer stored in the jobs table. The queued job holds only a reference, and the link is rebuilt when the email is sent, so a copy of the database (a backup, a leaked credential) no longer holds a live reset or invitation link, before or after sending, and a failed send's error never names one. Core's email service also blanks a secret-carrying template's link and code out of a provider's failure before logging it. An email whose link was replaced, used or expired before it went is not sent. For plugin authors,ctx.security.secretsmints now return aref, andreveal({ ref })derives the token or code again while it is live (experimental). -
#5136
6faa3deThanks @mobeenabdullah! - A document's readability in each language, which a document's history, review state and workflow notices ask, is judged from a read of the document alone, with its relationships left as ids. The verdict is the read's report of the row it loaded, which no related row changes; each language's probe no longer reads every related entry and file, which made opening an entry for editing read its relations once per configured language. -
#5044
b593704Thanks @hasnat-rx! - The SEO plugin no longer calls a structured data detail missing when it is mapped to one of the dates every entry holds by itself. SEO › Content types and an entry's SEO tab now judge a mapping tocreatedAt,updatedAtorfirstPublishedAtas the page's structured data does, and the Content types screen offers Created and First published as sources for the date published and a video's upload date. A mapping into the plugin's own SEO group is no longer flagged either. A page not saved yet says when such a date will be set.plugin-sdkaddsentryDateFieldNames(experimental), naming those dates from core's own declaration. -
#5127
daedff9Thanks @muzzamil-rx! - Settings has a Languages page: it lists each language with its code, writing direction, fallback and how much content it holds, and adds, renames, reorders and removes languages and changes the default after showing what that changes. Languages declared in the configuration are shown read-only, saying where they are set. -
#5121
7776758Thanks @aqib-rx! -nextly migratefollows more of a hand-written migration before it records one applied without running it. A constraint named inside a column's definition (author integer CONSTRAINT posts_author_fk REFERENCES users (id) DEFERRABLE) is checked as one written as its own clause: a PostgreSQL key's deferrability, a MySQL check's enforcement, a unique constraint's index. A later drop removes only an object of its own kind, so aDROP INDEXsharing a constraint's name no longer stops the constraint from being checked. A MySQLCREATE TABLEthat declares an index with a method or order (INDEX i USING HASH (c)), or a full-text or spatial one, is refused as theCREATE INDEXform is. On SQLite, theAUTOINCREMENTcounter is compared with the highest key inside SQLite in one statement, exact above 2^53, and a key declaredPRIMARY KEY ON CONFLICT <resolution> AUTOINCREMENTis read as one. Filesnextly migrate:createwrites are unaffected: where the database does not stand as a hand-written file leaves it, the run stops withMIGRATION_NOT_PROVENinstead of recording it. -
#5150
81ac406Thanks @aqib-rx! -nextly migratereads a hand-written migration's indexes, keys and constraints the same way however the statement is written, before it records the file applied without running it. On PostgreSQL and SQLite, a key or exclusion declared in aCREATE TABLEbody (UNIQUE NULLS NOT DISTINCT,EXCLUDE, SQLite'sUNIQUE (c DESC)) is now refused as not shown by the snapshot, as itsALTER TABLE ... ADD CONSTRAINTspelling already was, and an unnamedALTER TABLE ... ADD EXCLUDEorADD UNIQUE NULLS NOT DISTINCTis no longer read as adding a column. A MySQL index whose unquoted name is an order word (INDEX nulls (c)) is no longer refused. A key named inside a column that references an unquoted table named like a keyword (REFERENCES generated (id) DEFERRABLE) has its deferrability read. On SQLite, a table whose key is declared AUTOINCREMENT at the table's level (PRIMARY KEY (id AUTOINCREMENT)) has its counter checked as the column form's is, instead of being refused. Filesnextly migrate:createwrites are unaffected. -
#5009
d7b6515Thanks @faisal-rx! - Staff can retry and cancel a queued email.- Retry:
POST /api/email-deliveries/queued/:id/retry(Direct API:nextly.email.retryQueued({ id })) retries a queued email now while its message is held.- A waiting or retrying email has its next attempt brought forward to now.
- A failed email waits again, due now, with a fresh set of attempts. Its last failure shows until the next attempt replaces it.
- A template email is rendered from its template as saved at that moment, so a retry after fixing the template sends the fixed version.
- It is refused (
CONFLICT, saying why) while an attempt is with the provider, and for an email already sent or cancelled, or whose message has been cleared.
- Cancel:
POST /api/email-deliveries/queued/:id/cancelcancels asnextly.email.cancelQueueddoes. While an attempt is with the provider, the cancel is a request: it takes effect only if that attempt fails. - Permissions: both need
manage-email-deliveries, seeded to super-admin only. - In the admin: the Activity tab's detail sheet for a queued email offers Try again now and Cancel email to a person who may manage email deliveries. Cancel asks first. While an attempt is with the provider, only Cancel is offered, and it holds only if that attempt fails. An email whose message was cleared can be cancelled but not tried again. A refusal shows the server's reason, and the list and the sheet are read again either way.
- Recorded: each retry and cancel by a person is written to the activity log as an update under
email-deliveries, naming the queued email and the action. No address is recorded. - A queued email whose attempt stopped after its send was recorded now keeps the provider that sent it, read from that send's delivery records.
- Plugins are told: when a person retries a failed email a plugin queued, the plugin hears
state: "retrying"with the new optionalretry: { by: "person", userId }, in the retry's own transaction. The attempts that follow count from 1 again.QueuedEmailChange.retryis a new optional field (@experimental).
- Retry:
-
#5128
92c2103Thanks @mobeenabdullah! - On a site upgrading with committed migrations and nolocalizationblock,nextly migrateandnextly migrate:checkno longer list its text-like columns as bare drops: each drop says it moves to the<table>_localestable, and the message names the fields, says nothing is lost, and gives the two safe ways forward (mark the fieldslocalized: false, or declarelocalizationon purpose).nextly migrate:create's refusal there says the same. Nothing about storage changes. -
#5155
8776b10Thanks @faisal-rx! - The admin package builds its type declarations again: the collection schema API declares its types, which declarations made from each module alone need. Nothing it does changes. -
#5124
cb15bacThanks @faisal-rx! - A translated field's type change now gives its translations column the new type. The Schema Builder save writes the column's change in a companion migration file of its own,retypes, ahead of the main one, and judges each language's value before anything runs.nextly migrategroups that file with its change and judges each language's value before either runs. A value one language holds that the new type cannot read refuses the change, naming that language's row. Such a change was refused before, whatever its values. It stays refused where the road doesn't carry the column's change: a change whose translations column changes only on a database other than the file's, a Single's save, and the code-first reload,db:syncand REST. A build before this one refuses aretypesfile (header version 8) as one it does not support. -
#5141
6c97ed2Thanks @faisal-rx! - A translated relationship switched between storage shapes (one link becoming a list, the reverse, or to or from naming several collections) keeps its values again on PostgreSQL and MySQL. The companion migration file that gives a translations column its new type no longer casts such a column ahead of the switch's own statements, which carry each stored link into the new shape. -
#5137
d1153ebThanks @mobeenabdullah! - A start resolves every translation table's readiness with one table listing rather than one probe per translated collection, Single and field group, so its statements no longer grow with the number of entities. Reads that need the same table's readiness at the same moment share one probe. -
#5135
b629f5cThanks @mobeenabdullah! - The admin asks for a document's review state, and for whether anything can wait for its reader's review, only where a workflow holds something that reader may read. The signed-in workspace answer (GET /api/admin-meta/workspace) now carriesworkflowEntities: the collections and Singles a workflow holds that the reader may read, by slug. An entry of a collection no workflow holds is answered "no workflow" without a request, and a site with no workflow attached sends neither request on a list or an edit page. Where the workspace answer does not say (it failed, or comes from an older server), both are asked as before.
Packages
@nextlyhq/adapter-drizzle@nextlyhq/adapter-mysql@nextlyhq/adapter-postgres@nextlyhq/adapter-sqlite@nextlyhq/admin@nextlyhq/admin-css@nextlyhq/blocks-engine@nextlyhq/blocks-react@nextlyhq/builder@nextlyhq/eslint-plugin@nextlyhq/plugin-accounts@nextlyhq/plugin-form-builder@nextlyhq/plugin-mcp@nextlyhq/plugin-page-builder@nextlyhq/plugin-sdk@nextlyhq/plugin-seo@nextlyhq/storage-s3@nextlyhq/storage-uploadthing@nextlyhq/storage-vercel-blob@nextlyhq/uicreate-nextly-appnextly