@geekmidas/manifest 10.0.0-alpha.2 → 10.0.0-alpha.21

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/index.cjs CHANGED
@@ -1,13 +1,12 @@
1
- //#region rolldown:runtime
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
10
  var __copyProps = (to, from, except, desc) => {
12
11
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
13
12
  key = keys[i];
@@ -18,13 +17,11 @@ var __copyProps = (to, from, except, desc) => {
18
17
  }
19
18
  return to;
20
19
  };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
22
21
  value: mod,
23
22
  enumerable: true
24
23
  }) : target, mod));
25
-
26
24
  //#endregion
27
-
28
25
  //#region src/declaration.ts
29
26
  /**
30
27
  * The version used when a database names none.
@@ -37,32 +34,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
34
  */
38
35
  const DEFAULT_POSTGRES_VERSION = 18;
39
36
  /**
40
- * How the process serving a declaration is built and run.
41
- *
42
- * The half of an application that a graph genuinely cannot derive. *What*
43
- * exists — a surface, a site, the edges between them — is declared and read
44
- * back from the manifest. *Where its source lives and which globs find its
45
- * code* is not derivable from anything: it is a fact about a directory.
46
- *
47
- * It lives on the declaration rather than in a config `apps` block because the
48
- * two were the same list written twice, and the copy in config was the one that
49
- * could disagree. A site declared `path: 'apps/web'` and an app entry declared
50
- * `path: 'apps/web'`, and nothing checked them against each other; a surface
51
- * that config had no entry for simply never deployed.
52
- *
53
- * Only the declaration that *is* an app carries one. Two surfaces in one
54
- * process means one of them has the spec and the other collapses onto it —
55
- * which is the same rule that decides deploy units, now stated once.
56
- */
57
- /**
58
- * Where an app's code lives when nobody says otherwise.
59
- *
60
- * One glob, every kind — the same rule the `constructs` glob follows. A handler
61
- * in one of these directories is found; anywhere else needs a `code` glob, and
62
- * saying so is the whole reason the field still exists.
63
- */
64
- const DEFAULT_APP_CODE = "./{endpoints,functions,crons,queues,topics,subscribers}/**/*.ts";
65
- /**
66
37
  * What each kind may derive from.
67
38
  *
68
39
  * Small enough to state exhaustively, and stating it makes cycles impossible
@@ -102,7 +73,6 @@ const PUBLIC = {
102
73
  site: ["url"],
103
74
  worker: []
104
75
  };
105
-
106
76
  //#endregion
107
77
  //#region src/errors.ts
108
78
  /**
@@ -161,20 +131,9 @@ var IllegalDerivation = class extends Error {
161
131
  this.allowed = allowed;
162
132
  }
163
133
  };
164
-
165
134
  //#endregion
166
- //#region ../../node_modules/.pnpm/lodash.snakecase@4.1.1/node_modules/lodash.snakecase/index.js
167
- var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.snakecase@4.1.1/node_modules/lodash.snakecase/index.js"(exports, module) {
168
- /**
169
- * lodash (Custom Build) <https://lodash.com/>
170
- * Build: `lodash modularize exports="npm" -o ./`
171
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
172
- * Released under MIT license <https://lodash.com/license>
173
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
174
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
175
- */
176
- /** Used as references for various `Number` constants. */
177
- var INFINITY = Infinity;
135
+ //#region src/naming.ts
136
+ var import_lodash_snakecase = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
178
137
  /** `Object#toString` result references. */
179
138
  var symbolTag = "[object Symbol]";
180
139
  /** Used to match words composed of alphanumeric characters. */
@@ -182,15 +141,46 @@ var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.snakecase@4.1
182
141
  /** Used to match Latin Unicode letters (excluding mathematical operators). */
183
142
  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
184
143
  /** Used to compose unicode character classes. */
185
- var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
144
+ var rsAstralRange = "\\ud800-\\udfff";
145
+ var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23";
146
+ var rsComboSymbolsRange = "\\u20d0-\\u20f0";
147
+ var rsDingbatRange = "\\u2700-\\u27bf";
148
+ var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
149
+ var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
150
+ var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
151
+ var rsPunctuationRange = "\\u2000-\\u206f";
152
+ var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
153
+ var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
154
+ var rsVarRange = "\\ufe0e\\ufe0f";
155
+ var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
186
156
  /** Used to compose unicode capture groups. */
187
- var rsApos = "['’]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
157
+ var rsApos = "['’]";
158
+ var rsBreak = "[" + rsBreakRange + "]";
159
+ var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]";
160
+ var rsDigits = "\\d+";
161
+ var rsDingbat = "[" + rsDingbatRange + "]";
162
+ var rsLower = "[" + rsLowerRange + "]";
163
+ var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
164
+ var rsModifier = "(?:" + rsCombo + "|\\ud83c[\\udffb-\\udfff])";
165
+ var rsNonAstral = "[^" + rsAstralRange + "]";
166
+ var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
167
+ var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
168
+ var rsUpper = "[" + rsUpperRange + "]";
169
+ var rsZWJ = "\\u200d";
188
170
  /** Used to compose unicode regexes. */
189
- var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
171
+ var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")";
172
+ var rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")";
173
+ var rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
174
+ var rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
175
+ var reOptMod = rsModifier + "?";
176
+ var rsOptVar = "[" + rsVarRange + "]?";
177
+ var rsOptJoin = "(?:" + rsZWJ + "(?:" + [
190
178
  rsNonAstral,
191
179
  rsRegional,
192
180
  rsSurrPair
193
- ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [
181
+ ].join("|") + ")" + rsOptVar + reOptMod + ")*";
182
+ var rsSeq = rsOptVar + reOptMod + rsOptJoin;
183
+ var rsEmoji = "(?:" + [
194
184
  rsDingbat,
195
185
  rsRegional,
196
186
  rsSurrPair
@@ -489,18 +479,17 @@ var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.snakecase@4.1
489
479
  function unicodeWords(string) {
490
480
  return string.match(reUnicodeWord) || [];
491
481
  }
492
- /** Used for built-in method references. */
493
- var objectProto = Object.prototype;
494
482
  /**
495
483
  * Used to resolve the
496
484
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
497
485
  * of values.
498
486
  */
499
- var objectToString = objectProto.toString;
487
+ var objectToString = Object.prototype.toString;
500
488
  /** Built-in value references. */
501
489
  var Symbol = root.Symbol;
502
490
  /** Used to convert symbols to primitives and strings. */
503
- var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
491
+ var symbolProto = Symbol ? Symbol.prototype : void 0;
492
+ var symbolToString = symbolProto ? symbolProto.toString : void 0;
504
493
  /**
505
494
  * The base implementation of `_.toString` which doesn't convert nullish
506
495
  * values to empty strings.
@@ -513,7 +502,7 @@ var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.snakecase@4.1
513
502
  if (typeof value == "string") return value;
514
503
  if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
515
504
  var result = value + "";
516
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
505
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
517
506
  }
518
507
  /**
519
508
  * Creates a function like `_.camelCase`.
@@ -670,11 +659,7 @@ var require_lodash = __commonJS({ "../../node_modules/.pnpm/lodash.snakecase@4.1
670
659
  return string.match(pattern) || [];
671
660
  }
672
661
  module.exports = snakeCase;
673
- } });
674
-
675
- //#endregion
676
- //#region src/naming.ts
677
- var import_lodash = __toESM(require_lodash(), 1);
662
+ })))(), 1);
678
663
  /**
679
664
  * `UPPER_SNAKE_CASE`, with numbers kept against the word they follow.
680
665
  *
@@ -686,7 +671,7 @@ var import_lodash = __toESM(require_lodash(), 1);
686
671
  * @example environmentCase('api2') // 'API2' (digit joins its word)
687
672
  */
688
673
  function environmentCase(name) {
689
- return (0, import_lodash.default)(name).toUpperCase().replace(/_\d+/g, (r) => r.replace("_", ""));
674
+ return (0, import_lodash_snakecase.default)(name).toUpperCase().replace(/_\d+/g, (r) => r.replace("_", ""));
690
675
  }
691
676
  /**
692
677
  * The env key a construct provides for one of its roles.
@@ -711,7 +696,7 @@ function provideKey(id, role) {
711
696
  * @example canonicalId('user-uploads') // 'UserUploads'
712
697
  */
713
698
  function canonicalId(input) {
714
- const id = (0, import_lodash.default)(input).split("_").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
699
+ const id = (0, import_lodash_snakecase.default)(input).split("_").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
715
700
  if (!VALID_ID.test(id)) throw new InvalidConstructId(input, id);
716
701
  return id;
717
702
  }
@@ -863,7 +848,6 @@ function cookieDomain(urls) {
863
848
  function providedKeyFor(id, kind, role) {
864
849
  return kind === "secret" ? environmentCase(id) : provideKey(id, role);
865
850
  }
866
-
867
851
  //#endregion
868
852
  //#region src/derive.ts
869
853
  /** Whether a declaration names a parent. */
@@ -995,7 +979,6 @@ function publicEnvFor(declaration, manifest) {
995
979
  }
996
980
  return keys;
997
981
  }
998
-
999
982
  //#endregion
1000
983
  //#region src/index.ts
1001
984
  /** Flatten a manifest field (array or partitioned) into a plain array. */
@@ -1003,9 +986,7 @@ function flattenManifestField(field) {
1003
986
  if (!field) return [];
1004
987
  return Array.isArray(field) ? [...field] : Object.values(field).flat();
1005
988
  }
1006
-
1007
989
  //#endregion
1008
- exports.DEFAULT_APP_CODE = DEFAULT_APP_CODE;
1009
990
  exports.DEFAULT_POSTGRES_VERSION = DEFAULT_POSTGRES_VERSION;
1010
991
  exports.DERIVES_FROM = DERIVES_FROM;
1011
992
  exports.IllegalDerivation = IllegalDerivation;
@@ -1030,4 +1011,5 @@ exports.provisionOrder = provisionOrder;
1030
1011
  exports.publicEnvFor = publicEnvFor;
1031
1012
  exports.scopedName = scopedName;
1032
1013
  exports.serviceKey = serviceKey;
1014
+
1033
1015
  //# sourceMappingURL=index.cjs.map