@happyvertical/smrt-core 0.57.46 → 0.57.48

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.
Files changed (189) hide show
  1. package/AGENTS.md +11 -3
  2. package/agents/browser-entry.md +16 -0
  3. package/agents/build-knowledge.md +58 -14
  4. package/agents/change-feed.md +20 -0
  5. package/agents/generators.md +69 -3
  6. package/agents/schema-paths.md +82 -0
  7. package/dist/_virtual/_rolldown/runtime.js +22 -1
  8. package/dist/browser.d.ts +2 -2
  9. package/dist/browser.d.ts.map +1 -1
  10. package/dist/browser.js +2 -2
  11. package/dist/cascade.d.ts +46 -0
  12. package/dist/cascade.d.ts.map +1 -1
  13. package/dist/cascade.js +96 -7
  14. package/dist/cascade.js.map +1 -1
  15. package/dist/change-feed.d.ts.map +1 -1
  16. package/dist/change-feed.js +7 -4
  17. package/dist/change-feed.js.map +1 -1
  18. package/dist/class.d.ts.map +1 -1
  19. package/dist/class.js +3 -3
  20. package/dist/class.js.map +1 -1
  21. package/dist/consumer-plugin/index.d.ts +13 -0
  22. package/dist/consumer-plugin/index.d.ts.map +1 -1
  23. package/dist/consumer-plugin/index.js +69 -13
  24. package/dist/consumer-plugin/index.js.map +1 -1
  25. package/dist/consumer-plugin.js +2 -2
  26. package/dist/database.d.ts.map +1 -1
  27. package/dist/database.js +3 -3
  28. package/dist/database.js.map +1 -1
  29. package/dist/dispatch/bus.d.ts.map +1 -1
  30. package/dist/dispatch/bus.js +1 -4
  31. package/dist/dispatch/bus.js.map +1 -1
  32. package/dist/dispatch/index.d.ts +1 -1
  33. package/dist/dispatch/index.d.ts.map +1 -1
  34. package/dist/dispatch/types.d.ts +22 -3
  35. package/dist/dispatch/types.d.ts.map +1 -1
  36. package/dist/generators/changes-route.d.ts.map +1 -1
  37. package/dist/generators/changes-route.js +2 -2
  38. package/dist/generators/changes-route.js.map +1 -1
  39. package/dist/generators/custom-action.d.ts +11 -0
  40. package/dist/generators/custom-action.d.ts.map +1 -1
  41. package/dist/generators/custom-action.js +23 -4
  42. package/dist/generators/custom-action.js.map +1 -1
  43. package/dist/index.d.ts +2 -2
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +3 -2
  46. package/dist/lazy-config.d.ts +120 -3
  47. package/dist/lazy-config.d.ts.map +1 -1
  48. package/dist/lazy-config.js +81 -10
  49. package/dist/lazy-config.js.map +1 -1
  50. package/dist/manifest/generator.d.ts +8 -2
  51. package/dist/manifest/generator.d.ts.map +1 -1
  52. package/dist/manifest/generator.js +6 -5
  53. package/dist/manifest/generator.js.map +1 -1
  54. package/dist/manifest/index.d.ts +1 -0
  55. package/dist/manifest/index.d.ts.map +1 -1
  56. package/dist/manifest/index.js +2 -1
  57. package/dist/manifest/index.js.map +1 -1
  58. package/dist/manifest/local-manifest-reader.d.ts +13 -2
  59. package/dist/manifest/local-manifest-reader.d.ts.map +1 -1
  60. package/dist/manifest/local-manifest-reader.js +38 -6
  61. package/dist/manifest/local-manifest-reader.js.map +1 -1
  62. package/dist/manifest/manifest-loader.d.ts +9 -8
  63. package/dist/manifest/manifest-loader.d.ts.map +1 -1
  64. package/dist/manifest/manifest-loader.js +67 -27
  65. package/dist/manifest/manifest-loader.js.map +1 -1
  66. package/dist/manifest/object-declarations.d.ts +116 -0
  67. package/dist/manifest/object-declarations.d.ts.map +1 -0
  68. package/dist/manifest/object-declarations.js +161 -0
  69. package/dist/manifest/object-declarations.js.map +1 -0
  70. package/dist/manifest/static-manifest.d.ts.map +1 -1
  71. package/dist/manifest/static-manifest.js +5 -3
  72. package/dist/manifest/static-manifest.js.map +1 -1
  73. package/dist/manifest/store.d.ts.map +1 -1
  74. package/dist/manifest/store.js +18 -2
  75. package/dist/manifest/store.js.map +1 -1
  76. package/dist/manifest/test-artifacts.d.ts +57 -0
  77. package/dist/manifest/test-artifacts.d.ts.map +1 -0
  78. package/dist/manifest/test-artifacts.js +111 -0
  79. package/dist/manifest/test-artifacts.js.map +1 -0
  80. package/dist/manifest.js +2 -1
  81. package/dist/manifest.json +5 -3
  82. package/dist/migrations/differ.d.ts.map +1 -1
  83. package/dist/migrations/differ.js +11 -3
  84. package/dist/migrations/differ.js.map +1 -1
  85. package/dist/migrations/index.d.ts +2 -0
  86. package/dist/migrations/index.d.ts.map +1 -1
  87. package/dist/migrations/index.js +3 -1
  88. package/dist/migrations/qualified-name-aliases.d.ts.map +1 -1
  89. package/dist/migrations/qualified-name-aliases.js +1 -1
  90. package/dist/migrations/qualified-name-aliases.js.map +1 -1
  91. package/dist/migrations.js +3 -1
  92. package/dist/object.d.ts.map +1 -1
  93. package/dist/object.js +2 -2
  94. package/dist/object.js.map +1 -1
  95. package/dist/postgres-permissions.d.ts.map +1 -1
  96. package/dist/postgres-permissions.js +4 -3
  97. package/dist/postgres-permissions.js.map +1 -1
  98. package/dist/postgres-timeouts.d.ts +30 -3
  99. package/dist/postgres-timeouts.d.ts.map +1 -1
  100. package/dist/postgres-timeouts.js +39 -2
  101. package/dist/postgres-timeouts.js.map +1 -1
  102. package/dist/prebuild/index.d.ts.map +1 -1
  103. package/dist/prebuild/index.js +14 -11
  104. package/dist/prebuild/index.js.map +1 -1
  105. package/dist/registry/class-registration.d.ts.map +1 -1
  106. package/dist/registry/class-registration.js +24 -2
  107. package/dist/registry/class-registration.js.map +1 -1
  108. package/dist/registry/collection-exposure.d.ts +27 -0
  109. package/dist/registry/collection-exposure.d.ts.map +1 -1
  110. package/dist/registry/collection-exposure.js +74 -1
  111. package/dist/registry/collection-exposure.js.map +1 -1
  112. package/dist/registry/collection-resolution.d.ts.map +1 -1
  113. package/dist/registry/collection-resolution.js +1 -0
  114. package/dist/registry/collection-resolution.js.map +1 -1
  115. package/dist/registry/framework-base-classes.d.ts.map +1 -1
  116. package/dist/registry/framework-base-classes.js +5 -0
  117. package/dist/registry/framework-base-classes.js.map +1 -1
  118. package/dist/registry/schema-builder.d.ts +8 -1
  119. package/dist/registry/schema-builder.d.ts.map +1 -1
  120. package/dist/registry/schema-builder.js +17 -4
  121. package/dist/registry/schema-builder.js.map +1 -1
  122. package/dist/registry/types.d.ts +12 -0
  123. package/dist/registry/types.d.ts.map +1 -1
  124. package/dist/registry.d.ts +2 -1
  125. package/dist/registry.d.ts.map +1 -1
  126. package/dist/registry.js +30 -10
  127. package/dist/registry.js.map +1 -1
  128. package/dist/scanner/manifest-generator.d.ts.map +1 -1
  129. package/dist/scanner/manifest-generator.js +10 -8
  130. package/dist/scanner/manifest-generator.js.map +1 -1
  131. package/dist/scanner/types.d.ts +29 -0
  132. package/dist/scanner/types.d.ts.map +1 -1
  133. package/dist/scanner/types.js.map +1 -1
  134. package/dist/schema/generator.d.ts +32 -0
  135. package/dist/schema/generator.d.ts.map +1 -1
  136. package/dist/schema/generator.js +59 -0
  137. package/dist/schema/generator.js.map +1 -1
  138. package/dist/schema/live-parity.d.ts.map +1 -1
  139. package/dist/schema/live-parity.js +4 -2
  140. package/dist/schema/live-parity.js.map +1 -1
  141. package/dist/scripts/browser-unbundled-dev.mjs +90 -0
  142. package/dist/scripts/generate-test-manifest.js +9 -49
  143. package/dist/smrt-knowledge.json +16 -16
  144. package/dist/system/compatibility.d.ts.map +1 -1
  145. package/dist/system/compatibility.js +12 -4
  146. package/dist/system/compatibility.js.map +1 -1
  147. package/dist/system/schema.d.ts +70 -8
  148. package/dist/system/schema.d.ts.map +1 -1
  149. package/dist/system/schema.js +231 -24
  150. package/dist/system/schema.js.map +1 -1
  151. package/dist/testing/database.d.ts.map +1 -1
  152. package/dist/testing/database.js +14 -2
  153. package/dist/testing/database.js.map +1 -1
  154. package/dist/tools/tool-generator.d.ts.map +1 -1
  155. package/dist/tools/tool-generator.js +2 -2
  156. package/dist/tools/tool-generator.js.map +1 -1
  157. package/dist/utils/import-workspace-module.d.ts.map +1 -1
  158. package/dist/utils/import-workspace-module.js +23 -0
  159. package/dist/utils/import-workspace-module.js.map +1 -1
  160. package/dist/utils/naming.js +5 -3
  161. package/dist/utils/naming.js.map +1 -1
  162. package/dist/vendor/pluralize/pluralize.js +421 -0
  163. package/dist/vendor/pluralize/pluralize.js.map +1 -0
  164. package/dist/vite-plugin/api-client-entries.d.ts +5 -1
  165. package/dist/vite-plugin/api-client-entries.d.ts.map +1 -1
  166. package/dist/vite-plugin/api-client-entries.js +11 -6
  167. package/dist/vite-plugin/api-client-entries.js.map +1 -1
  168. package/dist/vite-plugin/consumer-import.d.ts +28 -0
  169. package/dist/vite-plugin/consumer-import.d.ts.map +1 -0
  170. package/dist/vite-plugin/consumer-import.js +42 -0
  171. package/dist/vite-plugin/consumer-import.js.map +1 -0
  172. package/dist/vite-plugin/dev-plane-route.d.ts +6 -1
  173. package/dist/vite-plugin/dev-plane-route.d.ts.map +1 -1
  174. package/dist/vite-plugin/dev-plane-route.js +8 -9
  175. package/dist/vite-plugin/dev-plane-route.js.map +1 -1
  176. package/dist/vite-plugin/index.d.ts.map +1 -1
  177. package/dist/vite-plugin/index.js +12 -9
  178. package/dist/vite-plugin/index.js.map +1 -1
  179. package/dist/vite-plugin/resources-route.d.ts.map +1 -1
  180. package/dist/vite-plugin/resources-route.js +3 -8
  181. package/dist/vite-plugin/resources-route.js.map +1 -1
  182. package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
  183. package/dist/vite-plugin/sveltekit-generator.js +7 -11
  184. package/dist/vite-plugin/sveltekit-generator.js.map +1 -1
  185. package/dist/vite-plugin/sync-apply-route.d.ts +16 -0
  186. package/dist/vite-plugin/sync-apply-route.d.ts.map +1 -1
  187. package/dist/vite-plugin/sync-apply-route.js +48 -6
  188. package/dist/vite-plugin/sync-apply-route.js.map +1 -1
  189. package/package.json +12 -12
@@ -1,5 +1,7 @@
1
- import pluralizeLib from "pluralize";
1
+ import { __toESM } from "../_virtual/_rolldown/runtime.js";
2
+ import { require_pluralize } from "../vendor/pluralize/pluralize.js";
2
3
  //#region src/utils/naming.ts
4
+ var import_pluralize = /* @__PURE__ */ __toESM(require_pluralize(), 1);
3
5
  /**
4
6
  * Converts a camelCase string to snake_case.
5
7
  */
@@ -17,9 +19,9 @@ function pluralize(word) {
17
19
  const parts = word.split("_");
18
20
  const lastWord = parts.pop();
19
21
  if (!lastWord) return word;
20
- return [...parts, pluralizeLib(lastWord)].join("_");
22
+ return [...parts, (0, import_pluralize.default)(lastWord)].join("_");
21
23
  }
22
- return pluralizeLib(word);
24
+ return (0, import_pluralize.default)(word);
23
25
  }
24
26
  /**
25
27
  * Converts a class name to a pluralized snake_case table name.
@@ -1 +1 @@
1
- {"version":3,"file":"naming.js","names":[],"sources":["../../src/utils/naming.ts"],"sourcesContent":["import pluralizeLib from 'pluralize';\n\n/**\n * Converts a camelCase string to snake_case.\n */\nexport function toSnakeCase(str: string): string {\n return str\n .replace(/([A-Z])/g, '_$1')\n .toLowerCase()\n .replace(/^_/, '');\n}\n\n/**\n * Pluralizes an English word using the pluralize library.\n *\n * For snake_case table names with multiple words, only the last word is\n * pluralized: `journal_entry` -> `journal_entries`.\n */\nexport function pluralize(word: string): string {\n if (word.includes('_')) {\n const parts = word.split('_');\n const lastWord = parts.pop();\n if (!lastWord) return word;\n return [...parts, pluralizeLib(lastWord)].join('_');\n }\n\n return pluralizeLib(word);\n}\n\n/**\n * Converts a class name to a pluralized snake_case table name.\n */\nexport function classnameToTablename(className: string): string {\n const snakeCase = className.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();\n\n return pluralize(snakeCase);\n}\n"],"mappings":";;;;;AAKA,SAAgB,YAAY,KAAqB;CAC/C,OAAO,IACJ,QAAQ,YAAY,KAAK,CAAC,CAC1B,YAAY,CAAC,CACb,QAAQ,MAAM,EAAE;AACrB;;;;;;;AAQA,SAAgB,UAAU,MAAsB;CAC9C,IAAI,KAAK,SAAS,GAAG,GAAG;EACtB,MAAM,QAAQ,KAAK,MAAM,GAAG;EAC5B,MAAM,WAAW,MAAM,IAAI;EAC3B,IAAI,CAAC,UAAU,OAAO;EACtB,OAAO,CAAC,GAAG,OAAO,aAAa,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG;CACpD;CAEA,OAAO,aAAa,IAAI;AAC1B;;;;AAKA,SAAgB,qBAAqB,WAA2B;CAG9D,OAAO,UAFW,UAAU,QAAQ,mBAAmB,OAAO,CAAC,CAAC,YAE/C,CAAS;AAC5B"}
1
+ {"version":3,"file":"naming.js","names":[],"sources":["../../src/utils/naming.ts"],"sourcesContent":["import pluralizeLib from 'pluralize';\n\n/**\n * Converts a camelCase string to snake_case.\n */\nexport function toSnakeCase(str: string): string {\n return str\n .replace(/([A-Z])/g, '_$1')\n .toLowerCase()\n .replace(/^_/, '');\n}\n\n/**\n * Pluralizes an English word using the pluralize library.\n *\n * For snake_case table names with multiple words, only the last word is\n * pluralized: `journal_entry` -> `journal_entries`.\n */\nexport function pluralize(word: string): string {\n if (word.includes('_')) {\n const parts = word.split('_');\n const lastWord = parts.pop();\n if (!lastWord) return word;\n return [...parts, pluralizeLib(lastWord)].join('_');\n }\n\n return pluralizeLib(word);\n}\n\n/**\n * Converts a class name to a pluralized snake_case table name.\n */\nexport function classnameToTablename(className: string): string {\n const snakeCase = className.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();\n\n return pluralize(snakeCase);\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,YAAY,KAAqB;CAC/C,OAAO,IACJ,QAAQ,YAAY,KAAK,CAAC,CAC1B,YAAY,CAAC,CACb,QAAQ,MAAM,EAAE;AACrB;;;;;;;AAQA,SAAgB,UAAU,MAAsB;CAC9C,IAAI,KAAK,SAAS,GAAG,GAAG;EACtB,MAAM,QAAQ,KAAK,MAAM,GAAG;EAC5B,MAAM,WAAW,MAAM,IAAI;EAC3B,IAAI,CAAC,UAAU,OAAO;EACtB,OAAO,CAAC,GAAG,QAAA,GAAA,iBAAA,QAAA,CAAoB,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG;CACpD;CAEA,QAAA,GAAA,iBAAA,QAAA,CAAoB,IAAI;AAC1B;;;;AAKA,SAAgB,qBAAqB,WAA2B;CAG9D,OAAO,UAFW,UAAU,QAAQ,mBAAmB,OAAO,CAAC,CAAC,YAE/C,CAAS;AAC5B"}
@@ -0,0 +1,421 @@
1
+ import { __commonJSMin, __require } from "../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js
3
+ var require_pluralize = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
+ (function(root, pluralize) {
5
+ /* istanbul ignore else */
6
+ if (typeof __require === "function" && typeof exports === "object" && typeof module === "object") module.exports = pluralize();
7
+ else if (typeof define === "function" && define.amd) define(function() {
8
+ return pluralize();
9
+ });
10
+ else root.pluralize = pluralize();
11
+ })(exports, function() {
12
+ var pluralRules = [];
13
+ var singularRules = [];
14
+ var uncountables = {};
15
+ var irregularPlurals = {};
16
+ var irregularSingles = {};
17
+ /**
18
+ * Sanitize a pluralization rule to a usable regular expression.
19
+ *
20
+ * @param {(RegExp|string)} rule
21
+ * @return {RegExp}
22
+ */
23
+ function sanitizeRule(rule) {
24
+ if (typeof rule === "string") return new RegExp("^" + rule + "$", "i");
25
+ return rule;
26
+ }
27
+ /**
28
+ * Pass in a word token to produce a function that can replicate the case on
29
+ * another word.
30
+ *
31
+ * @param {string} word
32
+ * @param {string} token
33
+ * @return {Function}
34
+ */
35
+ function restoreCase(word, token) {
36
+ if (word === token) return token;
37
+ if (word === word.toLowerCase()) return token.toLowerCase();
38
+ if (word === word.toUpperCase()) return token.toUpperCase();
39
+ if (word[0] === word[0].toUpperCase()) return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
40
+ return token.toLowerCase();
41
+ }
42
+ /**
43
+ * Interpolate a regexp string.
44
+ *
45
+ * @param {string} str
46
+ * @param {Array} args
47
+ * @return {string}
48
+ */
49
+ function interpolate(str, args) {
50
+ return str.replace(/\$(\d{1,2})/g, function(match, index) {
51
+ return args[index] || "";
52
+ });
53
+ }
54
+ /**
55
+ * Replace a word using a rule.
56
+ *
57
+ * @param {string} word
58
+ * @param {Array} rule
59
+ * @return {string}
60
+ */
61
+ function replace(word, rule) {
62
+ return word.replace(rule[0], function(match, index) {
63
+ var result = interpolate(rule[1], arguments);
64
+ if (match === "") return restoreCase(word[index - 1], result);
65
+ return restoreCase(match, result);
66
+ });
67
+ }
68
+ /**
69
+ * Sanitize a word by passing in the word and sanitization rules.
70
+ *
71
+ * @param {string} token
72
+ * @param {string} word
73
+ * @param {Array} rules
74
+ * @return {string}
75
+ */
76
+ function sanitizeWord(token, word, rules) {
77
+ if (!token.length || uncountables.hasOwnProperty(token)) return word;
78
+ var len = rules.length;
79
+ while (len--) {
80
+ var rule = rules[len];
81
+ if (rule[0].test(word)) return replace(word, rule);
82
+ }
83
+ return word;
84
+ }
85
+ /**
86
+ * Replace a word with the updated word.
87
+ *
88
+ * @param {Object} replaceMap
89
+ * @param {Object} keepMap
90
+ * @param {Array} rules
91
+ * @return {Function}
92
+ */
93
+ function replaceWord(replaceMap, keepMap, rules) {
94
+ return function(word) {
95
+ var token = word.toLowerCase();
96
+ if (keepMap.hasOwnProperty(token)) return restoreCase(word, token);
97
+ if (replaceMap.hasOwnProperty(token)) return restoreCase(word, replaceMap[token]);
98
+ return sanitizeWord(token, word, rules);
99
+ };
100
+ }
101
+ /**
102
+ * Check if a word is part of the map.
103
+ */
104
+ function checkWord(replaceMap, keepMap, rules, bool) {
105
+ return function(word) {
106
+ var token = word.toLowerCase();
107
+ if (keepMap.hasOwnProperty(token)) return true;
108
+ if (replaceMap.hasOwnProperty(token)) return false;
109
+ return sanitizeWord(token, token, rules) === token;
110
+ };
111
+ }
112
+ /**
113
+ * Pluralize or singularize a word based on the passed in count.
114
+ *
115
+ * @param {string} word The word to pluralize
116
+ * @param {number} count How many of the word exist
117
+ * @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)
118
+ * @return {string}
119
+ */
120
+ function pluralize(word, count, inclusive) {
121
+ var pluralized = count === 1 ? pluralize.singular(word) : pluralize.plural(word);
122
+ return (inclusive ? count + " " : "") + pluralized;
123
+ }
124
+ /**
125
+ * Pluralize a word.
126
+ *
127
+ * @type {Function}
128
+ */
129
+ pluralize.plural = replaceWord(irregularSingles, irregularPlurals, pluralRules);
130
+ /**
131
+ * Check if a word is plural.
132
+ *
133
+ * @type {Function}
134
+ */
135
+ pluralize.isPlural = checkWord(irregularSingles, irregularPlurals, pluralRules);
136
+ /**
137
+ * Singularize a word.
138
+ *
139
+ * @type {Function}
140
+ */
141
+ pluralize.singular = replaceWord(irregularPlurals, irregularSingles, singularRules);
142
+ /**
143
+ * Check if a word is singular.
144
+ *
145
+ * @type {Function}
146
+ */
147
+ pluralize.isSingular = checkWord(irregularPlurals, irregularSingles, singularRules);
148
+ /**
149
+ * Add a pluralization rule to the collection.
150
+ *
151
+ * @param {(string|RegExp)} rule
152
+ * @param {string} replacement
153
+ */
154
+ pluralize.addPluralRule = function(rule, replacement) {
155
+ pluralRules.push([sanitizeRule(rule), replacement]);
156
+ };
157
+ /**
158
+ * Add a singularization rule to the collection.
159
+ *
160
+ * @param {(string|RegExp)} rule
161
+ * @param {string} replacement
162
+ */
163
+ pluralize.addSingularRule = function(rule, replacement) {
164
+ singularRules.push([sanitizeRule(rule), replacement]);
165
+ };
166
+ /**
167
+ * Add an uncountable word rule.
168
+ *
169
+ * @param {(string|RegExp)} word
170
+ */
171
+ pluralize.addUncountableRule = function(word) {
172
+ if (typeof word === "string") {
173
+ uncountables[word.toLowerCase()] = true;
174
+ return;
175
+ }
176
+ pluralize.addPluralRule(word, "$0");
177
+ pluralize.addSingularRule(word, "$0");
178
+ };
179
+ /**
180
+ * Add an irregular word definition.
181
+ *
182
+ * @param {string} single
183
+ * @param {string} plural
184
+ */
185
+ pluralize.addIrregularRule = function(single, plural) {
186
+ plural = plural.toLowerCase();
187
+ single = single.toLowerCase();
188
+ irregularSingles[single] = plural;
189
+ irregularPlurals[plural] = single;
190
+ };
191
+ /**
192
+ * Irregular rules.
193
+ */
194
+ [
195
+ ["I", "we"],
196
+ ["me", "us"],
197
+ ["he", "they"],
198
+ ["she", "they"],
199
+ ["them", "them"],
200
+ ["myself", "ourselves"],
201
+ ["yourself", "yourselves"],
202
+ ["itself", "themselves"],
203
+ ["herself", "themselves"],
204
+ ["himself", "themselves"],
205
+ ["themself", "themselves"],
206
+ ["is", "are"],
207
+ ["was", "were"],
208
+ ["has", "have"],
209
+ ["this", "these"],
210
+ ["that", "those"],
211
+ ["echo", "echoes"],
212
+ ["dingo", "dingoes"],
213
+ ["volcano", "volcanoes"],
214
+ ["tornado", "tornadoes"],
215
+ ["torpedo", "torpedoes"],
216
+ ["genus", "genera"],
217
+ ["viscus", "viscera"],
218
+ ["stigma", "stigmata"],
219
+ ["stoma", "stomata"],
220
+ ["dogma", "dogmata"],
221
+ ["lemma", "lemmata"],
222
+ ["schema", "schemata"],
223
+ ["anathema", "anathemata"],
224
+ ["ox", "oxen"],
225
+ ["axe", "axes"],
226
+ ["die", "dice"],
227
+ ["yes", "yeses"],
228
+ ["foot", "feet"],
229
+ ["eave", "eaves"],
230
+ ["goose", "geese"],
231
+ ["tooth", "teeth"],
232
+ ["quiz", "quizzes"],
233
+ ["human", "humans"],
234
+ ["proof", "proofs"],
235
+ ["carve", "carves"],
236
+ ["valve", "valves"],
237
+ ["looey", "looies"],
238
+ ["thief", "thieves"],
239
+ ["groove", "grooves"],
240
+ ["pickaxe", "pickaxes"],
241
+ ["passerby", "passersby"]
242
+ ].forEach(function(rule) {
243
+ return pluralize.addIrregularRule(rule[0], rule[1]);
244
+ });
245
+ /**
246
+ * Pluralization rules.
247
+ */
248
+ [
249
+ [/s?$/i, "s"],
250
+ [/[^\u0000-\u007F]$/i, "$0"],
251
+ [/([^aeiou]ese)$/i, "$1"],
252
+ [/(ax|test)is$/i, "$1es"],
253
+ [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
254
+ [/(e[mn]u)s?$/i, "$1s"],
255
+ [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
256
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
257
+ [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
258
+ [/(seraph|cherub)(?:im)?$/i, "$1im"],
259
+ [/(her|at|gr)o$/i, "$1oes"],
260
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
261
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
262
+ [/sis$/i, "ses"],
263
+ [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
264
+ [/([^aeiouy]|qu)y$/i, "$1ies"],
265
+ [/([^ch][ieo][ln])ey$/i, "$1ies"],
266
+ [/(x|ch|ss|sh|zz)$/i, "$1es"],
267
+ [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
268
+ [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
269
+ [/(pe)(?:rson|ople)$/i, "$1ople"],
270
+ [/(child)(?:ren)?$/i, "$1ren"],
271
+ [/eaux$/i, "$0"],
272
+ [/m[ae]n$/i, "men"],
273
+ ["thou", "you"]
274
+ ].forEach(function(rule) {
275
+ return pluralize.addPluralRule(rule[0], rule[1]);
276
+ });
277
+ /**
278
+ * Singularization rules.
279
+ */
280
+ [
281
+ [/s$/i, ""],
282
+ [/(ss)$/i, "$1"],
283
+ [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
284
+ [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
285
+ [/ies$/i, "y"],
286
+ [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
287
+ [/\b(mon|smil)ies$/i, "$1ey"],
288
+ [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
289
+ [/(seraph|cherub)im$/i, "$1"],
290
+ [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
291
+ [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
292
+ [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
293
+ [/(test)(?:is|es)$/i, "$1is"],
294
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
295
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
296
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
297
+ [/(alumn|alg|vertebr)ae$/i, "$1a"],
298
+ [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
299
+ [/(matr|append)ices$/i, "$1ix"],
300
+ [/(pe)(rson|ople)$/i, "$1rson"],
301
+ [/(child)ren$/i, "$1"],
302
+ [/(eau)x?$/i, "$1"],
303
+ [/men$/i, "man"]
304
+ ].forEach(function(rule) {
305
+ return pluralize.addSingularRule(rule[0], rule[1]);
306
+ });
307
+ /**
308
+ * Uncountable rules.
309
+ */
310
+ [
311
+ "adulthood",
312
+ "advice",
313
+ "agenda",
314
+ "aid",
315
+ "aircraft",
316
+ "alcohol",
317
+ "ammo",
318
+ "analytics",
319
+ "anime",
320
+ "athletics",
321
+ "audio",
322
+ "bison",
323
+ "blood",
324
+ "bream",
325
+ "buffalo",
326
+ "butter",
327
+ "carp",
328
+ "cash",
329
+ "chassis",
330
+ "chess",
331
+ "clothing",
332
+ "cod",
333
+ "commerce",
334
+ "cooperation",
335
+ "corps",
336
+ "debris",
337
+ "diabetes",
338
+ "digestion",
339
+ "elk",
340
+ "energy",
341
+ "equipment",
342
+ "excretion",
343
+ "expertise",
344
+ "firmware",
345
+ "flounder",
346
+ "fun",
347
+ "gallows",
348
+ "garbage",
349
+ "graffiti",
350
+ "hardware",
351
+ "headquarters",
352
+ "health",
353
+ "herpes",
354
+ "highjinks",
355
+ "homework",
356
+ "housework",
357
+ "information",
358
+ "jeans",
359
+ "justice",
360
+ "kudos",
361
+ "labour",
362
+ "literature",
363
+ "machinery",
364
+ "mackerel",
365
+ "mail",
366
+ "media",
367
+ "mews",
368
+ "moose",
369
+ "music",
370
+ "mud",
371
+ "manga",
372
+ "news",
373
+ "only",
374
+ "personnel",
375
+ "pike",
376
+ "plankton",
377
+ "pliers",
378
+ "police",
379
+ "pollution",
380
+ "premises",
381
+ "rain",
382
+ "research",
383
+ "rice",
384
+ "salmon",
385
+ "scissors",
386
+ "series",
387
+ "sewage",
388
+ "shambles",
389
+ "shrimp",
390
+ "software",
391
+ "species",
392
+ "staff",
393
+ "swine",
394
+ "tennis",
395
+ "traffic",
396
+ "transportation",
397
+ "trout",
398
+ "tuna",
399
+ "wealth",
400
+ "welfare",
401
+ "whiting",
402
+ "wildebeest",
403
+ "wildlife",
404
+ "you",
405
+ /pok[eé]mon$/i,
406
+ /[^aeiou]ese$/i,
407
+ /deer$/i,
408
+ /fish$/i,
409
+ /measles$/i,
410
+ /o[iu]s$/i,
411
+ /pox$/i,
412
+ /sheep$/i
413
+ ].forEach(pluralize.addUncountableRule);
414
+ return pluralize;
415
+ });
416
+ }));
417
+ //#endregion
418
+ export default require_pluralize();
419
+ export { require_pluralize };
420
+
421
+ //# sourceMappingURL=pluralize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pluralize.js","names":[],"sources":["../../../../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js"],"sourcesContent":["/* global define */\n\n(function (root, pluralize) {\n /* istanbul ignore else */\n if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {\n // Node.\n module.exports = pluralize();\n } else if (typeof define === 'function' && define.amd) {\n // AMD, registers as an anonymous module.\n define(function () {\n return pluralize();\n });\n } else {\n // Browser global.\n root.pluralize = pluralize();\n }\n})(this, function () {\n // Rule storage - pluralize and singularize need to be run sequentially,\n // while other rules can be optimized using an object for instant lookups.\n var pluralRules = [];\n var singularRules = [];\n var uncountables = {};\n var irregularPlurals = {};\n var irregularSingles = {};\n\n /**\n * Sanitize a pluralization rule to a usable regular expression.\n *\n * @param {(RegExp|string)} rule\n * @return {RegExp}\n */\n function sanitizeRule (rule) {\n if (typeof rule === 'string') {\n return new RegExp('^' + rule + '$', 'i');\n }\n\n return rule;\n }\n\n /**\n * Pass in a word token to produce a function that can replicate the case on\n * another word.\n *\n * @param {string} word\n * @param {string} token\n * @return {Function}\n */\n function restoreCase (word, token) {\n // Tokens are an exact match.\n if (word === token) return token;\n\n // Lower cased words. E.g. \"hello\".\n if (word === word.toLowerCase()) return token.toLowerCase();\n\n // Upper cased words. E.g. \"WHISKY\".\n if (word === word.toUpperCase()) return token.toUpperCase();\n\n // Title cased words. E.g. \"Title\".\n if (word[0] === word[0].toUpperCase()) {\n return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();\n }\n\n // Lower cased words. E.g. \"test\".\n return token.toLowerCase();\n }\n\n /**\n * Interpolate a regexp string.\n *\n * @param {string} str\n * @param {Array} args\n * @return {string}\n */\n function interpolate (str, args) {\n return str.replace(/\\$(\\d{1,2})/g, function (match, index) {\n return args[index] || '';\n });\n }\n\n /**\n * Replace a word using a rule.\n *\n * @param {string} word\n * @param {Array} rule\n * @return {string}\n */\n function replace (word, rule) {\n return word.replace(rule[0], function (match, index) {\n var result = interpolate(rule[1], arguments);\n\n if (match === '') {\n return restoreCase(word[index - 1], result);\n }\n\n return restoreCase(match, result);\n });\n }\n\n /**\n * Sanitize a word by passing in the word and sanitization rules.\n *\n * @param {string} token\n * @param {string} word\n * @param {Array} rules\n * @return {string}\n */\n function sanitizeWord (token, word, rules) {\n // Empty string or doesn't need fixing.\n if (!token.length || uncountables.hasOwnProperty(token)) {\n return word;\n }\n\n var len = rules.length;\n\n // Iterate over the sanitization rules and use the first one to match.\n while (len--) {\n var rule = rules[len];\n\n if (rule[0].test(word)) return replace(word, rule);\n }\n\n return word;\n }\n\n /**\n * Replace a word with the updated word.\n *\n * @param {Object} replaceMap\n * @param {Object} keepMap\n * @param {Array} rules\n * @return {Function}\n */\n function replaceWord (replaceMap, keepMap, rules) {\n return function (word) {\n // Get the correct token and case restoration functions.\n var token = word.toLowerCase();\n\n // Check against the keep object map.\n if (keepMap.hasOwnProperty(token)) {\n return restoreCase(word, token);\n }\n\n // Check against the replacement map for a direct word replacement.\n if (replaceMap.hasOwnProperty(token)) {\n return restoreCase(word, replaceMap[token]);\n }\n\n // Run all the rules against the word.\n return sanitizeWord(token, word, rules);\n };\n }\n\n /**\n * Check if a word is part of the map.\n */\n function checkWord (replaceMap, keepMap, rules, bool) {\n return function (word) {\n var token = word.toLowerCase();\n\n if (keepMap.hasOwnProperty(token)) return true;\n if (replaceMap.hasOwnProperty(token)) return false;\n\n return sanitizeWord(token, token, rules) === token;\n };\n }\n\n /**\n * Pluralize or singularize a word based on the passed in count.\n *\n * @param {string} word The word to pluralize\n * @param {number} count How many of the word exist\n * @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)\n * @return {string}\n */\n function pluralize (word, count, inclusive) {\n var pluralized = count === 1\n ? pluralize.singular(word) : pluralize.plural(word);\n\n return (inclusive ? count + ' ' : '') + pluralized;\n }\n\n /**\n * Pluralize a word.\n *\n * @type {Function}\n */\n pluralize.plural = replaceWord(\n irregularSingles, irregularPlurals, pluralRules\n );\n\n /**\n * Check if a word is plural.\n *\n * @type {Function}\n */\n pluralize.isPlural = checkWord(\n irregularSingles, irregularPlurals, pluralRules\n );\n\n /**\n * Singularize a word.\n *\n * @type {Function}\n */\n pluralize.singular = replaceWord(\n irregularPlurals, irregularSingles, singularRules\n );\n\n /**\n * Check if a word is singular.\n *\n * @type {Function}\n */\n pluralize.isSingular = checkWord(\n irregularPlurals, irregularSingles, singularRules\n );\n\n /**\n * Add a pluralization rule to the collection.\n *\n * @param {(string|RegExp)} rule\n * @param {string} replacement\n */\n pluralize.addPluralRule = function (rule, replacement) {\n pluralRules.push([sanitizeRule(rule), replacement]);\n };\n\n /**\n * Add a singularization rule to the collection.\n *\n * @param {(string|RegExp)} rule\n * @param {string} replacement\n */\n pluralize.addSingularRule = function (rule, replacement) {\n singularRules.push([sanitizeRule(rule), replacement]);\n };\n\n /**\n * Add an uncountable word rule.\n *\n * @param {(string|RegExp)} word\n */\n pluralize.addUncountableRule = function (word) {\n if (typeof word === 'string') {\n uncountables[word.toLowerCase()] = true;\n return;\n }\n\n // Set singular and plural references for the word.\n pluralize.addPluralRule(word, '$0');\n pluralize.addSingularRule(word, '$0');\n };\n\n /**\n * Add an irregular word definition.\n *\n * @param {string} single\n * @param {string} plural\n */\n pluralize.addIrregularRule = function (single, plural) {\n plural = plural.toLowerCase();\n single = single.toLowerCase();\n\n irregularSingles[single] = plural;\n irregularPlurals[plural] = single;\n };\n\n /**\n * Irregular rules.\n */\n [\n // Pronouns.\n ['I', 'we'],\n ['me', 'us'],\n ['he', 'they'],\n ['she', 'they'],\n ['them', 'them'],\n ['myself', 'ourselves'],\n ['yourself', 'yourselves'],\n ['itself', 'themselves'],\n ['herself', 'themselves'],\n ['himself', 'themselves'],\n ['themself', 'themselves'],\n ['is', 'are'],\n ['was', 'were'],\n ['has', 'have'],\n ['this', 'these'],\n ['that', 'those'],\n // Words ending in with a consonant and `o`.\n ['echo', 'echoes'],\n ['dingo', 'dingoes'],\n ['volcano', 'volcanoes'],\n ['tornado', 'tornadoes'],\n ['torpedo', 'torpedoes'],\n // Ends with `us`.\n ['genus', 'genera'],\n ['viscus', 'viscera'],\n // Ends with `ma`.\n ['stigma', 'stigmata'],\n ['stoma', 'stomata'],\n ['dogma', 'dogmata'],\n ['lemma', 'lemmata'],\n ['schema', 'schemata'],\n ['anathema', 'anathemata'],\n // Other irregular rules.\n ['ox', 'oxen'],\n ['axe', 'axes'],\n ['die', 'dice'],\n ['yes', 'yeses'],\n ['foot', 'feet'],\n ['eave', 'eaves'],\n ['goose', 'geese'],\n ['tooth', 'teeth'],\n ['quiz', 'quizzes'],\n ['human', 'humans'],\n ['proof', 'proofs'],\n ['carve', 'carves'],\n ['valve', 'valves'],\n ['looey', 'looies'],\n ['thief', 'thieves'],\n ['groove', 'grooves'],\n ['pickaxe', 'pickaxes'],\n ['passerby', 'passersby']\n ].forEach(function (rule) {\n return pluralize.addIrregularRule(rule[0], rule[1]);\n });\n\n /**\n * Pluralization rules.\n */\n [\n [/s?$/i, 's'],\n [/[^\\u0000-\\u007F]$/i, '$0'],\n [/([^aeiou]ese)$/i, '$1'],\n [/(ax|test)is$/i, '$1es'],\n [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'],\n [/(e[mn]u)s?$/i, '$1s'],\n [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'],\n [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],\n [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],\n [/(seraph|cherub)(?:im)?$/i, '$1im'],\n [/(her|at|gr)o$/i, '$1oes'],\n [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],\n [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],\n [/sis$/i, 'ses'],\n [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],\n [/([^aeiouy]|qu)y$/i, '$1ies'],\n [/([^ch][ieo][ln])ey$/i, '$1ies'],\n [/(x|ch|ss|sh|zz)$/i, '$1es'],\n [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],\n [/\\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],\n [/(pe)(?:rson|ople)$/i, '$1ople'],\n [/(child)(?:ren)?$/i, '$1ren'],\n [/eaux$/i, '$0'],\n [/m[ae]n$/i, 'men'],\n ['thou', 'you']\n ].forEach(function (rule) {\n return pluralize.addPluralRule(rule[0], rule[1]);\n });\n\n /**\n * Singularization rules.\n */\n [\n [/s$/i, ''],\n [/(ss)$/i, '$1'],\n [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\\w]|^)li)ves$/i, '$1fe'],\n [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],\n [/ies$/i, 'y'],\n [/\\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'],\n [/\\b(mon|smil)ies$/i, '$1ey'],\n [/\\b((?:tit)?m|l)ice$/i, '$1ouse'],\n [/(seraph|cherub)im$/i, '$1'],\n [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'],\n [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'],\n [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],\n [/(test)(?:is|es)$/i, '$1is'],\n [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],\n [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],\n [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],\n [/(alumn|alg|vertebr)ae$/i, '$1a'],\n [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],\n [/(matr|append)ices$/i, '$1ix'],\n [/(pe)(rson|ople)$/i, '$1rson'],\n [/(child)ren$/i, '$1'],\n [/(eau)x?$/i, '$1'],\n [/men$/i, 'man']\n ].forEach(function (rule) {\n return pluralize.addSingularRule(rule[0], rule[1]);\n });\n\n /**\n * Uncountable rules.\n */\n [\n // Singular words with no plurals.\n 'adulthood',\n 'advice',\n 'agenda',\n 'aid',\n 'aircraft',\n 'alcohol',\n 'ammo',\n 'analytics',\n 'anime',\n 'athletics',\n 'audio',\n 'bison',\n 'blood',\n 'bream',\n 'buffalo',\n 'butter',\n 'carp',\n 'cash',\n 'chassis',\n 'chess',\n 'clothing',\n 'cod',\n 'commerce',\n 'cooperation',\n 'corps',\n 'debris',\n 'diabetes',\n 'digestion',\n 'elk',\n 'energy',\n 'equipment',\n 'excretion',\n 'expertise',\n 'firmware',\n 'flounder',\n 'fun',\n 'gallows',\n 'garbage',\n 'graffiti',\n 'hardware',\n 'headquarters',\n 'health',\n 'herpes',\n 'highjinks',\n 'homework',\n 'housework',\n 'information',\n 'jeans',\n 'justice',\n 'kudos',\n 'labour',\n 'literature',\n 'machinery',\n 'mackerel',\n 'mail',\n 'media',\n 'mews',\n 'moose',\n 'music',\n 'mud',\n 'manga',\n 'news',\n 'only',\n 'personnel',\n 'pike',\n 'plankton',\n 'pliers',\n 'police',\n 'pollution',\n 'premises',\n 'rain',\n 'research',\n 'rice',\n 'salmon',\n 'scissors',\n 'series',\n 'sewage',\n 'shambles',\n 'shrimp',\n 'software',\n 'species',\n 'staff',\n 'swine',\n 'tennis',\n 'traffic',\n 'transportation',\n 'trout',\n 'tuna',\n 'wealth',\n 'welfare',\n 'whiting',\n 'wildebeest',\n 'wildlife',\n 'you',\n /pok[eé]mon$/i,\n // Regexes.\n /[^aeiou]ese$/i, // \"chinese\", \"japanese\"\n /deer$/i, // \"deer\", \"reindeer\"\n /fish$/i, // \"fish\", \"blowfish\", \"angelfish\"\n /measles$/i,\n /o[iu]s$/i, // \"carnivorous\"\n /pox$/i, // \"chickpox\", \"smallpox\"\n /sheep$/i\n ].forEach(pluralize.addUncountableRule);\n\n return pluralize;\n});\n"],"x_google_ignoreList":[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M;GACxB,OAAO,UAAU,cAAc,KAAK,IAAI,KAAK,EAAE;EACjD,CAAC;;;;EAKD;GACE,CAAC,OAAO,EAAE;GACV,CAAC,UAAU,IAAI;GACf,CAAC,iEAAiE,MAAM;GACxE,CAAC,mCAAmC,KAAK;GACzC,CAAC,SAAS,GAAG;GACb,CAAC,wFAAwF,MAAM;GAC/F,CAAC,qBAAqB,MAAM;GAC5B,CAAC,wBAAwB,QAAQ;GACjC,CAAC,uBAAuB,IAAI;GAC5B,CAAC,4FAA4F,IAAI;GACjG,CAAC,sEAAsE,OAAO;GAC9E,CAAC,kCAAkC,IAAI;GACvC,CAAC,qBAAqB,MAAM;GAC5B,CAAC,6FAA6F,MAAM;GACpG,CAAC,0GAA0G,MAAM;GACjH,CAAC,+FAA+F,MAAM;GACtG,CAAC,2BAA2B,KAAK;GACjC,CAAC,gCAAgC,MAAM;GACvC,CAAC,uBAAuB,MAAM;GAC9B,CAAC,qBAAqB,QAAQ;GAC9B,CAAC,gBAAgB,IAAI;GACrB,CAAC,aAAa,IAAI;GAClB,CAAC,SAAS,KAAK;EACjB,CAAC,CAAC,QAAQ,SAAU,MAAM;GACxB,OAAO,UAAU,gBAAgB,KAAK,IAAI,KAAK,EAAE;EACnD,CAAC;;;;EAKD;GAEE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC,CAAC,QAAQ,UAAU,kBAAkB;EAEtC,OAAO;CACT,CAAC"}
@@ -15,7 +15,11 @@ export interface ApiClientEntry {
15
15
  obj: SmartObjectDefinition;
16
16
  /** Canonical collection key or deterministic class-derived secondary key. */
17
17
  clientKey: string;
18
- /** Row-payload interface used by CRUD methods for this entry. */
18
+ /**
19
+ * Row-payload interface used by CRUD methods for this entry: the declared
20
+ * name from the shared declaration selection (package-qualified when
21
+ * distinct classes share a simple name, #3115).
22
+ */
19
23
  dataInterfaceName: string;
20
24
  /** Standard client operations whose server routes are actually emitted. */
21
25
  crudMethods: ApiClientCrudMethod[];
@@ -1 +1 @@
1
- {"version":3,"file":"api-client-entries.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/api-client-entries.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAS7B,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,GAAG,EAAE,qBAAqB,CAAC;IAC3B,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,sEAAsE;IACtE,aAAa,EAAE,KAAK,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;QAC7B,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,UAAU,EAAE,KAAK,CAAC;YAChB,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE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UAAU,EAAE,KAAK,CAAC;YAChB,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;YACb,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB,CAAC,CAAC;KACJ,CAAC,CAAC;CACJ;AAED,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,mBAAmB,EAAE,EAClC,iBAAiB,GAAE,MAAM,EAAO,GAC/B,MAAM,GAAG,SAAS,CAepB;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,EAC/C,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAChC,MAAM,CAyCR;AA8TD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,mBAAmB,GAC5B,cAAc,EAAE,CAyElB"}
@@ -1,6 +1,8 @@
1
+ import { isFrameworkBaseClass } from "../registry/framework-base-classes.js";
1
2
  import { CRUD_OPERATIONS, createManifestClassNamePredicate, resolveApiMethodExposure } from "../generators/custom-action.js";
2
3
  import { resolveApiActionRouteConfig } from "./sveltekit-generator.js";
3
4
  import { findManifestObjectByName, isCollectionManifestClass, orderedManifestObjectEntries, resolveCollectionItemObject } from "./web-collections.js";
5
+ import { createObjectDeclarationIndex } from "../manifest/object-declarations.js";
4
6
  //#region src/vite-plugin/api-client-entries.ts
5
7
  /**
6
8
  * Manifest -> generated API-client entry selection.
@@ -96,7 +98,7 @@ function resolveCrudObject(obj, manifest) {
96
98
  if (!isCollectionManifestClass(manifest, obj)) return obj;
97
99
  const itemObject = resolveCollectionItemObject(manifest, obj);
98
100
  if (itemObject) return itemObject;
99
- return orderedManifestObjectEntries(manifest).filter(([, candidate]) => candidate.collection === obj.collection && !isCollectionManifestClass(manifest, candidate)).map(([, candidate]) => candidate)[0];
101
+ return orderedManifestObjectEntries(manifest).filter(([, candidate]) => candidate.collection === obj.collection && !isFrameworkBaseClass(candidate.className, candidate.packageName) && !isCollectionManifestClass(manifest, candidate)).map(([, candidate]) => candidate)[0];
100
102
  }
101
103
  function resolveGeneratedClientCrudMethods(obj, manifest) {
102
104
  const crudObject = resolveCrudObject(obj, manifest);
@@ -124,7 +126,7 @@ function resolveGeneratedEndpointCrudMethods(collection, manifest) {
124
126
  let collectionMethods = [];
125
127
  let itemMethods = [];
126
128
  for (const [, obj] of orderedManifestObjectEntries(manifest)) {
127
- if (obj.collection !== collection || isCollectionManifestClass(manifest, obj)) continue;
129
+ if (obj.collection !== collection || isFrameworkBaseClass(obj.className, obj.packageName) || isCollectionManifestClass(manifest, obj)) continue;
128
130
  const methods = resolveGeneratedClientCrudMethods(obj, manifest);
129
131
  const emittedCollectionMethods = methods.filter((method) => [
130
132
  "list",
@@ -143,13 +145,15 @@ function resolveGeneratedEndpointCrudMethods(collection, manifest) {
143
145
  return [...CRUD_OPERATIONS, "search"].filter((method) => emitted.has(method));
144
146
  }
145
147
  function exposesApiClientSurface(obj, manifest) {
148
+ if (isFrameworkBaseClass(obj.className, obj.packageName)) return false;
146
149
  if (obj.decoratorConfig?.api === false) return false;
147
150
  if (resolveGeneratedClientCrudMethods(obj, manifest).length > 0) return true;
148
151
  return resolveGeneratedClientCustomMethods(obj, manifest).length > 0;
149
152
  }
150
- function resolveDataInterfaceName(obj, manifest) {
151
- if (!isCollectionManifestClass(manifest, obj)) return `${obj.className}Data`;
152
- return `${resolveCollectionItemObject(manifest, obj)?.className || obj.className}Data`;
153
+ function resolveDataInterfaceName(obj, manifest, declarations) {
154
+ if (!isCollectionManifestClass(manifest, obj)) return declarations.interfaceNameFor(obj);
155
+ const itemObject = resolveCollectionItemObject(manifest, obj);
156
+ return declarations.interfaceNameFor(itemObject ?? obj);
153
157
  }
154
158
  function sharedCollectionModelDepth(manifest, obj) {
155
159
  const seen = /* @__PURE__ */ new Set();
@@ -218,6 +222,7 @@ function selectApiClientEntries(manifest) {
218
222
  return compareCandidateIdentity(left, right);
219
223
  });
220
224
  const reservedCanonicalKeys = new Set(canonicalOwners.keys());
225
+ const declarations = createObjectDeclarationIndex(manifest);
221
226
  const usedKeys = /* @__PURE__ */ new Set();
222
227
  return orderedCandidates.map(({ objectName, obj }) => {
223
228
  const isCanonicalOwner = canonicalOwners.get(obj.collection)?.objectName === objectName;
@@ -233,7 +238,7 @@ function selectApiClientEntries(manifest) {
233
238
  objectName,
234
239
  obj,
235
240
  clientKey,
236
- dataInterfaceName: resolveDataInterfaceName(obj, manifest),
241
+ dataInterfaceName: resolveDataInterfaceName(obj, manifest, declarations),
237
242
  crudMethods: resolveGeneratedEndpointCrudMethods(obj.collection, manifest),
238
243
  customMethods: resolveGeneratedClientCustomMethods(obj, manifest)
239
244
  };