@cyberskill/shared 1.50.0 → 1.52.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.
- package/dist/_tsup-dts-rollup.d.cts +100 -129
- package/dist/_tsup-dts-rollup.d.ts +100 -129
- package/dist/cli.cjs +1 -2146
- package/dist/cli.d.cts +1 -2
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +1 -2066
- package/dist/configs/commitlint/base.cjs +1 -64
- package/dist/configs/commitlint/base.js +1 -7
- package/dist/configs/eslint/base.cjs +1 -121
- package/dist/configs/eslint/base.js +1 -52
- package/dist/configs/eslint/nestjs.cjs +1 -155
- package/dist/configs/eslint/nestjs.js +1 -85
- package/dist/configs/eslint/nextjs.cjs +1 -155
- package/dist/configs/eslint/nextjs.js +1 -85
- package/dist/configs/eslint/nodejs.cjs +1 -156
- package/dist/configs/eslint/nodejs.js +1 -86
- package/dist/configs/eslint/vite-react.cjs +1 -159
- package/dist/configs/eslint/vite-react.js +1 -89
- package/dist/configs/graphql/graphql-codegen.cjs +1 -125
- package/dist/configs/graphql/graphql-codegen.js +1 -64
- package/dist/configs/graphql/index.cjs +1 -126
- package/dist/configs/graphql/index.js +1 -64
- package/dist/configs/i18n/react/i18next.cjs +1 -80
- package/dist/configs/i18n/react/i18next.js +1 -7
- package/dist/configs/i18n/react/index.cjs +1 -81
- package/dist/configs/i18n/react/index.js +1 -7
- package/dist/configs/index.cjs +1 -232
- package/dist/configs/index.js +1 -166
- package/dist/configs/lint-staged/base.cjs +1 -64
- package/dist/configs/lint-staged/base.js +1 -7
- package/dist/configs/vitest/react/e2e.cjs +1 -128
- package/dist/configs/vitest/react/e2e.js +1 -59
- package/dist/configs/vitest/react/unit.cjs +1 -305
- package/dist/configs/vitest/react/unit.js +1 -228
- package/dist/configs/vitest/react/unit.setup.cjs +1 -60
- package/dist/configs/vitest/react/unit.setup.js +1 -8
- package/dist/constants/index.cjs +1 -677
- package/dist/constants/index.d.cts +8 -3
- package/dist/constants/index.d.ts +8 -3
- package/dist/constants/index.js +1 -468
- package/dist/constants/path.cjs +1 -422
- package/dist/constants/path.d.cts +8 -3
- package/dist/constants/path.d.ts +8 -3
- package/dist/constants/path.js +1 -217
- package/dist/constants/response-status.cjs +1 -313
- package/dist/constants/response-status.js +1 -252
- package/dist/index.cjs +1 -4559
- package/dist/index.d.cts +13 -8
- package/dist/index.d.ts +13 -8
- package/dist/index.js +1 -4142
- package/dist/nodejs/index.cjs +1 -2138
- package/dist/nodejs/index.js +1 -2054
- package/dist/nodejs/mongo.cjs +1 -2137
- package/dist/nodejs/mongo.js +1 -2054
- package/dist/react/apollo-client.cjs +1 -177
- package/dist/react/apollo-client.js +1 -116
- package/dist/react/index.cjs +1 -990
- package/dist/react/index.js +1 -876
- package/dist/react/loading.cjs +1 -301
- package/dist/react/loading.js +1 -216
- package/dist/react/next-intl.cjs +1 -744
- package/dist/react/next-intl.js +1 -655
- package/dist/react/storage.cjs +1 -631
- package/dist/react/storage.js +1 -558
- package/dist/typescript/api-response.cjs +1 -48
- package/dist/typescript/apollo.cjs +1 -48
- package/dist/typescript/command.cjs +1 -68
- package/dist/typescript/command.d.cts +3 -0
- package/dist/typescript/command.d.ts +3 -0
- package/dist/typescript/command.js +1 -7
- package/dist/typescript/config.cjs +1 -48
- package/dist/typescript/fs.cjs +1 -48
- package/dist/typescript/graphql-codegen.cjs +1 -48
- package/dist/typescript/index.cjs +1 -175
- package/dist/typescript/index.d.cts +3 -0
- package/dist/typescript/index.d.ts +3 -0
- package/dist/typescript/index.js +1 -151
- package/dist/typescript/loading.cjs +1 -48
- package/dist/typescript/log.cjs +1 -48
- package/dist/typescript/mongo.cjs +1 -164
- package/dist/typescript/mongo.js +1 -145
- package/dist/typescript/next-intl.cjs +1 -48
- package/dist/typescript/react.cjs +1 -48
- package/dist/typescript/serializer.cjs +1 -48
- package/dist/typescript/string.cjs +1 -48
- package/dist/utils/command.cjs +1 -1387
- package/dist/utils/command.d.cts +2 -2
- package/dist/utils/command.d.ts +2 -2
- package/dist/utils/command.js +1 -1287
- package/dist/utils/common.cjs +1 -300
- package/dist/utils/common.js +1 -219
- package/dist/utils/config.cjs +1 -146
- package/dist/utils/config.js +1 -89
- package/dist/utils/fs.cjs +1 -132
- package/dist/utils/fs.js +1 -47
- package/dist/utils/index-nodejs.cjs +1 -1752
- package/dist/utils/index-nodejs.d.cts +2 -5
- package/dist/utils/index-nodejs.d.ts +2 -5
- package/dist/utils/index-nodejs.js +1 -1581
- package/dist/utils/index.cjs +1 -727
- package/dist/utils/index.js +1 -625
- package/dist/utils/log.cjs +1 -330
- package/dist/utils/log.js +1 -269
- package/dist/utils/package.cjs +1 -941
- package/dist/utils/package.js +1 -857
- package/dist/utils/path.cjs +1 -291
- package/dist/utils/path.d.cts +0 -3
- package/dist/utils/path.d.ts +0 -3
- package/dist/utils/path.js +1 -191
- package/dist/utils/serializer.cjs +1 -91
- package/dist/utils/serializer.js +1 -30
- package/dist/utils/storage-client.cjs +1 -349
- package/dist/utils/storage-client.js +1 -276
- package/dist/utils/storage-server.cjs +1 -636
- package/dist/utils/storage-server.js +1 -550
- package/dist/utils/string.cjs +1 -152
- package/dist/utils/string.js +1 -75
- package/dist/utils/validate.cjs +1 -90
- package/dist/utils/validate.js +1 -33
- package/package.json +15 -13
- /package/{src/public → public}/favicon/android-icon-144x144.png +0 -0
- /package/{src/public → public}/favicon/android-icon-192x192.png +0 -0
- /package/{src/public → public}/favicon/android-icon-36x36.png +0 -0
- /package/{src/public → public}/favicon/android-icon-48x48.png +0 -0
- /package/{src/public → public}/favicon/android-icon-72x72.png +0 -0
- /package/{src/public → public}/favicon/android-icon-96x96.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-114x114.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-120x120.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-144x144.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-152x152.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-180x180.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-57x57.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-60x60.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-72x72.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-76x76.png +0 -0
- /package/{src/public → public}/favicon/apple-icon-precomposed.png +0 -0
- /package/{src/public → public}/favicon/apple-icon.png +0 -0
- /package/{src/public → public}/favicon/browserconfig.xml +0 -0
- /package/{src/public → public}/favicon/favicon-16x16.png +0 -0
- /package/{src/public → public}/favicon/favicon-32x32.png +0 -0
- /package/{src/public → public}/favicon/favicon-96x96.png +0 -0
- /package/{src/public → public}/favicon/favicon.ico +0 -0
- /package/{src/public → public}/favicon/manifest.json +0 -0
- /package/{src/public → public}/favicon/ms-icon-144x144.png +0 -0
- /package/{src/public → public}/favicon/ms-icon-150x150.png +0 -0
- /package/{src/public → public}/favicon/ms-icon-310x310.png +0 -0
- /package/{src/public → public}/favicon/ms-icon-70x70.png +0 -0
|
@@ -1,125 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
function _type_of(obj) {
|
|
31
|
-
"@swc/helpers - typeof";
|
|
32
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
33
|
-
}
|
|
34
|
-
var __defProp = Object.defineProperty;
|
|
35
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
36
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
37
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
38
|
-
var __export = function(target, all) {
|
|
39
|
-
for(var name in all)__defProp(target, name, {
|
|
40
|
-
get: all[name],
|
|
41
|
-
enumerable: true
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __copyProps = function(to, from, except, desc) {
|
|
45
|
-
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
46
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
47
|
-
try {
|
|
48
|
-
var _loop = function() {
|
|
49
|
-
var key = _step.value;
|
|
50
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
51
|
-
get: function() {
|
|
52
|
-
return from[key];
|
|
53
|
-
},
|
|
54
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
58
|
-
} catch (err) {
|
|
59
|
-
_didIteratorError = true;
|
|
60
|
-
_iteratorError = err;
|
|
61
|
-
} finally{
|
|
62
|
-
try {
|
|
63
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
64
|
-
_iterator.return();
|
|
65
|
-
}
|
|
66
|
-
} finally{
|
|
67
|
-
if (_didIteratorError) {
|
|
68
|
-
throw _iteratorError;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return to;
|
|
74
|
-
};
|
|
75
|
-
var __toCommonJS = function(mod) {
|
|
76
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
77
|
-
value: true
|
|
78
|
-
}), mod);
|
|
79
|
-
};
|
|
80
|
-
// src/configs/graphql/graphql-codegen.ts
|
|
81
|
-
var graphql_codegen_exports = {};
|
|
82
|
-
__export(graphql_codegen_exports, {
|
|
83
|
-
createGraphqlCodegenConfig: function() {
|
|
84
|
-
return createGraphqlCodegenConfig;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
module.exports = __toCommonJS(graphql_codegen_exports);
|
|
88
|
-
function createGraphqlCodegenConfig(param) {
|
|
89
|
-
var uri = param.uri, from = param.from, to = param.to, withComponent = param.withComponent, withHOC = param.withHOC, withHooks = param.withHooks, withMutationFn = param.withMutationFn, withRefetchFn = param.withRefetchFn;
|
|
90
|
-
var configOptions = _object_spread({}, withComponent && {
|
|
91
|
-
withComponent: withComponent
|
|
92
|
-
}, withHOC && {
|
|
93
|
-
withHOC: withHOC
|
|
94
|
-
}, withHooks && {
|
|
95
|
-
withHooks: withHooks
|
|
96
|
-
}, withMutationFn && {
|
|
97
|
-
withMutationFn: withMutationFn
|
|
98
|
-
}, withRefetchFn && {
|
|
99
|
-
withRefetchFn: withRefetchFn
|
|
100
|
-
});
|
|
101
|
-
return {
|
|
102
|
-
schema: uri,
|
|
103
|
-
documents: [
|
|
104
|
-
from
|
|
105
|
-
],
|
|
106
|
-
generates: _define_property({}, to, _object_spread({
|
|
107
|
-
plugins: [
|
|
108
|
-
"typescript",
|
|
109
|
-
"typescript-operations",
|
|
110
|
-
"typescript-react-apollo"
|
|
111
|
-
]
|
|
112
|
-
}, Object.keys(configOptions).length > 0 && {
|
|
113
|
-
config: configOptions
|
|
114
|
-
})),
|
|
115
|
-
hooks: {
|
|
116
|
-
afterAllFileWrite: [
|
|
117
|
-
"pnpm exec cyberskill lint:fix"
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
123
|
-
0 && (module.exports = {
|
|
124
|
-
createGraphqlCodegenConfig: createGraphqlCodegenConfig
|
|
125
|
-
});
|
|
1
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(t){if(Array.isArray(t))return e(t)}function r(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var o=true;var c=false;var a,i;try{for(n=n.call(e);!(o=(a=n.next()).done);o=true){r.push(a.value);if(t&&r.length===t)break}}catch(e){c=true;i=e}finally{try{if(!o&&n["return"]!=null)n["return"]()}finally{if(c)throw i}}return r}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var o=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}o.forEach(function(t){r(e,t,n[t])})}return e}function l(e,n){return t(e)||c(e,n)||p(e,n)||a()}function s(e){return n(e)||o(e)||p(e)||i()}function f(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function p(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}var d=Object.create;var I=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var _=function(e,t){for(var n in t)I(e,n,{get:t[n],enumerable:!0})},v=function(e,t,n,r){var o=true,c=false,a=undefined;if(t&&(typeof t==="undefined"?"undefined":f(t))=="object"||typeof t=="function")try{var i=function(){var o=l.value;!E.call(e,o)&&o!==n&&I(e,o,{get:function(){return t[o]},enumerable:!(r=m(t,o))||r.enumerable})};for(var u=y(t)[Symbol.iterator](),l;!(o=(l=u.next()).done);o=true)i()}catch(e){c=true;a=e}finally{try{if(!o&&u.return!=null){u.return()}}finally{if(c){throw a}}}return e};var T=function(e,t,n){return n=e!=null?d(O(e)):{},v(t||!e||!e.__esModule?I(n,"default",{value:e,enumerable:!0}):n,e)},g=function(e){return v(I({},"__esModule",{value:!0}),e)};var C={};_(C,{createGraphqlCodegenConfig:function(){return eL}});module.exports=g(C);var S=T(require("process"),1);var b=T(require("boxen"),1),h=T(require("chalk"),1),A=require("child_process"),N=T(require("process"),1),L=T(require("util"),1);var w=T(require("node-fetch"),1);var G=T(require("fs"),1);var M=T(require("path"),1);function j(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=M).resolve.apply(r,[J].concat(s(t)))}function R(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=M).join.apply(r,s(t))}var P=T(require("node-persist"),1),D=T(require("os"),1),x=T(require("process"),1);var K=24*60*60*1e3;var F=N.default.env.DEBUG==="true",k=L.promisify(A.exec),q=h.default,Y=q.gray,H=q.blue;function B(e){return{raw:!0,cmd:e}}function U(e,t){return(t===null||t===void 0?void 0:t.isRemote)?"".concat(e_," ").concat(X," ").concat(e):(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(e_," ").concat(ey," src/cli.ts ").concat(e):"".concat(e_," ").concat(ea," ").concat(e)}function W(e,t){return typeof e=="function"?U(e(t),t):(typeof e==="undefined"?"undefined":f(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?U(e,t):e}var J=S.default.env.INIT_CWD||S.default.cwd(),X="@cyberskill/shared";var $="node_modules",z="dist",Q="package.json",V="package-lock.json",Z="tsconfig.json",ee=".gitignore",et=".simple-git-hooks.json",en="pnpm-lock.yaml",er=".git/hooks/",eo=".git/COMMIT_EDITMSG",ec=R(J,$,X,z),ea="cyberskill",ei="eslint",eu="vitest",el="vitest",es="@commitlint/cli",ef="commitlint",ep="lint-staged",ed="lint-staged",eI="tsc",em="tsc",ey="tsx",eO="git",eE="pnpm",e_="pnpm exec",ev="simple-git-hooks",eT="simple-git-hooks",eg="@eslint/config-inspector",eC="eslint-config-inspector",eS="node-modules-inspector",eb="node-modules-inspector",eh={CYBERSKILL_DIRECTORY:ec,WORKING_DIRECTORY:J,TS_CONFIG:j(Z),GIT_IGNORE:j(ee),GIT_HOOK:j(er),GIT_COMMIT_MSG:j(eo),SIMPLE_GIT_HOOKS_JSON:j(et),PACKAGE_JSON:j(Q),PACKAGE_LOCK_JSON:j(V),PNPM_LOCK_YAML:j(en),NODE_MODULES:j($),CYBERSKILL:{LINT_STAGED_CONFIG:j("".concat(ec,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:j("".concat(ec,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:j("".concat(ec,"/configs/vitest/react/unit.js")),E2E_TEST_CONFIG:j("".concat(ec,"/configs/vitest/react/e2e.js"))}};function eA(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}var o=l(n,2),c=o[0],a=o[1];switch(e){case"pnpmAddAndExec":return W(B("".concat(eE," add -D ").concat(c," && ").concat(e_," ").concat(a)));case"pnpmExec":return W(B("".concat(e_," ").concat(c," ").concat(a||"").trim()));case"raw":return W(B(c))}}var eN={SIMPLE_GIT_HOOKS:eA("pnpmAddAndExec",ev,eT),ESLINT_INSPECT:eA("pnpmAddAndExec",eg,eC),NODE_MODULES_INSPECT:eA("pnpmAddAndExec",eS,eb),ESLINT_CHECK:eA("pnpmExec",ei,eh.WORKING_DIRECTORY),ESLINT_FIX:eA("pnpmExec",ei,"".concat(eh.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:eA("pnpmAddAndExec",eI,"".concat(em," -p ").concat(eh.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:eA("raw","".concat(eO," config core.hooksPath ").concat(eh.GIT_HOOK)),BUILD:eA("raw","".concat(eE," run build")),STAGE_BUILD_DIRECTORY:eA("raw","".concat(eO," add ").concat(z)),PNPM_INSTALL_STANDARD:eA("raw","".concat(eE," install")),PNPM_INSTALL_LEGACY:eA("raw","".concat(eE," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:eA("raw","".concat(eE," install --force")),CYBERSKILL:{TEST_UNIT:eA("pnpmAddAndExec",eu,"".concat(el," --config ").concat(eh.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:eA("pnpmAddAndExec",eu,"".concat(el," --config ").concat(eh.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:eA("pnpmAddAndExec",es,"".concat(ef," --edit ").concat(eh.GIT_COMMIT_MSG," --config ").concat(eh.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:eA("pnpmAddAndExec",ep,"".concat(ed," --config ").concat(eh.CYBERSKILL.LINT_STAGED_CONFIG))}};function eL(e){var t=e.uri,n=e.from,o=e.to,c=e.withComponent,a=e.withHOC,i=e.withHooks,l=e.withMutationFn,s=e.withRefetchFn;var f=u({},c&&{withComponent:c},a&&{withHOC:a},i&&{withHooks:i},l&&{withMutationFn:l},s&&{withRefetchFn:s});return{schema:t,documents:[n],generates:r({},o,u({plugins:["typescript","typescript-operations","typescript-react-apollo"]},Object.keys(f).length>0&&{config:f})),hooks:{afterAllFileWrite:[eN.ESLINT_FIX]}}}0&&(module.exports={createGraphqlCodegenConfig:createGraphqlCodegenConfig});
|
|
@@ -1,64 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
function createGraphqlCodegenConfig(param) {
|
|
31
|
-
var uri = param.uri, from = param.from, to = param.to, withComponent = param.withComponent, withHOC = param.withHOC, withHooks = param.withHooks, withMutationFn = param.withMutationFn, withRefetchFn = param.withRefetchFn;
|
|
32
|
-
var configOptions = _object_spread({}, withComponent && {
|
|
33
|
-
withComponent: withComponent
|
|
34
|
-
}, withHOC && {
|
|
35
|
-
withHOC: withHOC
|
|
36
|
-
}, withHooks && {
|
|
37
|
-
withHooks: withHooks
|
|
38
|
-
}, withMutationFn && {
|
|
39
|
-
withMutationFn: withMutationFn
|
|
40
|
-
}, withRefetchFn && {
|
|
41
|
-
withRefetchFn: withRefetchFn
|
|
42
|
-
});
|
|
43
|
-
return {
|
|
44
|
-
schema: uri,
|
|
45
|
-
documents: [
|
|
46
|
-
from
|
|
47
|
-
],
|
|
48
|
-
generates: _define_property({}, to, _object_spread({
|
|
49
|
-
plugins: [
|
|
50
|
-
"typescript",
|
|
51
|
-
"typescript-operations",
|
|
52
|
-
"typescript-react-apollo"
|
|
53
|
-
]
|
|
54
|
-
}, Object.keys(configOptions).length > 0 && {
|
|
55
|
-
config: configOptions
|
|
56
|
-
})),
|
|
57
|
-
hooks: {
|
|
58
|
-
afterAllFileWrite: [
|
|
59
|
-
"pnpm exec cyberskill lint:fix"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export { createGraphqlCodegenConfig };
|
|
1
|
+
function t(t,n){if(n==null||n>t.length)n=t.length;for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function n(t){if(Array.isArray(t))return t}function e(n){if(Array.isArray(n))return t(n)}function o(t,n,e){if(n in t){Object.defineProperty(t,n,{value:e,enumerable:true,configurable:true,writable:true})}else{t[n]=e}return t}function r(t){if(typeof Symbol!=="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function c(t,n){var e=t==null?null:typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(e==null)return;var o=[];var r=true;var c=false;var i,a;try{for(e=e.call(t);!(r=(i=e.next()).done);r=true){o.push(i.value);if(n&&o.length===n)break}}catch(t){c=true;a=t}finally{try{if(!r&&e["return"]!=null)e["return"]()}finally{if(c)throw a}}return o}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};var r=Object.keys(e);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.forEach(function(n){o(t,n,e[n])})}return t}function s(t,e){return n(t)||c(t,e)||p(t,e)||i()}function u(t){return e(t)||r(t)||p(t)||a()}function f(t){"@swc/helpers - typeof";return t&&typeof Symbol!=="undefined"&&t.constructor===Symbol?"symbol":typeof t}function p(n,e){if(!n)return;if(typeof n==="string")return t(n,e);var o=Object.prototype.toString.call(n).slice(8,-1);if(o==="Object"&&n.constructor)o=n.constructor.name;if(o==="Map"||o==="Set")return Array.from(o);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return t(n,e)}import d from"node:process";import m from"boxen";import I from"chalk";import{exec as E}from"node:child_process";import _ from"node:process";import*as T from"node:util";import O from"node-fetch";import*as y from"node:path";function S(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++){n[e]=arguments[e]}var o;return(o=y).resolve.apply(o,[R].concat(u(n)))}function C(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++){n[e]=arguments[e]}var o;return(o=y).join.apply(o,u(n))}import g from"node-persist";var h=24*60*60*1e3;var A=_.env.DEBUG==="true",N=T.promisify(E),v=I.gray,b=I.blue;function L(t){return{raw:!0,cmd:t}}function w(t,n){return(n===null||n===void 0?void 0:n.isRemote)?"".concat(tr," ").concat(M," ").concat(t):(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(tr," ").concat(tn," src/cli.ts ").concat(t):"".concat(tr," ").concat(W," ").concat(t)}function G(t,n){return typeof t=="function"?w(t(n),n):(typeof t==="undefined"?"undefined":f(t))=="object"&&(t===null||t===void 0?void 0:t.raw)===!0?t.cmd:typeof t=="string"?w(t,n):t}var R=d.env.INIT_CWD||d.cwd(),M="@cyberskill/shared";var P="node_modules",j="dist",D="package.json",K="package-lock.json",x="tsconfig.json",F=".gitignore",k=".simple-git-hooks.json",Y="pnpm-lock.yaml",H=".git/hooks/",B=".git/COMMIT_EDITMSG",U=C(R,P,M,j),W="cyberskill",J="eslint",X="vitest",q="vitest",$="@commitlint/cli",z="commitlint",Q="lint-staged",V="lint-staged",Z="tsc",tt="tsc",tn="tsx",te="git",to="pnpm",tr="pnpm exec",tc="simple-git-hooks",ti="simple-git-hooks",ta="@eslint/config-inspector",tl="eslint-config-inspector",ts="node-modules-inspector",tu="node-modules-inspector",tf={CYBERSKILL_DIRECTORY:U,WORKING_DIRECTORY:R,TS_CONFIG:S(x),GIT_IGNORE:S(F),GIT_HOOK:S(H),GIT_COMMIT_MSG:S(B),SIMPLE_GIT_HOOKS_JSON:S(k),PACKAGE_JSON:S(D),PACKAGE_LOCK_JSON:S(K),PNPM_LOCK_YAML:S(Y),NODE_MODULES:S(P),CYBERSKILL:{LINT_STAGED_CONFIG:S("".concat(U,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:S("".concat(U,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:S("".concat(U,"/configs/vitest/react/unit.js")),E2E_TEST_CONFIG:S("".concat(U,"/configs/vitest/react/e2e.js"))}};function tp(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o<n;o++){e[o-1]=arguments[o]}var r=s(e,2),c=r[0],i=r[1];switch(t){case"pnpmAddAndExec":return G(L("".concat(to," add -D ").concat(c," && ").concat(tr," ").concat(i)));case"pnpmExec":return G(L("".concat(tr," ").concat(c," ").concat(i||"").trim()));case"raw":return G(L(c))}}var td={SIMPLE_GIT_HOOKS:tp("pnpmAddAndExec",tc,ti),ESLINT_INSPECT:tp("pnpmAddAndExec",ta,tl),NODE_MODULES_INSPECT:tp("pnpmAddAndExec",ts,tu),ESLINT_CHECK:tp("pnpmExec",J,tf.WORKING_DIRECTORY),ESLINT_FIX:tp("pnpmExec",J,"".concat(tf.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:tp("pnpmAddAndExec",Z,"".concat(tt," -p ").concat(tf.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:tp("raw","".concat(te," config core.hooksPath ").concat(tf.GIT_HOOK)),BUILD:tp("raw","".concat(to," run build")),STAGE_BUILD_DIRECTORY:tp("raw","".concat(te," add ").concat(j)),PNPM_INSTALL_STANDARD:tp("raw","".concat(to," install")),PNPM_INSTALL_LEGACY:tp("raw","".concat(to," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:tp("raw","".concat(to," install --force")),CYBERSKILL:{TEST_UNIT:tp("pnpmAddAndExec",X,"".concat(q," --config ").concat(tf.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:tp("pnpmAddAndExec",X,"".concat(q," --config ").concat(tf.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:tp("pnpmAddAndExec",$,"".concat(z," --edit ").concat(tf.GIT_COMMIT_MSG," --config ").concat(tf.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:tp("pnpmAddAndExec",Q,"".concat(V," --config ").concat(tf.CYBERSKILL.LINT_STAGED_CONFIG))}};function tm(t){var n=t.uri,e=t.from,r=t.to,c=t.withComponent,i=t.withHOC,a=t.withHooks,s=t.withMutationFn,u=t.withRefetchFn;var f=l({},c&&{withComponent:c},i&&{withHOC:i},a&&{withHooks:a},s&&{withMutationFn:s},u&&{withRefetchFn:u});return{schema:n,documents:[e],generates:o({},r,l({plugins:["typescript","typescript-operations","typescript-react-apollo"]},Object.keys(f).length>0&&{config:f})),hooks:{afterAllFileWrite:[td.ESLINT_FIX]}}}export{tm as createGraphqlCodegenConfig};
|
|
@@ -1,126 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
function _type_of(obj) {
|
|
31
|
-
"@swc/helpers - typeof";
|
|
32
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
33
|
-
}
|
|
34
|
-
var __defProp = Object.defineProperty;
|
|
35
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
36
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
37
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
38
|
-
var __export = function(target, all) {
|
|
39
|
-
for(var name in all)__defProp(target, name, {
|
|
40
|
-
get: all[name],
|
|
41
|
-
enumerable: true
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __copyProps = function(to, from, except, desc) {
|
|
45
|
-
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
46
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
47
|
-
try {
|
|
48
|
-
var _loop = function() {
|
|
49
|
-
var key = _step.value;
|
|
50
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
51
|
-
get: function() {
|
|
52
|
-
return from[key];
|
|
53
|
-
},
|
|
54
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
58
|
-
} catch (err) {
|
|
59
|
-
_didIteratorError = true;
|
|
60
|
-
_iteratorError = err;
|
|
61
|
-
} finally{
|
|
62
|
-
try {
|
|
63
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
64
|
-
_iterator.return();
|
|
65
|
-
}
|
|
66
|
-
} finally{
|
|
67
|
-
if (_didIteratorError) {
|
|
68
|
-
throw _iteratorError;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return to;
|
|
74
|
-
};
|
|
75
|
-
var __toCommonJS = function(mod) {
|
|
76
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
77
|
-
value: true
|
|
78
|
-
}), mod);
|
|
79
|
-
};
|
|
80
|
-
// src/configs/graphql/index.ts
|
|
81
|
-
var graphql_exports = {};
|
|
82
|
-
__export(graphql_exports, {
|
|
83
|
-
createGraphqlCodegenConfig: function() {
|
|
84
|
-
return createGraphqlCodegenConfig;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
module.exports = __toCommonJS(graphql_exports);
|
|
88
|
-
// src/configs/graphql/graphql-codegen.ts
|
|
89
|
-
function createGraphqlCodegenConfig(param) {
|
|
90
|
-
var uri = param.uri, from = param.from, to = param.to, withComponent = param.withComponent, withHOC = param.withHOC, withHooks = param.withHooks, withMutationFn = param.withMutationFn, withRefetchFn = param.withRefetchFn;
|
|
91
|
-
var configOptions = _object_spread({}, withComponent && {
|
|
92
|
-
withComponent: withComponent
|
|
93
|
-
}, withHOC && {
|
|
94
|
-
withHOC: withHOC
|
|
95
|
-
}, withHooks && {
|
|
96
|
-
withHooks: withHooks
|
|
97
|
-
}, withMutationFn && {
|
|
98
|
-
withMutationFn: withMutationFn
|
|
99
|
-
}, withRefetchFn && {
|
|
100
|
-
withRefetchFn: withRefetchFn
|
|
101
|
-
});
|
|
102
|
-
return {
|
|
103
|
-
schema: uri,
|
|
104
|
-
documents: [
|
|
105
|
-
from
|
|
106
|
-
],
|
|
107
|
-
generates: _define_property({}, to, _object_spread({
|
|
108
|
-
plugins: [
|
|
109
|
-
"typescript",
|
|
110
|
-
"typescript-operations",
|
|
111
|
-
"typescript-react-apollo"
|
|
112
|
-
]
|
|
113
|
-
}, Object.keys(configOptions).length > 0 && {
|
|
114
|
-
config: configOptions
|
|
115
|
-
})),
|
|
116
|
-
hooks: {
|
|
117
|
-
afterAllFileWrite: [
|
|
118
|
-
"pnpm exec cyberskill lint:fix"
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
124
|
-
0 && (module.exports = {
|
|
125
|
-
createGraphqlCodegenConfig: createGraphqlCodegenConfig
|
|
126
|
-
});
|
|
1
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(t){if(Array.isArray(t))return e(t)}function r(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var o=true;var c=false;var a,i;try{for(n=n.call(e);!(o=(a=n.next()).done);o=true){r.push(a.value);if(t&&r.length===t)break}}catch(e){c=true;i=e}finally{try{if(!o&&n["return"]!=null)n["return"]()}finally{if(c)throw i}}return r}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var o=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}o.forEach(function(t){r(e,t,n[t])})}return e}function l(e,n){return t(e)||c(e,n)||p(e,n)||a()}function s(e){return n(e)||o(e)||p(e)||i()}function f(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function p(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}var d=Object.create;var I=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var _=function(e,t){for(var n in t)I(e,n,{get:t[n],enumerable:!0})},v=function(e,t,n,r){var o=true,c=false,a=undefined;if(t&&(typeof t==="undefined"?"undefined":f(t))=="object"||typeof t=="function")try{var i=function(){var o=l.value;!E.call(e,o)&&o!==n&&I(e,o,{get:function(){return t[o]},enumerable:!(r=m(t,o))||r.enumerable})};for(var u=y(t)[Symbol.iterator](),l;!(o=(l=u.next()).done);o=true)i()}catch(e){c=true;a=e}finally{try{if(!o&&u.return!=null){u.return()}}finally{if(c){throw a}}}return e};var T=function(e,t,n){return n=e!=null?d(O(e)):{},v(t||!e||!e.__esModule?I(n,"default",{value:e,enumerable:!0}):n,e)},g=function(e){return v(I({},"__esModule",{value:!0}),e)};var C={};_(C,{createGraphqlCodegenConfig:function(){return eL}});module.exports=g(C);var S=T(require("process"),1);var b=T(require("boxen"),1),h=T(require("chalk"),1),A=require("child_process"),N=T(require("process"),1),L=T(require("util"),1);var w=T(require("node-fetch"),1);var G=T(require("fs"),1);var M=T(require("path"),1);function j(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=M).resolve.apply(r,[J].concat(s(t)))}function R(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=M).join.apply(r,s(t))}var P=T(require("node-persist"),1),D=T(require("os"),1),x=T(require("process"),1);var K=24*60*60*1e3;var F=N.default.env.DEBUG==="true",k=L.promisify(A.exec),q=h.default,Y=q.gray,H=q.blue;function B(e){return{raw:!0,cmd:e}}function U(e,t){return(t===null||t===void 0?void 0:t.isRemote)?"".concat(e_," ").concat(X," ").concat(e):(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(e_," ").concat(ey," src/cli.ts ").concat(e):"".concat(e_," ").concat(ea," ").concat(e)}function W(e,t){return typeof e=="function"?U(e(t),t):(typeof e==="undefined"?"undefined":f(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?U(e,t):e}var J=S.default.env.INIT_CWD||S.default.cwd(),X="@cyberskill/shared";var $="node_modules",z="dist",Q="package.json",V="package-lock.json",Z="tsconfig.json",ee=".gitignore",et=".simple-git-hooks.json",en="pnpm-lock.yaml",er=".git/hooks/",eo=".git/COMMIT_EDITMSG",ec=R(J,$,X,z),ea="cyberskill",ei="eslint",eu="vitest",el="vitest",es="@commitlint/cli",ef="commitlint",ep="lint-staged",ed="lint-staged",eI="tsc",em="tsc",ey="tsx",eO="git",eE="pnpm",e_="pnpm exec",ev="simple-git-hooks",eT="simple-git-hooks",eg="@eslint/config-inspector",eC="eslint-config-inspector",eS="node-modules-inspector",eb="node-modules-inspector",eh={CYBERSKILL_DIRECTORY:ec,WORKING_DIRECTORY:J,TS_CONFIG:j(Z),GIT_IGNORE:j(ee),GIT_HOOK:j(er),GIT_COMMIT_MSG:j(eo),SIMPLE_GIT_HOOKS_JSON:j(et),PACKAGE_JSON:j(Q),PACKAGE_LOCK_JSON:j(V),PNPM_LOCK_YAML:j(en),NODE_MODULES:j($),CYBERSKILL:{LINT_STAGED_CONFIG:j("".concat(ec,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:j("".concat(ec,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:j("".concat(ec,"/configs/vitest/react/unit.js")),E2E_TEST_CONFIG:j("".concat(ec,"/configs/vitest/react/e2e.js"))}};function eA(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}var o=l(n,2),c=o[0],a=o[1];switch(e){case"pnpmAddAndExec":return W(B("".concat(eE," add -D ").concat(c," && ").concat(e_," ").concat(a)));case"pnpmExec":return W(B("".concat(e_," ").concat(c," ").concat(a||"").trim()));case"raw":return W(B(c))}}var eN={SIMPLE_GIT_HOOKS:eA("pnpmAddAndExec",ev,eT),ESLINT_INSPECT:eA("pnpmAddAndExec",eg,eC),NODE_MODULES_INSPECT:eA("pnpmAddAndExec",eS,eb),ESLINT_CHECK:eA("pnpmExec",ei,eh.WORKING_DIRECTORY),ESLINT_FIX:eA("pnpmExec",ei,"".concat(eh.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:eA("pnpmAddAndExec",eI,"".concat(em," -p ").concat(eh.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:eA("raw","".concat(eO," config core.hooksPath ").concat(eh.GIT_HOOK)),BUILD:eA("raw","".concat(eE," run build")),STAGE_BUILD_DIRECTORY:eA("raw","".concat(eO," add ").concat(z)),PNPM_INSTALL_STANDARD:eA("raw","".concat(eE," install")),PNPM_INSTALL_LEGACY:eA("raw","".concat(eE," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:eA("raw","".concat(eE," install --force")),CYBERSKILL:{TEST_UNIT:eA("pnpmAddAndExec",eu,"".concat(el," --config ").concat(eh.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:eA("pnpmAddAndExec",eu,"".concat(el," --config ").concat(eh.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:eA("pnpmAddAndExec",es,"".concat(ef," --edit ").concat(eh.GIT_COMMIT_MSG," --config ").concat(eh.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:eA("pnpmAddAndExec",ep,"".concat(ed," --config ").concat(eh.CYBERSKILL.LINT_STAGED_CONFIG))}};function eL(e){var t=e.uri,n=e.from,o=e.to,c=e.withComponent,a=e.withHOC,i=e.withHooks,l=e.withMutationFn,s=e.withRefetchFn;var f=u({},c&&{withComponent:c},a&&{withHOC:a},i&&{withHooks:i},l&&{withMutationFn:l},s&&{withRefetchFn:s});return{schema:t,documents:[n],generates:r({},o,u({plugins:["typescript","typescript-operations","typescript-react-apollo"]},Object.keys(f).length>0&&{config:f})),hooks:{afterAllFileWrite:[eN.ESLINT_FIX]}}}0&&(module.exports={createGraphqlCodegenConfig:createGraphqlCodegenConfig});
|
|
@@ -1,64 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function _define_property(obj, key, value) {
|
|
3
|
-
if (key in obj) {
|
|
4
|
-
Object.defineProperty(obj, key, {
|
|
5
|
-
value: value,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
writable: true
|
|
9
|
-
});
|
|
10
|
-
} else {
|
|
11
|
-
obj[key] = value;
|
|
12
|
-
}
|
|
13
|
-
return obj;
|
|
14
|
-
}
|
|
15
|
-
function _object_spread(target) {
|
|
16
|
-
for(var i = 1; i < arguments.length; i++){
|
|
17
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
-
var ownKeys = Object.keys(source);
|
|
19
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
ownKeys.forEach(function(key) {
|
|
25
|
-
_define_property(target, key, source[key]);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
}
|
|
30
|
-
function createGraphqlCodegenConfig(param) {
|
|
31
|
-
var uri = param.uri, from = param.from, to = param.to, withComponent = param.withComponent, withHOC = param.withHOC, withHooks = param.withHooks, withMutationFn = param.withMutationFn, withRefetchFn = param.withRefetchFn;
|
|
32
|
-
var configOptions = _object_spread({}, withComponent && {
|
|
33
|
-
withComponent: withComponent
|
|
34
|
-
}, withHOC && {
|
|
35
|
-
withHOC: withHOC
|
|
36
|
-
}, withHooks && {
|
|
37
|
-
withHooks: withHooks
|
|
38
|
-
}, withMutationFn && {
|
|
39
|
-
withMutationFn: withMutationFn
|
|
40
|
-
}, withRefetchFn && {
|
|
41
|
-
withRefetchFn: withRefetchFn
|
|
42
|
-
});
|
|
43
|
-
return {
|
|
44
|
-
schema: uri,
|
|
45
|
-
documents: [
|
|
46
|
-
from
|
|
47
|
-
],
|
|
48
|
-
generates: _define_property({}, to, _object_spread({
|
|
49
|
-
plugins: [
|
|
50
|
-
"typescript",
|
|
51
|
-
"typescript-operations",
|
|
52
|
-
"typescript-react-apollo"
|
|
53
|
-
]
|
|
54
|
-
}, Object.keys(configOptions).length > 0 && {
|
|
55
|
-
config: configOptions
|
|
56
|
-
})),
|
|
57
|
-
hooks: {
|
|
58
|
-
afterAllFileWrite: [
|
|
59
|
-
"pnpm exec cyberskill lint:fix"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export { createGraphqlCodegenConfig };
|
|
1
|
+
function t(t,n){if(n==null||n>t.length)n=t.length;for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function n(t){if(Array.isArray(t))return t}function e(n){if(Array.isArray(n))return t(n)}function o(t,n,e){if(n in t){Object.defineProperty(t,n,{value:e,enumerable:true,configurable:true,writable:true})}else{t[n]=e}return t}function r(t){if(typeof Symbol!=="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function c(t,n){var e=t==null?null:typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(e==null)return;var o=[];var r=true;var c=false;var i,a;try{for(e=e.call(t);!(r=(i=e.next()).done);r=true){o.push(i.value);if(n&&o.length===n)break}}catch(t){c=true;a=t}finally{try{if(!r&&e["return"]!=null)e["return"]()}finally{if(c)throw a}}return o}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};var r=Object.keys(e);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.forEach(function(n){o(t,n,e[n])})}return t}function s(t,e){return n(t)||c(t,e)||p(t,e)||i()}function u(t){return e(t)||r(t)||p(t)||a()}function f(t){"@swc/helpers - typeof";return t&&typeof Symbol!=="undefined"&&t.constructor===Symbol?"symbol":typeof t}function p(n,e){if(!n)return;if(typeof n==="string")return t(n,e);var o=Object.prototype.toString.call(n).slice(8,-1);if(o==="Object"&&n.constructor)o=n.constructor.name;if(o==="Map"||o==="Set")return Array.from(o);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return t(n,e)}import d from"node:process";import m from"boxen";import I from"chalk";import{exec as E}from"node:child_process";import _ from"node:process";import*as T from"node:util";import O from"node-fetch";import*as y from"node:path";function S(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++){n[e]=arguments[e]}var o;return(o=y).resolve.apply(o,[R].concat(u(n)))}function C(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++){n[e]=arguments[e]}var o;return(o=y).join.apply(o,u(n))}import g from"node-persist";var h=24*60*60*1e3;var A=_.env.DEBUG==="true",N=T.promisify(E),v=I.gray,b=I.blue;function L(t){return{raw:!0,cmd:t}}function w(t,n){return(n===null||n===void 0?void 0:n.isRemote)?"".concat(tr," ").concat(M," ").concat(t):(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(tr," ").concat(tn," src/cli.ts ").concat(t):"".concat(tr," ").concat(W," ").concat(t)}function G(t,n){return typeof t=="function"?w(t(n),n):(typeof t==="undefined"?"undefined":f(t))=="object"&&(t===null||t===void 0?void 0:t.raw)===!0?t.cmd:typeof t=="string"?w(t,n):t}var R=d.env.INIT_CWD||d.cwd(),M="@cyberskill/shared";var P="node_modules",j="dist",D="package.json",K="package-lock.json",x="tsconfig.json",F=".gitignore",k=".simple-git-hooks.json",Y="pnpm-lock.yaml",H=".git/hooks/",B=".git/COMMIT_EDITMSG",U=C(R,P,M,j),W="cyberskill",J="eslint",X="vitest",q="vitest",$="@commitlint/cli",z="commitlint",Q="lint-staged",V="lint-staged",Z="tsc",tt="tsc",tn="tsx",te="git",to="pnpm",tr="pnpm exec",tc="simple-git-hooks",ti="simple-git-hooks",ta="@eslint/config-inspector",tl="eslint-config-inspector",ts="node-modules-inspector",tu="node-modules-inspector",tf={CYBERSKILL_DIRECTORY:U,WORKING_DIRECTORY:R,TS_CONFIG:S(x),GIT_IGNORE:S(F),GIT_HOOK:S(H),GIT_COMMIT_MSG:S(B),SIMPLE_GIT_HOOKS_JSON:S(k),PACKAGE_JSON:S(D),PACKAGE_LOCK_JSON:S(K),PNPM_LOCK_YAML:S(Y),NODE_MODULES:S(P),CYBERSKILL:{LINT_STAGED_CONFIG:S("".concat(U,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:S("".concat(U,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:S("".concat(U,"/configs/vitest/react/unit.js")),E2E_TEST_CONFIG:S("".concat(U,"/configs/vitest/react/e2e.js"))}};function tp(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o<n;o++){e[o-1]=arguments[o]}var r=s(e,2),c=r[0],i=r[1];switch(t){case"pnpmAddAndExec":return G(L("".concat(to," add -D ").concat(c," && ").concat(tr," ").concat(i)));case"pnpmExec":return G(L("".concat(tr," ").concat(c," ").concat(i||"").trim()));case"raw":return G(L(c))}}var td={SIMPLE_GIT_HOOKS:tp("pnpmAddAndExec",tc,ti),ESLINT_INSPECT:tp("pnpmAddAndExec",ta,tl),NODE_MODULES_INSPECT:tp("pnpmAddAndExec",ts,tu),ESLINT_CHECK:tp("pnpmExec",J,tf.WORKING_DIRECTORY),ESLINT_FIX:tp("pnpmExec",J,"".concat(tf.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:tp("pnpmAddAndExec",Z,"".concat(tt," -p ").concat(tf.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:tp("raw","".concat(te," config core.hooksPath ").concat(tf.GIT_HOOK)),BUILD:tp("raw","".concat(to," run build")),STAGE_BUILD_DIRECTORY:tp("raw","".concat(te," add ").concat(j)),PNPM_INSTALL_STANDARD:tp("raw","".concat(to," install")),PNPM_INSTALL_LEGACY:tp("raw","".concat(to," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:tp("raw","".concat(to," install --force")),CYBERSKILL:{TEST_UNIT:tp("pnpmAddAndExec",X,"".concat(q," --config ").concat(tf.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:tp("pnpmAddAndExec",X,"".concat(q," --config ").concat(tf.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:tp("pnpmAddAndExec",$,"".concat(z," --edit ").concat(tf.GIT_COMMIT_MSG," --config ").concat(tf.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:tp("pnpmAddAndExec",Q,"".concat(V," --config ").concat(tf.CYBERSKILL.LINT_STAGED_CONFIG))}};function tm(t){var n=t.uri,e=t.from,r=t.to,c=t.withComponent,i=t.withHOC,a=t.withHooks,s=t.withMutationFn,u=t.withRefetchFn;var f=l({},c&&{withComponent:c},i&&{withHOC:i},a&&{withHooks:a},s&&{withMutationFn:s},u&&{withRefetchFn:u});return{schema:n,documents:[e],generates:o({},r,l({plugins:["typescript","typescript-operations","typescript-react-apollo"]},Object.keys(f).length>0&&{config:f})),hooks:{afterAllFileWrite:[td.ESLINT_FIX]}}}export{tm as createGraphqlCodegenConfig};
|
|
@@ -1,80 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _type_of(obj) {
|
|
3
|
-
"@swc/helpers - typeof";
|
|
4
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5
|
-
}
|
|
6
|
-
var __create = Object.create;
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __export = function(target, all) {
|
|
13
|
-
for(var name in all)__defProp(target, name, {
|
|
14
|
-
get: all[name],
|
|
15
|
-
enumerable: true
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = function(to, from, except, desc) {
|
|
19
|
-
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
20
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
21
|
-
try {
|
|
22
|
-
var _loop = function() {
|
|
23
|
-
var key = _step.value;
|
|
24
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
25
|
-
get: function() {
|
|
26
|
-
return from[key];
|
|
27
|
-
},
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
32
|
-
} catch (err) {
|
|
33
|
-
_didIteratorError = true;
|
|
34
|
-
_iteratorError = err;
|
|
35
|
-
} finally{
|
|
36
|
-
try {
|
|
37
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
38
|
-
_iterator.return();
|
|
39
|
-
}
|
|
40
|
-
} finally{
|
|
41
|
-
if (_didIteratorError) {
|
|
42
|
-
throw _iteratorError;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
48
|
-
};
|
|
49
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
50
|
-
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
55
|
-
value: mod,
|
|
56
|
-
enumerable: true
|
|
57
|
-
}) : target, mod);
|
|
58
|
-
};
|
|
59
|
-
var __toCommonJS = function(mod) {
|
|
60
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
61
|
-
value: true
|
|
62
|
-
}), mod);
|
|
63
|
-
};
|
|
64
|
-
// src/configs/i18n/react/i18next.ts
|
|
65
|
-
var i18next_exports = {};
|
|
66
|
-
__export(i18next_exports, {
|
|
67
|
-
initI18Next: function() {
|
|
68
|
-
return initI18Next;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
module.exports = __toCommonJS(i18next_exports);
|
|
72
|
-
var import_i18next = __toESM(require("i18next"), 1);
|
|
73
|
-
var import_react_i18next = require("react-i18next");
|
|
74
|
-
function initI18Next(options) {
|
|
75
|
-
return import_i18next.default.use(import_react_i18next.initReactI18next).init(options);
|
|
76
|
-
}
|
|
77
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
78
|
-
0 && (module.exports = {
|
|
79
|
-
initI18Next: initI18Next
|
|
80
|
-
});
|
|
1
|
+
"use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var t=Object.create;var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty;var a=function(e,t){for(var n in t)r(e,n,{get:t[n],enumerable:!0})},f=function(t,o,a,f){var l=true,c=false,y=undefined;if(o&&(typeof o==="undefined"?"undefined":e(o))=="object"||typeof o=="function")try{var v=function(){var e=p.value;!i.call(t,e)&&e!==a&&r(t,e,{get:function(){return o[e]},enumerable:!(f=n(o,e))||f.enumerable})};for(var d=u(o)[Symbol.iterator](),p;!(l=(p=d.next()).done);l=true)v()}catch(e){c=true;y=e}finally{try{if(!l&&d.return!=null){d.return()}}finally{if(c){throw y}}}return t};var l=function(e,n,u){return u=e!=null?t(o(e)):{},f(n||!e||!e.__esModule?r(u,"default",{value:e,enumerable:!0}):u,e)},c=function(e){return f(r({},"__esModule",{value:!0}),e)};var y={};a(y,{initI18Next:function(){return p}});module.exports=c(y);var v=l(require("i18next"),1),d=require("react-i18next");function p(e){return v.default.use(d.initReactI18next).init(e)}0&&(module.exports={initI18Next:initI18Next});
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import i18next from "i18next";
|
|
3
|
-
import { initReactI18next } from "react-i18next";
|
|
4
|
-
function initI18Next(options) {
|
|
5
|
-
return i18next.use(initReactI18next).init(options);
|
|
6
|
-
}
|
|
7
|
-
export { initI18Next };
|
|
1
|
+
import t from"i18next";import{initReactI18next as i}from"react-i18next";function e(e){return t.use(i).init(e)}export{e as initI18Next};
|
|
@@ -1,81 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _type_of(obj) {
|
|
3
|
-
"@swc/helpers - typeof";
|
|
4
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
5
|
-
}
|
|
6
|
-
var __create = Object.create;
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __export = function(target, all) {
|
|
13
|
-
for(var name in all)__defProp(target, name, {
|
|
14
|
-
get: all[name],
|
|
15
|
-
enumerable: true
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = function(to, from, except, desc) {
|
|
19
|
-
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
20
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
21
|
-
try {
|
|
22
|
-
var _loop = function() {
|
|
23
|
-
var key = _step.value;
|
|
24
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
25
|
-
get: function() {
|
|
26
|
-
return from[key];
|
|
27
|
-
},
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
32
|
-
} catch (err) {
|
|
33
|
-
_didIteratorError = true;
|
|
34
|
-
_iteratorError = err;
|
|
35
|
-
} finally{
|
|
36
|
-
try {
|
|
37
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
38
|
-
_iterator.return();
|
|
39
|
-
}
|
|
40
|
-
} finally{
|
|
41
|
-
if (_didIteratorError) {
|
|
42
|
-
throw _iteratorError;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
48
|
-
};
|
|
49
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
50
|
-
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
55
|
-
value: mod,
|
|
56
|
-
enumerable: true
|
|
57
|
-
}) : target, mod);
|
|
58
|
-
};
|
|
59
|
-
var __toCommonJS = function(mod) {
|
|
60
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
61
|
-
value: true
|
|
62
|
-
}), mod);
|
|
63
|
-
};
|
|
64
|
-
// src/configs/i18n/react/index.ts
|
|
65
|
-
var react_exports = {};
|
|
66
|
-
__export(react_exports, {
|
|
67
|
-
initI18Next: function() {
|
|
68
|
-
return initI18Next;
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
module.exports = __toCommonJS(react_exports);
|
|
72
|
-
// src/configs/i18n/react/i18next.ts
|
|
73
|
-
var import_i18next = __toESM(require("i18next"), 1);
|
|
74
|
-
var import_react_i18next = require("react-i18next");
|
|
75
|
-
function initI18Next(options) {
|
|
76
|
-
return import_i18next.default.use(import_react_i18next.initReactI18next).init(options);
|
|
77
|
-
}
|
|
78
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
-
0 && (module.exports = {
|
|
80
|
-
initI18Next: initI18Next
|
|
81
|
-
});
|
|
1
|
+
"use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var t=Object.create;var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty;var a=function(e,t){for(var n in t)r(e,n,{get:t[n],enumerable:!0})},f=function(t,o,a,f){var l=true,c=false,y=undefined;if(o&&(typeof o==="undefined"?"undefined":e(o))=="object"||typeof o=="function")try{var v=function(){var e=p.value;!i.call(t,e)&&e!==a&&r(t,e,{get:function(){return o[e]},enumerable:!(f=n(o,e))||f.enumerable})};for(var d=u(o)[Symbol.iterator](),p;!(l=(p=d.next()).done);l=true)v()}catch(e){c=true;y=e}finally{try{if(!l&&d.return!=null){d.return()}}finally{if(c){throw y}}}return t};var l=function(e,n,u){return u=e!=null?t(o(e)):{},f(n||!e||!e.__esModule?r(u,"default",{value:e,enumerable:!0}):u,e)},c=function(e){return f(r({},"__esModule",{value:!0}),e)};var y={};a(y,{initI18Next:function(){return p}});module.exports=c(y);var v=l(require("i18next"),1),d=require("react-i18next");function p(e){return v.default.use(d.initReactI18next).init(e)}0&&(module.exports={initI18Next:initI18Next});
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import i18next from "i18next";
|
|
3
|
-
import { initReactI18next } from "react-i18next";
|
|
4
|
-
function initI18Next(options) {
|
|
5
|
-
return i18next.use(initReactI18next).init(options);
|
|
6
|
-
}
|
|
7
|
-
export { initI18Next };
|
|
1
|
+
import t from"i18next";import{initReactI18next as i}from"react-i18next";function e(e){return t.use(i).init(e)}export{e as initI18Next};
|