@domain-first/project-structure 7.1.0 → 7.1.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.
package/dist/287.js CHANGED
@@ -188,8 +188,26 @@ const scaffoldInMemoryDb = (shared)=>{
188
188
  };
189
189
  const inMemoryDbScaffolded = ()=>serviceFile().exists && (!in_memory_db_withWiring() || in_memory_db_wireFile().exists);
190
190
  const usesInMemoryDb = (implementationType)=>Boolean(ConfigFile.Instance.data.withInMemoryDb) && new UnknownFormatNaming(implementationType).fileName === inMemoryImplementationType && inMemoryDbScaffolded();
191
+ const uncountableEndings = [
192
+ 'data',
193
+ 'info',
194
+ 'usage',
195
+ 'feedback',
196
+ 'media',
197
+ 'ware',
198
+ 'equipment',
199
+ 'information',
200
+ 'knowledge',
201
+ 'traffic',
202
+ 'telemetry',
203
+ 'analytics',
204
+ 'series'
205
+ ];
206
+ const uncountable = new RegExp(`(${uncountableEndings.join('|')})$`, 'i');
191
207
  const plural = (word)=>{
208
+ if (uncountable.test(word)) return word;
192
209
  if (/[^aeiou]y$/i.test(word)) return `${word.slice(0, -1)}ies`;
210
+ if (/(^|[^aeiou]|qu)[aeiou]z$/i.test(word)) return `${word}zes`;
193
211
  if (/(s|x|z|ch|sh)$/i.test(word)) return `${word}es`;
194
212
  return `${word}s`;
195
213
  };
@@ -16,7 +16,8 @@ export declare const inMemoryDbScaffolded: () => boolean;
16
16
  */
17
17
  export declare const usesInMemoryDb: (implementationType: string) => boolean;
18
18
  /**
19
- * `user` → `users`, `category` → `categories`, `box` → `boxes`.
19
+ * `user` → `users`, `category` → `categories`, `box` → `boxes`,
20
+ * `quiz` → `quizzes`, `user-data` → `user-data`.
20
21
  */
21
22
  export declare const plural: (word: string) => string;
22
23
  /**
package/dist/index.cjs CHANGED
@@ -698,8 +698,26 @@ const in_memory_db_wireFile = ()=>new file_system_File(in_memory_db_sharedFolder
698
698
  ]);
699
699
  const in_memory_db_inMemoryDbScaffolded = ()=>serviceFile().exists && (!in_memory_db_withWiring() || in_memory_db_wireFile().exists);
700
700
  const usesInMemoryDb = (implementationType)=>Boolean(config_file_ConfigFile.Instance.data.withInMemoryDb) && new unknown_format_naming_UnknownFormatNaming(implementationType).fileName === inMemoryImplementationType && in_memory_db_inMemoryDbScaffolded();
701
+ const uncountableEndings = [
702
+ 'data',
703
+ 'info',
704
+ 'usage',
705
+ 'feedback',
706
+ 'media',
707
+ 'ware',
708
+ 'equipment',
709
+ 'information',
710
+ 'knowledge',
711
+ 'traffic',
712
+ 'telemetry',
713
+ 'analytics',
714
+ 'series'
715
+ ];
716
+ const uncountable = new RegExp(`(${uncountableEndings.join('|')})$`, 'i');
701
717
  const plural = (word)=>{
718
+ if (uncountable.test(word)) return word;
702
719
  if (/[^aeiou]y$/i.test(word)) return `${word.slice(0, -1)}ies`;
720
+ if (/(^|[^aeiou]|qu)[aeiou]z$/i.test(word)) return `${word}zes`;
703
721
  if (/(s|x|z|ch|sh)$/i.test(word)) return `${word}es`;
704
722
  return `${word}s`;
705
723
  };
package/dist/init.cjs CHANGED
@@ -550,6 +550,22 @@ const in_memory_db_scaffoldInMemoryDb = (shared)=>{
550
550
  'infrastructure-services'
551
551
  ]).createFile('wire-in-memory-db-infrastructure-service.ts', inMemoryDbWiring);
552
552
  };
553
+ const uncountableEndings = [
554
+ 'data',
555
+ 'info',
556
+ 'usage',
557
+ 'feedback',
558
+ 'media',
559
+ 'ware',
560
+ 'equipment',
561
+ 'information',
562
+ 'knowledge',
563
+ 'traffic',
564
+ 'telemetry',
565
+ 'analytics',
566
+ 'series'
567
+ ];
568
+ new RegExp(`(${uncountableEndings.join('|')})$`, 'i');
553
569
  const hasDependency = (name)=>{
554
570
  const manifestFile = new file_system_File(external_node_path_default().join(new project_root_ProjectRoot().path, 'package.json'));
555
571
  if (!manifestFile.exists) return false;
@@ -497,6 +497,22 @@ const in_memory_db_scaffoldInMemoryDb = (shared)=>{
497
497
  ]).createFile('wire-in-memory-db-infrastructure-service.ts', inMemoryDbWiring);
498
498
  };
499
499
  const inMemoryDbScaffolded = ()=>serviceFile().exists && (!in_memory_db_withWiring() || in_memory_db_wireFile().exists);
500
+ const uncountableEndings = [
501
+ 'data',
502
+ 'info',
503
+ 'usage',
504
+ 'feedback',
505
+ 'media',
506
+ 'ware',
507
+ 'equipment',
508
+ 'information',
509
+ 'knowledge',
510
+ 'traffic',
511
+ 'telemetry',
512
+ 'analytics',
513
+ 'series'
514
+ ];
515
+ new RegExp(`(${uncountableEndings.join('|')})$`, 'i');
500
516
  const addInMemoryDb = ()=>{
501
517
  const config = config_file_ConfigFile.Instance.data;
502
518
  if (!config.withInMemoryDb) config_file_ConfigFile.write({
package/dist/react.cjs CHANGED
@@ -340,6 +340,22 @@ const save_pending_changes_savePendingChanges = async ()=>{
340
340
  writePendingChanges();
341
341
  return true;
342
342
  };
343
+ const uncountableEndings = [
344
+ 'data',
345
+ 'info',
346
+ 'usage',
347
+ 'feedback',
348
+ 'media',
349
+ 'ware',
350
+ 'equipment',
351
+ 'information',
352
+ 'knowledge',
353
+ 'traffic',
354
+ 'telemetry',
355
+ 'analytics',
356
+ 'series'
357
+ ];
358
+ new RegExp(`(${uncountableEndings.join('|')})$`, 'i');
343
359
  require("node:module");
344
360
  const stripJsonComments = (source)=>source.replace(/("(?:\\.|[^"\\])*")|\/\/[^\n]*|\/\*[\s\S]*?\*\//g, (_, text)=>text ? text : '').replace(/,(\s*[}\]])/g, '$1');
345
361
  class unknown_format_naming_UnknownFormatNaming {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@domain-first/project-structure",
3
3
  "description": "Build and manage your Domain-First project structure with CLI",
4
- "version": "7.1.0",
4
+ "version": "7.1.1",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",