@powerlines/plugin-i18next 0.1.25 → 0.1.27
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 +9 -9
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +9 -9
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/get-object-tag.cjs +6 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/get-object-tag.mjs +5 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-date.cjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-date.mjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-empty.cjs +27 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-empty.mjs +27 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-function.cjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-function.mjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-non-null-object.cjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-null.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-null.mjs +11 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-number.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-number.mjs +11 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-object.cjs +13 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-object.mjs +13 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-plain-object.cjs +14 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-plain-object.mjs +13 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set-object.cjs +13 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set-object.mjs +13 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set.cjs +13 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set.mjs +13 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-string.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-string.mjs +11 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-symbol.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-symbol.mjs +11 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-undefined.cjs +6 -0
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-undefined.mjs +5 -0
- package/dist/types/plugin.d.mts +3 -3
- package/package.json +7 -8
- /package/dist/{powerlines → packages/powerlines}/src/internal/helpers/hooks.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/api.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/build.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/commands.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/config.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/context.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/fs.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/hooks.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/plugin.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/resolved.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/tsconfig.d.mts +0 -0
- /package/dist/{powerlines → packages/powerlines}/src/types/unplugin.d.mts +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_is_set = require('./node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set.cjs');
|
|
4
|
+
const require_is_set_object = require('./node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set-object.cjs');
|
|
5
|
+
const require_is_string = require('./node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-string.cjs');
|
|
3
6
|
const require_config_utils = require('./helpers/config-utils.cjs');
|
|
4
7
|
let __stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
5
8
|
let __stryke_path_append = require("@stryke/path/append");
|
|
6
9
|
let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
7
10
|
let __stryke_path_join = require("@stryke/path/join");
|
|
8
|
-
let __stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
9
|
-
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
10
|
-
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
11
11
|
let defu = require("defu");
|
|
12
12
|
defu = require_rolldown_runtime.__toESM(defu);
|
|
13
13
|
let i18next_cli = require("i18next-cli");
|
|
@@ -51,7 +51,7 @@ const plugin = (options = {}) => {
|
|
|
51
51
|
locales: []
|
|
52
52
|
});
|
|
53
53
|
if (!i18next.locales || i18next.locales.length === 0) i18next.locales = [i18next.extract.primaryLanguage || "en"];
|
|
54
|
-
if (!
|
|
54
|
+
if (!require_is_set.t(i18next.types.indentation)) i18next.types.indentation = i18next.extract.indentation;
|
|
55
55
|
return { i18next };
|
|
56
56
|
},
|
|
57
57
|
async configResolved() {},
|
|
@@ -78,13 +78,13 @@ const plugin = (options = {}) => {
|
|
|
78
78
|
for (const file of await (0, __stryke_fs_list_files.listFiles)(require_config_utils.getOutputPath(this.config.i18next.extract.output, this.config.i18next.extract.primaryLanguage, "*"))) {
|
|
79
79
|
const namespace = (0, __stryke_path_file_path_fns.findFileName)(file, { withExtension: false });
|
|
80
80
|
const parsedContent = await this.resolver.import(file);
|
|
81
|
-
if (this.config.i18next.extract.mergeNamespaces &&
|
|
82
|
-
if (Object.keys(parsedContent).filter((k) =>
|
|
83
|
-
for (const nsName of Object.keys(parsedContent).filter((k) =>
|
|
81
|
+
if (this.config.i18next.extract.mergeNamespaces && require_is_set_object.t(parsedContent)) {
|
|
82
|
+
if (Object.keys(parsedContent).filter((k) => require_is_set_object.t(parsedContent[k])).length > 0) {
|
|
83
|
+
for (const nsName of Object.keys(parsedContent).filter((k) => require_is_set_object.t(parsedContent[k]))) resources.push({
|
|
84
84
|
name: nsName,
|
|
85
85
|
resources: parsedContent[nsName]
|
|
86
86
|
});
|
|
87
|
-
if (Object.keys(parsedContent).filter((k) => !
|
|
87
|
+
if (Object.keys(parsedContent).filter((k) => !require_is_set_object.t(parsedContent[k])).length > 0) this.warn(`The file ${file} contains top-level keys that are not objects (${Object.keys(parsedContent).filter((k) => !require_is_set_object.t(parsedContent[k])).join(", ")}). When 'mergeNamespaces' is enabled, top-level keys are treated as namespaces. These keys will be ignored.`);
|
|
88
88
|
continue;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -112,7 +112,7 @@ ${(0, i18next_resources_for_ts.mergeResourcesAsInterface)(resources, {
|
|
|
112
112
|
*/
|
|
113
113
|
declare module 'i18next' {
|
|
114
114
|
interface CustomTypeOptions {
|
|
115
|
-
enableSelector: ${
|
|
115
|
+
enableSelector: ${require_is_string.e(this.config.i18next.types.enableSelector) ? `"${this.config.i18next.types.enableSelector}"` : this.config.i18next.types.enableSelector};
|
|
116
116
|
defaultNS: ${this.config.i18next.extract.defaultNS === false ? "false" : `'${this.config.i18next.extract.defaultNS || "translation"}'`};
|
|
117
117
|
resources: Resources;
|
|
118
118
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin } from "./powerlines/src/types/plugin.mjs";
|
|
1
|
+
import { Plugin } from "./packages/powerlines/src/types/plugin.mjs";
|
|
2
2
|
import { I18NextPluginContext, I18NextPluginOptions, I18NextPluginResolvedConfig, I18NextPluginUserConfig } from "./types/plugin.mjs";
|
|
3
3
|
import { Resource, ResourceContent } from "./types/i18n.mjs";
|
|
4
4
|
import "./types/index.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { t } from "./node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set.mjs";
|
|
2
|
+
import { t as t$1 } from "./node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set-object.mjs";
|
|
3
|
+
import { e } from "./node_modules/.pnpm/@stryke_type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-string.mjs";
|
|
1
4
|
import { getOutputPath } from "./helpers/config-utils.mjs";
|
|
2
5
|
import { listFiles } from "@stryke/fs/list-files";
|
|
3
6
|
import { appendPath } from "@stryke/path/append";
|
|
4
7
|
import { findFileName } from "@stryke/path/file-path-fns";
|
|
5
8
|
import { joinPaths } from "@stryke/path/join";
|
|
6
|
-
import { isSet } from "@stryke/type-checks/is-set";
|
|
7
|
-
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
8
|
-
import { isString } from "@stryke/type-checks/is-string";
|
|
9
9
|
import defu from "defu";
|
|
10
10
|
import { runExtractor } from "i18next-cli";
|
|
11
11
|
import { mergeResourcesAsInterface } from "i18next-resources-for-ts";
|
|
@@ -48,7 +48,7 @@ const plugin = (options = {}) => {
|
|
|
48
48
|
locales: []
|
|
49
49
|
});
|
|
50
50
|
if (!i18next.locales || i18next.locales.length === 0) i18next.locales = [i18next.extract.primaryLanguage || "en"];
|
|
51
|
-
if (!
|
|
51
|
+
if (!t(i18next.types.indentation)) i18next.types.indentation = i18next.extract.indentation;
|
|
52
52
|
return { i18next };
|
|
53
53
|
},
|
|
54
54
|
async configResolved() {},
|
|
@@ -75,13 +75,13 @@ const plugin = (options = {}) => {
|
|
|
75
75
|
for (const file of await listFiles(getOutputPath(this.config.i18next.extract.output, this.config.i18next.extract.primaryLanguage, "*"))) {
|
|
76
76
|
const namespace = findFileName(file, { withExtension: false });
|
|
77
77
|
const parsedContent = await this.resolver.import(file);
|
|
78
|
-
if (this.config.i18next.extract.mergeNamespaces &&
|
|
79
|
-
if (Object.keys(parsedContent).filter((k) =>
|
|
80
|
-
for (const nsName of Object.keys(parsedContent).filter((k) =>
|
|
78
|
+
if (this.config.i18next.extract.mergeNamespaces && t$1(parsedContent)) {
|
|
79
|
+
if (Object.keys(parsedContent).filter((k) => t$1(parsedContent[k])).length > 0) {
|
|
80
|
+
for (const nsName of Object.keys(parsedContent).filter((k) => t$1(parsedContent[k]))) resources.push({
|
|
81
81
|
name: nsName,
|
|
82
82
|
resources: parsedContent[nsName]
|
|
83
83
|
});
|
|
84
|
-
if (Object.keys(parsedContent).filter((k) => !
|
|
84
|
+
if (Object.keys(parsedContent).filter((k) => !t$1(parsedContent[k])).length > 0) this.warn(`The file ${file} contains top-level keys that are not objects (${Object.keys(parsedContent).filter((k) => !t$1(parsedContent[k])).join(", ")}). When 'mergeNamespaces' is enabled, top-level keys are treated as namespaces. These keys will be ignored.`);
|
|
85
85
|
continue;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -109,7 +109,7 @@ ${mergeResourcesAsInterface(resources, {
|
|
|
109
109
|
*/
|
|
110
110
|
declare module 'i18next' {
|
|
111
111
|
interface CustomTypeOptions {
|
|
112
|
-
enableSelector: ${
|
|
112
|
+
enableSelector: ${e(this.config.i18next.types.enableSelector) ? `"${this.config.i18next.types.enableSelector}"` : this.config.i18next.types.enableSelector};
|
|
113
113
|
defaultNS: ${this.config.i18next.extract.defaultNS === false ? "false" : `'${this.config.i18next.extract.defaultNS || "translation"}'`};
|
|
114
114
|
resources: Resources;
|
|
115
115
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/get-object-tag.mjs
|
|
3
|
+
const e = (e$1) => e$1 == null ? e$1 === void 0 ? `[object Undefined]` : `[object Null]` : Object.prototype.toString.call(e$1);
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
exports.e = e;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/get-object-tag.mjs
|
|
2
|
+
const e = (e$1) => e$1 == null ? e$1 === void 0 ? `[object Undefined]` : `[object Null]` : Object.prototype.toString.call(e$1);
|
|
3
|
+
|
|
4
|
+
//#endregion
|
|
5
|
+
export { e };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
|
+
const require_is_plain_object = require('./is-plain-object.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-date.mjs
|
|
5
|
+
const n = (n$1) => require_is_plain_object.t(n$1) && require_get_object_tag.e(n$1) == `[object Date]`;
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.n = n;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { e } from "./get-object-tag.mjs";
|
|
2
|
+
import { t } from "./is-plain-object.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-date.mjs
|
|
5
|
+
const n = (n$1) => t(n$1) && e(n$1) == `[object Date]`;
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_is_date = require('./is-date.cjs');
|
|
2
|
+
const require_is_function = require('./is-function.cjs');
|
|
3
|
+
const require_is_null = require('./is-null.cjs');
|
|
4
|
+
const require_is_number = require('./is-number.cjs');
|
|
5
|
+
const require_is_symbol = require('./is-symbol.cjs');
|
|
6
|
+
const require_is_undefined = require('./is-undefined.cjs');
|
|
7
|
+
|
|
8
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-empty.mjs
|
|
9
|
+
const o = (e$3) => {
|
|
10
|
+
try {
|
|
11
|
+
return require_is_undefined.e(e$3) || require_is_null.e(e$3);
|
|
12
|
+
} catch {
|
|
13
|
+
return !1;
|
|
14
|
+
}
|
|
15
|
+
}, s = (n$1) => {
|
|
16
|
+
if (n$1 === !0 || n$1 === !1 || n$1 == null) return !0;
|
|
17
|
+
if (require_is_number.t(n$1)) return n$1 === 0;
|
|
18
|
+
if (require_is_date.n(n$1)) return Number.isNaN(n$1.getTime());
|
|
19
|
+
if (require_is_function.r(n$1) || require_is_symbol.e(n$1)) return !1;
|
|
20
|
+
let { length: a } = n$1;
|
|
21
|
+
if (require_is_number.t(a)) return a === 0;
|
|
22
|
+
let { size: o$1 } = n$1;
|
|
23
|
+
return require_is_number.t(o$1) ? o$1 === 0 : Object.keys(n$1).length === 0;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.o = o;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { n } from "./is-date.mjs";
|
|
2
|
+
import { r } from "./is-function.mjs";
|
|
3
|
+
import { e } from "./is-null.mjs";
|
|
4
|
+
import { t } from "./is-number.mjs";
|
|
5
|
+
import { e as e$1 } from "./is-symbol.mjs";
|
|
6
|
+
import { e as e$2 } from "./is-undefined.mjs";
|
|
7
|
+
|
|
8
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-empty.mjs
|
|
9
|
+
const o = (e$3) => {
|
|
10
|
+
try {
|
|
11
|
+
return e$2(e$3) || e(e$3);
|
|
12
|
+
} catch {
|
|
13
|
+
return !1;
|
|
14
|
+
}
|
|
15
|
+
}, s = (n$1) => {
|
|
16
|
+
if (n$1 === !0 || n$1 === !1 || n$1 == null) return !0;
|
|
17
|
+
if (t(n$1)) return n$1 === 0;
|
|
18
|
+
if (n(n$1)) return Number.isNaN(n$1.getTime());
|
|
19
|
+
if (r(n$1) || e$1(n$1)) return !1;
|
|
20
|
+
let { length: a } = n$1;
|
|
21
|
+
if (t(a)) return a === 0;
|
|
22
|
+
let { size: o$1 } = n$1;
|
|
23
|
+
return t(o$1) ? o$1 === 0 : Object.keys(n$1).length === 0;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { o };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-function.mjs
|
|
4
|
+
function t(t$1) {
|
|
5
|
+
return require_get_object_tag.e(t$1) === `[object Function]`;
|
|
6
|
+
}
|
|
7
|
+
function n(t$1) {
|
|
8
|
+
return require_get_object_tag.e(t$1) === `[object AsyncFunction]`;
|
|
9
|
+
}
|
|
10
|
+
const r = (e$1) => {
|
|
11
|
+
try {
|
|
12
|
+
return e$1 instanceof Function || typeof e$1 == `function` || !!(e$1?.constructor && e$1?.call && e$1?.apply) || t(e$1) || n(e$1);
|
|
13
|
+
} catch {
|
|
14
|
+
return !1;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.r = r;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { e } from "./get-object-tag.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-function.mjs
|
|
4
|
+
function t(t$1) {
|
|
5
|
+
return e(t$1) === `[object Function]`;
|
|
6
|
+
}
|
|
7
|
+
function n(t$1) {
|
|
8
|
+
return e(t$1) === `[object AsyncFunction]`;
|
|
9
|
+
}
|
|
10
|
+
const r = (e$1) => {
|
|
11
|
+
try {
|
|
12
|
+
return e$1 instanceof Function || typeof e$1 == `function` || !!(e$1?.constructor && e$1?.call && e$1?.apply) || t(e$1) || n(e$1);
|
|
13
|
+
} catch {
|
|
14
|
+
return !1;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const require_is_set = require('./is-set.cjs');
|
|
2
|
+
const require_is_object = require('./is-object.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs
|
|
5
|
+
const n = (n$1) => require_is_set.t(n$1) && require_is_object.s(n$1);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.n = n;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t } from "./is-set.mjs";
|
|
2
|
+
import { s } from "./is-object.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-non-null-object.mjs
|
|
5
|
+
const n = (n$1) => t(n$1) && s(n$1);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-number.mjs
|
|
3
|
+
const t = (e) => {
|
|
4
|
+
try {
|
|
5
|
+
return e instanceof Number || typeof e == `number` || Number(e) === e;
|
|
6
|
+
} catch {
|
|
7
|
+
return !1;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.t = t;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-number.mjs
|
|
2
|
+
const t = (e) => {
|
|
3
|
+
try {
|
|
4
|
+
return e instanceof Number || typeof e == `number` || Number(e) === e;
|
|
5
|
+
} catch {
|
|
6
|
+
return !1;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_is_plain_object = require('./is-plain-object.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-object.mjs
|
|
4
|
+
const s = (t) => {
|
|
5
|
+
try {
|
|
6
|
+
return typeof t == `object` || !!t && t?.constructor === Object || require_is_plain_object.n(t);
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.s = s;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n } from "./is-plain-object.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-object.mjs
|
|
4
|
+
const s = (t) => {
|
|
5
|
+
try {
|
|
6
|
+
return typeof t == `object` || !!t && t?.constructor === Object || n(t);
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { s };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-plain-object.mjs
|
|
4
|
+
const t = (e$1) => typeof e$1 == `object` && !!e$1, n = (n$1) => {
|
|
5
|
+
if (!t(n$1) || require_get_object_tag.e(n$1) !== `[object Object]`) return !1;
|
|
6
|
+
if (Object.getPrototypeOf(n$1) === null) return !0;
|
|
7
|
+
let r = n$1;
|
|
8
|
+
for (; Object.getPrototypeOf(r) !== null;) r = Object.getPrototypeOf(r);
|
|
9
|
+
return Object.getPrototypeOf(n$1) === r;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.n = n;
|
|
14
|
+
exports.t = t;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { e } from "./get-object-tag.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-plain-object.mjs
|
|
4
|
+
const t = (e$1) => typeof e$1 == `object` && !!e$1, n = (n$1) => {
|
|
5
|
+
if (!t(n$1) || e(n$1) !== `[object Object]`) return !1;
|
|
6
|
+
if (Object.getPrototypeOf(n$1) === null) return !0;
|
|
7
|
+
let r = n$1;
|
|
8
|
+
for (; Object.getPrototypeOf(r) !== null;) r = Object.getPrototypeOf(r);
|
|
9
|
+
return Object.getPrototypeOf(n$1) === r;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n, t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_is_non_null_object = require('./is-non-null-object.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set-object.mjs
|
|
4
|
+
const t = (t$1) => {
|
|
5
|
+
try {
|
|
6
|
+
return require_is_non_null_object.n(t$1) && Object.keys(t$1).length > 0;
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.t = t;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { n } from "./is-non-null-object.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set-object.mjs
|
|
4
|
+
const t = (t$1) => {
|
|
5
|
+
try {
|
|
6
|
+
return n(t$1) && Object.keys(t$1).length > 0;
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_is_empty = require('./is-empty.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
|
+
const t = (t$1) => {
|
|
5
|
+
try {
|
|
6
|
+
return !require_is_empty.o(t$1);
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.t = t;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { o } from "./is-empty.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
|
+
const t = (t$1) => {
|
|
5
|
+
try {
|
|
6
|
+
return !o(t$1);
|
|
7
|
+
} catch {
|
|
8
|
+
return !1;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-symbol.mjs
|
|
3
|
+
const e = (e$1) => {
|
|
4
|
+
try {
|
|
5
|
+
return e$1 instanceof Symbol || typeof e$1 == `symbol` || !!e$1 && e$1.constructor === Symbol;
|
|
6
|
+
} catch {
|
|
7
|
+
return !1;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.e = e;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.15/node_modules/@stryke/type-checks/dist/is-symbol.mjs
|
|
2
|
+
const e = (e$1) => {
|
|
3
|
+
try {
|
|
4
|
+
return e$1 instanceof Symbol || typeof e$1 == `symbol` || !!e$1 && e$1.constructor === Symbol;
|
|
5
|
+
} catch {
|
|
6
|
+
return !1;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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";
|
|
1
|
+
import { UserConfig } from "../packages/powerlines/src/types/config.mjs";
|
|
2
|
+
import { ResolvedConfig } from "../packages/powerlines/src/types/resolved.mjs";
|
|
3
|
+
import { PluginContext } from "../packages/powerlines/src/types/context.mjs";
|
|
4
4
|
import { I18nextToolkitConfig } from "i18next-cli";
|
|
5
5
|
import { DeepPartial } from "@stryke/types/base";
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-i18next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to use i18next for internationalization.",
|
|
6
6
|
"repository": {
|
|
@@ -121,15 +121,14 @@
|
|
|
121
121
|
"@stryke/path": "^0.24.1",
|
|
122
122
|
"@stryke/types": "^0.10.29",
|
|
123
123
|
"defu": "^6.1.4",
|
|
124
|
-
"
|
|
124
|
+
"i18next-cli": "^1.34.1",
|
|
125
|
+
"i18next-resources-for-ts": "^2.0.0",
|
|
126
|
+
"powerlines": "^0.37.4"
|
|
125
127
|
},
|
|
126
128
|
"devDependencies": {
|
|
127
|
-
"@powerlines/
|
|
128
|
-
"@
|
|
129
|
-
"@types/node": "^24.10.4",
|
|
130
|
-
"i18next-cli": "^1.34.1",
|
|
131
|
-
"i18next-resources-for-ts": "^2.0.0"
|
|
129
|
+
"@powerlines/plugin-plugin": "^0.12.82",
|
|
130
|
+
"@types/node": "^24.10.4"
|
|
132
131
|
},
|
|
133
132
|
"publishConfig": { "access": "public" },
|
|
134
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "48a35579bd5535a267a420c160c273899920b2e7"
|
|
135
134
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|