create-stacki 0.1.66 → 0.1.67

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/cli.mjs CHANGED
@@ -448,6 +448,16 @@ function string2(value, maximum = MAX_SOURCE) {
448
448
  return value;
449
449
  }
450
450
 
451
+ // studio/vendor/stacki/shared/properties/componentSources.ts
452
+ var COMPONENT_SOURCE_LIMITS = {
453
+ sourcesMax: 16,
454
+ filesMax: 1e4,
455
+ directoriesMax: 1e3,
456
+ sourceBytesMax: 1024 * 1024,
457
+ sourceBytesTotalMax: 16 * 1024 * 1024,
458
+ configBytesMax: 16384
459
+ };
460
+
451
461
  // studio/vendor/stacki/shared/core/assert.ts
452
462
  function assert(condition, message) {
453
463
  if (!condition) {
@@ -468,8 +478,8 @@ var DEFAULT_LIMITS = {
468
478
  };
469
479
  function componentFile(input) {
470
480
  const value = text(input);
471
- if (value.length > 500 || !/^src\/[\w./ -]+\.astro$/.test(value)) {
472
- throw new Error("Component defaults: expected a project-relative .astro path under src/");
481
+ if (value.length > 500 || !/^(src\/|node_modules\/(?:@[\w.-]+\/)?[\w.-]+\/)[\w./ -]+\.astro$/.test(value)) {
482
+ throw new Error("Component defaults: expected a project-relative component .astro path");
473
483
  }
474
484
  if (value.split("/").some((part) => part.startsWith(".") || part === "")) {
475
485
  throw new Error("Component defaults: invalid path segment");
@@ -500,6 +510,7 @@ function parseComponentDefaults(input) {
500
510
  return { version: 1, components };
501
511
  }
502
512
  var parseDefaultComponent = object({
513
+ importPath: optional(text),
503
514
  file: componentFile,
504
515
  name: text,
505
516
  props: list(text),
@@ -608,6 +619,9 @@ function parseRecipeChildren(input, depth, takeNode) {
608
619
 
609
620
  // studio/vendor/stacki/shared/properties/projectMetadata.ts
610
621
  function metadataKind(input) {
622
+ if (input === "componentSources") {
623
+ return input;
624
+ }
611
625
  if (input === "components" || input === "guide" || input === "publish" || input === "pages") {
612
626
  return input;
613
627
  }