@codions/portta 0.0.0-develop.166.sha-d31f10f → 0.0.0-develop.171.sha-d749180

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.
package/dist/host.js CHANGED
@@ -3306,7 +3306,7 @@ var require_Schema = __commonJS({
3306
3306
  var string4 = require_string();
3307
3307
  var tags = require_tags();
3308
3308
  var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
3309
- var Schema = class _Schema {
3309
+ var Schema2 = class _Schema {
3310
3310
  constructor({ compat, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
3311
3311
  this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
3312
3312
  this.name = typeof schema === "string" && schema || "core";
@@ -3324,7 +3324,7 @@ var require_Schema = __commonJS({
3324
3324
  return copy;
3325
3325
  }
3326
3326
  };
3327
- exports.Schema = Schema;
3327
+ exports.Schema = Schema2;
3328
3328
  }
3329
3329
  });
3330
3330
 
@@ -3417,7 +3417,7 @@ var require_Document = __commonJS({
3417
3417
  var identity = require_identity();
3418
3418
  var Pair = require_Pair();
3419
3419
  var toJS = require_toJS();
3420
- var Schema = require_Schema();
3420
+ var Schema2 = require_Schema();
3421
3421
  var stringifyDocument = require_stringifyDocument();
3422
3422
  var anchors = require_anchors();
3423
3423
  var applyReviver = require_applyReviver();
@@ -3668,7 +3668,7 @@ var require_Document = __commonJS({
3668
3668
  if (options.schema instanceof Object)
3669
3669
  this.schema = options.schema;
3670
3670
  else if (opt)
3671
- this.schema = new Schema.Schema(Object.assign(opt, options));
3671
+ this.schema = new Schema2.Schema(Object.assign(opt, options));
3672
3672
  else
3673
3673
  throw new Error(`With a null YAML version, the { schema: Schema } option is required`);
3674
3674
  }
@@ -7332,7 +7332,7 @@ var require_dist = __commonJS({
7332
7332
  "use strict";
7333
7333
  var composer = require_composer();
7334
7334
  var Document = require_Document();
7335
- var Schema = require_Schema();
7335
+ var Schema2 = require_Schema();
7336
7336
  var errors = require_errors();
7337
7337
  var Alias = require_Alias();
7338
7338
  var identity = require_identity();
@@ -7348,7 +7348,7 @@ var require_dist = __commonJS({
7348
7348
  var visit2 = require_visit();
7349
7349
  exports.Composer = composer.Composer;
7350
7350
  exports.Document = Document.Document;
7351
- exports.Schema = Schema.Schema;
7351
+ exports.Schema = Schema2.Schema;
7352
7352
  exports.YAMLError = errors.YAMLError;
7353
7353
  exports.YAMLParseError = errors.YAMLParseError;
7354
7354
  exports.YAMLWarning = errors.YAMLWarning;
@@ -72428,7 +72428,7 @@ function createDaemonTaskflowHost(context) {
72428
72428
  port: hostListen(env2).port,
72429
72429
  workflowBuiltinsDir: taskflowAssets(env2).workflowBuiltinsDir,
72430
72430
  version: env2.PORTTA_VERSION || "0.0.0-local",
72431
- buildDate: true ? "2026-09-18T00:00:48Z" : (/* @__PURE__ */ new Date()).toISOString(),
72431
+ buildDate: true ? "2026-09-18T00:56:55Z" : (/* @__PURE__ */ new Date()).toISOString(),
72432
72432
  environmentStore: createEnvironmentStore(paths.database),
72433
72433
  hostEnvironmentProvider: new HostEnvironmentProvider(),
72434
72434
  devContainerProvider: new DevContainerProvider(),
@@ -73701,6 +73701,58 @@ var DOCKER_SIZE_UNITS = {
73701
73701
  // ../core/src/password.ts
73702
73702
  var SCRYPT_MAX_MEMORY = 96 * 1024 * 1024;
73703
73703
 
73704
+ // ../core/src/project-config.ts
73705
+ var PROJECT_CONFIG_FILE = "project.yaml";
73706
+ var PROJECT_CONFIG_PATH2 = `.portta/${PROJECT_CONFIG_FILE}`;
73707
+ var BRANCH_PATTERN_PLACEHOLDERS = ["type", "slug"];
73708
+ function hostShape(value) {
73709
+ if (/:\/\//.test(value)) return "looks like a URL";
73710
+ if (value.startsWith("//")) return "looks like a URL";
73711
+ if (value.startsWith("/")) return "is an absolute path";
73712
+ if (/^[a-z]:[\\/]/i.test(value)) return "is an absolute path";
73713
+ if (value.startsWith("~")) return "is a home-relative path, which differs per machine";
73714
+ if (/^\d{1,5}:\d{1,5}$/.test(value)) return "looks like a published host port";
73715
+ return null;
73716
+ }
73717
+ var portable = (label) => external_exports.string().trim().min(1).superRefine((value, ctx) => {
73718
+ const shape = hostShape(value);
73719
+ if (shape) {
73720
+ ctx.addIssue({
73721
+ code: "custom",
73722
+ message: `${label} ${shape}; that belongs to the host, not to the project (ADR 0052)`
73723
+ });
73724
+ }
73725
+ });
73726
+ var repoRelativePath = (label) => portable(label).superRefine((value, ctx) => {
73727
+ const normalized = value.replaceAll("\\", "/");
73728
+ if (normalized.split("/").includes("..")) {
73729
+ ctx.addIssue({ code: "custom", message: `${label} escapes the repository with '..'` });
73730
+ }
73731
+ });
73732
+ var branchPattern = portable("the branch pattern").superRefine((value, ctx) => {
73733
+ const used = [...value.matchAll(/\{([^}]*)\}/g)].map((match2) => match2[1] ?? "");
73734
+ const allowed = new Set(BRANCH_PATTERN_PLACEHOLDERS);
73735
+ for (const placeholder of used) {
73736
+ if (!allowed.has(placeholder)) {
73737
+ ctx.addIssue({
73738
+ code: "custom",
73739
+ message: `unknown placeholder {${placeholder}}; the branch pattern accepts ${BRANCH_PATTERN_PLACEHOLDERS.map((name) => `{${name}}`).join(" and ")}`
73740
+ });
73741
+ }
73742
+ }
73743
+ });
73744
+ var Schema = external_exports.strictObject({
73745
+ version: external_exports.literal(1),
73746
+ name: portable("the project name").optional(),
73747
+ mainBranch: portable("the main branch").optional(),
73748
+ worktrees: external_exports.strictObject({
73749
+ root: repoRelativePath("the worktree root").optional(),
73750
+ branchPattern: branchPattern.optional()
73751
+ }).optional(),
73752
+ stack: external_exports.array(external_exports.string().trim().min(1).regex(/^[a-z0-9][a-z0-9.+-]*$/i, "a stack entry is a plain identifier such as node or mysql")).optional(),
73753
+ instructions: external_exports.array(repoRelativePath("an instruction path")).optional()
73754
+ });
73755
+
73704
73756
  // ../core/src/route-path.ts
73705
73757
  function matchPath(pattern, path) {
73706
73758
  const expected = pattern.split("/");
@@ -1 +1 @@
1
- 0.0.0-develop.166.sha-d31f10f
1
+ 0.0.0-develop.171.sha-d749180
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codions/portta",
3
- "version": "0.0.0-develop.166.sha-d31f10f",
3
+ "version": "0.0.0-develop.171.sha-d749180",
4
4
  "description": "Machine-first CLI for a shared Docker development gateway",
5
5
  "license": "MIT",
6
6
  "type": "module",