@factorialco/fcode-cli 2.1.0 → 2.3.0

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 (60) hide show
  1. package/README.md +128 -2
  2. package/dist/commands/add.js +3 -1
  3. package/dist/commands/clone.d.ts +1 -0
  4. package/dist/commands/clone.js +19 -1
  5. package/dist/commands/i18n/add.d.ts +9 -0
  6. package/dist/commands/i18n/add.js +13 -0
  7. package/dist/commands/i18n/pull.d.ts +12 -0
  8. package/dist/commands/i18n/pull.js +14 -0
  9. package/dist/commands/i18n/push.d.ts +12 -0
  10. package/dist/commands/i18n/push.js +14 -0
  11. package/dist/commands/i18n/remove.d.ts +9 -0
  12. package/dist/commands/i18n/remove.js +19 -0
  13. package/dist/commands/i18n/reset.d.ts +9 -0
  14. package/dist/commands/i18n/reset.js +13 -0
  15. package/dist/commands/i18n/status.d.ts +11 -0
  16. package/dist/commands/i18n/status.js +42 -0
  17. package/dist/commands/pull.js +5 -3
  18. package/dist/commands/push.js +5 -3
  19. package/dist/commands/reset.js +3 -1
  20. package/dist/commands/run.d.ts +1 -0
  21. package/dist/commands/run.js +5 -2
  22. package/dist/commands/status.js +4 -2
  23. package/dist/commands/team/push.js +3 -0
  24. package/dist/config/remote.js +1 -1
  25. package/dist/config/workspace.js +10 -0
  26. package/dist/core/commands/api-client-command.d.ts +1 -0
  27. package/dist/core/commands/api-client-command.js +5 -0
  28. package/dist/core/commands/base-command.d.ts +2 -0
  29. package/dist/core/commands/base-command.js +31 -0
  30. package/dist/core/commands/i18n-command.d.ts +5 -0
  31. package/dist/core/commands/i18n-command.js +16 -0
  32. package/dist/core/errors.d.ts +10 -0
  33. package/dist/core/errors.js +34 -1
  34. package/dist/core/executors/execution-task.js +4 -0
  35. package/dist/core/executors/javascript-execution-task.js +26 -1
  36. package/dist/core/resource-pusher.js +15 -0
  37. package/dist/core/types.d.ts +29 -1
  38. package/dist/core/types.js +46 -3
  39. package/dist/repositories/locale.d.ts +24 -0
  40. package/dist/repositories/locale.js +102 -0
  41. package/dist/repositories/resource.js +4 -1
  42. package/dist/repositories/team.js +5 -2
  43. package/dist/runtime/libs/python/fcode/__init__.py +1 -0
  44. package/dist/runtime/libs/python/fcode/context.py +43 -1
  45. package/dist/services/auth-service.d.ts +1 -0
  46. package/dist/services/auth-service.js +12 -0
  47. package/dist/services/fcode-graphql-client.d.ts +13 -1
  48. package/dist/services/fcode-graphql-client.js +136 -0
  49. package/dist/services/locale-merger.d.ts +23 -0
  50. package/dist/services/locale-merger.js +114 -0
  51. package/dist/services/locale-resolver.d.ts +18 -0
  52. package/dist/services/locale-resolver.js +120 -0
  53. package/dist/services/process-runner.d.ts +1 -0
  54. package/dist/services/process-runner.js +2 -2
  55. package/dist/services/team-access.d.ts +13 -0
  56. package/dist/services/team-access.js +45 -0
  57. package/dist/utils/gitignore.d.ts +1 -1
  58. package/dist/utils/gitignore.js +4 -1
  59. package/oclif.manifest.json +194 -1
  60. package/package.json +2 -1
@@ -506,6 +506,13 @@
506
506
  "allowNo": false,
507
507
  "type": "boolean"
508
508
  },
509
+ "locale": {
510
+ "description": "Locale fcode.i18n resolves against (defaults to the workspace primaryLocale)",
511
+ "name": "locale",
512
+ "hasDynamicHelp": false,
513
+ "multiple": false,
514
+ "type": "option"
515
+ },
509
516
  "variablesFile": {
510
517
  "char": "e",
511
518
  "description": "Path to a .env file whose variables override workspace variables",
@@ -876,6 +883,192 @@
876
883
  "status.js"
877
884
  ]
878
885
  },
886
+ "i18n:add": {
887
+ "aliases": [],
888
+ "args": {
889
+ "resourceSlug": {
890
+ "description": "Resource slug",
891
+ "name": "resourceSlug"
892
+ }
893
+ },
894
+ "description": "Keeps track of new local locales",
895
+ "examples": [
896
+ "$ fcode i18n:add",
897
+ "$ fcode i18n:add pt-BR"
898
+ ],
899
+ "flags": {},
900
+ "hasDynamicHelp": false,
901
+ "hiddenAliases": [],
902
+ "id": "i18n:add",
903
+ "pluginAlias": "@factorialco/fcode-cli",
904
+ "pluginName": "@factorialco/fcode-cli",
905
+ "pluginType": "core",
906
+ "strict": true,
907
+ "isESM": false,
908
+ "relativePath": [
909
+ "dist",
910
+ "commands",
911
+ "i18n",
912
+ "add.js"
913
+ ]
914
+ },
915
+ "i18n:pull": {
916
+ "aliases": [],
917
+ "args": {
918
+ "resourceSlug": {
919
+ "description": "Resource slug",
920
+ "name": "resourceSlug"
921
+ }
922
+ },
923
+ "description": "Fetch all locales from cloud and save them locally",
924
+ "examples": [
925
+ "$ fcode i18n:pull"
926
+ ],
927
+ "flags": {
928
+ "force": {
929
+ "char": "f",
930
+ "description": "Force command",
931
+ "name": "force",
932
+ "allowNo": false,
933
+ "type": "boolean"
934
+ }
935
+ },
936
+ "hasDynamicHelp": false,
937
+ "hiddenAliases": [],
938
+ "id": "i18n:pull",
939
+ "pluginAlias": "@factorialco/fcode-cli",
940
+ "pluginName": "@factorialco/fcode-cli",
941
+ "pluginType": "core",
942
+ "strict": true,
943
+ "isESM": false,
944
+ "relativePath": [
945
+ "dist",
946
+ "commands",
947
+ "i18n",
948
+ "pull.js"
949
+ ]
950
+ },
951
+ "i18n:push": {
952
+ "aliases": [],
953
+ "args": {
954
+ "resourceSlug": {
955
+ "description": "Resource slug",
956
+ "name": "resourceSlug"
957
+ }
958
+ },
959
+ "description": "Create or update cloud locales from local ones",
960
+ "examples": [
961
+ "$ fcode i18n:push",
962
+ "$ fcode i18n:push pt-BR"
963
+ ],
964
+ "flags": {
965
+ "force": {
966
+ "char": "f",
967
+ "description": "Force command",
968
+ "name": "force",
969
+ "allowNo": false,
970
+ "type": "boolean"
971
+ }
972
+ },
973
+ "hasDynamicHelp": false,
974
+ "hiddenAliases": [],
975
+ "id": "i18n:push",
976
+ "pluginAlias": "@factorialco/fcode-cli",
977
+ "pluginName": "@factorialco/fcode-cli",
978
+ "pluginType": "core",
979
+ "strict": true,
980
+ "isESM": false,
981
+ "relativePath": [
982
+ "dist",
983
+ "commands",
984
+ "i18n",
985
+ "push.js"
986
+ ]
987
+ },
988
+ "i18n:remove": {
989
+ "aliases": [],
990
+ "args": {
991
+ "resourceSlug": {
992
+ "description": "Resource slug",
993
+ "name": "resourceSlug"
994
+ }
995
+ },
996
+ "description": "Remove track of a local locale",
997
+ "examples": [
998
+ "$ fcode i18n:remove pt-BR"
999
+ ],
1000
+ "flags": {},
1001
+ "hasDynamicHelp": false,
1002
+ "hiddenAliases": [],
1003
+ "id": "i18n:remove",
1004
+ "pluginAlias": "@factorialco/fcode-cli",
1005
+ "pluginName": "@factorialco/fcode-cli",
1006
+ "pluginType": "core",
1007
+ "strict": true,
1008
+ "isESM": false,
1009
+ "relativePath": [
1010
+ "dist",
1011
+ "commands",
1012
+ "i18n",
1013
+ "remove.js"
1014
+ ]
1015
+ },
1016
+ "i18n:reset": {
1017
+ "aliases": [],
1018
+ "args": {
1019
+ "resourceSlug": {
1020
+ "description": "Resource slug",
1021
+ "name": "resourceSlug"
1022
+ }
1023
+ },
1024
+ "description": "Reset locales with contents from current remote",
1025
+ "examples": [
1026
+ "$ fcode i18n:reset"
1027
+ ],
1028
+ "flags": {},
1029
+ "hasDynamicHelp": false,
1030
+ "hiddenAliases": [],
1031
+ "id": "i18n:reset",
1032
+ "pluginAlias": "@factorialco/fcode-cli",
1033
+ "pluginName": "@factorialco/fcode-cli",
1034
+ "pluginType": "core",
1035
+ "strict": true,
1036
+ "isESM": false,
1037
+ "relativePath": [
1038
+ "dist",
1039
+ "commands",
1040
+ "i18n",
1041
+ "reset.js"
1042
+ ]
1043
+ },
1044
+ "i18n:status": {
1045
+ "aliases": [],
1046
+ "args": {
1047
+ "resourceSlug": {
1048
+ "description": "Resource slug",
1049
+ "name": "resourceSlug"
1050
+ }
1051
+ },
1052
+ "description": "List all locales status",
1053
+ "examples": [
1054
+ "$ fcode i18n:status"
1055
+ ],
1056
+ "flags": {},
1057
+ "hasDynamicHelp": false,
1058
+ "hiddenAliases": [],
1059
+ "id": "i18n:status",
1060
+ "pluginAlias": "@factorialco/fcode-cli",
1061
+ "pluginName": "@factorialco/fcode-cli",
1062
+ "pluginType": "core",
1063
+ "strict": true,
1064
+ "isESM": false,
1065
+ "relativePath": [
1066
+ "dist",
1067
+ "commands",
1068
+ "i18n",
1069
+ "status.js"
1070
+ ]
1071
+ },
879
1072
  "modules:add": {
880
1073
  "aliases": [],
881
1074
  "args": {
@@ -1970,5 +2163,5 @@
1970
2163
  ]
1971
2164
  }
1972
2165
  },
1973
- "version": "2.1.0"
2166
+ "version": "2.3.0"
1974
2167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/fcode-cli",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "packageManager": "pnpm@11.7.0",
5
5
  "description": "Factorial Code Command Line Interface",
6
6
  "homepage": "https://code.factorialhr.com/docs/cli/",
@@ -41,6 +41,7 @@
41
41
  "openid-client": "^5.6.5",
42
42
  "string-width": "^4.2.3",
43
43
  "strip-comments": "^2.0.1",
44
+ "yaml": "^2.8.1",
44
45
  "zod": "^4.4.3"
45
46
  },
46
47
  "peerDependencies": {