@intlayer/types 7.3.1 → 7.3.2-canary.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/README.md CHANGED
@@ -24,8 +24,6 @@
24
24
  <a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="license"/></a>
25
25
  <a href="https://github.com/aymericzip/intlayer/commits/main" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="last commit"/>
26
26
  </a>
27
- <a href="https://bountyhub.dev/bounties?repo=intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/badge/Bounties-on%20BountyHub-yellow?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="Bounties on BountyHub"/>
28
- </a>
29
27
  </p>
30
28
 
31
29
  ![Watch the video](https://github.com/aymericzip/intlayer/blob/main/docs/assets/demo_video.gif)
@@ -444,6 +444,45 @@ type BuildConfig = {
444
444
  */
445
445
  require?: NodeJS.Require;
446
446
  };
447
+ type CompilerConfig = {
448
+ /**
449
+ * Indicates if the compiler should be enabled
450
+ */
451
+ enabled: boolean;
452
+ /**
453
+ * Pattern to traverse the code to optimize.
454
+ *
455
+ * Allows to avoid to traverse the code that is not relevant to the optimization.
456
+ * Improve build performance.
457
+ *
458
+ * Default: ['**\/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx}', '!**\/node_modules/**']
459
+ *
460
+ * Example: `['src/**\/*.{ts,tsx}', '../ui-library/**\/*.{ts,tsx}', '!**\/node_modules/**']`
461
+ *
462
+ * Note:
463
+ * - This option will be ignored if `optimize` is disabled.
464
+ * - Use glob pattern.
465
+ */
466
+ transformPattern: string | string[];
467
+ /**
468
+ * Pattern to exclude from the optimization.
469
+ *
470
+ * Allows to exclude files from the optimization.
471
+ *
472
+ * Default: ['**\/node_modules/**']
473
+ *
474
+ * Example: `['**\/node_modules/**', '!**\/node_modules/react/**']`
475
+ */
476
+ excludePattern: string | string[];
477
+ /**
478
+ * Output directory for the optimized dictionaries.
479
+ *
480
+ * Default: 'compiler'
481
+ *
482
+ * The directory where the optimized dictionaries will be stored.
483
+ */
484
+ outputDir: string;
485
+ };
447
486
  /**
448
487
  * Custom configuration that can be provided to override default settings
449
488
  */
@@ -480,6 +519,10 @@ type CustomIntlayerConfig = {
480
519
  * Custom build configuration
481
520
  */
482
521
  build?: Partial<BuildConfig>;
522
+ /**
523
+ * Custom compiler configuration
524
+ */
525
+ compiler?: Partial<CompilerConfig>;
483
526
  /**
484
527
  * Custom plugins configuration
485
528
  */
@@ -522,6 +565,10 @@ type IntlayerConfig = {
522
565
  * Build configuration
523
566
  */
524
567
  build: BuildConfig;
568
+ /**
569
+ * Compiler configuration
570
+ */
571
+ compiler: CompilerConfig;
525
572
  /**
526
573
  * Plugins configuration
527
574
  */
@@ -749,5 +796,5 @@ type LogConfig = {
749
796
  debug?: typeof console.debug;
750
797
  };
751
798
  //#endregion
752
- export { AiConfig, BaseContentConfig, BaseDerivedConfig, BuildConfig, ContentConfig, CookiesAttributes, CustomIntlayerConfig, DictionaryConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, PatternsContentConfig, RoutingConfig, StorageAttributes, StrictMode };
799
+ export { AiConfig, BaseContentConfig, BaseDerivedConfig, BuildConfig, CompilerConfig, ContentConfig, CookiesAttributes, CustomIntlayerConfig, DictionaryConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, PatternsContentConfig, RoutingConfig, StorageAttributes, StrictMode };
753
800
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","names":[],"sources":["../../src/config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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwGA,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCA,aAAA,GAAgB,oBAC1B,oBACA;KAEU,YAAA;iBACK,OAAA,CAAQ;eACV,OAAA,CAAQ;gBACP,OAAA,CAAQ;gBACR,OAAA,CAAQ;;KAGZ,SAAA;;;;;;;;;;;;;;;;;;;;;;iBAwBK,OAAA,CAAQ;eACV,OAAA,CAAQ;gBACP,OAAA,CAAQ;gBACR,OAAA,CAAQ;iBACP,OAAA,CAAQ"}
@@ -3,6 +3,6 @@ import { DeclaredLocales, DictionaryKeys, DictionaryRegistry, DictionaryRegistry
3
3
  import { NodeType, TypedNodeModel, formatNodeType } from "./nodeType.js";
4
4
  import { ContentNode, Dictionary, DictionaryId, DictionaryKey, DictionaryLocation, Fill, GetSubPath, LocalDictionaryId, TypedNode } from "./dictionary.js";
5
5
  import { MergedDictionaryOutput, MergedDictionaryResult, Plugin, UnmergedDictionaryOutput, UnmergedDictionaryResult } from "./plugin.js";
6
- import { AiConfig, BaseContentConfig, BaseDerivedConfig, BuildConfig, ContentConfig, CookiesAttributes, CustomIntlayerConfig, DictionaryConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, PatternsContentConfig, RoutingConfig, StorageAttributes, StrictMode } from "./config.js";
6
+ import { AiConfig, BaseContentConfig, BaseDerivedConfig, BuildConfig, CompilerConfig, ContentConfig, CookiesAttributes, CustomIntlayerConfig, DictionaryConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, PatternsContentConfig, RoutingConfig, StorageAttributes, StrictMode } from "./config.js";
7
7
  import { ArrayNode, ConditionNode, EnumerationNode, FileNode, GenderNode, InsertionNode, KeyPath, MarkdownNode, NestedNode, ObjectNode, ReactNode, TranslationNode } from "./keyPath.js";
8
- export { AiConfig, ArrayNode, BaseContentConfig, BaseDerivedConfig, BuildConfig, ConditionNode, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, DeclaredLocales, Dictionary, DictionaryConfig, DictionaryId, DictionaryKey, DictionaryKeys, DictionaryLocation, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, EditorConfig, EnumerationNode, FileNode, Fill, GenderNode, GetSubPath, InsertionNode, InternationalizationConfig, IntlayerConfig, KeyPath, LocalDictionaryId, type Locale, locales_d_exports as Locales, LocalesValues, LogConfig, LogFunctions, MarkdownNode, MergedDictionaryOutput, MergedDictionaryResult, NestedNode, NodeType, ObjectNode, PatternsContentConfig, Plugin, ReactNode, RequiredLocales, RoutingConfig, StorageAttributes, StrictMode, StrictModeLocaleMap, TranslationNode, TypedNode, TypedNodeModel, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
8
+ export { AiConfig, ArrayNode, BaseContentConfig, BaseDerivedConfig, BuildConfig, CompilerConfig, ConditionNode, ContentConfig, ContentNode, CookiesAttributes, CustomIntlayerConfig, DeclaredLocales, Dictionary, DictionaryConfig, DictionaryId, DictionaryKey, DictionaryKeys, DictionaryLocation, DictionaryRegistry, DictionaryRegistryContent, DictionaryRegistryElement, EditorConfig, EnumerationNode, FileNode, Fill, GenderNode, GetSubPath, InsertionNode, InternationalizationConfig, IntlayerConfig, KeyPath, LocalDictionaryId, type Locale, locales_d_exports as Locales, LocalesValues, LogConfig, LogFunctions, MarkdownNode, MergedDictionaryOutput, MergedDictionaryResult, NestedNode, NodeType, ObjectNode, PatternsContentConfig, Plugin, ReactNode, RequiredLocales, RoutingConfig, StorageAttributes, StrictMode, StrictModeLocaleMap, TranslationNode, TypedNode, TypedNodeModel, UnmergedDictionaryOutput, UnmergedDictionaryResult, formatNodeType };
@@ -1 +1 @@
1
- {"version":3,"file":"keyPath.d.ts","names":[],"sources":["../../src/keyPath.ts"],"sourcesContent":[],"mappings":";;;KAEY,UAAA;QACJ,QAAA,CAAS;EADL,GAAA,EAAA,MAAA;AAKZ,CAAA;AAKY,KALA,SAAA,GAKe;EAKf,IAAA,EATJ,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,KArCQ,UAAA,GAqCR;EACA,IAAA,EArCI,QAAA,CAAS,MAqCb;EACA,GAAA,EAAA,MAAA;CACA;AACA,KApCQ,aAAA,GAoCR;EAAQ,IAAA,EAnCJ,QAAA,CAAS,SAmCL;;;KA/BA,YAAA;QACJ,QAAA,CAAS;;;KAIL,SAAA;QACJ,QAAA,CAAS;;;KAIL,UAAA;QACJ,QAAA,CAAS;;;KAIL,QAAA;QACJ,QAAA,CAAS;;;KAIL,OAAA,GACR,aACA,YACA,kBACA,kBACA,gBACA,aACA,eACA,YACA,gBACA,aACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/types",
3
- "version": "7.3.1",
3
+ "version": "7.3.2-canary.1",
4
4
  "private": false,
5
5
  "description": "Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.",
6
6
  "keywords": [
@@ -61,6 +61,7 @@
61
61
  "./package.json"
62
62
  ],
63
63
  "scripts": {
64
+ "_prepublish": "cp -f ../../../README.md ./README.md",
64
65
  "build": "tsdown --config tsdown.config.ts",
65
66
  "build:ci": "tsdown --config tsdown.config.ts",
66
67
  "clean": "rimraf ./dist .turbo",
@@ -69,7 +70,7 @@
69
70
  "format:fix": "biome format --write .",
70
71
  "lint": "biome lint .",
71
72
  "lint:fix": "biome lint --write .",
72
- "prepublish": "cp -f ../../../README.md ./README.md",
73
+ "prepublish": "echo prepublish temporally disabled to avoid rewrite readme",
73
74
  "publish": "bun publish || true",
74
75
  "publish:canary": "bun publish --access public --tag canary || true",
75
76
  "publish:latest": "bun publish --access public --tag latest || true",
@@ -83,9 +84,9 @@
83
84
  "@utils/ts-config-types": "1.0.4",
84
85
  "@utils/tsdown-config": "1.0.4",
85
86
  "rimraf": "6.1.2",
86
- "tsdown": "0.16.6",
87
+ "tsdown": "0.16.8",
87
88
  "typescript": "5.9.3",
88
- "vitest": "4.0.13"
89
+ "vitest": "4.0.14"
89
90
  },
90
91
  "engines": {
91
92
  "node": ">=14.18"