@cyberskill/shared 1.137.0 → 1.138.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/README.md +4 -4
- package/dist/_tsup-dts-rollup.d.cts +31 -288
- package/dist/_tsup-dts-rollup.d.ts +31 -288
- package/dist/config/config.type.d.cts +3 -0
- package/dist/config/config.type.d.ts +3 -0
- package/dist/config/config.util.cjs +1 -0
- package/dist/config/config.util.d.cts +1 -0
- package/dist/config/config.util.d.ts +1 -0
- package/dist/config/config.util.js +1 -0
- package/dist/config/env/env.constant.d.cts +1 -0
- package/dist/config/env/env.constant.d.ts +1 -0
- package/dist/config/env/env.type.d.cts +1 -0
- package/dist/config/env/env.type.d.ts +1 -0
- package/dist/config/env/env.util.d.cts +2 -0
- package/dist/config/env/env.util.d.ts +2 -0
- package/dist/config/env/index.d.cts +4 -0
- package/dist/config/env/index.d.ts +4 -0
- package/dist/config/graphql-codegen/graphql-codegen.type.d.cts +1 -0
- package/dist/config/graphql-codegen/graphql-codegen.type.d.ts +1 -0
- package/dist/config/graphql-codegen/graphql-codegen.util.d.cts +1 -0
- package/dist/config/graphql-codegen/graphql-codegen.util.d.ts +1 -0
- package/dist/{configs/graphql-codegen/graphql-codegen.util.d.cts → config/graphql-codegen/index.d.cts} +1 -0
- package/dist/{configs/graphql-codegen/graphql-codegen.util.d.ts → config/graphql-codegen/index.d.ts} +1 -0
- package/dist/config/index.cjs +1 -0
- package/dist/config/index.d.cts +13 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.js +1 -0
- package/dist/constant/common.d.cts +1 -0
- package/dist/constant/common.d.ts +1 -0
- package/dist/{constants/common.d.cts → constant/index.d.cts} +1 -0
- package/dist/{constants/common.d.ts → constant/index.d.ts} +1 -0
- package/dist/{constants/index.d.cts → constant/response-status.d.cts} +0 -1
- package/dist/{constants/index.d.ts → constant/response-status.d.ts} +0 -1
- package/dist/node/apollo-server/apollo-server.type.d.cts +1 -1
- package/dist/node/apollo-server/apollo-server.type.d.ts +1 -1
- package/dist/node/apollo-server/apollo-server.util.d.cts +2 -2
- package/dist/node/apollo-server/apollo-server.util.d.ts +2 -2
- package/dist/node/apollo-server/index.d.cts +3 -3
- package/dist/node/apollo-server/index.d.ts +3 -3
- package/dist/node/cli/cli.util.cjs +1 -1
- package/dist/node/cli/cli.util.js +1 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.js +1 -1
- package/dist/node/command/command.type.d.cts +8 -8
- package/dist/node/command/command.type.d.ts +8 -8
- package/dist/node/command/command.util.cjs +1 -1
- package/dist/node/command/command.util.d.cts +6 -6
- package/dist/node/command/command.util.d.ts +6 -6
- package/dist/node/command/command.util.js +1 -1
- package/dist/node/command/index.cjs +1 -1
- package/dist/node/command/index.d.cts +14 -14
- package/dist/node/command/index.d.ts +14 -14
- package/dist/node/command/index.js +1 -1
- package/dist/node/express/express.type.d.cts +8 -8
- package/dist/node/express/express.type.d.ts +8 -8
- package/dist/node/express/express.util.d.cts +7 -7
- package/dist/node/express/express.util.d.ts +7 -7
- package/dist/node/express/index.d.cts +15 -15
- package/dist/node/express/index.d.ts +15 -15
- package/dist/node/fs/fs.type.d.cts +1 -1
- package/dist/node/fs/fs.type.d.ts +1 -1
- package/dist/node/fs/fs.util.d.cts +13 -13
- package/dist/node/fs/fs.util.d.ts +13 -13
- package/dist/node/fs/index.d.cts +14 -14
- package/dist/node/fs/index.d.ts +14 -14
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +176 -176
- package/dist/node/index.d.ts +176 -176
- package/dist/node/index.js +1 -1
- package/dist/node/log/index.cjs +1 -1
- package/dist/node/log/index.d.cts +8 -8
- package/dist/node/log/index.d.ts +8 -8
- package/dist/node/log/index.js +1 -1
- package/dist/node/log/log.type.d.cts +5 -5
- package/dist/node/log/log.type.d.ts +5 -5
- package/dist/node/log/log.util.cjs +1 -1
- package/dist/node/log/log.util.d.cts +3 -3
- package/dist/node/log/log.util.d.ts +3 -3
- package/dist/node/log/log.util.js +1 -1
- package/dist/node/mongo/index.cjs +1 -1
- package/dist/node/mongo/index.d.cts +61 -61
- package/dist/node/mongo/index.d.ts +61 -61
- package/dist/node/mongo/index.js +1 -1
- package/dist/node/mongo/mongo.constant.d.cts +1 -1
- package/dist/node/mongo/mongo.constant.d.ts +1 -1
- package/dist/node/mongo/mongo.type.d.cts +55 -55
- package/dist/node/mongo/mongo.type.d.ts +55 -55
- package/dist/node/mongo/mongo.util.cjs +1 -1
- package/dist/node/mongo/mongo.util.d.cts +5 -5
- package/dist/node/mongo/mongo.util.d.ts +5 -5
- package/dist/node/mongo/mongo.util.js +1 -1
- package/dist/node/package/index.cjs +1 -1
- package/dist/node/package/index.d.cts +9 -9
- package/dist/node/package/index.d.ts +9 -9
- package/dist/node/package/index.js +1 -1
- package/dist/node/package/package.type.d.cts +4 -4
- package/dist/node/package/package.type.d.ts +4 -4
- package/dist/node/package/package.util.cjs +1 -1
- package/dist/node/package/package.util.d.cts +5 -5
- package/dist/node/package/package.util.d.ts +5 -5
- package/dist/node/package/package.util.js +1 -1
- package/dist/node/path/index.cjs +1 -1
- package/dist/node/path/index.d.cts +47 -47
- package/dist/node/path/index.d.ts +47 -47
- package/dist/node/path/index.js +1 -1
- package/dist/node/path/path.constant.cjs +1 -1
- package/dist/node/path/path.constant.d.cts +43 -43
- package/dist/node/path/path.constant.d.ts +43 -43
- package/dist/node/path/path.constant.js +1 -1
- package/dist/node/path/path.util.d.cts +4 -4
- package/dist/node/path/path.util.d.ts +4 -4
- package/dist/node/storage/index.cjs +1 -1
- package/dist/node/storage/index.d.cts +1 -1
- package/dist/node/storage/index.d.ts +1 -1
- package/dist/node/storage/index.js +1 -1
- package/dist/node/storage/storage.util.cjs +1 -1
- package/dist/node/storage/storage.util.d.cts +1 -1
- package/dist/node/storage/storage.util.d.ts +1 -1
- package/dist/node/storage/storage.util.js +1 -1
- package/dist/node/ws/index.d.cts +4 -4
- package/dist/node/ws/index.d.ts +4 -4
- package/dist/node/ws/ts.util.d.cts +2 -2
- package/dist/node/ws/ts.util.d.ts +2 -2
- package/dist/node/ws/ws.type.d.cts +2 -2
- package/dist/node/ws/ws.type.d.ts +2 -2
- package/dist/react/apollo-client/apollo-client.component.d.cts +1 -1
- package/dist/react/apollo-client/apollo-client.component.d.ts +1 -1
- package/dist/react/apollo-client/apollo-client.constant.d.cts +1 -1
- package/dist/react/apollo-client/apollo-client.constant.d.ts +1 -1
- package/dist/react/apollo-client/apollo-client.type.d.cts +5 -5
- package/dist/react/apollo-client/apollo-client.type.d.ts +5 -5
- package/dist/react/apollo-client/index.d.cts +7 -7
- package/dist/react/apollo-client/index.d.ts +7 -7
- package/dist/react/apollo-error/apollo-error.component.d.cts +1 -1
- package/dist/react/apollo-error/apollo-error.component.d.ts +1 -1
- package/dist/react/apollo-error/apollo-error.context.d.cts +1 -1
- package/dist/react/apollo-error/apollo-error.context.d.ts +1 -1
- package/dist/react/apollo-error/apollo-error.hook.d.cts +1 -1
- package/dist/react/apollo-error/apollo-error.hook.d.ts +1 -1
- package/dist/react/apollo-error/apollo-error.provider.d.cts +1 -1
- package/dist/react/apollo-error/apollo-error.provider.d.ts +1 -1
- package/dist/react/apollo-error/apollo-error.type.d.cts +1 -1
- package/dist/react/apollo-error/apollo-error.type.d.ts +1 -1
- package/dist/react/apollo-error/apollo-error.util.d.cts +2 -2
- package/dist/react/apollo-error/apollo-error.util.d.ts +2 -2
- package/dist/react/apollo-error/index.d.cts +7 -7
- package/dist/react/apollo-error/index.d.ts +7 -7
- package/dist/react/apollo-error/index.js +1 -1
- package/dist/react/i18next/i18next.hook.d.cts +1 -1
- package/dist/react/i18next/i18next.hook.d.ts +1 -1
- package/dist/react/i18next/i18next.util.d.cts +1 -1
- package/dist/react/i18next/i18next.util.d.ts +1 -1
- package/dist/react/i18next/index.d.cts +2 -2
- package/dist/react/i18next/index.d.ts +2 -2
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.cts +41 -42
- package/dist/react/index.d.ts +41 -42
- package/dist/react/index.js +1 -1
- package/dist/react/loading/index.d.cts +6 -6
- package/dist/react/loading/index.d.ts +6 -6
- package/dist/react/loading/loading.component.d.cts +1 -1
- package/dist/react/loading/loading.component.d.ts +1 -1
- package/dist/react/loading/loading.context.d.cts +1 -1
- package/dist/react/loading/loading.context.d.ts +1 -1
- package/dist/react/loading/loading.hook.d.cts +1 -1
- package/dist/react/loading/loading.hook.d.ts +1 -1
- package/dist/react/loading/loading.provider.d.cts +1 -1
- package/dist/react/loading/loading.provider.d.ts +1 -1
- package/dist/react/loading/loading.type.d.cts +2 -2
- package/dist/react/loading/loading.type.d.ts +2 -2
- package/dist/react/log/index.d.cts +3 -4
- package/dist/react/log/index.d.ts +3 -4
- package/dist/react/log/log.type.d.cts +1 -2
- package/dist/react/log/log.type.d.ts +1 -2
- package/dist/react/log/log.util.d.cts +2 -2
- package/dist/react/log/log.util.d.ts +2 -2
- package/dist/react/next-intl/index.d.cts +10 -10
- package/dist/react/next-intl/index.d.ts +10 -10
- package/dist/react/next-intl/next-intl.constant.d.cts +1 -1
- package/dist/react/next-intl/next-intl.constant.d.ts +1 -1
- package/dist/react/next-intl/next-intl.context.d.cts +1 -1
- package/dist/react/next-intl/next-intl.context.d.ts +1 -1
- package/dist/react/next-intl/next-intl.hoc.d.cts +1 -1
- package/dist/react/next-intl/next-intl.hoc.d.ts +1 -1
- package/dist/react/next-intl/next-intl.hook.d.cts +2 -2
- package/dist/react/next-intl/next-intl.hook.d.ts +2 -2
- package/dist/react/next-intl/next-intl.provider.d.cts +1 -1
- package/dist/react/next-intl/next-intl.provider.d.ts +1 -1
- package/dist/react/next-intl/next-intl.type.d.cts +4 -4
- package/dist/react/next-intl/next-intl.type.d.ts +4 -4
- package/dist/react/storage/index.d.cts +2 -2
- package/dist/react/storage/index.d.ts +2 -2
- package/dist/react/storage/storage.hook.d.cts +1 -1
- package/dist/react/storage/storage.hook.d.ts +1 -1
- package/dist/react/storage/storage.util.d.cts +1 -1
- package/dist/react/storage/storage.util.d.ts +1 -1
- package/dist/react/toast/index.d.cts +2 -2
- package/dist/react/toast/index.d.ts +2 -2
- package/dist/react/vitest/index.cjs +1 -1
- package/dist/react/vitest/index.d.cts +2 -2
- package/dist/react/vitest/index.d.ts +2 -2
- package/dist/react/vitest/index.js +1 -1
- package/dist/react/vitest/vitest.e2e.d.cts +1 -1
- package/dist/react/vitest/vitest.e2e.d.ts +1 -1
- package/dist/react/vitest/vitest.unit.cjs +1 -1
- package/dist/react/vitest/vitest.unit.d.cts +1 -1
- package/dist/react/vitest/vitest.unit.d.ts +1 -1
- package/dist/react/vitest/vitest.unit.js +1 -1
- package/dist/typescript/common.d.cts +5 -4
- package/dist/typescript/common.d.ts +5 -4
- package/dist/typescript/index.d.cts +7 -6
- package/dist/typescript/index.d.ts +7 -6
- package/dist/typescript/react.d.cts +2 -2
- package/dist/typescript/react.d.ts +2 -2
- package/dist/util/common/common.util.d.cts +2 -0
- package/dist/util/common/common.util.d.ts +2 -0
- package/dist/util/index.d.cts +17 -0
- package/dist/util/index.d.ts +17 -0
- package/dist/util/object/index.d.cts +3 -0
- package/dist/util/object/index.d.ts +3 -0
- package/dist/util/serializer/index.d.cts +5 -0
- package/dist/util/serializer/index.d.ts +5 -0
- package/dist/{utils/serializer/index.d.cts → util/serializer/serializer.type.d.cts} +0 -1
- package/dist/{utils/serializer/index.d.ts → util/serializer/serializer.type.d.ts} +0 -1
- package/dist/util/serializer/serializer.util.d.cts +1 -0
- package/dist/util/serializer/serializer.util.d.ts +1 -0
- package/dist/util/string/index.d.cts +6 -0
- package/dist/util/string/index.d.ts +6 -0
- package/dist/util/string/string.type.d.cts +1 -0
- package/dist/util/string/string.type.d.ts +1 -0
- package/dist/{utils/string/index.d.cts → util/string/string.util.d.cts} +0 -1
- package/dist/{utils/string/index.d.ts → util/string/string.util.d.ts} +0 -1
- package/dist/util/validate/index.d.cts +1 -0
- package/dist/util/validate/index.d.ts +1 -0
- package/package.json +65 -46
- package/public/wiki/convention.md +1 -1
- package/dist/configs/config.type.d.cts +0 -3
- package/dist/configs/config.type.d.ts +0 -3
- package/dist/configs/config.util.cjs +0 -1
- package/dist/configs/config.util.d.cts +0 -1
- package/dist/configs/config.util.d.ts +0 -1
- package/dist/configs/config.util.js +0 -1
- package/dist/configs/env/env.constant.d.cts +0 -1
- package/dist/configs/env/env.constant.d.ts +0 -1
- package/dist/configs/env/env.type.d.cts +0 -1
- package/dist/configs/env/env.type.d.ts +0 -1
- package/dist/configs/env/env.util.d.cts +0 -2
- package/dist/configs/env/env.util.d.ts +0 -2
- package/dist/configs/env/index.d.cts +0 -4
- package/dist/configs/env/index.d.ts +0 -4
- package/dist/configs/graphql-codegen/graphql-codegen.type.d.cts +0 -1
- package/dist/configs/graphql-codegen/graphql-codegen.type.d.ts +0 -1
- package/dist/configs/graphql-codegen/index.d.cts +0 -2
- package/dist/configs/graphql-codegen/index.d.ts +0 -2
- package/dist/configs/index.cjs +0 -1
- package/dist/configs/index.d.cts +0 -13
- package/dist/configs/index.d.ts +0 -13
- package/dist/configs/index.js +0 -1
- package/dist/constants/response-status.d.cts +0 -1
- package/dist/constants/response-status.d.ts +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -256
- package/dist/index.d.ts +0 -256
- package/dist/index.js +0 -1
- package/dist/utils/common/index.d.cts +0 -2
- package/dist/utils/common/index.d.ts +0 -2
- package/dist/utils/index.d.cts +0 -17
- package/dist/utils/index.d.ts +0 -17
- package/dist/utils/object/object.util.d.cts +0 -3
- package/dist/utils/object/object.util.d.ts +0 -3
- package/dist/utils/serializer/serializer.type.d.cts +0 -4
- package/dist/utils/serializer/serializer.type.d.ts +0 -4
- package/dist/utils/serializer/serializer.util.d.cts +0 -1
- package/dist/utils/serializer/serializer.util.d.ts +0 -1
- package/dist/utils/string/string.type.d.cts +0 -1
- package/dist/utils/string/string.type.d.ts +0 -1
- package/dist/utils/string/string.util.d.cts +0 -5
- package/dist/utils/string/string.util.d.ts +0 -5
- package/dist/utils/validate/validate.util.d.cts +0 -1
- package/dist/utils/validate/validate.util.d.ts +0 -1
- /package/dist/{configs → config}/commitlint/index.cjs +0 -0
- /package/dist/{configs → config}/commitlint/index.d.cts +0 -0
- /package/dist/{configs → config}/commitlint/index.d.ts +0 -0
- /package/dist/{configs → config}/commitlint/index.js +0 -0
- /package/dist/{configs → config}/config.type.cjs +0 -0
- /package/dist/{configs → config}/config.type.js +0 -0
- /package/dist/{configs → config}/env/env.constant.cjs +0 -0
- /package/dist/{configs → config}/env/env.constant.js +0 -0
- /package/dist/{configs → config}/env/env.type.cjs +0 -0
- /package/dist/{configs → config}/env/env.type.js +0 -0
- /package/dist/{configs → config}/env/env.util.cjs +0 -0
- /package/dist/{configs → config}/env/env.util.js +0 -0
- /package/dist/{configs → config}/env/index.cjs +0 -0
- /package/dist/{configs → config}/env/index.js +0 -0
- /package/dist/{configs → config}/eslint/index.cjs +0 -0
- /package/dist/{configs → config}/eslint/index.d.cts +0 -0
- /package/dist/{configs → config}/eslint/index.d.ts +0 -0
- /package/dist/{configs → config}/eslint/index.js +0 -0
- /package/dist/{configs → config}/graphql-codegen/graphql-codegen.type.cjs +0 -0
- /package/dist/{configs → config}/graphql-codegen/graphql-codegen.type.js +0 -0
- /package/dist/{configs → config}/graphql-codegen/graphql-codegen.util.cjs +0 -0
- /package/dist/{configs → config}/graphql-codegen/graphql-codegen.util.js +0 -0
- /package/dist/{configs → config}/graphql-codegen/index.cjs +0 -0
- /package/dist/{configs → config}/graphql-codegen/index.js +0 -0
- /package/dist/{configs → config}/lint-staged/index.cjs +0 -0
- /package/dist/{configs → config}/lint-staged/index.d.cts +0 -0
- /package/dist/{configs → config}/lint-staged/index.d.ts +0 -0
- /package/dist/{configs → config}/lint-staged/index.js +0 -0
- /package/dist/{constants → constant}/common.cjs +0 -0
- /package/dist/{constants → constant}/common.js +0 -0
- /package/dist/{constants → constant}/index.cjs +0 -0
- /package/dist/{constants → constant}/index.js +0 -0
- /package/dist/{constants → constant}/response-status.cjs +0 -0
- /package/dist/{constants → constant}/response-status.js +0 -0
- /package/dist/{styles → style}/reset.css +0 -0
- /package/dist/{styles → style}/reset.d.cts +0 -0
- /package/dist/{styles → style}/reset.d.ts +0 -0
- /package/dist/{utils → util}/common/common.util.cjs +0 -0
- /package/dist/{utils → util}/common/common.util.js +0 -0
- /package/dist/{utils → util}/common/index.cjs +0 -0
- /package/dist/{utils/common/common.util.d.cts → util/common/index.d.cts} +0 -0
- /package/dist/{utils/common/common.util.d.ts → util/common/index.d.ts} +0 -0
- /package/dist/{utils → util}/common/index.js +0 -0
- /package/dist/{utils → util}/index.cjs +0 -0
- /package/dist/{utils → util}/index.js +0 -0
- /package/dist/{utils → util}/object/index.cjs +0 -0
- /package/dist/{utils → util}/object/index.js +0 -0
- /package/dist/{utils → util}/object/object.util.cjs +0 -0
- /package/dist/{utils/object/index.d.cts → util/object/object.util.d.cts} +0 -0
- /package/dist/{utils/object/index.d.ts → util/object/object.util.d.ts} +0 -0
- /package/dist/{utils → util}/object/object.util.js +0 -0
- /package/dist/{utils → util}/serializer/index.cjs +0 -0
- /package/dist/{utils → util}/serializer/index.js +0 -0
- /package/dist/{utils → util}/serializer/serializer.type.cjs +0 -0
- /package/dist/{utils → util}/serializer/serializer.type.js +0 -0
- /package/dist/{utils → util}/serializer/serializer.util.cjs +0 -0
- /package/dist/{utils → util}/serializer/serializer.util.js +0 -0
- /package/dist/{utils → util}/string/index.cjs +0 -0
- /package/dist/{utils → util}/string/index.js +0 -0
- /package/dist/{utils → util}/string/string.type.cjs +0 -0
- /package/dist/{utils → util}/string/string.type.js +0 -0
- /package/dist/{utils → util}/string/string.util.cjs +0 -0
- /package/dist/{utils → util}/string/string.util.js +0 -0
- /package/dist/{utils → util}/validate/index.cjs +0 -0
- /package/dist/{utils → util}/validate/index.js +0 -0
- /package/dist/{utils → util}/validate/validate.util.cjs +0 -0
- /package/dist/{utils/validate/index.d.cts → util/validate/validate.util.d.cts} +0 -0
- /package/dist/{utils/validate/index.d.ts → util/validate/validate.util.d.ts} +0 -0
- /package/dist/{utils → util}/validate/validate.util.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,n){if(n==null||n>e.length)n=e.length;for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function n(n){if(Array.isArray(n))return e(n)}function t(e,n,t,r,o,a,s){try{var i=e[a](s);var c=i.value}catch(e){t(e);return}if(i.done){n(c)}else{Promise.resolve(c).then(r,o)}}function r(e){return function(){var n=this,r=arguments;return new Promise(function(o,a){var s=e.apply(n,r);function i(e){t(s,o,a,i,c,"next",e)}function c(e){t(s,o,a,i,c,"throw",e)}i(undefined)})}}function o(e,n,t){if(n in e){Object.defineProperty(e,n,{value:t,enumerable:true,configurable:true,writable:true})}else{e[n]=t}return e}function a(e,n){if(n!=null&&typeof Symbol!=="undefined"&&n[Symbol.hasInstance]){return!!n[Symbol.hasInstance](e)}else{return e instanceof n}}function s(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}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 c(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};var r=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}r.forEach(function(n){o(e,n,t[n])})}return e}function u(e){return n(e)||s(e)||l(e)||i()}function E(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(n,t){if(!n)return;if(typeof n==="string")return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor)r=n.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(n,t)}function d(e,n){var t,r,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(n){return c([e,n])}}function c(i){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(a=0)),a)try{if(t=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){a=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(i[0]===6&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}if(o[2])a.ops.pop();a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e];r=0}finally{t=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var f=Object.defineProperty;var p=function(e,n){return f(e,"name",{value:n,configurable:!0})};import m from"@vitejs/plugin-react-swc";import{defineConfig as S}from"vitest/config";import D from"fs-extra";var O=".cyberskill-storage";import C from"@dotenvx/dotenvx";import{bool as y,cleanEnv as I,str as T}from"envalid";import N from"node:os";import v from"node:path";import g from"node:process";var h=!1;function A(){h||(C.config(),h=!0)}p(A,"loadEnvFile");function _(){A();var e=I(g.env,{CWD:T({default:g.cwd()}),DEBUG:y({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:T({default:v.join(N.homedir(),O)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}p(_,"getEnv");var R=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});import{exec as G}from"node:child_process";import P from"node:process";import*as M from"node:util";var L=function(e){return e.Error="error",e.Warning="warning",e}({});import b from"chalk";import U from"consola";import{GraphQLError as w}from"graphql";var F={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var k=_();k.DEBUG||(U.level=4);function Y(e){var n=b[e];return typeof n=="function"?n:b.green}p(Y,"chalkKeyword");var V={silent:U.silent,level:U.level,fatal:U.fatal,error:U.error,warn:U.warn,log:U.log,info:U.info,success:U.success,ready:U.ready,start:U.start,box:U.box,debug:U.debug,trace:U.trace,verbose:U.verbose,printBoxedLog:function e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(n===null||n===void 0?void 0:n.length)){U.box(b.green(e));return}n.forEach(function(e){var n=e.file,r=e.position,o=e.rule,a=e.message;U.log("".concat(b.gray("File:")," ").concat(b.blue("".concat(n).concat(r?":".concat(r):"")))),o&&U.log(" ".concat(Y(t)("Rule:")," ").concat(o)),U.log(" ".concat(Y(t)("Message:")," ").concat(a))}),U.box(Y(t)("".concat(e," : ").concat(n.length))),U.log(b.gray("─".repeat(40)))}};function x(e,n){var t=n!==null&&n!==void 0?n:{},r=t.shouldLog,o=r===void 0?!0:r,s=t.returnValue,i=t.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&V.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:F.INTERNAL_SERVER_ERROR.CODE}}p(x,"catchErrorNode");var j=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});import B from"node-fetch";import K from"fs-extra";var Q=K.lstatSync,H=K.readdirSync,q=K.mkdirSync,W=K.readFileSync,J=K.unlinkSync,z=K.statSync,$=K.readJsonSync;function X(e,n,t){K.writeFileSync(e,n,t!==null&&t!==void 0?t:"utf-8")}p(X,"writeFileSync");function Z(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.every(function(e){return K.pathExistsSync(e)})}p(Z,"pathExistsSync");var ee=_();function en(e){return r(function(){var n,t,r,o;return d(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);return[4,B("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:n=a.sent();if(!n.ok)throw new Error("Failed to fetch latest version: ".concat(n.status," ").concat(n.statusText));return[4,n.json()];case 2:t=a.sent(),r=t.version;return[2,{success:!0,result:r}];case 3:o=a.sent();return[2,x(o)];case 4:return[2]}})})()}p(en,"getLatestPackageVersion");function et(e){return r(function(){var n,t,r,o,a,s,i,c,u,E,l,f,p,m,S,D,O,C,y;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);if(!Z(nt.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:"",file:{}}}];n=$(nt.PACKAGE_JSON),t=n.name,r=n.version,o=r===void 0?"":r,a=n.dependencies,s=a===void 0?{}:a,i=n.devDependencies,c=i===void 0?{}:i;if(e.name===t)return[2,{success:!0,result:{name:t,currentVersion:o,latestVersion:o,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:nt.PACKAGE_JSON,file:n}}];u=e.name in s,E=e.name in c;return[4,en(e.name)];case 1:l=d.sent();if(!l.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:E,installedPath:"",file:{}}}];if(!u&&!E)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:l.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:"",file:{}}}];m=(p=(f=s[e.name])!==null&&f!==void 0?f:c[e.name])!==null&&p!==void 0?p:"",S=eg(ee.CWD,eR,e.name,eP);if(!Z(S))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:l.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:E,installedPath:"",file:{}}}];D=$(S),O=D.version,C=O===void 0?"":O;return[2,m!==C?{success:!0,result:{name:e.name,currentVersion:C||m,latestVersion:l.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:u,isDevDependency:E,installedPath:S,file:D}}:{success:!0,result:{name:e.name,currentVersion:m,latestVersion:l.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:m===l.result,isDependency:u,isDevDependency:E,installedPath:S,file:D}}];case 2:y=d.sent();return[2,x(y)];case 3:return[2]}})})()}p(et,"getPackage");function er(e){return r(function(){var n,t,r,o,a;return d(this,function(s){try{;r=$(nt.PACKAGE_JSON),o=(n=r.dependencies)!==null&&n!==void 0?n:{},a=(t=r.devDependencies)!==null&&t!==void 0?t:{};e.isDependency?o[e.name]=e.latestVersion:e.isDevDependency&&(a[e.name]=e.latestVersion),X(nt.PACKAGE_JSON,JSON.stringify(r,null,4)),V.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){x(e)}return[2]})})()}p(er,"updatePackage");function eo(){return r(function(){var e,n,t,r,o,a,s,i,c,u,E,l,f;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,12,,13]);e=[{command:p(function(){return no.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:p(function(){return no.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:p(function(){return no.pnpmInstallForce()},"command"),message:"Retrying with force install"}];n=true,t=false,r=undefined;d.label=1;case 1:d.trys.push([1,9,10,11]);o=e[Symbol.iterator]();d.label=2;case 2:if(!!(n=(a=o.next()).done))return[3,8];s=a.value,i=s.command,c=s.message;d.label=3;case 3:d.trys.push([3,6,,7]);return[4,i()];case 4:u=d.sent();return[4,ey("".concat(c," using: ").concat(u),u)];case 5:d.sent();return[2];case 6:E=d.sent();x(E);return[3,7];case 7:n=true;return[3,2];case 8:return[3,11];case 9:l=d.sent();t=true;r=l;return[3,11];case 10:try{if(!n&&o.return!=null){o.return()}}finally{if(t){throw r}}return[7];case 11:return[3,13];case 12:f=d.sent();x(f);return[3,13];case 13:return[2]}})})()}p(eo,"installDependencies");function ea(e,n){return r(function(){var t,r,o,a,s,i,c,u,E,l,f,p;return d(this,function(d){switch(d.label){case 0:if(!Z(nt.PACKAGE_JSON)){V.error("package.json not found. Aborting setup.");return[2]}d.label=1;case 1:d.trys.push([1,16,,17]);return[4,Promise.all(e.map(et))];case 2:t=d.sent().filter(function(e){return e.success?!e.result.isCurrentProject&&(!e.result.isInstalled||!e.result.isUpToDate):!1});r=t.length>0;if(!r)return[3,7];return[4,Promise.all(t.map(function(e){return e.success?er(e.result):Promise.resolve()}))];case 3:d.sent();return[4,eo()];case 4:d.sent();o=["Running ESLint with auto-fix"];return[4,no.eslintFix()];case 5:return[4,ey.apply(void 0,o.concat([d.sent()]))];case 6:r=d.sent();d.label=7;case 7:r;s=true,i=false,c=undefined;d.label=8;case 8:d.trys.push([8,13,14,15]);u=((a=n===null||n===void 0?void 0:n.postInstallActions)!==null&&a!==void 0?a:[])[Symbol.iterator]();d.label=9;case 9:if(!!(s=(E=u.next()).done))return[3,12];l=E.value;return[4,l()];case 10:d.sent();d.label=11;case 11:s=true;return[3,9];case 12:return[3,15];case 13:f=d.sent();i=true;c=f;return[3,15];case 14:try{if(!s&&u.return!=null){u.return()}}finally{if(i){throw c}}return[7];case 15:return[3,17];case 16:p=d.sent();x(p);return[3,17];case 17:return[2]}})})()}p(ea,"setupPackages");import es from"node-persist";var ei=_();function ec(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:e=es.defaultInstance;if(e)return[3,2];return[4,es.init({dir:ei.CYBERSKILL_STORAGE_DIRECTORY,stringify:JSON.stringify,parse:JSON.parse,encoding:"utf8",logging:!1,forgiveParseErrors:!0})];case 1:e=n.sent();n.label=2;case 2:e;return[2]}})})()}p(ec,"initNodePersist");var eu={get:function e(e){return r(function(){var n,t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ec()];case 1:r.sent();return[4,es.getItem(e)];case 2:return[2,(n=r.sent())!==null&&n!==void 0?n:null];case 3:t=r.sent();return[2,x(t,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ec()];case 1:r.sent();return[4,es.setItem(e,n)];case 2:r.sent();return[3,4];case 3:t=r.sent();x(t);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,ec()];case 1:t.sent();return[4,es.removeItem(e)];case 2:t.sent();return[3,4];case 3:n=t.sent();x(n);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,ec()];case 1:t.sent();return[4,es.keys()];case 2:e=t.sent();return[2,Array.isArray(e)?e:(V.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:n=t.sent();return[2,x(n,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return d(this,function(n){try{return[2,"".concat(ei.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,x(e,{returnValue:null})]}return[2]})})()}};var eE=_(),el=M.promisify(G);function ed(e){return"error_list:".concat(e)}p(ed,"getErrorListKey");function ef(e){return r(function(){var n,t,o;return d(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];n=Date.now(),t=ed(n);a.label=1;case 1:a.trys.push([1,3,,4]);return[4,eu.set(t,{errors:e,timestamp:n})];case 2:a.sent(),setTimeout(function(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:return[4,eu.getLogLink(t)];case 1:e=n.sent();e&&V.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},10);return[3,4];case 3:o=a.sent();x(o);return[3,4];case 4:return[2]}})})()}p(ef,"saveErrorListToStorage");function ep(e){var n=[],t=[],r="",o=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,a=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,E,l;var d=o.exec(e)||[],f=a.exec(e)||[],p=s.exec(e)||[];var m,S,D,O,C,y;d.length&&r?n.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===L.Error?L.Error:L.Warning,message:(m=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&m!==void 0?m:"",rule:(S=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&S!==void 0?S:""}):f.length?n.push({file:(D=f===null||f===void 0?void 0:f[1])!==null&&D!==void 0?D:"",position:"".concat(f[2],":").concat(f[3]),type:f[4]===L.Error?L.Error:L.Warning,message:(O=f===null||f===void 0?void 0:(u=f[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):p.length?n.push({file:"commitlint",type:L.Error,message:(C=p===null||p===void 0?void 0:(E=p[1])===null||E===void 0?void 0:E.trim())!==null&&C!==void 0?C:"",rule:(y=p===null||p===void 0?void 0:(l=p[2])===null||l===void 0?void 0:l.trim())!==null&&y!==void 0?y:""}):t.push(e.trim())}}),n.length&&ef(n),eE.DEBUG&&t.length&&(V.warn("Unmatched lines:"),t.forEach(function(e){return V.info(" ".concat(e))}))}p(ep,"parseTextErrors");function em(e){try{var n=JSON.parse(e),t=[];n.forEach(function(e){var n=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,o=e.line,a=e.column,s=e.ruleId,i=e.message;t.push({type:r===2?L.Error:L.Warning,file:n,position:"".concat(o,":").concat(a),rule:s,message:i})})}),t.length&&ef(t)}catch(n){ep(e)}}p(em,"parseCommandOutput");function eS(e){return r(function(e){var n,t,r,o,a,s,i,c,u;var E=arguments;return d(this,function(l){switch(l.label){case 0:n=E.length>1&&E[1]!==void 0?E[1]:em;t=new AbortController;P.on("SIGINT",function(){V.warn("Process interrupted. Terminating..."),t.abort(),P.exit()});l.label=1;case 1:l.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,el(e,{maxBuffer:0x6400000,signal:t.signal})];case 2:r=l.sent(),o=r.stdout,a=r.stderr;[o,a].forEach(function(e){return e&&n(e)});l.label=3;case 3:return[3,5];case 4:s=l.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&n(e)}),!c&&!i&&V.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}p(eS,"executeCommand");function eD(e){return{raw:!0,cmd:e}}p(eD,"rawCommand");function eO(e,n){return(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(e4," ").concat(e0," ").concat(ej," ").concat(e):"".concat(e4," ").concat(ex," ").concat(e)}p(eO,"formatCLI");function eC(e,n){return typeof e=="function"?eO(e(n),n):(typeof e==="undefined"?"undefined":E(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eO(e,n):e}p(eC,"formatCommand");function ey(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);V.start("".concat(e)),eE.DEBUG&&V.info("→ ".concat(n));return[4,eS(n)];case 1:r.sent(),V.success("".concat(e," done."));return[3,3];case 2:t=r.sent();x(t);return[3,3];case 3:return[2]}})})()}p(ey,"runCommand");import eI from"node:path";var eT=_(),eN=eI;function ev(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eN).resolve.apply(r,[eT.CWD].concat(u(n)))}p(ev,"resolveWorkingPath");function eg(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eN).join.apply(r,u(n))}p(eg,"join");var eh=_(),eA=eh.CWD,e_="@cyberskill/shared",eR="node_modules",eG="dist",eP="package.json",eM="package-lock.json",eL="tsconfig.json",eb=".gitignore",eU=".simple-git-hooks.json",ew="pnpm-lock.yaml",eF=".git/hooks/",ek=".git/COMMIT_EDITMSG",eY=".migrate-mongo.config.js",eV=function(){var e=D.readJsonSync(ev(eP)).name===e_?eA:eg(eA,eR,e_);return eg(e,eG)}(),ex="cyberskill",ej="src/node/cli/index.ts",eB="eslint",eK="eslint",eQ="vitest";var eH="vitest",eq="@commitlint/cli",eW="@commitlint/config-conventional",eJ="commitlint",ez="lint-staged",e$="lint-staged",eX="typescript",eZ="tsc",e0="tsx",e1="git",e2="pnpm",e4="pnpm exec",e3="simple-git-hooks",e5="simple-git-hooks",e7="@eslint/config-inspector",e6="eslint-config-inspector",e8="node-modules-inspector",e9="node-modules-inspector",ne="migrate-mongo",nn="./node_modules/migrate-mongo/bin/migrate-mongo",nt={CYBERSKILL_DIRECTORY:eV,WORKING_DIRECTORY:eA,TS_CONFIG:ev(eL),GIT_IGNORE:ev(eb),GIT_HOOK:ev(eF),GIT_COMMIT_MSG:ev(ek),SIMPLE_GIT_HOOKS_JSON:ev(eU),PACKAGE_JSON:ev(eP),PACKAGE_LOCK_JSON:ev(eM),PNPM_LOCK_YAML:ev(ew),NODE_MODULES:ev(eR),MIGRATE_MONGO_CONFIG:ev(eY),LINT_STAGED_CONFIG:ev("".concat(eV,"/configs/lint-staged/index.js")),COMMITLINT_CONFIG:ev("".concat(eV,"/configs/commitlint/index.js")),UNIT_TEST_CONFIG:ev("".concat(eV,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:ev("".concat(eV,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:ev("".concat(eV,"/react/vitest/vitest.e2e.js"))};function nr(e){var n=e.type,t=e.packages,o=e.command;var a=t===null||t===void 0?void 0:t.reduce(function(e,n){return e.some(function(e){return e.name===n.name})||e.push(n),e},[]);return function(){return r(function(){var e;return d(this,function(t){switch(t.label){case 0:switch(n){case R.CLI:return[3,1];case R.STRING:return[3,4]}return[3,5];case 1:e=a===null||a===void 0?void 0:a.length;if(!e)return[3,3];return[4,ea(a,{update:!0})];case 2:e=t.sent();t.label=3;case 3:return[2,(e,eC(eD("".concat(e4," ").concat(o))))];case 4:return[2,eC(eD(o))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}p(nr,"buildCommand");var no={simpleGitHooks:nr({type:R.CLI,packages:[{name:e3,type:j.DEV_DEPENDENCY}],command:e5}),eslintInspect:nr({type:R.CLI,packages:[{name:e7,type:j.DEV_DEPENDENCY}],command:e6}),nodeModulesInspect:nr({type:R.CLI,packages:[{name:e8,type:j.DEV_DEPENDENCY}],command:e9}),eslintCheck:nr({type:R.CLI,packages:[{name:eB,type:j.DEV_DEPENDENCY}],command:"".concat(eK," ").concat(nt.WORKING_DIRECTORY," --no-cache")}),eslintFix:nr({type:R.CLI,packages:[{name:eB,type:j.DEV_DEPENDENCY}],command:"".concat(eK," ").concat(nt.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:nr({type:R.CLI,packages:[{name:eX,type:j.DEPENDENCY}],command:"".concat(eZ," -p ").concat(nt.TS_CONFIG," --noEmit")}),testUnit:nr({type:R.CLI,packages:[{name:eQ,type:j.DEV_DEPENDENCY}],command:"".concat(eH," --config ").concat(nt.UNIT_TEST_CONFIG)}),testE2e:nr({type:R.CLI,packages:[{name:eQ,type:j.DEV_DEPENDENCY}],command:"".concat(eH," --config ").concat(nt.E2E_TEST_CONFIG)}),mongoMigrateCreate:p(function(e){return nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," create ").concat(e," -f ").concat(nt.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," up -f ").concat(nt.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," down -f ").concat(nt.MIGRATE_MONGO_CONFIG)}),commitLint:nr({type:R.CLI,packages:[{name:eq,type:j.DEV_DEPENDENCY},{name:eW,type:j.DEV_DEPENDENCY}],command:"".concat(eJ," --edit ").concat(nt.GIT_COMMIT_MSG," --config ").concat(nt.COMMITLINT_CONFIG)}),lintStaged:nr({type:R.CLI,packages:[{name:ez,type:j.DEV_DEPENDENCY}],command:"".concat(e$," --config ").concat(nt.LINT_STAGED_CONFIG)}),configureGitHook:nr({type:R.STRING,command:"".concat(e1," config core.hooksPath ").concat(nt.GIT_HOOK)}),stageBuildDirectory:nr({type:R.STRING,command:"".concat(e1," add ").concat(eG)}),build:nr({type:R.STRING,command:"".concat(e2," run --if-present build")}),pnpmInstallStandard:nr({type:R.STRING,command:"".concat(e2," install --no-frozen-lockfile")}),pnpmInstallLegacy:nr({type:R.STRING,command:"".concat(e2," install --no-frozen-lockfile --legacy-peer-deps")}),pnpmInstallForce:nr({type:R.STRING,command:"".concat(e2," install --no-frozen-lockfile --force")})};function na(e){return S(c({plugins:[m()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[nt.UNIT_TEST_SETUP_CONFIG]}},e))}p(na,"vitestUnit");export{na as vitestUnit};
|
|
1
|
+
function e(e,n){if(n==null||n>e.length)n=e.length;for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function n(n){if(Array.isArray(n))return e(n)}function t(e,n,t,r,o,a,s){try{var i=e[a](s);var c=i.value}catch(e){t(e);return}if(i.done){n(c)}else{Promise.resolve(c).then(r,o)}}function r(e){return function(){var n=this,r=arguments;return new Promise(function(o,a){var s=e.apply(n,r);function i(e){t(s,o,a,i,c,"next",e)}function c(e){t(s,o,a,i,c,"throw",e)}i(undefined)})}}function o(e,n,t){if(n in e){Object.defineProperty(e,n,{value:t,enumerable:true,configurable:true,writable:true})}else{e[n]=t}return e}function a(e,n){if(n!=null&&typeof Symbol!=="undefined"&&n[Symbol.hasInstance]){return!!n[Symbol.hasInstance](e)}else{return e instanceof n}}function s(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}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 c(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};var r=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}r.forEach(function(n){o(e,n,t[n])})}return e}function u(e){return n(e)||s(e)||l(e)||i()}function E(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(n,t){if(!n)return;if(typeof n==="string")return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor)r=n.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(n,t)}function d(e,n){var t,r,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(n){return c([e,n])}}function c(i){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(a=0)),a)try{if(t=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){a=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(i[0]===6&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}if(o[2])a.ops.pop();a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e];r=0}finally{t=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var f=Object.defineProperty;var p=function(e,n){return f(e,"name",{value:n,configurable:!0})};import m from"@vitejs/plugin-react-swc";import{defineConfig as S}from"vitest/config";import D from"fs-extra";var O=".cyberskill-storage";import C from"@dotenvx/dotenvx";import{bool as y,cleanEnv as I,str as T}from"envalid";import N from"node:os";import v from"node:path";import g from"node:process";var h=!1;function A(){h||(C.config(),h=!0)}p(A,"loadEnvFile");function _(){A();var e=I(g.env,{CWD:T({default:g.cwd()}),DEBUG:y({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:T({default:v.join(N.homedir(),O)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}p(_,"getEnv");var R=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});import{exec as G}from"node:child_process";import P from"node:process";import*as M from"node:util";var L=function(e){return e.Error="error",e.Warning="warning",e}({});import b from"chalk";import U from"consola";import{GraphQLError as w}from"graphql";var F={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var k=_();k.DEBUG||(U.level=4);function Y(e){var n=b[e];return typeof n=="function"?n:b.green}p(Y,"chalkKeyword");var V={silent:U.silent,level:U.level,fatal:U.fatal,error:U.error,warn:U.warn,log:U.log,info:U.info,success:U.success,ready:U.ready,start:U.start,box:U.box,debug:U.debug,trace:U.trace,verbose:U.verbose,printBoxedLog:function e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(n===null||n===void 0?void 0:n.length)){U.box(b.green(e));return}n.forEach(function(e){var n=e.file,r=e.position,o=e.rule,a=e.message;U.log("".concat(b.gray("File:")," ").concat(b.blue("".concat(n).concat(r?":".concat(r):"")))),o&&U.log(" ".concat(Y(t)("Rule:")," ").concat(o)),U.log(" ".concat(Y(t)("Message:")," ").concat(a))}),U.box(Y(t)("".concat(e," : ").concat(n.length))),U.log(b.gray("─".repeat(40)))}};function x(e,n){var t=n!==null&&n!==void 0?n:{},r=t.shouldLog,o=r===void 0?!0:r,s=t.returnValue,i=t.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&V.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:F.INTERNAL_SERVER_ERROR.CODE}}p(x,"catchError");var j=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});import B from"node-fetch";import K from"fs-extra";var Q=K.lstatSync,H=K.readdirSync,q=K.mkdirSync,W=K.readFileSync,J=K.unlinkSync,z=K.statSync,$=K.readJsonSync;function X(e,n,t){K.writeFileSync(e,n,t!==null&&t!==void 0?t:"utf-8")}p(X,"writeFileSync");function Z(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.every(function(e){return K.pathExistsSync(e)})}p(Z,"pathExistsSync");var ee=_();function en(e){return r(function(){var n,t,r,o;return d(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);return[4,B("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:n=a.sent();if(!n.ok)throw new Error("Failed to fetch latest version: ".concat(n.status," ").concat(n.statusText));return[4,n.json()];case 2:t=a.sent(),r=t.version;return[2,{success:!0,result:r}];case 3:o=a.sent();return[2,x(o)];case 4:return[2]}})})()}p(en,"getLatestPackageVersion");function et(e){return r(function(){var n,t,r,o,a,s,i,c,u,E,l,f,p,m,S,D,O,C,y;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);if(!Z(nt.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:"",file:{}}}];n=$(nt.PACKAGE_JSON),t=n.name,r=n.version,o=r===void 0?"":r,a=n.dependencies,s=a===void 0?{}:a,i=n.devDependencies,c=i===void 0?{}:i;if(e.name===t)return[2,{success:!0,result:{name:t,currentVersion:o,latestVersion:o,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:nt.PACKAGE_JSON,file:n}}];u=e.name in s,E=e.name in c;return[4,en(e.name)];case 1:l=d.sent();if(!l.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:E,installedPath:"",file:{}}}];if(!u&&!E)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:l.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:"",file:{}}}];m=(p=(f=s[e.name])!==null&&f!==void 0?f:c[e.name])!==null&&p!==void 0?p:"",S=eg(ee.CWD,eR,e.name,eP);if(!Z(S))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:l.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:E,installedPath:"",file:{}}}];D=$(S),O=D.version,C=O===void 0?"":O;return[2,m!==C?{success:!0,result:{name:e.name,currentVersion:C||m,latestVersion:l.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:u,isDevDependency:E,installedPath:S,file:D}}:{success:!0,result:{name:e.name,currentVersion:m,latestVersion:l.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:m===l.result,isDependency:u,isDevDependency:E,installedPath:S,file:D}}];case 2:y=d.sent();return[2,x(y)];case 3:return[2]}})})()}p(et,"getPackage");function er(e){return r(function(){var n,t,r,o,a;return d(this,function(s){try{;r=$(nt.PACKAGE_JSON),o=(n=r.dependencies)!==null&&n!==void 0?n:{},a=(t=r.devDependencies)!==null&&t!==void 0?t:{};e.isDependency?o[e.name]=e.latestVersion:e.isDevDependency&&(a[e.name]=e.latestVersion),X(nt.PACKAGE_JSON,JSON.stringify(r,null,4)),V.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){x(e)}return[2]})})()}p(er,"updatePackage");function eo(){return r(function(){var e,n,t,r,o,a,s,i,c,u,E,l,f;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,12,,13]);e=[{command:p(function(){return no.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:p(function(){return no.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:p(function(){return no.pnpmInstallForce()},"command"),message:"Retrying with force install"}];n=true,t=false,r=undefined;d.label=1;case 1:d.trys.push([1,9,10,11]);o=e[Symbol.iterator]();d.label=2;case 2:if(!!(n=(a=o.next()).done))return[3,8];s=a.value,i=s.command,c=s.message;d.label=3;case 3:d.trys.push([3,6,,7]);return[4,i()];case 4:u=d.sent();return[4,ey("".concat(c," using: ").concat(u),u)];case 5:d.sent();return[2];case 6:E=d.sent();x(E);return[3,7];case 7:n=true;return[3,2];case 8:return[3,11];case 9:l=d.sent();t=true;r=l;return[3,11];case 10:try{if(!n&&o.return!=null){o.return()}}finally{if(t){throw r}}return[7];case 11:return[3,13];case 12:f=d.sent();x(f);return[3,13];case 13:return[2]}})})()}p(eo,"installDependencies");function ea(e,n){return r(function(){var t,r,o,a,s,i,c,u,E,l,f,p;return d(this,function(d){switch(d.label){case 0:if(!Z(nt.PACKAGE_JSON)){V.error("package.json not found. Aborting setup.");return[2]}d.label=1;case 1:d.trys.push([1,16,,17]);return[4,Promise.all(e.map(et))];case 2:t=d.sent().filter(function(e){return e.success?!e.result.isCurrentProject&&(!e.result.isInstalled||!e.result.isUpToDate):!1});r=t.length>0;if(!r)return[3,7];return[4,Promise.all(t.map(function(e){return e.success?er(e.result):Promise.resolve()}))];case 3:d.sent();return[4,eo()];case 4:d.sent();o=["Running ESLint with auto-fix"];return[4,no.eslintFix()];case 5:return[4,ey.apply(void 0,o.concat([d.sent()]))];case 6:r=d.sent();d.label=7;case 7:r;s=true,i=false,c=undefined;d.label=8;case 8:d.trys.push([8,13,14,15]);u=((a=n===null||n===void 0?void 0:n.postInstallActions)!==null&&a!==void 0?a:[])[Symbol.iterator]();d.label=9;case 9:if(!!(s=(E=u.next()).done))return[3,12];l=E.value;return[4,l()];case 10:d.sent();d.label=11;case 11:s=true;return[3,9];case 12:return[3,15];case 13:f=d.sent();i=true;c=f;return[3,15];case 14:try{if(!s&&u.return!=null){u.return()}}finally{if(i){throw c}}return[7];case 15:return[3,17];case 16:p=d.sent();x(p);return[3,17];case 17:return[2]}})})()}p(ea,"setupPackages");import es from"node-persist";var ei=_();function ec(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:e=es.defaultInstance;if(e)return[3,2];return[4,es.init({dir:ei.CYBERSKILL_STORAGE_DIRECTORY,stringify:JSON.stringify,parse:JSON.parse,encoding:"utf8",logging:!1,forgiveParseErrors:!0})];case 1:e=n.sent();n.label=2;case 2:e;return[2]}})})()}p(ec,"initNodePersist");var eu={get:function e(e){return r(function(){var n,t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ec()];case 1:r.sent();return[4,es.getItem(e)];case 2:return[2,(n=r.sent())!==null&&n!==void 0?n:null];case 3:t=r.sent();return[2,x(t,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ec()];case 1:r.sent();return[4,es.setItem(e,n)];case 2:r.sent();return[3,4];case 3:t=r.sent();x(t);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,ec()];case 1:t.sent();return[4,es.removeItem(e)];case 2:t.sent();return[3,4];case 3:n=t.sent();x(n);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,ec()];case 1:t.sent();return[4,es.keys()];case 2:e=t.sent();return[2,Array.isArray(e)?e:(V.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:n=t.sent();return[2,x(n,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return d(this,function(n){try{return[2,"".concat(ei.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,x(e,{returnValue:null})]}return[2]})})()}};var eE=_(),el=M.promisify(G);function ed(e){return"error_list:".concat(e)}p(ed,"getErrorListKey");function ef(e){return r(function(){var n,t,o;return d(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];n=Date.now(),t=ed(n);a.label=1;case 1:a.trys.push([1,3,,4]);return[4,eu.set(t,{errors:e,timestamp:n})];case 2:a.sent(),setTimeout(function(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:return[4,eu.getLogLink(t)];case 1:e=n.sent();e&&V.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},10);return[3,4];case 3:o=a.sent();x(o);return[3,4];case 4:return[2]}})})()}p(ef,"saveErrorListToStorage");function ep(e){var n=[],t=[],r="",o=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,a=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,E,l;var d=o.exec(e)||[],f=a.exec(e)||[],p=s.exec(e)||[];var m,S,D,O,C,y;d.length&&r?n.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===L.Error?L.Error:L.Warning,message:(m=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&m!==void 0?m:"",rule:(S=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&S!==void 0?S:""}):f.length?n.push({file:(D=f===null||f===void 0?void 0:f[1])!==null&&D!==void 0?D:"",position:"".concat(f[2],":").concat(f[3]),type:f[4]===L.Error?L.Error:L.Warning,message:(O=f===null||f===void 0?void 0:(u=f[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):p.length?n.push({file:"commitlint",type:L.Error,message:(C=p===null||p===void 0?void 0:(E=p[1])===null||E===void 0?void 0:E.trim())!==null&&C!==void 0?C:"",rule:(y=p===null||p===void 0?void 0:(l=p[2])===null||l===void 0?void 0:l.trim())!==null&&y!==void 0?y:""}):t.push(e.trim())}}),n.length&&ef(n),eE.DEBUG&&t.length&&(V.warn("Unmatched lines:"),t.forEach(function(e){return V.info(" ".concat(e))}))}p(ep,"parseTextErrors");function em(e){try{var n=JSON.parse(e),t=[];n.forEach(function(e){var n=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,o=e.line,a=e.column,s=e.ruleId,i=e.message;t.push({type:r===2?L.Error:L.Warning,file:n,position:"".concat(o,":").concat(a),rule:s,message:i})})}),t.length&&ef(t)}catch(n){ep(e)}}p(em,"parseCommandOutput");function eS(e){return r(function(e){var n,t,r,o,a,s,i,c,u;var E=arguments;return d(this,function(l){switch(l.label){case 0:n=E.length>1&&E[1]!==void 0?E[1]:em;t=new AbortController;P.on("SIGINT",function(){V.warn("Process interrupted. Terminating..."),t.abort(),P.exit()});l.label=1;case 1:l.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,el(e,{maxBuffer:0x6400000,signal:t.signal})];case 2:r=l.sent(),o=r.stdout,a=r.stderr;[o,a].forEach(function(e){return e&&n(e)});l.label=3;case 3:return[3,5];case 4:s=l.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&n(e)}),!c&&!i&&V.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}p(eS,"executeCommand");function eD(e){return{raw:!0,cmd:e}}p(eD,"rawCommand");function eO(e,n){return(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(e4," ").concat(e0," ").concat(ej," ").concat(e):"".concat(e4," ").concat(ex," ").concat(e)}p(eO,"formatCLI");function eC(e,n){return typeof e=="function"?eO(e(n),n):(typeof e==="undefined"?"undefined":E(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eO(e,n):e}p(eC,"formatCommand");function ey(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);V.start("".concat(e)),eE.DEBUG&&V.info("→ ".concat(n));return[4,eS(n)];case 1:r.sent(),V.success("".concat(e," done."));return[3,3];case 2:t=r.sent();x(t);return[3,3];case 3:return[2]}})})()}p(ey,"runCommand");import eI from"node:path";var eT=_(),eN=eI;function ev(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eN).resolve.apply(r,[eT.CWD].concat(u(n)))}p(ev,"resolveWorkingPath");function eg(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eN).join.apply(r,u(n))}p(eg,"join");var eh=_(),eA=eh.CWD,e_="@cyberskill/shared",eR="node_modules",eG="dist",eP="package.json",eM="package-lock.json",eL="tsconfig.json",eb=".gitignore",eU=".simple-git-hooks.json",ew="pnpm-lock.yaml",eF=".git/hooks/",ek=".git/COMMIT_EDITMSG",eY=".migrate-mongo.config.js",eV=function(){var e=D.readJsonSync(ev(eP)).name===e_?eA:eg(eA,eR,e_);return eg(e,eG)}(),ex="cyberskill",ej="src/node/cli/index.ts",eB="eslint",eK="eslint",eQ="vitest";var eH="vitest",eq="@commitlint/cli",eW="@commitlint/config-conventional",eJ="commitlint",ez="lint-staged",e$="lint-staged",eX="typescript",eZ="tsc",e0="tsx",e1="git",e2="pnpm",e4="pnpm exec",e3="simple-git-hooks",e5="simple-git-hooks",e7="@eslint/config-inspector",e6="eslint-config-inspector",e8="node-modules-inspector",e9="node-modules-inspector",ne="migrate-mongo",nn="./node_modules/migrate-mongo/bin/migrate-mongo",nt={CYBERSKILL_DIRECTORY:eV,WORKING_DIRECTORY:eA,TS_CONFIG:ev(eL),GIT_IGNORE:ev(eb),GIT_HOOK:ev(eF),GIT_COMMIT_MSG:ev(ek),SIMPLE_GIT_HOOKS_JSON:ev(eU),PACKAGE_JSON:ev(eP),PACKAGE_LOCK_JSON:ev(eM),PNPM_LOCK_YAML:ev(ew),NODE_MODULES:ev(eR),MIGRATE_MONGO_CONFIG:ev(eY),LINT_STAGED_CONFIG:ev("".concat(eV,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:ev("".concat(eV,"/config/commitlint/index.js")),UNIT_TEST_CONFIG:ev("".concat(eV,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:ev("".concat(eV,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:ev("".concat(eV,"/react/vitest/vitest.e2e.js"))};function nr(e){var n=e.type,t=e.packages,o=e.command;var a=t===null||t===void 0?void 0:t.reduce(function(e,n){return e.some(function(e){return e.name===n.name})||e.push(n),e},[]);return function(){return r(function(){var e;return d(this,function(t){switch(t.label){case 0:switch(n){case R.CLI:return[3,1];case R.STRING:return[3,4]}return[3,5];case 1:e=a===null||a===void 0?void 0:a.length;if(!e)return[3,3];return[4,ea(a,{update:!0})];case 2:e=t.sent();t.label=3;case 3:return[2,(e,eC(eD("".concat(e4," ").concat(o))))];case 4:return[2,eC(eD(o))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}p(nr,"buildCommand");var no={simpleGitHooks:nr({type:R.CLI,packages:[{name:e3,type:j.DEV_DEPENDENCY}],command:e5}),eslintInspect:nr({type:R.CLI,packages:[{name:e7,type:j.DEV_DEPENDENCY}],command:e6}),nodeModulesInspect:nr({type:R.CLI,packages:[{name:e8,type:j.DEV_DEPENDENCY}],command:e9}),eslintCheck:nr({type:R.CLI,packages:[{name:eB,type:j.DEV_DEPENDENCY}],command:"".concat(eK," ").concat(nt.WORKING_DIRECTORY," --no-cache")}),eslintFix:nr({type:R.CLI,packages:[{name:eB,type:j.DEV_DEPENDENCY}],command:"".concat(eK," ").concat(nt.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:nr({type:R.CLI,packages:[{name:eX,type:j.DEPENDENCY}],command:"".concat(eZ," -p ").concat(nt.TS_CONFIG," --noEmit")}),testUnit:nr({type:R.CLI,packages:[{name:eQ,type:j.DEV_DEPENDENCY}],command:"".concat(eH," --config ").concat(nt.UNIT_TEST_CONFIG)}),testE2e:nr({type:R.CLI,packages:[{name:eQ,type:j.DEV_DEPENDENCY}],command:"".concat(eH," --config ").concat(nt.E2E_TEST_CONFIG)}),mongoMigrateCreate:p(function(e){return nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," create ").concat(e," -f ").concat(nt.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," up -f ").concat(nt.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," down -f ").concat(nt.MIGRATE_MONGO_CONFIG)}),commitLint:nr({type:R.CLI,packages:[{name:eq,type:j.DEV_DEPENDENCY},{name:eW,type:j.DEV_DEPENDENCY}],command:"".concat(eJ," --edit ").concat(nt.GIT_COMMIT_MSG," --config ").concat(nt.COMMITLINT_CONFIG)}),lintStaged:nr({type:R.CLI,packages:[{name:ez,type:j.DEV_DEPENDENCY}],command:"".concat(e$," --config ").concat(nt.LINT_STAGED_CONFIG)}),configureGitHook:nr({type:R.STRING,command:"".concat(e1," config core.hooksPath ").concat(nt.GIT_HOOK)}),stageBuildDirectory:nr({type:R.STRING,command:"".concat(e1," add ").concat(eG)}),build:nr({type:R.STRING,command:"".concat(e2," run --if-present build")}),pnpmInstallStandard:nr({type:R.STRING,command:"".concat(e2," install --no-frozen-lockfile")}),pnpmInstallLegacy:nr({type:R.STRING,command:"".concat(e2," install --no-frozen-lockfile --legacy-peer-deps")}),pnpmInstallForce:nr({type:R.STRING,command:"".concat(e2," install --no-frozen-lockfile --force")})};function na(e){return S(c({plugins:[m()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[nt.UNIT_TEST_SETUP_CONFIG]}},e))}p(na,"vitestUnit");export{na as vitestUnit};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { T_Object } from '../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { I_Log_alias_3 as I_Log } from '../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { I_ReturnSuccess } from '../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { I_ReturnFailure } from '../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { I_Return } from '../_tsup-dts-rollup.cjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { T_Object } from '../_tsup-dts-rollup.js';
|
|
2
|
+
export { I_Log_alias_3 as I_Log } from '../_tsup-dts-rollup.js';
|
|
3
|
+
export { I_ReturnSuccess } from '../_tsup-dts-rollup.js';
|
|
4
|
+
export { I_ReturnFailure } from '../_tsup-dts-rollup.js';
|
|
5
|
+
export { I_Return } from '../_tsup-dts-rollup.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
1
|
+
export { T_Object_alias_1 as T_Object } from '../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { I_Log_alias_4 as I_Log } from '../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { I_ReturnSuccess_alias_1 as I_ReturnSuccess } from '../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { I_ReturnFailure_alias_1 as I_ReturnFailure } from '../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { I_Return_alias_1 as I_Return } from '../_tsup-dts-rollup.cjs';
|
|
6
|
+
export { T_Children } from '../_tsup-dts-rollup.cjs';
|
|
7
|
+
export { I_Children } from '../_tsup-dts-rollup.cjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
1
|
+
export { T_Object_alias_1 as T_Object } from '../_tsup-dts-rollup.js';
|
|
2
|
+
export { I_Log_alias_4 as I_Log } from '../_tsup-dts-rollup.js';
|
|
3
|
+
export { I_ReturnSuccess_alias_1 as I_ReturnSuccess } from '../_tsup-dts-rollup.js';
|
|
4
|
+
export { I_ReturnFailure_alias_1 as I_ReturnFailure } from '../_tsup-dts-rollup.js';
|
|
5
|
+
export { I_Return_alias_1 as I_Return } from '../_tsup-dts-rollup.js';
|
|
6
|
+
export { T_Children } from '../_tsup-dts-rollup.js';
|
|
7
|
+
export { I_Children } from '../_tsup-dts-rollup.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { T_Children_alias_1 as T_Children } from '../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { I_Children_alias_1 as I_Children } from '../_tsup-dts-rollup.cjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { T_Children_alias_1 as T_Children } from '../_tsup-dts-rollup.js';
|
|
2
|
+
export { I_Children_alias_1 as I_Children } from '../_tsup-dts-rollup.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { regexSearchMapper } from '../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { removeAccent } from '../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { isJson } from '../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { isObject } from '../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { deepMerge } from '../_tsup-dts-rollup.cjs';
|
|
6
|
+
export { T_SerializerKnownTypes } from '../_tsup-dts-rollup.cjs';
|
|
7
|
+
export { T_SerializerValueMap } from '../_tsup-dts-rollup.cjs';
|
|
8
|
+
export { I_SerializerTypeWrapper } from '../_tsup-dts-rollup.cjs';
|
|
9
|
+
export { I_Serializer } from '../_tsup-dts-rollup.cjs';
|
|
10
|
+
export { serializer } from '../_tsup-dts-rollup.cjs';
|
|
11
|
+
export { I_SlugifyOptions } from '../_tsup-dts-rollup.cjs';
|
|
12
|
+
export { generateSlug } from '../_tsup-dts-rollup.cjs';
|
|
13
|
+
export { generateShortId } from '../_tsup-dts-rollup.cjs';
|
|
14
|
+
export { generateRandomPassword } from '../_tsup-dts-rollup.cjs';
|
|
15
|
+
export { getFileName } from '../_tsup-dts-rollup.cjs';
|
|
16
|
+
export { substringBetween } from '../_tsup-dts-rollup.cjs';
|
|
17
|
+
export { validate } from '../_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { regexSearchMapper } from '../_tsup-dts-rollup.js';
|
|
2
|
+
export { removeAccent } from '../_tsup-dts-rollup.js';
|
|
3
|
+
export { isJson } from '../_tsup-dts-rollup.js';
|
|
4
|
+
export { isObject } from '../_tsup-dts-rollup.js';
|
|
5
|
+
export { deepMerge } from '../_tsup-dts-rollup.js';
|
|
6
|
+
export { T_SerializerKnownTypes } from '../_tsup-dts-rollup.js';
|
|
7
|
+
export { T_SerializerValueMap } from '../_tsup-dts-rollup.js';
|
|
8
|
+
export { I_SerializerTypeWrapper } from '../_tsup-dts-rollup.js';
|
|
9
|
+
export { I_Serializer } from '../_tsup-dts-rollup.js';
|
|
10
|
+
export { serializer } from '../_tsup-dts-rollup.js';
|
|
11
|
+
export { I_SlugifyOptions } from '../_tsup-dts-rollup.js';
|
|
12
|
+
export { generateSlug } from '../_tsup-dts-rollup.js';
|
|
13
|
+
export { generateShortId } from '../_tsup-dts-rollup.js';
|
|
14
|
+
export { generateRandomPassword } from '../_tsup-dts-rollup.js';
|
|
15
|
+
export { getFileName } from '../_tsup-dts-rollup.js';
|
|
16
|
+
export { substringBetween } from '../_tsup-dts-rollup.js';
|
|
17
|
+
export { validate } from '../_tsup-dts-rollup.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { T_SerializerKnownTypes_alias_1 as T_SerializerKnownTypes } from '../../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { T_SerializerValueMap_alias_1 as T_SerializerValueMap } from '../../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { I_SerializerTypeWrapper_alias_1 as I_SerializerTypeWrapper } from '../../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { I_Serializer_alias_1 as I_Serializer } from '../../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { serializer_alias_1 as serializer } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { T_SerializerKnownTypes_alias_1 as T_SerializerKnownTypes } from '../../_tsup-dts-rollup.js';
|
|
2
|
+
export { T_SerializerValueMap_alias_1 as T_SerializerValueMap } from '../../_tsup-dts-rollup.js';
|
|
3
|
+
export { I_SerializerTypeWrapper_alias_1 as I_SerializerTypeWrapper } from '../../_tsup-dts-rollup.js';
|
|
4
|
+
export { I_Serializer_alias_1 as I_Serializer } from '../../_tsup-dts-rollup.js';
|
|
5
|
+
export { serializer_alias_1 as serializer } from '../../_tsup-dts-rollup.js';
|
|
@@ -2,4 +2,3 @@ export { T_SerializerKnownTypes_alias_2 as T_SerializerKnownTypes } from '../../
|
|
|
2
2
|
export { T_SerializerValueMap_alias_2 as T_SerializerValueMap } from '../../_tsup-dts-rollup.cjs';
|
|
3
3
|
export { I_SerializerTypeWrapper_alias_2 as I_SerializerTypeWrapper } from '../../_tsup-dts-rollup.cjs';
|
|
4
4
|
export { I_Serializer_alias_2 as I_Serializer } from '../../_tsup-dts-rollup.cjs';
|
|
5
|
-
export { serializer_alias_2 as serializer } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -2,4 +2,3 @@ export { T_SerializerKnownTypes_alias_2 as T_SerializerKnownTypes } from '../../
|
|
|
2
2
|
export { T_SerializerValueMap_alias_2 as T_SerializerValueMap } from '../../_tsup-dts-rollup.js';
|
|
3
3
|
export { I_SerializerTypeWrapper_alias_2 as I_SerializerTypeWrapper } from '../../_tsup-dts-rollup.js';
|
|
4
4
|
export { I_Serializer_alias_2 as I_Serializer } from '../../_tsup-dts-rollup.js';
|
|
5
|
-
export { serializer_alias_2 as serializer } from '../../_tsup-dts-rollup.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { serializer_alias_2 as serializer } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { serializer_alias_2 as serializer } from '../../_tsup-dts-rollup.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { I_SlugifyOptions_alias_1 as I_SlugifyOptions } from '../../_tsup-dts-rollup.cjs';
|
|
2
|
+
export { generateSlug_alias_1 as generateSlug } from '../../_tsup-dts-rollup.cjs';
|
|
3
|
+
export { generateShortId_alias_1 as generateShortId } from '../../_tsup-dts-rollup.cjs';
|
|
4
|
+
export { generateRandomPassword_alias_1 as generateRandomPassword } from '../../_tsup-dts-rollup.cjs';
|
|
5
|
+
export { getFileName_alias_1 as getFileName } from '../../_tsup-dts-rollup.cjs';
|
|
6
|
+
export { substringBetween_alias_1 as substringBetween } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { I_SlugifyOptions_alias_1 as I_SlugifyOptions } from '../../_tsup-dts-rollup.js';
|
|
2
|
+
export { generateSlug_alias_1 as generateSlug } from '../../_tsup-dts-rollup.js';
|
|
3
|
+
export { generateShortId_alias_1 as generateShortId } from '../../_tsup-dts-rollup.js';
|
|
4
|
+
export { generateRandomPassword_alias_1 as generateRandomPassword } from '../../_tsup-dts-rollup.js';
|
|
5
|
+
export { getFileName_alias_1 as getFileName } from '../../_tsup-dts-rollup.js';
|
|
6
|
+
export { substringBetween_alias_1 as substringBetween } from '../../_tsup-dts-rollup.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { I_SlugifyOptions_alias_2 as I_SlugifyOptions } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { I_SlugifyOptions_alias_2 as I_SlugifyOptions } from '../../_tsup-dts-rollup.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { I_SlugifyOptions_alias_2 as I_SlugifyOptions } from '../../_tsup-dts-rollup.cjs';
|
|
2
1
|
export { generateSlug_alias_2 as generateSlug } from '../../_tsup-dts-rollup.cjs';
|
|
3
2
|
export { generateShortId_alias_2 as generateShortId } from '../../_tsup-dts-rollup.cjs';
|
|
4
3
|
export { generateRandomPassword_alias_2 as generateRandomPassword } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { I_SlugifyOptions_alias_2 as I_SlugifyOptions } from '../../_tsup-dts-rollup.js';
|
|
2
1
|
export { generateSlug_alias_2 as generateSlug } from '../../_tsup-dts-rollup.js';
|
|
3
2
|
export { generateShortId_alias_2 as generateShortId } from '../../_tsup-dts-rollup.js';
|
|
4
3
|
export { generateRandomPassword_alias_2 as generateRandomPassword } from '../../_tsup-dts-rollup.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validate_alias_1 as validate } from '../../_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validate_alias_1 as validate } from '../../_tsup-dts-rollup.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberskill/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.138.0",
|
|
5
5
|
"description": "CyberSkill Shared",
|
|
6
6
|
"author": "Stephen Cheng",
|
|
7
7
|
"license": "MIT",
|
|
@@ -19,40 +19,40 @@
|
|
|
19
19
|
"import": "./dist/index.js",
|
|
20
20
|
"require": "./dist/index.cjs"
|
|
21
21
|
},
|
|
22
|
-
"./
|
|
23
|
-
"types": "./dist/
|
|
24
|
-
"import": "./dist/
|
|
25
|
-
"require": "./dist/
|
|
26
|
-
},
|
|
27
|
-
"./
|
|
28
|
-
"types": "./dist/
|
|
29
|
-
"import": "./dist/
|
|
30
|
-
"require": "./dist/
|
|
31
|
-
},
|
|
32
|
-
"./
|
|
33
|
-
"types": "./dist/
|
|
34
|
-
"import": "./dist/
|
|
35
|
-
"require": "./dist/
|
|
36
|
-
},
|
|
37
|
-
"./
|
|
38
|
-
"types": "./dist/
|
|
39
|
-
"import": "./dist/
|
|
40
|
-
"require": "./dist/
|
|
41
|
-
},
|
|
42
|
-
"./
|
|
43
|
-
"types": "./dist/
|
|
44
|
-
"import": "./dist/
|
|
45
|
-
"require": "./dist/
|
|
46
|
-
},
|
|
47
|
-
"./
|
|
48
|
-
"types": "./dist/
|
|
49
|
-
"import": "./dist/
|
|
50
|
-
"require": "./dist/
|
|
51
|
-
},
|
|
52
|
-
"./
|
|
53
|
-
"types": "./dist/
|
|
54
|
-
"import": "./dist/
|
|
55
|
-
"require": "./dist/
|
|
22
|
+
"./config": {
|
|
23
|
+
"types": "./dist/config/index.d.ts",
|
|
24
|
+
"import": "./dist/config/index.js",
|
|
25
|
+
"require": "./dist/config/index.cjs"
|
|
26
|
+
},
|
|
27
|
+
"./config/commitlint": {
|
|
28
|
+
"types": "./dist/config/commitlint/index.d.ts",
|
|
29
|
+
"import": "./dist/config/commitlint/index.js",
|
|
30
|
+
"require": "./dist/config/commitlint/index.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./config/env": {
|
|
33
|
+
"types": "./dist/config/env/index.d.ts",
|
|
34
|
+
"import": "./dist/config/env/index.js",
|
|
35
|
+
"require": "./dist/config/env/index.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./config/eslint": {
|
|
38
|
+
"types": "./dist/config/eslint/index.d.ts",
|
|
39
|
+
"import": "./dist/config/eslint/index.js",
|
|
40
|
+
"require": "./dist/config/eslint/index.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./config/graphql-codegen": {
|
|
43
|
+
"types": "./dist/config/graphql-codegen/index.d.ts",
|
|
44
|
+
"import": "./dist/config/graphql-codegen/index.js",
|
|
45
|
+
"require": "./dist/config/graphql-codegen/index.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./config/lint-staged": {
|
|
48
|
+
"types": "./dist/config/lint-staged/index.d.ts",
|
|
49
|
+
"import": "./dist/config/lint-staged/index.js",
|
|
50
|
+
"require": "./dist/config/lint-staged/index.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./constant": {
|
|
53
|
+
"types": "./dist/constant/index.d.ts",
|
|
54
|
+
"import": "./dist/constant/index.js",
|
|
55
|
+
"require": "./dist/constant/index.cjs"
|
|
56
56
|
},
|
|
57
57
|
"./node": {
|
|
58
58
|
"types": "./dist/node/index.d.ts",
|
|
@@ -164,24 +164,43 @@
|
|
|
164
164
|
"import": "./dist/react/vitest/index.js",
|
|
165
165
|
"require": "./dist/react/vitest/index.cjs"
|
|
166
166
|
},
|
|
167
|
-
"./
|
|
168
|
-
"import": "./dist/
|
|
169
|
-
"require": "./dist/
|
|
167
|
+
"./style/reset.css": {
|
|
168
|
+
"import": "./dist/style/reset.css",
|
|
169
|
+
"require": "./dist/style/reset.css"
|
|
170
170
|
},
|
|
171
171
|
"./typescript": {
|
|
172
172
|
"types": "./dist/typescript/index.d.ts",
|
|
173
173
|
"import": "./dist/typescript/index.js",
|
|
174
174
|
"require": "./dist/typescript/index.cjs"
|
|
175
175
|
},
|
|
176
|
-
"./
|
|
177
|
-
"types": "./dist/
|
|
178
|
-
"import": "./dist/
|
|
179
|
-
"require": "./dist/
|
|
176
|
+
"./util": {
|
|
177
|
+
"types": "./dist/util/index.d.ts",
|
|
178
|
+
"import": "./dist/util/index.js",
|
|
179
|
+
"require": "./dist/util/index.cjs"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"typesVersions": {
|
|
183
|
+
"*": {
|
|
184
|
+
"config": [
|
|
185
|
+
"dist/config/index.d.ts"
|
|
186
|
+
],
|
|
187
|
+
"constant": [
|
|
188
|
+
"dist/constant/index.d.ts"
|
|
189
|
+
],
|
|
190
|
+
"node": [
|
|
191
|
+
"dist/node/index.d.ts"
|
|
192
|
+
],
|
|
193
|
+
"react": [
|
|
194
|
+
"dist/react/index.d.ts"
|
|
195
|
+
],
|
|
196
|
+
"typescript": [
|
|
197
|
+
"dist/typescript/index.d.ts"
|
|
198
|
+
],
|
|
199
|
+
"util": [
|
|
200
|
+
"dist/util/index.d.ts"
|
|
201
|
+
]
|
|
180
202
|
}
|
|
181
203
|
},
|
|
182
|
-
"main": "./dist/index.cjs",
|
|
183
|
-
"module": "./dist/index.js",
|
|
184
|
-
"types": "./dist/index.d.ts",
|
|
185
204
|
"bin": {
|
|
186
205
|
"cyberskill": "dist/node/cli/index.js"
|
|
187
206
|
},
|
|
@@ -271,7 +290,7 @@
|
|
|
271
290
|
"vite": "6.3.4",
|
|
272
291
|
"vitest": "3.1.2",
|
|
273
292
|
"vitest-browser-react": "0.1.1",
|
|
274
|
-
"ws": "8.18.
|
|
293
|
+
"ws": "8.18.2",
|
|
275
294
|
"yargs": "17.7.2"
|
|
276
295
|
},
|
|
277
296
|
"publishConfig": {
|
|
@@ -1 +0,0 @@
|
|
|
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,r,a,o,i){try{var s=e[o](i);var c=s.value}catch(e){n(e);return}if(s.done){t(c)}else{Promise.resolve(c).then(r,a)}}function a(e){return function(){var t=this,n=arguments;return new Promise(function(a,o){var i=e.apply(t,n);function s(e){r(i,a,o,s,c,"next",e)}function c(e){r(i,a,o,s,c,"throw",e)}s(undefined)})}}function o(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 i(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function s(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 a=true;var o=false;var i,s;try{for(n=n.call(e);!(a=(i=n.next()).done);a=true){r.push(i.value);if(t&&r.length===t)break}}catch(e){o=true;s=e}finally{try{if(!a&&n["return"]!=null)n["return"]()}finally{if(o)throw s}}return r}function u(){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 l(){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 E(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){o(e,t,n[t])})}return e}function f(e,t){if(e==null)return{};var n=d(e,t);var r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++){r=o[a];if(t.indexOf(r)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;n[r]=e[r]}}return n}function d(e,t){if(e==null)return{};var n={};var r=Object.keys(e);var a,o;for(o=0;o<r.length;o++){a=r[o];if(t.indexOf(a)>=0)continue;n[a]=e[a]}return n}function p(e,n){return t(e)||c(e,n)||v(e,n)||u()}function S(e){return n(e)||s(e)||v(e)||l()}function m(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function v(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)}function y(e,t){var n,r,a,o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=s(0),i["throw"]=s(1),i["return"]=s(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,s[0]&&(o=0)),o)try{if(n=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;r=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(s[0]===6&&o.label<a[1]){o.label=a[1];a=s;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(s);break}if(a[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];r=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}}var O=void 0;var D=Object.create;var g=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var N=function(e,t){return g(e,"name",{value:t,configurable:!0})};var A=function(e,t){for(var n in t)g(e,n,{get:t[n],enumerable:!0})},_=function(e,t,n,r){var a=true,o=false,i=undefined;if(t&&(typeof t==="undefined"?"undefined":m(t))=="object"||typeof t=="function")try{var s=function(){var a=u.value;!h.call(e,a)&&a!==n&&g(e,a,{get:function(){return t[a]},enumerable:!(r=T(t,a))||r.enumerable})};for(var c=C(t)[Symbol.iterator](),u;!(a=(u=c.next()).done);a=true)s()}catch(e){o=true;i=e}finally{try{if(!a&&c.return!=null){c.return()}}finally{if(o){throw i}}}return e};var R=function(e,t,n){return n=e!=null?D(I(e)):{},_(t||!e||!e.__esModule?g(n,"default",{value:e,enumerable:!0}):n,e)},G=function(e){return _(g({},"__esModule",{value:!0}),e)};var b={};A(b,{mergeConfigs:function(){return tw}});module.exports=G(b);var P=R(require("@antfu/eslint-config"),1);var M=R(require("@vitejs/plugin-react-swc"),1),L=require("vitest/config");function w(e){return(0,L.defineConfig)(E({plugins:[(0,M.default)()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}},e))}N(w,"vitestE2E");var U=R(require("@vitejs/plugin-react-swc"),1),k=require("vitest/config");var F=R(require("fs-extra"),1);var Y=".cyberskill-storage";var j=R(require("@dotenvx/dotenvx"),1),x=require("envalid"),V=R(require("os"),1),q=R(require("path"),1),B=R(require("process"),1);var K=!1;function Q(){K||(j.default.config(),K=!0)}N(Q,"loadEnvFile");function H(){Q();var e=(0,x.cleanEnv)(B.default.env,{CWD:(0,x.str)({default:B.default.cwd()}),DEBUG:(0,x.bool)({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:(0,x.str)({default:q.default.join(V.default.homedir(),Y)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}N(H,"getEnv");var W=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});var J=require("child_process"),z=R(require("process"),1),$=R(require("util"),1);var X=function(e){return e.Error="error",e.Warning="warning",e}({});var Z=R(require("chalk"),1),ee=R(require("consola"),1),et=require("graphql");var en={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var er=H();er.DEBUG||(ee.default.level=4);function ea(e){var t=Z.default[e];return typeof t=="function"?t:Z.default.green}N(ea,"chalkKeyword");var eo={silent:ee.default.silent,level:ee.default.level,fatal:ee.default.fatal,error:ee.default.error,warn:ee.default.warn,log:ee.default.log,info:ee.default.info,success:ee.default.success,ready:ee.default.ready,start:ee.default.start,box:ee.default.box,debug:ee.default.debug,trace:ee.default.trace,verbose:ee.default.verbose,printBoxedLog:function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(t===null||t===void 0?void 0:t.length)){ee.default.box(Z.default.green(e));return}t.forEach(function(e){var t=e.file,r=e.position,a=e.rule,o=e.message;ee.default.log("".concat(Z.default.gray("File:")," ").concat(Z.default.blue("".concat(t).concat(r?":".concat(r):"")))),a&&ee.default.log(" ".concat(ea(n)("Rule:")," ").concat(a)),ee.default.log(" ".concat(ea(n)("Message:")," ").concat(o))}),ee.default.box(ea(n)("".concat(e," : ").concat(t.length))),ee.default.log(Z.default.gray("─".repeat(40)))}};function ei(e,t){var n=t!==null&&t!==void 0?t:{},r=n.shouldLog,a=r===void 0?!0:r,o=n.returnValue,s=n.callback,c=i(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return a&&eo.error(c.message),s&&typeof s=="function"&&s(c),o||{success:!1,message:c.message,code:en.INTERNAL_SERVER_ERROR.CODE}}N(ei,"catchErrorNode");var es=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});var ec=R(require("node-fetch"),1);var eu=R(require("fs-extra"),1),el=R(require("path"),1);var eE=eu.default,ef=eE.lstatSync,ed=eE.readdirSync,ep=eE.mkdirSync,eS=eE.readFileSync,em=eE.unlinkSync,ev=eE.statSync,ey=eu.default.readJsonSync;function eO(e,t,n){eu.default.writeFileSync(e,t,n!==null&&n!==void 0?n:"utf-8")}N(eO,"writeFileSync");function eD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return t.every(function(e){return eu.default.pathExistsSync(e)})}N(eD,"pathExistsSync");var eg=H();function eT(e){return a(function(){var t,n,r,a;return y(this,function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,(0,ec.default)("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:t=o.sent();if(!t.ok)throw new Error("Failed to fetch latest version: ".concat(t.status," ").concat(t.statusText));return[4,t.json()];case 2:n=o.sent(),r=n.version;return[2,{success:!0,result:r}];case 3:a=o.sent();return[2,ei(a)];case 4:return[2]}})})()}N(eT,"getLatestPackageVersion");function eC(e){return a(function(){var t,n,r,a,o,i,s,c,u,l,E,f,d,p,S,m,v,O,D;return y(this,function(y){switch(y.label){case 0:y.trys.push([0,2,,3]);if(!eD(tC.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===es.DEPENDENCY,isDevDependency:e.type===es.DEV_DEPENDENCY,installedPath:"",file:{}}}];t=ey(tC.PACKAGE_JSON),n=t.name,r=t.version,a=r===void 0?"":r,o=t.dependencies,i=o===void 0?{}:o,s=t.devDependencies,c=s===void 0?{}:s;if(e.name===n)return[2,{success:!0,result:{name:n,currentVersion:a,latestVersion:a,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===es.DEPENDENCY,isDevDependency:e.type===es.DEV_DEPENDENCY,installedPath:tC.PACKAGE_JSON,file:t}}];u=e.name in i,l=e.name in c;return[4,eT(e.name)];case 1:E=y.sent();if(!E.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:l,installedPath:"",file:{}}}];if(!u&&!l)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:E.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===es.DEPENDENCY,isDevDependency:e.type===es.DEV_DEPENDENCY,installedPath:"",file:{}}}];p=(d=(f=i[e.name])!==null&&f!==void 0?f:c[e.name])!==null&&d!==void 0?d:"",S=eQ(eg.CWD,ez,e.name,eX);if(!eD(S))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:E.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:l,installedPath:"",file:{}}}];m=ey(S),v=m.version,O=v===void 0?"":v;return[2,p!==O?{success:!0,result:{name:e.name,currentVersion:O||p,latestVersion:E.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:u,isDevDependency:l,installedPath:S,file:m}}:{success:!0,result:{name:e.name,currentVersion:p,latestVersion:E.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:p===E.result,isDependency:u,isDevDependency:l,installedPath:S,file:m}}];case 2:D=y.sent();return[2,ei(D)];case 3:return[2]}})})()}N(eC,"getPackage");function eI(e){return a(function(){var t,n,r,a,o;return y(this,function(i){try{;r=ey(tC.PACKAGE_JSON),a=(t=r.dependencies)!==null&&t!==void 0?t:{},o=(n=r.devDependencies)!==null&&n!==void 0?n:{};e.isDependency?a[e.name]=e.latestVersion:e.isDevDependency&&(o[e.name]=e.latestVersion),eO(tC.PACKAGE_JSON,JSON.stringify(r,null,4)),eo.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){ei(e)}return[2]})})()}N(eI,"updatePackage");function eh(){return a(function(){var e,t,n,r,a,o,i,s,c,u,l,E,f;return y(this,function(d){switch(d.label){case 0:d.trys.push([0,12,,13]);e=[{command:N(function(){return th.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:N(function(){return th.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:N(function(){return th.pnpmInstallForce()},"command"),message:"Retrying with force install"}];t=true,n=false,r=undefined;d.label=1;case 1:d.trys.push([1,9,10,11]);a=e[Symbol.iterator]();d.label=2;case 2:if(!!(t=(o=a.next()).done))return[3,8];i=o.value,s=i.command,c=i.message;d.label=3;case 3:d.trys.push([3,6,,7]);return[4,s()];case 4:u=d.sent();return[4,ex("".concat(c," using: ").concat(u),u)];case 5:d.sent();return[2];case 6:l=d.sent();ei(l);return[3,7];case 7:t=true;return[3,2];case 8:return[3,11];case 9:E=d.sent();n=true;r=E;return[3,11];case 10:try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw r}}return[7];case 11:return[3,13];case 12:f=d.sent();ei(f);return[3,13];case 13:return[2]}})})()}N(eh,"installDependencies");function eN(e,t){return a(function(){var n,r,a,o,i,s,c,u,l,E,f,d;return y(this,function(p){switch(p.label){case 0:if(!eD(tC.PACKAGE_JSON)){eo.error("package.json not found. Aborting setup.");return[2]}p.label=1;case 1:p.trys.push([1,16,,17]);return[4,Promise.all(e.map(eC))];case 2:n=p.sent().filter(function(e){return e.success?!e.result.isCurrentProject&&(!e.result.isInstalled||!e.result.isUpToDate):!1});r=n.length>0;if(!r)return[3,7];return[4,Promise.all(n.map(function(e){return e.success?eI(e.result):Promise.resolve()}))];case 3:p.sent();return[4,eh()];case 4:p.sent();a=["Running ESLint with auto-fix"];return[4,th.eslintFix()];case 5:return[4,ex.apply(void 0,a.concat([p.sent()]))];case 6:r=p.sent();p.label=7;case 7:r;i=true,s=false,c=undefined;p.label=8;case 8:p.trys.push([8,13,14,15]);u=((o=t===null||t===void 0?void 0:t.postInstallActions)!==null&&o!==void 0?o:[])[Symbol.iterator]();p.label=9;case 9:if(!!(i=(l=u.next()).done))return[3,12];E=l.value;return[4,E()];case 10:p.sent();p.label=11;case 11:i=true;return[3,9];case 12:return[3,15];case 13:f=p.sent();s=true;c=f;return[3,15];case 14:try{if(!i&&u.return!=null){u.return()}}finally{if(s){throw c}}return[7];case 15:return[3,17];case 16:d=p.sent();ei(d);return[3,17];case 17:return[2]}})})()}N(eN,"setupPackages");var eA=R(require("node-persist"),1);var e_=H();function eR(){return a(function(){var e;return y(this,function(t){switch(t.label){case 0:e=eA.default.defaultInstance;if(e)return[3,2];return[4,eA.default.init({dir:e_.CYBERSKILL_STORAGE_DIRECTORY,stringify:JSON.stringify,parse:JSON.parse,encoding:"utf8",logging:!1,forgiveParseErrors:!0})];case 1:e=t.sent();t.label=2;case 2:e;return[2]}})})()}N(eR,"initNodePersist");var eG={get:function e(e){return a(function(){var t,n;return y(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eR()];case 1:r.sent();return[4,eA.default.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,ei(n,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,t){return a(function(){var n;return y(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eR()];case 1:r.sent();return[4,eA.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();ei(n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return a(function(){var t;return y(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eR()];case 1:n.sent();return[4,eA.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();ei(t);return[3,4];case 4:return[2]}})})()},keys:function e(){return a(function(){var e,t;return y(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eR()];case 1:n.sent();return[4,eA.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(eo.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,ei(t,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return a(function(){return y(this,function(t){try{return[2,"".concat(e_.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,ei(e,{returnValue:null})]}return[2]})})()}};var eb=H(),eP=$.promisify(J.exec);function eM(e){return"error_list:".concat(e)}N(eM,"getErrorListKey");function eL(e){return a(function(){var t,n,r;return y(this,function(o){switch(o.label){case 0:if(e.length===0)return[2];t=Date.now(),n=eM(t);o.label=1;case 1:o.trys.push([1,3,,4]);return[4,eG.set(n,{errors:e,timestamp:t})];case 2:o.sent(),setTimeout(function(){return a(function(){var e;return y(this,function(t){switch(t.label){case 0:return[4,eG.getLogLink(n)];case 1:e=t.sent();e&&eo.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},10);return[3,4];case 3:r=o.sent();ei(r);return[3,4];case 4:return[2]}})})()}N(eL,"saveErrorListToStorage");function ew(e){var t=[],n=[],r="",a=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,o=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,i=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var s,c,u,l,E;var f=a.exec(e)||[],d=o.exec(e)||[],p=i.exec(e)||[];var S,m,v,y,O,D;f.length&&r?t.push({file:r,position:"".concat(f[1],":").concat(f[2]),type:f[3]===X.Error?X.Error:X.Warning,message:(S=f===null||f===void 0?void 0:(s=f[4])===null||s===void 0?void 0:s.trim())!==null&&S!==void 0?S:"",rule:(m=f===null||f===void 0?void 0:(c=f[5])===null||c===void 0?void 0:c.trim())!==null&&m!==void 0?m:""}):d.length?t.push({file:(v=d===null||d===void 0?void 0:d[1])!==null&&v!==void 0?v:"",position:"".concat(d[2],":").concat(d[3]),type:d[4]===X.Error?X.Error:X.Warning,message:(y=d===null||d===void 0?void 0:(u=d[5])===null||u===void 0?void 0:u.trim())!==null&&y!==void 0?y:""}):p.length?t.push({file:"commitlint",type:X.Error,message:(O=p===null||p===void 0?void 0:(l=p[1])===null||l===void 0?void 0:l.trim())!==null&&O!==void 0?O:"",rule:(D=p===null||p===void 0?void 0:(E=p[2])===null||E===void 0?void 0:E.trim())!==null&&D!==void 0?D:""}):n.push(e.trim())}}),t.length&&eL(t),eb.DEBUG&&n.length&&(eo.warn("Unmatched lines:"),n.forEach(function(e){return eo.info(" ".concat(e))}))}N(ew,"parseTextErrors");function eU(e){try{var t=JSON.parse(e),n=[];t.forEach(function(e){var t=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,a=e.line,o=e.column,i=e.ruleId,s=e.message;n.push({type:r===2?X.Error:X.Warning,file:t,position:"".concat(a,":").concat(o),rule:i,message:s})})}),n.length&&eL(n)}catch(t){ew(e)}}N(eU,"parseCommandOutput");function ek(e){return a(function(e){var t,n,r,a,o,i,s,c,u;var l=arguments;return y(this,function(E){switch(E.label){case 0:t=l.length>1&&l[1]!==void 0?l[1]:eU;n=new AbortController;z.default.on("SIGINT",function(){eo.warn("Process interrupted. Terminating..."),n.abort(),z.default.exit()});E.label=1;case 1:E.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,eP(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=E.sent(),a=r.stdout,o=r.stderr;[a,o].forEach(function(e){return e&&t(e)});E.label=3;case 3:return[3,5];case 4:i=E.sent();s=i.stdout,c=i.stderr,u=i.message;[s,c].forEach(function(e){return e&&t(e)}),!c&&!s&&eo.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}N(ek,"executeCommand");function eF(e){return{raw:!0,cmd:e}}N(eF,"rawCommand");function eY(e,t){return(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(tp," ").concat(tE," ").concat(e9," ").concat(e):"".concat(tp," ").concat(e8," ").concat(e)}N(eY,"formatCLI");function ej(e,t){return typeof e=="function"?eY(e(t),t):(typeof e==="undefined"?"undefined":m(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eY(e,t):e}N(ej,"formatCommand");function ex(e,t){return a(function(){var n;return y(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);eo.start("".concat(e)),eb.DEBUG&&eo.info("→ ".concat(t));return[4,ek(t)];case 1:r.sent(),eo.success("".concat(e," done."));return[3,3];case 2:n=r.sent();ei(n);return[3,3];case 3:return[2]}})})()}N(ex,"runCommand");var eV=R(require("path"),1);var eq=H(),eB=eV.default;function eK(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=eB).resolve.apply(r,[eq.CWD].concat(S(t)))}N(eK,"resolveWorkingPath");function eQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=eB).join.apply(r,S(t))}N(eQ,"join");var eH=H(),eW=eH.CWD,eJ="@cyberskill/shared",ez="node_modules",e$="dist",eX="package.json",eZ="package-lock.json",e0="tsconfig.json",e1=".gitignore",e2=".simple-git-hooks.json",e4="pnpm-lock.yaml",e3=".git/hooks/",e5=".git/COMMIT_EDITMSG",e7=".migrate-mongo.config.js",e6=function(){var e=F.default.readJsonSync(eK(eX)).name===eJ?eW:eQ(eW,ez,eJ);return eQ(e,e$)}(),e8="cyberskill",e9="src/node/cli/index.ts",te="eslint",tt="eslint",tn="vitest";var tr="vitest",ta="@commitlint/cli",to="@commitlint/config-conventional",ti="commitlint",ts="lint-staged",tc="lint-staged",tu="typescript",tl="tsc",tE="tsx",tf="git",td="pnpm",tp="pnpm exec",tS="simple-git-hooks",tm="simple-git-hooks",tv="@eslint/config-inspector",ty="eslint-config-inspector",tO="node-modules-inspector",tD="node-modules-inspector",tg="migrate-mongo",tT="./node_modules/migrate-mongo/bin/migrate-mongo",tC={CYBERSKILL_DIRECTORY:e6,WORKING_DIRECTORY:eW,TS_CONFIG:eK(e0),GIT_IGNORE:eK(e1),GIT_HOOK:eK(e3),GIT_COMMIT_MSG:eK(e5),SIMPLE_GIT_HOOKS_JSON:eK(e2),PACKAGE_JSON:eK(eX),PACKAGE_LOCK_JSON:eK(eZ),PNPM_LOCK_YAML:eK(e4),NODE_MODULES:eK(ez),MIGRATE_MONGO_CONFIG:eK(e7),LINT_STAGED_CONFIG:eK("".concat(e6,"/configs/lint-staged/index.js")),COMMITLINT_CONFIG:eK("".concat(e6,"/configs/commitlint/index.js")),UNIT_TEST_CONFIG:eK("".concat(e6,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:eK("".concat(e6,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:eK("".concat(e6,"/react/vitest/vitest.e2e.js"))};function tI(e){var t=e.type,n=e.packages,r=e.command;var o=n===null||n===void 0?void 0:n.reduce(function(e,t){return e.some(function(e){return e.name===t.name})||e.push(t),e},[]);return function(){return a(function(){var e;return y(this,function(n){switch(n.label){case 0:switch(t){case W.CLI:return[3,1];case W.STRING:return[3,4]}return[3,5];case 1:e=o===null||o===void 0?void 0:o.length;if(!e)return[3,3];return[4,eN(o,{update:!0})];case 2:e=n.sent();n.label=3;case 3:return[2,(e,ej(eF("".concat(tp," ").concat(r))))];case 4:return[2,ej(eF(r))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}N(tI,"buildCommand");var th={simpleGitHooks:tI({type:W.CLI,packages:[{name:tS,type:es.DEV_DEPENDENCY}],command:tm}),eslintInspect:tI({type:W.CLI,packages:[{name:tv,type:es.DEV_DEPENDENCY}],command:ty}),nodeModulesInspect:tI({type:W.CLI,packages:[{name:tO,type:es.DEV_DEPENDENCY}],command:tD}),eslintCheck:tI({type:W.CLI,packages:[{name:te,type:es.DEV_DEPENDENCY}],command:"".concat(tt," ").concat(tC.WORKING_DIRECTORY," --no-cache")}),eslintFix:tI({type:W.CLI,packages:[{name:te,type:es.DEV_DEPENDENCY}],command:"".concat(tt," ").concat(tC.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:tI({type:W.CLI,packages:[{name:tu,type:es.DEPENDENCY}],command:"".concat(tl," -p ").concat(tC.TS_CONFIG," --noEmit")}),testUnit:tI({type:W.CLI,packages:[{name:tn,type:es.DEV_DEPENDENCY}],command:"".concat(tr," --config ").concat(tC.UNIT_TEST_CONFIG)}),testE2e:tI({type:W.CLI,packages:[{name:tn,type:es.DEV_DEPENDENCY}],command:"".concat(tr," --config ").concat(tC.E2E_TEST_CONFIG)}),mongoMigrateCreate:N(function(e){return tI({type:W.CLI,packages:[{name:tg,type:es.DEPENDENCY}],command:"".concat(tE," ").concat(tT," create ").concat(e," -f ").concat(tC.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:tI({type:W.CLI,packages:[{name:tg,type:es.DEPENDENCY}],command:"".concat(tE," ").concat(tT," up -f ").concat(tC.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:tI({type:W.CLI,packages:[{name:tg,type:es.DEPENDENCY}],command:"".concat(tE," ").concat(tT," down -f ").concat(tC.MIGRATE_MONGO_CONFIG)}),commitLint:tI({type:W.CLI,packages:[{name:ta,type:es.DEV_DEPENDENCY},{name:to,type:es.DEV_DEPENDENCY}],command:"".concat(ti," --edit ").concat(tC.GIT_COMMIT_MSG," --config ").concat(tC.COMMITLINT_CONFIG)}),lintStaged:tI({type:W.CLI,packages:[{name:ts,type:es.DEV_DEPENDENCY}],command:"".concat(tc," --config ").concat(tC.LINT_STAGED_CONFIG)}),configureGitHook:tI({type:W.STRING,command:"".concat(tf," config core.hooksPath ").concat(tC.GIT_HOOK)}),stageBuildDirectory:tI({type:W.STRING,command:"".concat(tf," add ").concat(e$)}),build:tI({type:W.STRING,command:"".concat(td," run --if-present build")}),pnpmInstallStandard:tI({type:W.STRING,command:"".concat(td," install --no-frozen-lockfile")}),pnpmInstallLegacy:tI({type:W.STRING,command:"".concat(td," install --no-frozen-lockfile --legacy-peer-deps")}),pnpmInstallForce:tI({type:W.STRING,command:"".concat(td," install --no-frozen-lockfile --force")})};function tN(e){return(0,k.defineConfig)(E({plugins:[(0,U.default)()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[tC.UNIT_TEST_SETUP_CONFIG]}},e))}N(tN,"vitestUnit");function tA(e){return(typeof e==="undefined"?"undefined":m(e))=="object"&&e!==null&&!Array.isArray(e)}N(tA,"isObject");function t_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r={};var a=true,o=false,i=undefined,s=true,c=false,u=undefined;try{for(var l=t.flat()[Symbol.iterator](),E;!(s=(E=l.next()).done);s=true){var f=E.value;try{for(var d=Object.entries(f)[Symbol.iterator](),m;!(a=(m=d.next()).done);a=true){var v=p(m.value,2),y=v[0],O=v[1];var D=r[y];if(Array.isArray(O)){var g=Array.isArray(D)?D:[];r[y]=S(new Set(S(g).concat(S(O))));continue}if(tA(O)){r[y]=t_(tA(D)?D:{},O);continue}r[y]=O}}catch(e){o=true;i=e}finally{try{if(!a&&d.return!=null){d.return()}}finally{if(o){throw i}}}}}catch(e){c=true;u=e}finally{try{if(!s&&l.return!=null){l.return()}}finally{if(c){throw u}}}return r}N(t_,"deepMerge");var tR=function(e){return e.ESLINT="eslint",e.COMMITLINT="commitlint",e.LINT_STAGED="lint-staged",e.VITEST_REACT_E2E="vitest-react-e2e",e.VITEST_REACT_UNIT="vitest-react-unit",e}({});var tG=R(require("globals"),1),tb=[{languageOptions:{globals:E({},tG.node,tG.browser)},rules:{"perfectionist/sort-imports":["error",{internalPattern:["^#.*","^@/.*"]}],"dot-notation":"off"},ignores:["build","dist"]}];var tP;var tM=N(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r=t_.apply(void 0,[tb].concat(S(t.map(function(e){return e})))),a=r.ignores,o=f(r,["ignores"]),i=Array.isArray(a)&&a.every(function(e){return typeof e=="string"})?{ignores:a}:void 0,s=[o].concat(S(i?[i]:[]));return(0,P.default).apply(O,[{stylistic:{semi:!0,indent:4,quotes:"single"},formatters:{css:!0,html:!0,markdown:"prettier"},yaml:!1,react:!0}].concat(S(s)))},"handleESLint"),tL=(tP={},o(tP,tR.ESLINT,function(e){return tM(e)}),o(tP,tR.COMMITLINT,function(e){return t_(e)}),o(tP,tR.LINT_STAGED,function(e){return t_(e)}),o(tP,tR.VITEST_REACT_UNIT,function(e){return tN(e)}),o(tP,tR.VITEST_REACT_E2E,function(e){return w(e)}),tP);function tw(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 a=tL[e];if(!n||n.length===0)return a({});if(!a)throw new Error("Unknown config type: ".concat(e));return a.apply(void 0,S(n))}N(tw,"mergeConfigs");0&&(module.exports={mergeConfigs:mergeConfigs});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { mergeConfigs_alias_1 as mergeConfigs } from '../_tsup-dts-rollup.cjs';
|