@formatjs/cli 6.2.4 → 6.2.6
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/bin/formatjs +87 -87
- package/package.json +2 -2
package/bin/formatjs
CHANGED
|
@@ -197841,106 +197841,84 @@ var require_printer = __commonJS({
|
|
|
197841
197841
|
}
|
|
197842
197842
|
});
|
|
197843
197843
|
|
|
197844
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197845
|
-
var
|
|
197846
|
-
__export(
|
|
197844
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/crowdin.js
|
|
197845
|
+
var crowdin_exports = {};
|
|
197846
|
+
__export(crowdin_exports, {
|
|
197847
197847
|
compile: () => compile,
|
|
197848
197848
|
format: () => format2
|
|
197849
197849
|
});
|
|
197850
197850
|
var format2, compile;
|
|
197851
|
-
var
|
|
197852
|
-
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197851
|
+
var init_crowdin = __esm({
|
|
197852
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/crowdin.js"() {
|
|
197853
197853
|
"use strict";
|
|
197854
|
-
format2 = (msgs) =>
|
|
197854
|
+
format2 = (msgs) => {
|
|
197855
|
+
const results = {};
|
|
197856
|
+
for (const [id, msg] of Object.entries(msgs)) {
|
|
197857
|
+
results[id] = {
|
|
197858
|
+
message: msg.defaultMessage,
|
|
197859
|
+
description: typeof msg.description === "string" ? msg.description : JSON.stringify(msg.description)
|
|
197860
|
+
};
|
|
197861
|
+
}
|
|
197862
|
+
return results;
|
|
197863
|
+
};
|
|
197855
197864
|
compile = (msgs) => {
|
|
197856
197865
|
const results = {};
|
|
197857
|
-
for (const
|
|
197858
|
-
|
|
197866
|
+
for (const [id, msg] of Object.entries(msgs)) {
|
|
197867
|
+
if (id === "smartling") {
|
|
197868
|
+
continue;
|
|
197869
|
+
}
|
|
197870
|
+
results[id] = msg.message;
|
|
197859
197871
|
}
|
|
197860
197872
|
return results;
|
|
197861
197873
|
};
|
|
197862
197874
|
}
|
|
197863
197875
|
});
|
|
197864
197876
|
|
|
197865
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197866
|
-
var
|
|
197867
|
-
__export(
|
|
197877
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/default.js
|
|
197878
|
+
var default_exports = {};
|
|
197879
|
+
__export(default_exports, {
|
|
197868
197880
|
compile: () => compile2,
|
|
197869
197881
|
format: () => format3
|
|
197870
197882
|
});
|
|
197871
197883
|
var format3, compile2;
|
|
197872
|
-
var
|
|
197873
|
-
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197884
|
+
var init_default = __esm({
|
|
197885
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/default.js"() {
|
|
197874
197886
|
"use strict";
|
|
197875
|
-
format3 = (msgs) =>
|
|
197876
|
-
const results = {};
|
|
197877
|
-
for (const [id, msg] of Object.entries(msgs)) {
|
|
197878
|
-
results[id] = {
|
|
197879
|
-
string: msg.defaultMessage,
|
|
197880
|
-
developer_comment: typeof msg.description === "string" ? msg.description : JSON.stringify(msg.description)
|
|
197881
|
-
};
|
|
197882
|
-
}
|
|
197883
|
-
return results;
|
|
197884
|
-
};
|
|
197887
|
+
format3 = (msgs) => msgs;
|
|
197885
197888
|
compile2 = (msgs) => {
|
|
197886
197889
|
const results = {};
|
|
197887
|
-
for (const
|
|
197888
|
-
results[
|
|
197890
|
+
for (const k in msgs) {
|
|
197891
|
+
results[k] = msgs[k].defaultMessage;
|
|
197889
197892
|
}
|
|
197890
197893
|
return results;
|
|
197891
197894
|
};
|
|
197892
197895
|
}
|
|
197893
197896
|
});
|
|
197894
197897
|
|
|
197895
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197896
|
-
var
|
|
197897
|
-
__export(
|
|
197898
|
-
compareMessages: () => compareMessages,
|
|
197898
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/lokalise.js
|
|
197899
|
+
var lokalise_exports = {};
|
|
197900
|
+
__export(lokalise_exports, {
|
|
197899
197901
|
compile: () => compile3,
|
|
197900
197902
|
format: () => format4
|
|
197901
197903
|
});
|
|
197902
|
-
var format4,
|
|
197903
|
-
var
|
|
197904
|
-
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197904
|
+
var format4, compile3;
|
|
197905
|
+
var init_lokalise = __esm({
|
|
197906
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/lokalise.js"() {
|
|
197905
197907
|
"use strict";
|
|
197906
197908
|
format4 = (msgs) => {
|
|
197907
|
-
const results = {
|
|
197908
|
-
smartling: {
|
|
197909
|
-
translate_paths: [
|
|
197910
|
-
{
|
|
197911
|
-
path: "*/message",
|
|
197912
|
-
key: "{*}/message",
|
|
197913
|
-
instruction: "*/description"
|
|
197914
|
-
}
|
|
197915
|
-
],
|
|
197916
|
-
variants_enabled: true,
|
|
197917
|
-
string_format: "icu"
|
|
197918
|
-
}
|
|
197919
|
-
};
|
|
197909
|
+
const results = {};
|
|
197920
197910
|
for (const [id, msg] of Object.entries(msgs)) {
|
|
197921
197911
|
results[id] = {
|
|
197922
|
-
|
|
197923
|
-
|
|
197912
|
+
translation: msg.defaultMessage,
|
|
197913
|
+
notes: typeof msg.description === "string" ? msg.description : JSON.stringify(msg.description)
|
|
197924
197914
|
};
|
|
197925
197915
|
}
|
|
197926
197916
|
return results;
|
|
197927
197917
|
};
|
|
197928
|
-
compareMessages = (el1, el2) => {
|
|
197929
|
-
if (el1.key === "smartling") {
|
|
197930
|
-
return -1;
|
|
197931
|
-
}
|
|
197932
|
-
if (el2.key === "smartling") {
|
|
197933
|
-
return 1;
|
|
197934
|
-
}
|
|
197935
|
-
return el1.key < el2.key ? -1 : el1.key === el2.key ? 0 : 1;
|
|
197936
|
-
};
|
|
197937
197918
|
compile3 = (msgs) => {
|
|
197938
197919
|
const results = {};
|
|
197939
197920
|
for (const [id, msg] of Object.entries(msgs)) {
|
|
197940
|
-
|
|
197941
|
-
continue;
|
|
197942
|
-
}
|
|
197943
|
-
results[id] = msg.message;
|
|
197921
|
+
results[id] = msg.translation;
|
|
197944
197922
|
}
|
|
197945
197923
|
return results;
|
|
197946
197924
|
};
|
|
@@ -197967,52 +197945,77 @@ var init_simple = __esm({
|
|
|
197967
197945
|
}
|
|
197968
197946
|
});
|
|
197969
197947
|
|
|
197970
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197971
|
-
var
|
|
197972
|
-
__export(
|
|
197948
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/smartling.js
|
|
197949
|
+
var smartling_exports = {};
|
|
197950
|
+
__export(smartling_exports, {
|
|
197951
|
+
compareMessages: () => compareMessages,
|
|
197973
197952
|
compile: () => compile5,
|
|
197974
197953
|
format: () => format6
|
|
197975
197954
|
});
|
|
197976
|
-
var format6, compile5;
|
|
197977
|
-
var
|
|
197978
|
-
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
197955
|
+
var format6, compareMessages, compile5;
|
|
197956
|
+
var init_smartling = __esm({
|
|
197957
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/smartling.js"() {
|
|
197979
197958
|
"use strict";
|
|
197980
197959
|
format6 = (msgs) => {
|
|
197981
|
-
const results = {
|
|
197960
|
+
const results = {
|
|
197961
|
+
smartling: {
|
|
197962
|
+
translate_paths: [
|
|
197963
|
+
{
|
|
197964
|
+
path: "*/message",
|
|
197965
|
+
key: "{*}/message",
|
|
197966
|
+
instruction: "*/description"
|
|
197967
|
+
}
|
|
197968
|
+
],
|
|
197969
|
+
variants_enabled: true,
|
|
197970
|
+
string_format: "icu"
|
|
197971
|
+
}
|
|
197972
|
+
};
|
|
197982
197973
|
for (const [id, msg] of Object.entries(msgs)) {
|
|
197983
197974
|
results[id] = {
|
|
197984
|
-
|
|
197985
|
-
|
|
197975
|
+
message: msg.defaultMessage,
|
|
197976
|
+
description: typeof msg.description === "string" ? msg.description : JSON.stringify(msg.description)
|
|
197986
197977
|
};
|
|
197987
197978
|
}
|
|
197988
197979
|
return results;
|
|
197989
197980
|
};
|
|
197981
|
+
compareMessages = (el1, el2) => {
|
|
197982
|
+
if (el1.key === "smartling") {
|
|
197983
|
+
return -1;
|
|
197984
|
+
}
|
|
197985
|
+
if (el2.key === "smartling") {
|
|
197986
|
+
return 1;
|
|
197987
|
+
}
|
|
197988
|
+
return el1.key < el2.key ? -1 : el1.key === el2.key ? 0 : 1;
|
|
197989
|
+
};
|
|
197990
197990
|
compile5 = (msgs) => {
|
|
197991
197991
|
const results = {};
|
|
197992
197992
|
for (const [id, msg] of Object.entries(msgs)) {
|
|
197993
|
-
|
|
197993
|
+
if (id === "smartling") {
|
|
197994
|
+
continue;
|
|
197995
|
+
}
|
|
197996
|
+
results[id] = msg.message;
|
|
197994
197997
|
}
|
|
197995
197998
|
return results;
|
|
197996
197999
|
};
|
|
197997
198000
|
}
|
|
197998
198001
|
});
|
|
197999
198002
|
|
|
198000
|
-
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
198001
|
-
var
|
|
198002
|
-
__export(
|
|
198003
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/transifex.js
|
|
198004
|
+
var transifex_exports = {};
|
|
198005
|
+
__export(transifex_exports, {
|
|
198003
198006
|
compile: () => compile6,
|
|
198004
198007
|
format: () => format7
|
|
198005
198008
|
});
|
|
198006
198009
|
var format7, compile6;
|
|
198007
|
-
var
|
|
198008
|
-
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/
|
|
198010
|
+
var init_transifex = __esm({
|
|
198011
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/transifex.js"() {
|
|
198009
198012
|
"use strict";
|
|
198010
198013
|
format7 = (msgs) => {
|
|
198011
198014
|
const results = {};
|
|
198012
198015
|
for (const [id, msg] of Object.entries(msgs)) {
|
|
198013
198016
|
results[id] = {
|
|
198014
|
-
|
|
198015
|
-
|
|
198017
|
+
string: msg.defaultMessage,
|
|
198018
|
+
developer_comment: typeof msg.description === "string" ? msg.description : JSON.stringify(msg.description)
|
|
198016
198019
|
};
|
|
198017
198020
|
}
|
|
198018
198021
|
return results;
|
|
@@ -198020,10 +198023,7 @@ var init_crowdin = __esm({
|
|
|
198020
198023
|
compile6 = (msgs) => {
|
|
198021
198024
|
const results = {};
|
|
198022
198025
|
for (const [id, msg] of Object.entries(msgs)) {
|
|
198023
|
-
|
|
198024
|
-
continue;
|
|
198025
|
-
}
|
|
198026
|
-
results[id] = msg.message;
|
|
198026
|
+
results[id] = msg.string;
|
|
198027
198027
|
}
|
|
198028
198028
|
return results;
|
|
198029
198029
|
};
|
|
@@ -198061,14 +198061,14 @@ var import_path, import_url;
|
|
|
198061
198061
|
var init_formatters = __esm({
|
|
198062
198062
|
"../../../../../../../../execroot/formatjs/bazel-out/darwin_arm64-fastbuild/bin/packages/cli-lib/lib_esnext/src/formatters/index.js"() {
|
|
198063
198063
|
"use strict";
|
|
198064
|
-
init_default();
|
|
198065
|
-
init_transifex();
|
|
198066
|
-
init_smartling();
|
|
198067
|
-
init_simple();
|
|
198068
|
-
init_lokalise();
|
|
198069
|
-
init_crowdin();
|
|
198070
198064
|
import_path = require("path");
|
|
198071
198065
|
import_url = require("url");
|
|
198066
|
+
init_crowdin();
|
|
198067
|
+
init_default();
|
|
198068
|
+
init_lokalise();
|
|
198069
|
+
init_simple();
|
|
198070
|
+
init_smartling();
|
|
198071
|
+
init_transifex();
|
|
198072
198072
|
}
|
|
198073
198073
|
});
|
|
198074
198074
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/cli",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.6",
|
|
4
4
|
"description": "A CLI for formatjs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"url": "https://github.com/formatjs/formatjs/issues"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@formatjs/cli-lib": "6.3.
|
|
36
|
+
"@formatjs/cli-lib": "6.3.5"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"vue": "^3.3.4"
|