@powerlines/plugin-i18next 0.1.20 → 0.1.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.
Files changed (48) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/helpers/config-utils.cjs +31 -0
  3. package/dist/helpers/config-utils.mjs +30 -0
  4. package/dist/index.cjs +4 -60
  5. package/dist/index.d.cts +3 -3
  6. package/dist/index.d.mts +4 -3
  7. package/dist/index.mjs +1 -31
  8. package/dist/powerlines/src/types/build.d.cts +145 -0
  9. package/dist/powerlines/src/types/build.d.mts +145 -0
  10. package/dist/powerlines/src/types/commands.d.cts +8 -0
  11. package/dist/powerlines/src/types/commands.d.mts +8 -0
  12. package/dist/powerlines/src/types/config.d.cts +376 -0
  13. package/dist/powerlines/src/types/config.d.mts +376 -0
  14. package/dist/powerlines/src/types/context.d.cts +403 -0
  15. package/dist/powerlines/src/types/context.d.mts +403 -0
  16. package/dist/powerlines/src/types/fs.d.cts +486 -0
  17. package/dist/powerlines/src/types/fs.d.mts +486 -0
  18. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  19. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  20. package/dist/powerlines/src/types/resolved.d.cts +81 -0
  21. package/dist/powerlines/src/types/resolved.d.mts +81 -0
  22. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  23. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  24. package/dist/types/i18n.cjs +0 -1
  25. package/dist/types/i18n.d.cts +21 -1
  26. package/dist/types/i18n.d.mts +21 -1
  27. package/dist/types/i18n.mjs +0 -2
  28. package/dist/types/index.cjs +0 -3
  29. package/dist/types/index.d.cts +2 -3
  30. package/dist/types/index.d.mts +2 -3
  31. package/dist/types/index.mjs +0 -4
  32. package/dist/types/plugin.cjs +0 -1
  33. package/dist/types/plugin.d.cts +24 -1
  34. package/dist/types/plugin.d.mts +24 -1
  35. package/dist/types/plugin.mjs +0 -2
  36. package/package.json +6 -6
  37. package/dist/i18n-C5zfq1YM.d.mts +0 -22
  38. package/dist/i18n-CUSH-jI_.mjs +0 -1
  39. package/dist/i18n-ComTDYPk.d.cts +0 -22
  40. package/dist/i18n-Ctazdbgs.cjs +0 -0
  41. package/dist/index-CA4VvAY_.d.mts +0 -1
  42. package/dist/index-CmCelmEL.d.cts +0 -1
  43. package/dist/plugin-B-8QVe28.cjs +0 -0
  44. package/dist/plugin-B7p8VtjC.mjs +0 -1
  45. package/dist/plugin-Bgs_50_L.d.mts +0 -1775
  46. package/dist/plugin-Cp8UI0nI.d.cts +0 -1775
  47. package/dist/types-BReKsBV6.mjs +0 -1
  48. package/dist/types-CBTc19th.cjs +0 -0
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -1 +0,0 @@
1
- require('../i18n-Ctazdbgs.cjs');
@@ -1,2 +1,22 @@
1
- import { n as ResourceContent, t as Resource } from "../i18n-ComTDYPk.cjs";
1
+ //#region src/types/i18n.d.ts
2
+ /**
3
+ * Represents a translation resource with its namespace name and content
4
+ */
5
+ interface ResourceContent {
6
+ [key: string]: string | ResourceContent;
7
+ }
8
+ /**
9
+ * Represents a translation resource with its namespace name and content
10
+ */
11
+ interface Resource {
12
+ /**
13
+ * The namespace name (filename without extension)
14
+ */
15
+ name: string;
16
+ /**
17
+ * The parsed JSON resources object
18
+ */
19
+ resources: ResourceContent;
20
+ }
21
+ //#endregion
2
22
  export { Resource, ResourceContent };
@@ -1,2 +1,22 @@
1
- import { n as ResourceContent, t as Resource } from "../i18n-C5zfq1YM.mjs";
1
+ //#region src/types/i18n.d.ts
2
+ /**
3
+ * Represents a translation resource with its namespace name and content
4
+ */
5
+ interface ResourceContent {
6
+ [key: string]: string | ResourceContent;
7
+ }
8
+ /**
9
+ * Represents a translation resource with its namespace name and content
10
+ */
11
+ interface Resource {
12
+ /**
13
+ * The namespace name (filename without extension)
14
+ */
15
+ name: string;
16
+ /**
17
+ * The parsed JSON resources object
18
+ */
19
+ resources: ResourceContent;
20
+ }
21
+ //#endregion
2
22
  export { Resource, ResourceContent };
@@ -1,3 +1 @@
1
- import "../i18n-CUSH-jI_.mjs";
2
-
3
1
  export { };
@@ -1,3 +0,0 @@
1
- require('../i18n-Ctazdbgs.cjs');
2
- require('../plugin-B-8QVe28.cjs');
3
- require('../types-CBTc19th.cjs');
@@ -1,4 +1,3 @@
1
- import { i as I18NextPluginUserConfig, n as I18NextPluginOptions, r as I18NextPluginResolvedConfig, t as I18NextPluginContext } from "../plugin-Cp8UI0nI.cjs";
2
- import { n as ResourceContent, t as Resource } from "../i18n-ComTDYPk.cjs";
3
- import "../index-CmCelmEL.cjs";
1
+ import { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig } from "./plugin.cjs";
2
+ import { Resource, ResourceContent } from "./i18n.cjs";
4
3
  export { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig, Resource, ResourceContent };
@@ -1,4 +1,3 @@
1
- import { i as I18NextPluginUserConfig, n as I18NextPluginOptions, r as I18NextPluginResolvedConfig, t as I18NextPluginContext } from "../plugin-Bgs_50_L.mjs";
2
- import { n as ResourceContent, t as Resource } from "../i18n-C5zfq1YM.mjs";
3
- import "../index-CA4VvAY_.mjs";
1
+ import { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig } from "./plugin.mjs";
2
+ import { Resource, ResourceContent } from "./i18n.mjs";
4
3
  export { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig, Resource, ResourceContent };
@@ -1,5 +1 @@
1
- import "../i18n-CUSH-jI_.mjs";
2
- import "../plugin-B7p8VtjC.mjs";
3
- import "../types-BReKsBV6.mjs";
4
-
5
1
  export { };
@@ -1 +0,0 @@
1
- require('../plugin-B-8QVe28.cjs');
@@ -1,2 +1,25 @@
1
- import { i as I18NextPluginUserConfig, n as I18NextPluginOptions, r as I18NextPluginResolvedConfig, t as I18NextPluginContext } from "../plugin-Cp8UI0nI.cjs";
1
+ import { UserConfig } from "../powerlines/src/types/config.cjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.cjs";
4
+ import { DeepPartial } from "@stryke/types/base";
5
+ import { I18nextToolkitConfig } from "i18next-cli";
6
+
7
+ //#region src/types/plugin.d.ts
8
+ type I18NextPluginOptions = DeepPartial<I18nextToolkitConfig>;
9
+ type I18NextPluginUserConfig = UserConfig & {
10
+ i18next?: I18NextPluginOptions;
11
+ };
12
+ type I18NextPluginResolvedConfig = ResolvedConfig & {
13
+ i18next: Omit<I18nextToolkitConfig, "extract" | "types"> & {
14
+ extract: Omit<I18nextToolkitConfig["extract"], "output" | "primaryLanguage" | "indentation"> & Required<Pick<I18nextToolkitConfig["extract"], "output" | "primaryLanguage" | "indentation">>;
15
+ types: Omit<NonNullable<I18nextToolkitConfig["types"]>, "input" | "output" | "enableSelector" | "indentation"> & {
16
+ input?: string;
17
+ output?: string;
18
+ enableSelector: boolean | "optimize";
19
+ indentation: number | string;
20
+ };
21
+ };
22
+ };
23
+ type I18NextPluginContext<TResolvedConfig extends I18NextPluginResolvedConfig = I18NextPluginResolvedConfig> = PluginContext<TResolvedConfig>;
24
+ //#endregion
2
25
  export { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig };
@@ -1,2 +1,25 @@
1
- import { i as I18NextPluginUserConfig, n as I18NextPluginOptions, r as I18NextPluginResolvedConfig, t as I18NextPluginContext } from "../plugin-Bgs_50_L.mjs";
1
+ import { UserConfig } from "../powerlines/src/types/config.mjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.mjs";
4
+ import { I18nextToolkitConfig } from "i18next-cli";
5
+ import { DeepPartial } from "@stryke/types/base";
6
+
7
+ //#region src/types/plugin.d.ts
8
+ type I18NextPluginOptions = DeepPartial<I18nextToolkitConfig>;
9
+ type I18NextPluginUserConfig = UserConfig & {
10
+ i18next?: I18NextPluginOptions;
11
+ };
12
+ type I18NextPluginResolvedConfig = ResolvedConfig & {
13
+ i18next: Omit<I18nextToolkitConfig, "extract" | "types"> & {
14
+ extract: Omit<I18nextToolkitConfig["extract"], "output" | "primaryLanguage" | "indentation"> & Required<Pick<I18nextToolkitConfig["extract"], "output" | "primaryLanguage" | "indentation">>;
15
+ types: Omit<NonNullable<I18nextToolkitConfig["types"]>, "input" | "output" | "enableSelector" | "indentation"> & {
16
+ input?: string;
17
+ output?: string;
18
+ enableSelector: boolean | "optimize";
19
+ indentation: number | string;
20
+ };
21
+ };
22
+ };
23
+ type I18NextPluginContext<TResolvedConfig extends I18NextPluginResolvedConfig = I18NextPluginResolvedConfig> = PluginContext<TResolvedConfig>;
24
+ //#endregion
2
25
  export { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig };
@@ -1,3 +1 @@
1
- import "../plugin-B7p8VtjC.mjs";
2
-
3
1
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-i18next",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to use i18next for internationalization.",
6
6
  "repository": {
@@ -121,15 +121,15 @@
121
121
  "@stryke/path": "^0.24.1",
122
122
  "@stryke/types": "^0.10.29",
123
123
  "defu": "^6.1.4",
124
- "powerlines": "^0.36.27"
124
+ "powerlines": "^0.36.28"
125
125
  },
126
126
  "devDependencies": {
127
- "@powerlines/nx": "^0.11.53",
128
- "@powerlines/plugin-plugin": "^0.12.75",
127
+ "@powerlines/nx": "^0.11.54",
128
+ "@powerlines/plugin-plugin": "^0.12.76",
129
129
  "@types/node": "^24.10.4",
130
- "i18next-cli": "^1.33.5",
130
+ "i18next-cli": "^1.34.0",
131
131
  "i18next-resources-for-ts": "^2.0.0"
132
132
  },
133
133
  "publishConfig": { "access": "public" },
134
- "gitHead": "fbc59ce584fd0f78d90d2dbaa18f9c9267bd3b61"
134
+ "gitHead": "6891ff1330798e807c4caef6134df09d9f57686d"
135
135
  }
@@ -1,22 +0,0 @@
1
- //#region src/types/i18n.d.ts
2
- /**
3
- * Represents a translation resource with its namespace name and content
4
- */
5
- interface ResourceContent {
6
- [key: string]: string | ResourceContent;
7
- }
8
- /**
9
- * Represents a translation resource with its namespace name and content
10
- */
11
- interface Resource {
12
- /**
13
- * The namespace name (filename without extension)
14
- */
15
- name: string;
16
- /**
17
- * The parsed JSON resources object
18
- */
19
- resources: ResourceContent;
20
- }
21
- //#endregion
22
- export { ResourceContent as n, Resource as t };
@@ -1 +0,0 @@
1
- export { };
@@ -1,22 +0,0 @@
1
- //#region src/types/i18n.d.ts
2
- /**
3
- * Represents a translation resource with its namespace name and content
4
- */
5
- interface ResourceContent {
6
- [key: string]: string | ResourceContent;
7
- }
8
- /**
9
- * Represents a translation resource with its namespace name and content
10
- */
11
- interface Resource {
12
- /**
13
- * The namespace name (filename without extension)
14
- */
15
- name: string;
16
- /**
17
- * The parsed JSON resources object
18
- */
19
- resources: ResourceContent;
20
- }
21
- //#endregion
22
- export { ResourceContent as n, Resource as t };
File without changes
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
File without changes
@@ -1 +0,0 @@
1
- export { };