@cyberskill/shared 1.47.0 → 1.49.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 +415 -30
- package/dist/_tsup-dts-rollup.d.ts +415 -30
- package/dist/cli.cjs +2144 -1
- package/dist/cli.d.cts +2 -1
- package/dist/cli.d.ts +2 -1
- package/dist/cli.js +2064 -1
- package/dist/configs/commitlint/base.cjs +64 -1
- package/dist/configs/commitlint/base.js +7 -1
- package/dist/configs/eslint/base.cjs +121 -1
- package/dist/configs/eslint/base.js +52 -1
- package/dist/configs/eslint/nestjs.cjs +155 -1
- package/dist/configs/eslint/nestjs.js +85 -1
- package/dist/configs/eslint/nextjs.cjs +155 -1
- package/dist/configs/eslint/nextjs.js +85 -1
- package/dist/configs/eslint/nodejs.cjs +156 -1
- package/dist/configs/eslint/nodejs.js +86 -1
- package/dist/configs/eslint/vite-react.cjs +159 -1
- package/dist/configs/eslint/vite-react.js +89 -1
- package/dist/configs/graphql/graphql-codegen.cjs +125 -1
- package/dist/configs/graphql/graphql-codegen.js +64 -1
- package/dist/configs/graphql/index.cjs +126 -1
- package/dist/configs/graphql/index.js +64 -1
- package/dist/configs/i18n/react/i18next.cjs +80 -1
- package/dist/configs/i18n/react/i18next.js +7 -1
- package/dist/configs/i18n/react/index.cjs +81 -1
- package/dist/configs/i18n/react/index.js +7 -1
- package/dist/configs/index.cjs +232 -1
- package/dist/configs/index.js +166 -1
- package/dist/configs/lint-staged/base.cjs +64 -1
- package/dist/configs/lint-staged/base.js +7 -1
- package/dist/configs/vitest/react/e2e.cjs +128 -1
- package/dist/configs/vitest/react/e2e.js +59 -1
- package/dist/configs/vitest/react/unit.cjs +305 -1
- package/dist/configs/vitest/react/unit.js +228 -1
- package/dist/configs/vitest/react/unit.setup.cjs +60 -1
- package/dist/configs/vitest/react/unit.setup.js +8 -1
- package/dist/constants/index.cjs +678 -1
- package/dist/constants/index.d.cts +31 -1
- package/dist/constants/index.d.ts +31 -1
- package/dist/constants/index.js +469 -1
- package/dist/constants/path.cjs +423 -1
- package/dist/constants/path.d.cts +31 -1
- package/dist/constants/path.d.ts +31 -1
- package/dist/constants/path.js +218 -1
- package/dist/constants/response-status.cjs +313 -1
- package/dist/constants/response-status.js +252 -1
- package/dist/index.cjs +4560 -1
- package/dist/index.d.cts +52 -7
- package/dist/index.d.ts +52 -7
- package/dist/index.js +4143 -1
- package/dist/nodejs/index.cjs +2138 -1
- package/dist/nodejs/index.js +2054 -1
- package/dist/nodejs/mongo.cjs +2137 -1
- package/dist/nodejs/mongo.js +2054 -1
- package/dist/react/apollo-client.cjs +177 -1
- package/dist/react/apollo-client.js +116 -1
- package/dist/react/index.cjs +990 -1
- package/dist/react/index.js +876 -1
- package/dist/react/loading.cjs +301 -1
- package/dist/react/loading.js +216 -1
- package/dist/react/next-intl.cjs +744 -1
- package/dist/react/next-intl.js +655 -1
- package/dist/react/storage.cjs +631 -1
- package/dist/react/storage.js +558 -1
- package/dist/typescript/api-response.cjs +48 -1
- package/dist/typescript/apollo.cjs +48 -1
- package/dist/typescript/command.cjs +68 -1
- package/dist/typescript/command.d.cts +4 -0
- package/dist/typescript/command.d.ts +4 -0
- package/dist/typescript/command.js +7 -1
- package/dist/typescript/config.cjs +48 -1
- package/dist/typescript/fs.cjs +48 -0
- package/dist/typescript/fs.d.cts +1 -0
- package/dist/typescript/fs.d.ts +1 -0
- package/dist/typescript/fs.js +0 -0
- package/dist/typescript/graphql-codegen.cjs +48 -1
- package/dist/typescript/index.cjs +175 -1
- package/dist/typescript/index.d.cts +5 -0
- package/dist/typescript/index.d.ts +5 -0
- package/dist/typescript/index.js +151 -1
- package/dist/typescript/loading.cjs +48 -1
- package/dist/typescript/log.cjs +48 -1
- package/dist/typescript/mongo.cjs +164 -1
- package/dist/typescript/mongo.js +145 -1
- package/dist/typescript/next-intl.cjs +48 -1
- package/dist/typescript/react.cjs +48 -1
- package/dist/typescript/serializer.cjs +48 -1
- package/dist/typescript/string.cjs +48 -1
- package/dist/utils/command.cjs +1387 -1
- package/dist/utils/command.d.cts +2 -0
- package/dist/utils/command.d.ts +2 -0
- package/dist/utils/command.js +1287 -1
- package/dist/utils/common.cjs +300 -1
- package/dist/utils/common.js +219 -1
- package/dist/utils/config.cjs +146 -1
- package/dist/utils/config.js +89 -1
- package/dist/utils/fs.cjs +132 -1
- package/dist/utils/fs.d.cts +5 -1
- package/dist/utils/fs.d.ts +5 -1
- package/dist/utils/fs.js +47 -1
- package/dist/utils/index-nodejs.cjs +1752 -1
- package/dist/utils/index-nodejs.d.cts +16 -6
- package/dist/utils/index-nodejs.d.ts +16 -6
- package/dist/utils/index-nodejs.js +1581 -1
- package/dist/utils/index.cjs +727 -1
- package/dist/utils/index.js +625 -1
- package/dist/utils/log.cjs +330 -1
- package/dist/utils/log.js +269 -1
- package/dist/utils/package.cjs +941 -0
- package/dist/utils/package.d.cts +3 -0
- package/dist/utils/package.d.ts +3 -0
- package/dist/utils/package.js +857 -0
- package/dist/utils/path.cjs +291 -0
- package/dist/utils/path.d.cts +6 -0
- package/dist/utils/path.d.ts +6 -0
- package/dist/utils/path.js +191 -0
- package/dist/utils/serializer.cjs +91 -1
- package/dist/utils/serializer.js +30 -1
- package/dist/utils/storage-client.cjs +349 -1
- package/dist/utils/storage-client.js +276 -1
- package/dist/utils/storage-server.cjs +636 -1
- package/dist/utils/storage-server.d.cts +1 -1
- package/dist/utils/storage-server.d.ts +1 -1
- package/dist/utils/storage-server.js +550 -1
- package/dist/utils/string.cjs +152 -1
- package/dist/utils/string.js +75 -1
- package/dist/utils/validate.cjs +90 -1
- package/dist/utils/validate.js +33 -1
- package/package.json +11 -12
- package/dist/utils/npm-package.cjs +0 -1
- package/dist/utils/npm-package.d.cts +0 -5
- package/dist/utils/npm-package.d.ts +0 -5
- package/dist/utils/npm-package.js +0 -1
|
@@ -1 +1,125 @@
|
|
|
1
|
-
"use strict";
|
|
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 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
// src/configs/graphql/graphql-codegen.ts
|
|
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 +1,126 @@
|
|
|
1
|
-
"use strict";
|
|
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 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
// src/configs/graphql/graphql-codegen.ts
|
|
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 +1,80 @@
|
|
|
1
|
-
"use strict";
|
|
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 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// src/configs/i18n/react/i18next.ts
|
|
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 +1,81 @@
|
|
|
1
|
-
"use strict";
|
|
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 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// src/configs/i18n/react/i18next.ts
|
|
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 };
|