turnzero 0.30.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3195,7 +3195,7 @@ var folderBindingOf = (io2, path) => {
3195
3195
  var BINDING_LINE_HEAD = "binding: ";
3196
3196
  var bindingLineOf = (application) => `${BINDING_LINE_HEAD}${FOLDER_MANIFEST} gets application ${application}, so later deploy and check lines naming another application are refused`;
3197
3197
  var BOUND_LINE_HEAD = "bound: ";
3198
- var boundLineOf = (application) => `${BOUND_LINE_HEAD}${FOLDER_MANIFEST} now names application ${application}; a deploy or check line naming another application is refused`;
3198
+ var boundLineOf = (application) => `${BOUND_LINE_HEAD}deploy wrote the application id ${application} into ${FOLDER_MANIFEST}, so a later deploy or check reaches this application and a line naming another is refused; commit ${FOLDER_MANIFEST} with your change`;
3199
3199
  var BIND_WRITE_FAILED_LINE = `${FOLDER_MANIFEST} could not be written to bind this folder to its application, so the deploy goes on unbound, and the next deploy writes it again.`;
3200
3200
  var boundElsewhereSentence = (bound) => `${FOLDER_MANIFEST} binds this folder to application ${bound}, and this line names another.`;
3201
3201
  var OFF_FORM_SENTENCE = `${FOLDER_MANIFEST}'s ${APPLICATION_MEMBER} member is not an application id, a lowercase UUID, so it binds this folder to no application a line can name.`;
@@ -5567,6 +5567,13 @@ var committedFilesOf = (copied, written) => {
5567
5567
  var COPY_PACKAGES_CLAUSE = "Copy the packages line into the application manifest's packages member at each submission. ";
5568
5568
  var KEEP_PACKAGES_CLAUSE = "The application manifest was written whole, so read it again before patching it, and carry its packages member over in any later rewrite. Call submit_manifest with it before the next deploy. ";
5569
5569
  var MADE_MANIFEST_CLAUSE = "The application manifest was made with no services and a public audience. Declare the services and the audience the application uses in it before submit_manifest. ";
5570
+ var REGISTRAR_PACKAGE_CLAUSE = "This project holds the registrar: pin the version in the package's instance file through the registrar, and run validate with kind library.";
5571
+ var REGISTRAR_ENTRY_CLAUSE = "This project holds the registrar: run validate with kind library.";
5572
+ var registrarClauseOf = (io2, root, entryPath) => {
5573
+ const holds = [root, repositoryRootOf(io2, root)].some((at) => io2.stat(join8(at, ".tzteam", "config.json"))?.folder === false);
5574
+ if (!holds) return "";
5575
+ return entryPath.startsWith("features/") ? REGISTRAR_PACKAGE_CLAUSE : REGISTRAR_ENTRY_CLAUSE;
5576
+ };
5570
5577
  var installFailedSentence = (folder) => `npm install in ${folder} did not finish: the entry, its row, and the copy are written. Run npm install there again; running this line again takes the entry again whole.`;
5571
5578
  var LIBRARY_AFTER_OWN_ERROR = "the entry's folder, its manifest row, or the application's copy may stand in part, and running the line again replaces each whole";
5572
5579
  async function readTake(io2, options, userAgent, bearer, planOf, planeChecked = false, say = () => void 0) {
@@ -5677,7 +5684,7 @@ function writeTake(io2, root, { entry, library, entryFolder, rows, manifestStood
5677
5684
  }
5678
5685
  return manifestText;
5679
5686
  }
5680
- async function installTake(io2, root, plan, manifestText, application) {
5687
+ async function installTake(io2, root, plan, manifestText, application, registrarClause = "") {
5681
5688
  const shown2 = shownFrom(root);
5682
5689
  let status = COMMAND_STATUS.done;
5683
5690
  let afterInterrupt = null;
@@ -5703,7 +5710,7 @@ async function installTake(io2, root, plan, manifestText, application) {
5703
5710
  io2.print(`${packagesLineOf(packagesOf(manifestText))} ${packagesWhereOf(root, application)}`);
5704
5711
  if (!("written" in application) && application.unwritten === "write_failed") status = COMMAND_STATUS.failed;
5705
5712
  io2.print(
5706
- `next: commit ${committedFilesOf(plan !== null, "written" in application)}. ${"written" in application ? `${application.made === true ? MADE_MANIFEST_CLAUSE : ""}${KEEP_PACKAGES_CLAUSE}` : COPY_PACKAGES_CLAUSE}Where the project holds the registrar, pin the version in its instance file and run validate with kind library.`
5713
+ `next: commit ${committedFilesOf(plan !== null, "written" in application)}. ${"written" in application ? `${application.made === true ? MADE_MANIFEST_CLAUSE : ""}${KEEP_PACKAGES_CLAUSE}` : COPY_PACKAGES_CLAUSE}${registrarClause}`.trimEnd()
5707
5714
  );
5708
5715
  printAfterInterrupt(io2, afterInterrupt);
5709
5716
  return status;
@@ -5731,7 +5738,7 @@ async function libraryTake(call, io2) {
5731
5738
  if (checked.plan?.made !== void 0) io2.print(APPLICATION_IN_APP_LINE);
5732
5739
  const manifestText = writeTake(io2, options.root, checked);
5733
5740
  const written = writeApplicationManifest(io2, application, packagesOf(manifestText));
5734
- return installTake(io2, options.root, checked.plan, manifestText, written);
5741
+ return installTake(io2, options.root, checked.plan, manifestText, written, registrarClauseOf(io2, options.root, checked.entry.path));
5735
5742
  }
5736
5743
  var LIBRARY_ROW = Object.freeze({
5737
5744
  name: LIBRARY_SUBCOMMAND,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turnzero",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "type": "module",
5
5
  "description": "Deploy and run AI-built apps with Turn Zero Cloud hosting and backend services.",
6
6
  "license": "Apache-2.0",