@cyberskill/shared 1.209.0 → 1.211.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/commitlint/index.cjs +1 -0
- package/dist/config/config.type.cjs +1 -0
- package/dist/config/config.type.js +4 -0
- package/dist/config/config.util.cjs +1 -0
- package/dist/config/config.util.js +58 -0
- package/dist/config/env/env.constant.cjs +1 -0
- package/dist/config/env/env.util.cjs +1 -0
- package/dist/config/env/env.util.js +29 -0
- package/dist/config/env/index.cjs +1 -0
- package/dist/config/eslint/index.cjs +1 -0
- package/dist/config/eslint/index.js +26 -0
- package/dist/config/graphql-codegen/graphql-codegen.util.cjs +1 -0
- package/dist/config/graphql-codegen/graphql-codegen.util.js +42 -0
- package/dist/config/graphql-codegen/index.cjs +1 -0
- package/dist/config/index.cjs +1 -0
- package/dist/config/index.js +6 -0
- package/dist/config/lint-staged/index.cjs +1 -0
- package/dist/config/vitest/index.cjs +1 -0
- package/dist/config/vitest/vitest.e2e.cjs +1 -0
- package/dist/config/vitest/vitest.e2e.js +30 -0
- package/dist/config/vitest/vitest.unit.cjs +1 -0
- package/dist/config/vitest/vitest.unit.js +26 -0
- package/dist/constant/common.cjs +1 -0
- package/dist/constant/common.js +4 -0
- package/dist/constant/index.cjs +1 -0
- package/dist/constant/response-status.cjs +1 -0
- package/dist/node/apollo-server/apollo-server.util.cjs +1 -0
- package/dist/node/apollo-server/apollo-server.util.js +56 -0
- package/dist/node/apollo-server/index.cjs +1 -0
- package/dist/node/cli/index.cjs +6 -0
- package/dist/node/cli/index.js +160 -0
- package/dist/node/command/command.type.cjs +1 -0
- package/dist/node/command/command.type.js +4 -0
- package/dist/node/command/command.util.cjs +2 -0
- package/dist/node/command/command.util.js +175 -0
- package/dist/node/command/index.cjs +1 -0
- package/dist/node/command/index.js +11 -0
- package/dist/node/express/express.util.cjs +1 -0
- package/dist/node/express/express.util.js +81 -0
- package/dist/node/express/index.cjs +1 -0
- package/dist/node/fs/fs.util.cjs +1 -0
- package/dist/node/fs/fs.util.js +63 -0
- package/dist/node/fs/index.cjs +1 -0
- package/dist/node/log/index.cjs +1 -0
- package/dist/node/log/index.js +8 -0
- package/dist/node/log/log.type.cjs +1 -0
- package/dist/node/log/log.type.js +4 -0
- package/dist/node/log/log.util.cjs +1 -0
- package/dist/node/log/log.util.js +60 -0
- package/dist/node/mongo/index.cjs +1 -0
- package/dist/node/mongo/index.js +17 -0
- package/dist/node/mongo/mongo.constant.cjs +1 -0
- package/dist/node/mongo/mongo.type.cjs +1 -0
- package/dist/node/mongo/mongo.type.js +16 -0
- package/dist/node/mongo/mongo.util.cjs +5 -0
- package/dist/node/mongo/mongo.util.js +556 -0
- package/dist/node/package/index.cjs +1 -0
- package/dist/node/package/index.js +10 -0
- package/dist/node/package/package.type.cjs +1 -0
- package/dist/node/package/package.type.js +4 -0
- package/dist/node/package/package.util.cjs +1 -0
- package/dist/node/package/package.util.js +254 -0
- package/dist/node/path/index.cjs +1 -0
- package/dist/node/path/index.js +52 -0
- package/dist/node/path/path.constant.cjs +1 -0
- package/dist/node/path/path.constant.js +295 -0
- package/dist/node/path/path.util.cjs +1 -0
- package/dist/node/storage/index.cjs +1 -0
- package/dist/node/storage/storage.util.cjs +1 -0
- package/dist/node/storage/storage.util.js +81 -0
- package/dist/node/upload/index.cjs +1 -0
- package/dist/node/upload/index.js +7 -0
- package/dist/node/upload/upload.type.cjs +1 -0
- package/dist/node/upload/upload.type.js +4 -0
- package/dist/node/upload/upload.util.cjs +1 -0
- package/dist/node/upload/upload.util.js +154 -0
- package/dist/node/ws/index.cjs +1 -0
- package/dist/node/ws/ts.util.cjs +1 -0
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.cjs +1 -0
- package/dist/{config-CwzVfkkX.js → node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js} +1 -1
- package/dist/react/apollo-client/apollo-client.component.cjs +1 -0
- package/dist/{src/react → react}/apollo-client/apollo-client.component.js +9 -12
- package/dist/react/apollo-client/apollo-client.constant.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.context.cjs +1 -0
- package/dist/{src/react → react}/apollo-client/apollo-client.context.js +2 -2
- package/dist/react/apollo-client/apollo-client.util.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.util.js +111 -0
- package/dist/react/apollo-client/index.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +21 -0
- package/dist/react/apollo-client-nextjs/index.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.component.cjs +1 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.component.js +5 -12
- package/dist/react/apollo-error/apollo-error.context.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.hook.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.module.scss.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.module.scss.js +11 -0
- package/dist/react/apollo-error/apollo-error.provider.cjs +1 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.provider.js +2 -2
- package/dist/react/apollo-error/apollo-error.util.cjs +1 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.util.js +1 -1
- package/dist/react/apollo-error/index.cjs +1 -0
- package/dist/react/i18next/i18next.hook.cjs +1 -0
- package/dist/react/i18next/i18next.util.cjs +1 -0
- package/dist/react/i18next/index.cjs +1 -0
- package/dist/react/loading/index.cjs +1 -0
- package/dist/react/loading/loading.component.cjs +6 -0
- package/dist/react/loading/loading.component.js +51 -0
- package/dist/react/loading/loading.context.cjs +1 -0
- package/dist/react/loading/loading.hook.cjs +1 -0
- package/dist/react/loading/loading.module.scss.cjs +1 -0
- package/dist/react/loading/loading.module.scss.js +15 -0
- package/dist/react/loading/loading.provider.cjs +1 -0
- package/dist/react/loading/loading.provider.js +17 -0
- package/dist/react/log/index.cjs +1 -0
- package/dist/react/log/log.util.cjs +1 -0
- package/dist/{src/react → react}/log/log.util.js +4 -4
- package/dist/react/next-intl/index.cjs +1 -0
- package/dist/react/next-intl/next-intl.constant.cjs +1 -0
- package/dist/react/next-intl/next-intl.context.cjs +1 -0
- package/dist/react/next-intl/next-intl.hoc.cjs +1 -0
- package/dist/react/next-intl/next-intl.hoc.js +32 -0
- package/dist/react/next-intl/next-intl.hook.cjs +1 -0
- package/dist/react/next-intl/next-intl.provider.cjs +1 -0
- package/dist/react/next-intl/next-intl.provider.js +23 -0
- package/dist/react/storage/index.cjs +1 -0
- package/dist/react/storage/storage.hook.cjs +1 -0
- package/dist/react/storage/storage.hook.js +77 -0
- package/dist/react/storage/storage.util.cjs +1 -0
- package/dist/react/storage/storage.util.js +60 -0
- package/dist/react/toast/index.cjs +1 -0
- package/dist/react/userback/index.cjs +1 -0
- package/dist/react/userback/userback.component.cjs +1 -0
- package/dist/react/userback/userback.component.js +51 -0
- package/dist/style.css +1 -1
- package/dist/typescript/common.type.cjs +1 -0
- package/dist/typescript/index.cjs +1 -0
- package/dist/typescript/index.js +4 -0
- package/dist/util/common/common.util.cjs +1 -0
- package/dist/util/common/common.util.js +56 -0
- package/dist/util/common/index.cjs +1 -0
- package/dist/util/index.cjs +1 -0
- package/dist/util/object/index.cjs +1 -0
- package/dist/util/object/object.util.cjs +1 -0
- package/dist/util/object/object.util.js +73 -0
- package/dist/util/serializer/index.cjs +1 -0
- package/dist/util/serializer/serializer.util.cjs +1 -0
- package/dist/util/string/index.cjs +1 -0
- package/dist/util/string/string.util.cjs +1 -0
- package/dist/util/string/string.util.js +61 -0
- package/dist/util/validate/index.cjs +1 -0
- package/dist/util/validate/validate.util.cjs +1 -0
- package/package.json +103 -69
- package/dist/index-BG1UznTl.js +0 -628
- package/dist/magic-string.es-BQ9KnLz-.js +0 -659
- package/dist/src/config/config.util.js +0 -50
- package/dist/src/config/env/env.util.js +0 -29
- package/dist/src/config/eslint/index.js +0 -18
- package/dist/src/config/graphql-codegen/graphql-codegen.util.js +0 -37
- package/dist/src/config/index.js +0 -5
- package/dist/src/config/vitest/vitest.e2e.js +0 -23
- package/dist/src/config/vitest/vitest.unit.js +0 -19
- package/dist/src/config/vitest/vitest.unit.setup.js +0 -30990
- package/dist/src/constant/common.js +0 -4
- package/dist/src/node/apollo-server/apollo-server.util.js +0 -31
- package/dist/src/node/cli/index.js +0 -108
- package/dist/src/node/command/command.util.js +0 -16
- package/dist/src/node/command/index.js +0 -10
- package/dist/src/node/express/express.util.js +0 -50
- package/dist/src/node/fs/fs.util.js +0 -48
- package/dist/src/node/log/index.js +0 -8
- package/dist/src/node/log/log.util.js +0 -59
- package/dist/src/node/mongo/index.js +0 -26
- package/dist/src/node/mongo/mongo.util.js +0 -488
- package/dist/src/node/package/index.js +0 -9
- package/dist/src/node/package/package.util.js +0 -13
- package/dist/src/node/path/index.js +0 -52
- package/dist/src/node/path/path.constant.js +0 -49
- package/dist/src/node/storage/storage.util.js +0 -51
- package/dist/src/node/upload/index.js +0 -6
- package/dist/src/node/upload/upload.util.js +0 -127
- package/dist/src/react/apollo-client/apollo-client.hook.js +0 -11
- package/dist/src/react/apollo-client/apollo-client.util.js +0 -101
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +0 -14
- package/dist/src/react/loading/loading.component.js +0 -40
- package/dist/src/react/loading/loading.provider.js +0 -17
- package/dist/src/react/next-intl/next-intl.hoc.js +0 -23
- package/dist/src/react/next-intl/next-intl.provider.js +0 -24
- package/dist/src/react/storage/storage.hook.js +0 -61
- package/dist/src/react/storage/storage.util.js +0 -35
- package/dist/src/react/userback/userback.component.js +0 -27
- package/dist/src/typescript/style.d.js +0 -1
- package/dist/src/util/common/common.util.js +0 -48
- package/dist/src/util/object/object.util.js +0 -67
- package/dist/src/util/string/string.util.js +0 -51
- /package/dist/{src/config → config}/commitlint/index.d.ts +0 -0
- /package/dist/{src/config → config}/commitlint/index.js +0 -0
- /package/dist/{src/config → config}/config.type.d.ts +0 -0
- /package/dist/{src/config → config}/config.util.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.constant.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.constant.js +0 -0
- /package/dist/{src/config → config}/env/env.type.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.util.d.ts +0 -0
- /package/dist/{src/config → config}/env/index.d.ts +0 -0
- /package/dist/{src/config → config}/env/index.js +0 -0
- /package/dist/{src/config → config}/eslint/index.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.type.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.util.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/index.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/index.js +0 -0
- /package/dist/{src/config → config}/index.d.ts +0 -0
- /package/dist/{src/config → config}/lint-staged/index.d.ts +0 -0
- /package/dist/{src/config → config}/lint-staged/index.js +0 -0
- /package/dist/{src/config → config}/vitest/index.d.ts +0 -0
- /package/dist/{src/config → config}/vitest/index.js +0 -0
- /package/dist/{src/config → config}/vitest/vitest.e2e.d.ts +0 -0
- /package/dist/{src/config → config}/vitest/vitest.unit.d.ts +0 -0
- /package/dist/{src/constant → constant}/common.d.ts +0 -0
- /package/dist/{src/constant → constant}/index.d.ts +0 -0
- /package/dist/{src/constant → constant}/index.js +0 -0
- /package/dist/{src/constant → constant}/response-status.d.ts +0 -0
- /package/dist/{src/constant → constant}/response-status.js +0 -0
- /package/dist/{src/node → node}/apollo-server/apollo-server.type.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/apollo-server.util.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/index.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/index.js +0 -0
- /package/dist/{src/node → node}/cli/index.d.ts +0 -0
- /package/dist/{src/node → node}/command/command.type.d.ts +0 -0
- /package/dist/{src/node → node}/command/command.util.d.ts +0 -0
- /package/dist/{src/node → node}/command/index.d.ts +0 -0
- /package/dist/{src/node → node}/express/express.type.d.ts +0 -0
- /package/dist/{src/node → node}/express/express.util.d.ts +0 -0
- /package/dist/{src/node → node}/express/index.d.ts +0 -0
- /package/dist/{src/node → node}/express/index.js +0 -0
- /package/dist/{src/node → node}/fs/fs.type.d.ts +0 -0
- /package/dist/{src/node → node}/fs/fs.util.d.ts +0 -0
- /package/dist/{src/node → node}/fs/index.d.ts +0 -0
- /package/dist/{src/node → node}/fs/index.js +0 -0
- /package/dist/{src/node → node}/log/index.d.ts +0 -0
- /package/dist/{src/node → node}/log/log.type.d.ts +0 -0
- /package/dist/{src/node → node}/log/log.util.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/index.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.constant.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.constant.js +0 -0
- /package/dist/{src/node → node}/mongo/mongo.type.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.util.d.ts +0 -0
- /package/dist/{src/node → node}/package/index.d.ts +0 -0
- /package/dist/{src/node → node}/package/package.type.d.ts +0 -0
- /package/dist/{src/node → node}/package/package.util.d.ts +0 -0
- /package/dist/{src/node → node}/path/index.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.constant.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.util.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.util.js +0 -0
- /package/dist/{src/node → node}/storage/index.d.ts +0 -0
- /package/dist/{src/node → node}/storage/index.js +0 -0
- /package/dist/{src/node → node}/storage/storage.util.d.ts +0 -0
- /package/dist/{src/node → node}/upload/index.d.ts +0 -0
- /package/dist/{src/node → node}/upload/upload.type.d.ts +0 -0
- /package/dist/{src/node → node}/upload/upload.util.d.ts +0 -0
- /package/dist/{src/node → node}/ws/index.d.ts +0 -0
- /package/dist/{src/node → node}/ws/index.js +0 -0
- /package/dist/{src/node → node}/ws/ts.util.d.ts +0 -0
- /package/dist/{src/node → node}/ws/ts.util.js +0 -0
- /package/dist/{src/node → node}/ws/ws.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.constant.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.constant.js +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.context.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.hook.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/index.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/index.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.context.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.context.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.hook.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.hook.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.provider.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/index.js +0 -0
- /package/dist/{src/react → react}/i18next/i18next.hook.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/i18next.hook.js +0 -0
- /package/dist/{src/react → react}/i18next/i18next.util.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/i18next.util.js +0 -0
- /package/dist/{src/react → react}/i18next/index.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/index.js +0 -0
- /package/dist/{src/react → react}/loading/index.d.ts +0 -0
- /package/dist/{src/react → react}/loading/index.js +0 -0
- /package/dist/{src/react → react}/loading/loading.component.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.context.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.context.js +0 -0
- /package/dist/{src/react → react}/loading/loading.hook.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.hook.js +0 -0
- /package/dist/{src/react → react}/loading/loading.provider.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.type.d.ts +0 -0
- /package/dist/{src/react → react}/log/index.d.ts +0 -0
- /package/dist/{src/react → react}/log/index.js +0 -0
- /package/dist/{src/react → react}/log/log.type.d.ts +0 -0
- /package/dist/{src/react → react}/log/log.util.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/index.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/index.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.constant.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.constant.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.context.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.context.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hoc.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hook.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hook.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.provider.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.type.d.ts +0 -0
- /package/dist/{src/react → react}/storage/index.d.ts +0 -0
- /package/dist/{src/react → react}/storage/index.js +0 -0
- /package/dist/{src/react → react}/storage/storage.hook.d.ts +0 -0
- /package/dist/{src/react → react}/storage/storage.util.d.ts +0 -0
- /package/dist/{src/react → react}/toast/index.d.ts +0 -0
- /package/dist/{src/react → react}/toast/index.js +0 -0
- /package/dist/{src/react → react}/userback/index.d.ts +0 -0
- /package/dist/{src/react → react}/userback/index.js +0 -0
- /package/dist/{src/react → react}/userback/userback.component.d.ts +0 -0
- /package/dist/{src/react → react}/userback/userback.type.d.ts +0 -0
- /package/dist/{src/typescript → typescript}/common.type.d.ts +0 -0
- /package/dist/{src/typescript/index.js → typescript/common.type.js} +0 -0
- /package/dist/{src/typescript → typescript}/index.d.ts +0 -0
- /package/dist/{src/typescript → typescript}/react.type.d.ts +0 -0
- /package/dist/{src/util → util}/common/common.type.d.ts +0 -0
- /package/dist/{src/util → util}/common/common.util.d.ts +0 -0
- /package/dist/{src/util → util}/common/index.d.ts +0 -0
- /package/dist/{src/util → util}/common/index.js +0 -0
- /package/dist/{src/util → util}/index.d.ts +0 -0
- /package/dist/{src/util → util}/index.js +0 -0
- /package/dist/{src/util → util}/object/index.d.ts +0 -0
- /package/dist/{src/util → util}/object/index.js +0 -0
- /package/dist/{src/util → util}/object/object.util.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/index.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/index.js +0 -0
- /package/dist/{src/util → util}/serializer/serializer.type.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/serializer.util.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/serializer.util.js +0 -0
- /package/dist/{src/util → util}/string/index.d.ts +0 -0
- /package/dist/{src/util → util}/string/index.js +0 -0
- /package/dist/{src/util → util}/string/string.type.d.ts +0 -0
- /package/dist/{src/util → util}/string/string.util.d.ts +0 -0
- /package/dist/{src/util → util}/validate/index.d.ts +0 -0
- /package/dist/{src/util → util}/validate/index.js +0 -0
- /package/dist/{src/util → util}/validate/validate.util.d.ts +0 -0
- /package/dist/{src/util → util}/validate/validate.util.js +0 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import T from "node-fetch";
|
|
2
|
+
import { E_PackageType as m } from "./package.type.js";
|
|
3
|
+
import { pathExistsSync as h, readJsonSync as E, writeFileSync as j } from "../fs/fs.util.js";
|
|
4
|
+
import { PATH as c, command as v, PACKAGE_JSON as O, NODE_MODULES as U } from "../path/path.constant.js";
|
|
5
|
+
import { join as G } from "../path/path.util.js";
|
|
6
|
+
import { catchError as f, log as _ } from "../log/log.util.js";
|
|
7
|
+
import { runCommand as J } from "../command/command.util.js";
|
|
8
|
+
import { getEnv as K } from "../../config/env/env.util.js";
|
|
9
|
+
var D = (e, t, r) => new Promise((n, i) => {
|
|
10
|
+
var a = (s) => {
|
|
11
|
+
try {
|
|
12
|
+
l(r.next(s));
|
|
13
|
+
} catch (o) {
|
|
14
|
+
i(o);
|
|
15
|
+
}
|
|
16
|
+
}, u = (s) => {
|
|
17
|
+
try {
|
|
18
|
+
l(r.throw(s));
|
|
19
|
+
} catch (o) {
|
|
20
|
+
i(o);
|
|
21
|
+
}
|
|
22
|
+
}, l = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(a, u);
|
|
23
|
+
l((r = r.apply(e, t)).next());
|
|
24
|
+
});
|
|
25
|
+
const g = K();
|
|
26
|
+
function w(e) {
|
|
27
|
+
return D(this, null, function* () {
|
|
28
|
+
try {
|
|
29
|
+
const t = yield T(`https://registry.npmjs.org/${e}/latest`);
|
|
30
|
+
if (!t.ok)
|
|
31
|
+
throw new Error(`Failed to fetch latest version: ${t.status} ${t.statusText}`);
|
|
32
|
+
const { version: r } = yield t.json();
|
|
33
|
+
return {
|
|
34
|
+
success: !0,
|
|
35
|
+
result: r
|
|
36
|
+
};
|
|
37
|
+
} catch (t) {
|
|
38
|
+
return f(t);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function I(e) {
|
|
43
|
+
return D(this, null, function* () {
|
|
44
|
+
var t, r;
|
|
45
|
+
try {
|
|
46
|
+
if (!e) {
|
|
47
|
+
if (h(c.PACKAGE_JSON)) {
|
|
48
|
+
const V = E(c.PACKAGE_JSON), { name: S = "", version: N = "" } = V;
|
|
49
|
+
return {
|
|
50
|
+
success: !0,
|
|
51
|
+
result: {
|
|
52
|
+
name: S,
|
|
53
|
+
currentVersion: N,
|
|
54
|
+
latestVersion: N,
|
|
55
|
+
isCurrentProject: !0,
|
|
56
|
+
isInstalled: !0,
|
|
57
|
+
isUpToDate: !0,
|
|
58
|
+
isDependency: !1,
|
|
59
|
+
isDevDependency: !1,
|
|
60
|
+
installedPath: c.PACKAGE_JSON,
|
|
61
|
+
file: V
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
success: !0,
|
|
67
|
+
result: {
|
|
68
|
+
name: "",
|
|
69
|
+
currentVersion: "",
|
|
70
|
+
latestVersion: "",
|
|
71
|
+
isCurrentProject: !1,
|
|
72
|
+
isInstalled: !1,
|
|
73
|
+
isUpToDate: !1,
|
|
74
|
+
isDependency: !1,
|
|
75
|
+
isDevDependency: !1,
|
|
76
|
+
installedPath: "",
|
|
77
|
+
file: {}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (!h(c.PACKAGE_JSON))
|
|
82
|
+
return {
|
|
83
|
+
success: !0,
|
|
84
|
+
result: {
|
|
85
|
+
name: e.name,
|
|
86
|
+
currentVersion: "",
|
|
87
|
+
latestVersion: "",
|
|
88
|
+
isCurrentProject: !1,
|
|
89
|
+
isInstalled: !1,
|
|
90
|
+
isUpToDate: !1,
|
|
91
|
+
isDependency: e.type === m.DEPENDENCY,
|
|
92
|
+
isDevDependency: e.type === m.DEV_DEPENDENCY,
|
|
93
|
+
installedPath: "",
|
|
94
|
+
file: {}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const n = E(c.PACKAGE_JSON), { name: i, version: a = "", dependencies: u = {}, devDependencies: l = {} } = n;
|
|
98
|
+
if (e.name === i)
|
|
99
|
+
return {
|
|
100
|
+
success: !0,
|
|
101
|
+
result: {
|
|
102
|
+
name: i,
|
|
103
|
+
currentVersion: a,
|
|
104
|
+
latestVersion: a,
|
|
105
|
+
isCurrentProject: !0,
|
|
106
|
+
isInstalled: !0,
|
|
107
|
+
isUpToDate: !0,
|
|
108
|
+
isDependency: e.type === m.DEPENDENCY,
|
|
109
|
+
isDevDependency: e.type === m.DEV_DEPENDENCY,
|
|
110
|
+
installedPath: c.PACKAGE_JSON,
|
|
111
|
+
file: n
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const s = e.name in u, o = e.name in l, d = yield w(e.name);
|
|
115
|
+
if (!d.success)
|
|
116
|
+
return {
|
|
117
|
+
success: !0,
|
|
118
|
+
result: {
|
|
119
|
+
name: e.name,
|
|
120
|
+
currentVersion: "",
|
|
121
|
+
latestVersion: "",
|
|
122
|
+
isCurrentProject: !1,
|
|
123
|
+
isInstalled: !1,
|
|
124
|
+
isUpToDate: !1,
|
|
125
|
+
isDependency: s,
|
|
126
|
+
isDevDependency: o,
|
|
127
|
+
installedPath: "",
|
|
128
|
+
file: {}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
if (!s && !o)
|
|
132
|
+
return {
|
|
133
|
+
success: !0,
|
|
134
|
+
result: {
|
|
135
|
+
name: e.name,
|
|
136
|
+
currentVersion: "",
|
|
137
|
+
latestVersion: d.result,
|
|
138
|
+
isCurrentProject: !1,
|
|
139
|
+
isInstalled: !1,
|
|
140
|
+
isUpToDate: !1,
|
|
141
|
+
isDependency: e.type === m.DEPENDENCY,
|
|
142
|
+
isDevDependency: e.type === m.DEV_DEPENDENCY,
|
|
143
|
+
installedPath: "",
|
|
144
|
+
file: {}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const y = (r = (t = u[e.name]) != null ? t : l[e.name]) != null ? r : "", p = G(g.CWD, U, e.name, O);
|
|
148
|
+
if (!h(p))
|
|
149
|
+
return {
|
|
150
|
+
success: !0,
|
|
151
|
+
result: {
|
|
152
|
+
name: e.name,
|
|
153
|
+
currentVersion: "",
|
|
154
|
+
latestVersion: d.result,
|
|
155
|
+
isCurrentProject: !1,
|
|
156
|
+
isInstalled: !1,
|
|
157
|
+
isUpToDate: !1,
|
|
158
|
+
isDependency: s,
|
|
159
|
+
isDevDependency: o,
|
|
160
|
+
installedPath: "",
|
|
161
|
+
file: {}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const P = E(p), { version: C = "" } = P;
|
|
165
|
+
return y !== C ? {
|
|
166
|
+
success: !0,
|
|
167
|
+
result: {
|
|
168
|
+
name: e.name,
|
|
169
|
+
currentVersion: C || y,
|
|
170
|
+
latestVersion: d.result,
|
|
171
|
+
isCurrentProject: !1,
|
|
172
|
+
isInstalled: !0,
|
|
173
|
+
isUpToDate: !1,
|
|
174
|
+
isDependency: s,
|
|
175
|
+
isDevDependency: o,
|
|
176
|
+
installedPath: p,
|
|
177
|
+
file: P
|
|
178
|
+
}
|
|
179
|
+
} : {
|
|
180
|
+
success: !0,
|
|
181
|
+
result: {
|
|
182
|
+
name: e.name,
|
|
183
|
+
currentVersion: y,
|
|
184
|
+
latestVersion: d.result,
|
|
185
|
+
isCurrentProject: !1,
|
|
186
|
+
isInstalled: !0,
|
|
187
|
+
isUpToDate: y === d.result,
|
|
188
|
+
isDependency: s,
|
|
189
|
+
isDevDependency: o,
|
|
190
|
+
installedPath: p,
|
|
191
|
+
file: P
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
} catch (n) {
|
|
195
|
+
return f(n);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function A(e) {
|
|
200
|
+
return D(this, null, function* () {
|
|
201
|
+
var t, r;
|
|
202
|
+
try {
|
|
203
|
+
const n = E(c.PACKAGE_JSON), i = (t = n.dependencies) != null ? t : {}, a = (r = n.devDependencies) != null ? r : {};
|
|
204
|
+
e.isDependency ? i[e.name] = e.latestVersion : e.isDevDependency && (a[e.name] = e.latestVersion), j(c.PACKAGE_JSON, JSON.stringify(n, null, 4)), _.info(`Updated "${e.name}" to version ${e.latestVersion}`);
|
|
205
|
+
} catch (n) {
|
|
206
|
+
f(n);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
function $() {
|
|
211
|
+
return D(this, null, function* () {
|
|
212
|
+
try {
|
|
213
|
+
const e = [
|
|
214
|
+
{ command: () => v.pnpmInstallStandard(), message: "Installing dependencies (standard)" },
|
|
215
|
+
{ command: () => v.pnpmInstallLegacy(), message: "Retrying with legacy peer dependencies" },
|
|
216
|
+
{ command: () => v.pnpmInstallForce(), message: "Retrying with force install" }
|
|
217
|
+
];
|
|
218
|
+
for (const { command: t, message: r } of e)
|
|
219
|
+
try {
|
|
220
|
+
const n = yield t();
|
|
221
|
+
yield J(`${r} using: ${n}`, n);
|
|
222
|
+
return;
|
|
223
|
+
} catch (n) {
|
|
224
|
+
f(n);
|
|
225
|
+
}
|
|
226
|
+
} catch (e) {
|
|
227
|
+
f(e);
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function W(e, t) {
|
|
232
|
+
return D(this, null, function* () {
|
|
233
|
+
var r;
|
|
234
|
+
try {
|
|
235
|
+
if (!h(c.PACKAGE_JSON)) {
|
|
236
|
+
_.error("package.json not found. Aborting setup.");
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const i = (yield Promise.all(e.map(I))).filter((s) => s.success && !!s.result && !s.result.isCurrentProject).map((s) => s.result), a = i.filter((s) => !s.isInstalled), u = i.filter((s) => !s.isUpToDate), l = [];
|
|
240
|
+
t != null && t.install && a.length > 0 && l.push(...a.map(A)), t != null && t.update && u.length > 0 && l.push(...u.map(A)), l.length > 0 && (yield Promise.all(l), yield $(), yield J("Running ESLint with auto-fix", yield v.eslintFix()));
|
|
241
|
+
for (const s of (r = t == null ? void 0 : t.callbacks) != null ? r : [])
|
|
242
|
+
yield s();
|
|
243
|
+
} catch (n) {
|
|
244
|
+
f(n);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
export {
|
|
249
|
+
w as getLatestPackageVersion,
|
|
250
|
+
I as getPackage,
|
|
251
|
+
$ as installDependencies,
|
|
252
|
+
W as setupPackages,
|
|
253
|
+
A as updatePackage
|
|
254
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./path.constant.cjs"),I=require("./path.util.cjs");exports.BUILD_DIRECTORY=_.BUILD_DIRECTORY;exports.COMMIT_LINT_CLI=_.COMMIT_LINT_CLI;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=_.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME;exports.COMMIT_LINT_PACKAGE_NAME=_.COMMIT_LINT_PACKAGE_NAME;exports.CYBERSKILL_CLI=_.CYBERSKILL_CLI;exports.CYBERSKILL_CLI_PATH=_.CYBERSKILL_CLI_PATH;exports.CYBERSKILL_DIRECTORY=_.CYBERSKILL_DIRECTORY;exports.CYBERSKILL_PACKAGE_NAME=_.CYBERSKILL_PACKAGE_NAME;exports.ESLINT_CLI=_.ESLINT_CLI;exports.ESLINT_INSPECT_CLI=_.ESLINT_INSPECT_CLI;exports.ESLINT_INSPECT_PACKAGE_NAME=_.ESLINT_INSPECT_PACKAGE_NAME;exports.ESLINT_PACKAGE_NAME=_.ESLINT_PACKAGE_NAME;exports.GIT_CLI=_.GIT_CLI;exports.GIT_COMMIT_EDITMSG=_.GIT_COMMIT_EDITMSG;exports.GIT_HOOK=_.GIT_HOOK;exports.GIT_IGNORE=_.GIT_IGNORE;exports.LINT_STAGED_CLI=_.LINT_STAGED_CLI;exports.LINT_STAGED_PACKAGE_NAME=_.LINT_STAGED_PACKAGE_NAME;exports.MIGRATE_MONGO_CLI=_.MIGRATE_MONGO_CLI;exports.MIGRATE_MONGO_CONFIG=_.MIGRATE_MONGO_CONFIG;exports.MIGRATE_MONGO_PACKAGE_NAME=_.MIGRATE_MONGO_PACKAGE_NAME;exports.NODE_MODULES=_.NODE_MODULES;exports.NODE_MODULES_INSPECT_CLI=_.NODE_MODULES_INSPECT_CLI;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=_.NODE_MODULES_INSPECT_PACKAGE_NAME;exports.PACKAGE_JSON=_.PACKAGE_JSON;exports.PACKAGE_LOCK_JSON=_.PACKAGE_LOCK_JSON;exports.PATH=_.PATH;exports.PNPM_CLI=_.PNPM_CLI;exports.PNPM_EXEC_CLI=_.PNPM_EXEC_CLI;exports.PNPM_LOCK_YAML=_.PNPM_LOCK_YAML;exports.PUBLIC_DIRECTORY=_.PUBLIC_DIRECTORY;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=_.SIMPLE_GIT_HOOKS_PACKAGE_NAME;exports.SIMPLE_GIT_HOOK_CLI=_.SIMPLE_GIT_HOOK_CLI;exports.SIMPLE_GIT_HOOK_JSON=_.SIMPLE_GIT_HOOK_JSON;exports.TSCONFIG_JSON=_.TSCONFIG_JSON;exports.TSC_CLI=_.TSC_CLI;exports.TSC_PACKAGE_NAME=_.TSC_PACKAGE_NAME;exports.TSX_CLI=_.TSX_CLI;exports.VITEST_CLI=_.VITEST_CLI;exports.VITEST_PACKAGE_NAME=_.VITEST_PACKAGE_NAME;exports.WORKING_DIRECTORY=_.WORKING_DIRECTORY;exports.command=_.command;exports.createGitHooksConfig=_.createGitHooksConfig;exports.dirname=I.dirname;exports.join=I.join;exports.path=I.path;exports.resolve=I.resolve;exports.resolveWorkingPath=I.resolveWorkingPath;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BUILD_DIRECTORY as E, COMMIT_LINT_CLI as C, COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as A, COMMIT_LINT_PACKAGE_NAME as N, CYBERSKILL_CLI as T, CYBERSKILL_CLI_PATH as L, CYBERSKILL_DIRECTORY as O, CYBERSKILL_PACKAGE_NAME as M, ESLINT_CLI as G, ESLINT_INSPECT_CLI as S, ESLINT_INSPECT_PACKAGE_NAME as P, ESLINT_PACKAGE_NAME as K, GIT_CLI as R, GIT_COMMIT_EDITMSG as D, GIT_HOOK as o, GIT_IGNORE as e, LINT_STAGED_CLI as r, LINT_STAGED_PACKAGE_NAME as Y, MIGRATE_MONGO_CLI as H, MIGRATE_MONGO_CONFIG as t, MIGRATE_MONGO_PACKAGE_NAME as B, NODE_MODULES as a, NODE_MODULES_INSPECT_CLI as i, NODE_MODULES_INSPECT_PACKAGE_NAME as m, PACKAGE_JSON as n, PACKAGE_LOCK_JSON as U, PATH as J, PNPM_CLI as f, PNPM_EXEC_CLI as p, PNPM_LOCK_YAML as s, PUBLIC_DIRECTORY as F, SIMPLE_GIT_HOOKS_PACKAGE_NAME as V, SIMPLE_GIT_HOOK_CLI as c, SIMPLE_GIT_HOOK_JSON as d, TSCONFIG_JSON as g, TSC_CLI as h, TSC_PACKAGE_NAME as k, TSX_CLI as l, VITEST_CLI as v, VITEST_PACKAGE_NAME as x, WORKING_DIRECTORY as W, command as X, createGitHooksConfig as j } from "./path.constant.js";
|
|
2
|
+
import { dirname as q, join as u, path as w, resolve as y, resolveWorkingPath as z } from "./path.util.js";
|
|
3
|
+
export {
|
|
4
|
+
E as BUILD_DIRECTORY,
|
|
5
|
+
C as COMMIT_LINT_CLI,
|
|
6
|
+
A as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
|
|
7
|
+
N as COMMIT_LINT_PACKAGE_NAME,
|
|
8
|
+
T as CYBERSKILL_CLI,
|
|
9
|
+
L as CYBERSKILL_CLI_PATH,
|
|
10
|
+
O as CYBERSKILL_DIRECTORY,
|
|
11
|
+
M as CYBERSKILL_PACKAGE_NAME,
|
|
12
|
+
G as ESLINT_CLI,
|
|
13
|
+
S as ESLINT_INSPECT_CLI,
|
|
14
|
+
P as ESLINT_INSPECT_PACKAGE_NAME,
|
|
15
|
+
K as ESLINT_PACKAGE_NAME,
|
|
16
|
+
R as GIT_CLI,
|
|
17
|
+
D as GIT_COMMIT_EDITMSG,
|
|
18
|
+
o as GIT_HOOK,
|
|
19
|
+
e as GIT_IGNORE,
|
|
20
|
+
r as LINT_STAGED_CLI,
|
|
21
|
+
Y as LINT_STAGED_PACKAGE_NAME,
|
|
22
|
+
H as MIGRATE_MONGO_CLI,
|
|
23
|
+
t as MIGRATE_MONGO_CONFIG,
|
|
24
|
+
B as MIGRATE_MONGO_PACKAGE_NAME,
|
|
25
|
+
a as NODE_MODULES,
|
|
26
|
+
i as NODE_MODULES_INSPECT_CLI,
|
|
27
|
+
m as NODE_MODULES_INSPECT_PACKAGE_NAME,
|
|
28
|
+
n as PACKAGE_JSON,
|
|
29
|
+
U as PACKAGE_LOCK_JSON,
|
|
30
|
+
J as PATH,
|
|
31
|
+
f as PNPM_CLI,
|
|
32
|
+
p as PNPM_EXEC_CLI,
|
|
33
|
+
s as PNPM_LOCK_YAML,
|
|
34
|
+
F as PUBLIC_DIRECTORY,
|
|
35
|
+
V as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
|
|
36
|
+
c as SIMPLE_GIT_HOOK_CLI,
|
|
37
|
+
d as SIMPLE_GIT_HOOK_JSON,
|
|
38
|
+
g as TSCONFIG_JSON,
|
|
39
|
+
h as TSC_CLI,
|
|
40
|
+
k as TSC_PACKAGE_NAME,
|
|
41
|
+
l as TSX_CLI,
|
|
42
|
+
v as VITEST_CLI,
|
|
43
|
+
x as VITEST_PACKAGE_NAME,
|
|
44
|
+
W as WORKING_DIRECTORY,
|
|
45
|
+
X as command,
|
|
46
|
+
j as createGitHooksConfig,
|
|
47
|
+
q as dirname,
|
|
48
|
+
u as join,
|
|
49
|
+
w as path,
|
|
50
|
+
y as resolve,
|
|
51
|
+
z as resolveWorkingPath
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("fs-extra"),_=require("./path.util.cjs"),e=require("../command/command.type.cjs"),N=require("../command/command.util.cjs"),te=require("../package/package.util.cjs"),E=require("../package/package.type.cjs"),oe=require("../../config/env/env.util.cjs");var Ee=Object.defineProperty,R=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,f=(a,t,o)=>t in a?Ee(a,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[t]=o,Ce=(a,t)=>{for(var o in t||(t={}))ae.call(t,o)&&f(a,o,t[o]);if(R)for(var o of R(t))Ie.call(t,o)&&f(a,o,t[o]);return a},ce=(a,t,o)=>new Promise((r,T)=>{var i=C=>{try{L(o.next(C))}catch(l){T(l)}},G=C=>{try{L(o.throw(C))}catch(l){T(l)}},L=C=>C.done?r(C.value):Promise.resolve(C.value).then(i,G);L((o=o.apply(a,t)).next())});const se=oe.getEnv(),P=se.CWD,g="@cyberskill/shared",d="node_modules",v="dist",h="public",D="package.json",$="package-lock.json",Y="tsconfig.json",F=".gitignore",V=".simple-git-hooks.json",W="pnpm-lock.yaml",H=".git/hooks/",U=".git/COMMIT_EDITMSG",j=".migrate-mongo.config.js",c=(()=>{const t=_e.readJsonSync(_.resolveWorkingPath(D)).name===g?P:_.join(P,d,g);return _.join(t,v)})(),me="cyberskill",Te="src/node/cli/index.ts",A="eslint",M="eslint",y="vitest",S="vitest",w="@commitlint/cli",J="@commitlint/config-conventional",k="commitlint",B="lint-staged",u="lint-staged",b="typescript",q="tsc",s="tsx",K="git",m="pnpm",x="pnpm exec",X="simple-git-hooks",z="simple-git-hooks",Q="@eslint/config-inspector",Z="eslint-config-inspector",ee="node-modules-inspector",ne="node-modules-inspector",p="migrate-mongo",O="./node_modules/migrate-mongo/bin/migrate-mongo",I={CYBERSKILL_DIRECTORY:c,WORKING_DIRECTORY:P,PUBLIC_DIRECTORY:_.resolveWorkingPath(h),TS_CONFIG:_.resolveWorkingPath(Y),GIT_IGNORE:_.resolveWorkingPath(F),GIT_HOOK:_.resolveWorkingPath(H),GIT_COMMIT_MSG:_.resolveWorkingPath(U),SIMPLE_GIT_HOOKS_JSON:_.resolveWorkingPath(V),PACKAGE_JSON:_.resolveWorkingPath(D),PACKAGE_LOCK_JSON:_.resolveWorkingPath($),PNPM_LOCK_YAML:_.resolveWorkingPath(W),NODE_MODULES:_.resolveWorkingPath(d),MIGRATE_MONGO_CONFIG:_.resolveWorkingPath(j),LINT_STAGED_CONFIG:_.resolveWorkingPath(`${c}/src/config/lint-staged/index.js`),COMMITLINT_CONFIG:_.resolveWorkingPath(`${c}/src/config/commitlint/index.js`),VITEST_UNIT_CONFIG:_.resolveWorkingPath(`${c}/src/config/vitest/vitest.unit.js`),VITEST_UNIT_SETUP_CONFIG:_.resolveWorkingPath(`${c}/src/config/vitest/vitest.unit.setup.js`),VITEST_E2E_CONFIG:_.resolveWorkingPath(`${c}/src/config/vitest/vitest.e2e.js`)};function re({isCurrentProject:a}){return Ce({"pre-commit":u,"commit-msg":k},a&&{"pre-push":N.rawCommand(`${K} pull`)})}function n({type:a,packages:t,command:o}){const r=t==null?void 0:t.reduce((T,i)=>(T.some(G=>G.name===i.name)||T.push(i),T),[]);return()=>ce(null,null,function*(){switch(a){case e.E_CommandType.CLI:return r!=null&&r.length&&(yield te.setupPackages(r,{install:!0})),N.formatCommand(N.rawCommand(`${x} ${o}`));case e.E_CommandType.STRING:return N.formatCommand(N.rawCommand(o));default:throw new Error("Unsupported command type")}})}const Ne={simpleGitHooks:n({type:e.E_CommandType.CLI,packages:[{name:X,type:E.E_PackageType.DEV_DEPENDENCY}],command:z}),eslintInspect:n({type:e.E_CommandType.CLI,packages:[{name:Q,type:E.E_PackageType.DEV_DEPENDENCY}],command:Z}),nodeModulesInspect:n({type:e.E_CommandType.CLI,packages:[{name:ee,type:E.E_PackageType.DEV_DEPENDENCY}],command:ne}),eslintCheck:n({type:e.E_CommandType.CLI,packages:[{name:A,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --no-cache`}),eslintFix:n({type:e.E_CommandType.CLI,packages:[{name:A,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --fix --no-cache`}),typescriptCheck:n({type:e.E_CommandType.CLI,packages:[{name:b,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${q} -p ${I.TS_CONFIG} --noEmit`}),testUnit:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_UNIT_CONFIG}`}),testE2e:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_E2E_CONFIG}`}),mongoMigrateCreate:a=>n({type:e.E_CommandType.CLI,packages:[{name:s,type:E.E_PackageType.DEPENDENCY},{name:p,type:E.E_PackageType.DEPENDENCY}],command:`${s} ${O} create ${a} -f ${I.MIGRATE_MONGO_CONFIG}`})(),mongoMigrateUp:n({type:e.E_CommandType.CLI,packages:[{name:s,type:E.E_PackageType.DEPENDENCY},{name:p,type:E.E_PackageType.DEPENDENCY}],command:`${s} ${O} up -f ${I.MIGRATE_MONGO_CONFIG}`}),mongoMigrateDown:n({type:e.E_CommandType.CLI,packages:[{name:s,type:E.E_PackageType.DEPENDENCY},{name:p,type:E.E_PackageType.DEPENDENCY}],command:`${s} ${O} down -f ${I.MIGRATE_MONGO_CONFIG}`}),commitLint:n({type:e.E_CommandType.CLI,packages:[{name:w,type:E.E_PackageType.DEV_DEPENDENCY},{name:J,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${k} --edit ${I.GIT_COMMIT_MSG} --config ${I.COMMITLINT_CONFIG}`}),lintStaged:n({type:e.E_CommandType.CLI,packages:[{name:B,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${u} --config ${I.LINT_STAGED_CONFIG}`}),configureGitHook:n({type:e.E_CommandType.STRING,command:`${K} config core.hooksPath ${I.GIT_HOOK}`}),build:n({type:e.E_CommandType.STRING,command:`${m} run --if-present build`}),pnpmInstallStandard:n({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts`}),pnpmInstallLegacy:n({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts --legacy-peer-deps`}),pnpmInstallForce:n({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts --force`}),pnpmPruneStore:n({type:e.E_CommandType.STRING,command:`${m} store prune`}),pnpmCleanCache:n({type:e.E_CommandType.STRING,command:`${m} cache delete`})};exports.BUILD_DIRECTORY=v;exports.COMMIT_LINT_CLI=k;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=J;exports.COMMIT_LINT_PACKAGE_NAME=w;exports.CYBERSKILL_CLI=me;exports.CYBERSKILL_CLI_PATH=Te;exports.CYBERSKILL_DIRECTORY=c;exports.CYBERSKILL_PACKAGE_NAME=g;exports.ESLINT_CLI=M;exports.ESLINT_INSPECT_CLI=Z;exports.ESLINT_INSPECT_PACKAGE_NAME=Q;exports.ESLINT_PACKAGE_NAME=A;exports.GIT_CLI=K;exports.GIT_COMMIT_EDITMSG=U;exports.GIT_HOOK=H;exports.GIT_IGNORE=F;exports.LINT_STAGED_CLI=u;exports.LINT_STAGED_PACKAGE_NAME=B;exports.MIGRATE_MONGO_CLI=O;exports.MIGRATE_MONGO_CONFIG=j;exports.MIGRATE_MONGO_PACKAGE_NAME=p;exports.NODE_MODULES=d;exports.NODE_MODULES_INSPECT_CLI=ne;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=ee;exports.PACKAGE_JSON=D;exports.PACKAGE_LOCK_JSON=$;exports.PATH=I;exports.PNPM_CLI=m;exports.PNPM_EXEC_CLI=x;exports.PNPM_LOCK_YAML=W;exports.PUBLIC_DIRECTORY=h;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=X;exports.SIMPLE_GIT_HOOK_CLI=z;exports.SIMPLE_GIT_HOOK_JSON=V;exports.TSCONFIG_JSON=Y;exports.TSC_CLI=q;exports.TSC_PACKAGE_NAME=b;exports.TSX_CLI=s;exports.VITEST_CLI=S;exports.VITEST_PACKAGE_NAME=y;exports.WORKING_DIRECTORY=P;exports.command=Ne;exports.createGitHooksConfig=re;
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import v from "fs-extra";
|
|
2
|
+
import { resolveWorkingPath as c, join as L } from "./path.util.js";
|
|
3
|
+
import { E_CommandType as e } from "../command/command.type.js";
|
|
4
|
+
import { formatCommand as d, rawCommand as g } from "../command/command.util.js";
|
|
5
|
+
import { setupPackages as h } from "../package/package.util.js";
|
|
6
|
+
import { E_PackageType as s } from "../package/package.type.js";
|
|
7
|
+
import { getEnv as F } from "../../config/env/env.util.js";
|
|
8
|
+
var V = Object.defineProperty, P = Object.getOwnPropertySymbols, U = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable, M = (E, n, o) => n in E ? V(E, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : E[n] = o, w = (E, n) => {
|
|
9
|
+
for (var o in n || (n = {}))
|
|
10
|
+
U.call(n, o) && M(E, o, n[o]);
|
|
11
|
+
if (P)
|
|
12
|
+
for (var o of P(n))
|
|
13
|
+
j.call(n, o) && M(E, o, n[o]);
|
|
14
|
+
return E;
|
|
15
|
+
}, H = (E, n, o) => new Promise((r, I) => {
|
|
16
|
+
var C = (a) => {
|
|
17
|
+
try {
|
|
18
|
+
O(o.next(a));
|
|
19
|
+
} catch (T) {
|
|
20
|
+
I(T);
|
|
21
|
+
}
|
|
22
|
+
}, N = (a) => {
|
|
23
|
+
try {
|
|
24
|
+
O(o.throw(a));
|
|
25
|
+
} catch (T) {
|
|
26
|
+
I(T);
|
|
27
|
+
}
|
|
28
|
+
}, O = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(C, N);
|
|
29
|
+
O((o = o.apply(E, n)).next());
|
|
30
|
+
});
|
|
31
|
+
const b = F(), D = b.CWD, S = "@cyberskill/shared", $ = "node_modules", J = "dist", x = "public", R = "package.json", B = "package-lock.json", W = "tsconfig.json", X = ".gitignore", q = ".simple-git-hooks.json", z = "pnpm-lock.yaml", Q = ".git/hooks/", Z = ".git/COMMIT_EDITMSG", ee = ".migrate-mongo.config.js", m = (() => {
|
|
32
|
+
const n = v.readJsonSync(c(R)).name === S ? D : L(D, $, S);
|
|
33
|
+
return L(n, J);
|
|
34
|
+
})(), ge = "cyberskill", De = "src/node/cli/index.ts", y = "eslint", A = "eslint", u = "vitest", f = "vitest", te = "@commitlint/cli", ne = "@commitlint/config-conventional", K = "commitlint", oe = "lint-staged", k = "lint-staged", se = "typescript", ce = "tsc", i = "tsx", Y = "git", p = "pnpm", Ee = "pnpm exec", _e = "simple-git-hooks", ae = "simple-git-hooks", Ie = "@eslint/config-inspector", me = "eslint-config-inspector", ie = "node-modules-inspector", pe = "node-modules-inspector", l = "migrate-mongo", G = "./node_modules/migrate-mongo/bin/migrate-mongo", _ = {
|
|
35
|
+
CYBERSKILL_DIRECTORY: m,
|
|
36
|
+
WORKING_DIRECTORY: D,
|
|
37
|
+
PUBLIC_DIRECTORY: c(x),
|
|
38
|
+
TS_CONFIG: c(W),
|
|
39
|
+
GIT_IGNORE: c(X),
|
|
40
|
+
GIT_HOOK: c(Q),
|
|
41
|
+
GIT_COMMIT_MSG: c(Z),
|
|
42
|
+
SIMPLE_GIT_HOOKS_JSON: c(q),
|
|
43
|
+
PACKAGE_JSON: c(R),
|
|
44
|
+
PACKAGE_LOCK_JSON: c(B),
|
|
45
|
+
PNPM_LOCK_YAML: c(z),
|
|
46
|
+
NODE_MODULES: c($),
|
|
47
|
+
MIGRATE_MONGO_CONFIG: c(ee),
|
|
48
|
+
LINT_STAGED_CONFIG: c(`${m}/src/config/lint-staged/index.js`),
|
|
49
|
+
COMMITLINT_CONFIG: c(`${m}/src/config/commitlint/index.js`),
|
|
50
|
+
VITEST_UNIT_CONFIG: c(`${m}/src/config/vitest/vitest.unit.js`),
|
|
51
|
+
VITEST_UNIT_SETUP_CONFIG: c(`${m}/src/config/vitest/vitest.unit.setup.js`),
|
|
52
|
+
VITEST_E2E_CONFIG: c(`${m}/src/config/vitest/vitest.e2e.js`)
|
|
53
|
+
};
|
|
54
|
+
function Le({ isCurrentProject: E }) {
|
|
55
|
+
return w({
|
|
56
|
+
"pre-commit": k,
|
|
57
|
+
"commit-msg": K
|
|
58
|
+
}, E && { "pre-push": g(`${Y} pull`) });
|
|
59
|
+
}
|
|
60
|
+
function t({ type: E, packages: n, command: o }) {
|
|
61
|
+
const r = n == null ? void 0 : n.reduce((I, C) => (I.some((N) => N.name === C.name) || I.push(C), I), []);
|
|
62
|
+
return () => H(null, null, function* () {
|
|
63
|
+
switch (E) {
|
|
64
|
+
case e.CLI:
|
|
65
|
+
return r != null && r.length && (yield h(r, {
|
|
66
|
+
install: !0
|
|
67
|
+
})), d(g(`${Ee} ${o}`));
|
|
68
|
+
case e.STRING:
|
|
69
|
+
return d(g(o));
|
|
70
|
+
default:
|
|
71
|
+
throw new Error("Unsupported command type");
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const de = {
|
|
76
|
+
simpleGitHooks: t({
|
|
77
|
+
type: e.CLI,
|
|
78
|
+
packages: [
|
|
79
|
+
{
|
|
80
|
+
name: _e,
|
|
81
|
+
type: s.DEV_DEPENDENCY
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
command: ae
|
|
85
|
+
}),
|
|
86
|
+
eslintInspect: t({
|
|
87
|
+
type: e.CLI,
|
|
88
|
+
packages: [
|
|
89
|
+
{
|
|
90
|
+
name: Ie,
|
|
91
|
+
type: s.DEV_DEPENDENCY
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
command: me
|
|
95
|
+
}),
|
|
96
|
+
nodeModulesInspect: t({
|
|
97
|
+
type: e.CLI,
|
|
98
|
+
packages: [
|
|
99
|
+
{
|
|
100
|
+
name: ie,
|
|
101
|
+
type: s.DEV_DEPENDENCY
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
command: pe
|
|
105
|
+
}),
|
|
106
|
+
eslintCheck: t({
|
|
107
|
+
type: e.CLI,
|
|
108
|
+
packages: [
|
|
109
|
+
{
|
|
110
|
+
name: y,
|
|
111
|
+
type: s.DEV_DEPENDENCY
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
command: `${A} ${_.WORKING_DIRECTORY} --no-cache`
|
|
115
|
+
}),
|
|
116
|
+
eslintFix: t({
|
|
117
|
+
type: e.CLI,
|
|
118
|
+
packages: [
|
|
119
|
+
{
|
|
120
|
+
name: y,
|
|
121
|
+
type: s.DEV_DEPENDENCY
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
command: `${A} ${_.WORKING_DIRECTORY} --fix --no-cache`
|
|
125
|
+
}),
|
|
126
|
+
typescriptCheck: t({
|
|
127
|
+
type: e.CLI,
|
|
128
|
+
packages: [
|
|
129
|
+
{
|
|
130
|
+
name: se,
|
|
131
|
+
type: s.DEV_DEPENDENCY
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
command: `${ce} -p ${_.TS_CONFIG} --noEmit`
|
|
135
|
+
}),
|
|
136
|
+
testUnit: t({
|
|
137
|
+
type: e.CLI,
|
|
138
|
+
packages: [
|
|
139
|
+
{
|
|
140
|
+
name: u,
|
|
141
|
+
type: s.DEV_DEPENDENCY
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
command: `${f} --config ${_.VITEST_UNIT_CONFIG}`
|
|
145
|
+
}),
|
|
146
|
+
testE2e: t({
|
|
147
|
+
type: e.CLI,
|
|
148
|
+
packages: [
|
|
149
|
+
{
|
|
150
|
+
name: u,
|
|
151
|
+
type: s.DEV_DEPENDENCY
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
command: `${f} --config ${_.VITEST_E2E_CONFIG}`
|
|
155
|
+
}),
|
|
156
|
+
mongoMigrateCreate: (E) => t({
|
|
157
|
+
type: e.CLI,
|
|
158
|
+
packages: [
|
|
159
|
+
{
|
|
160
|
+
name: i,
|
|
161
|
+
type: s.DEPENDENCY
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: l,
|
|
165
|
+
type: s.DEPENDENCY
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
command: `${i} ${G} create ${E} -f ${_.MIGRATE_MONGO_CONFIG}`
|
|
169
|
+
})(),
|
|
170
|
+
mongoMigrateUp: t({
|
|
171
|
+
type: e.CLI,
|
|
172
|
+
packages: [
|
|
173
|
+
{
|
|
174
|
+
name: i,
|
|
175
|
+
type: s.DEPENDENCY
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: l,
|
|
179
|
+
type: s.DEPENDENCY
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
command: `${i} ${G} up -f ${_.MIGRATE_MONGO_CONFIG}`
|
|
183
|
+
}),
|
|
184
|
+
mongoMigrateDown: t({
|
|
185
|
+
type: e.CLI,
|
|
186
|
+
packages: [
|
|
187
|
+
{
|
|
188
|
+
name: i,
|
|
189
|
+
type: s.DEPENDENCY
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: l,
|
|
193
|
+
type: s.DEPENDENCY
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
command: `${i} ${G} down -f ${_.MIGRATE_MONGO_CONFIG}`
|
|
197
|
+
}),
|
|
198
|
+
commitLint: t({
|
|
199
|
+
type: e.CLI,
|
|
200
|
+
packages: [
|
|
201
|
+
{
|
|
202
|
+
name: te,
|
|
203
|
+
type: s.DEV_DEPENDENCY
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: ne,
|
|
207
|
+
type: s.DEV_DEPENDENCY
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
command: `${K} --edit ${_.GIT_COMMIT_MSG} --config ${_.COMMITLINT_CONFIG}`
|
|
211
|
+
}),
|
|
212
|
+
lintStaged: t({
|
|
213
|
+
type: e.CLI,
|
|
214
|
+
packages: [
|
|
215
|
+
{
|
|
216
|
+
name: oe,
|
|
217
|
+
type: s.DEV_DEPENDENCY
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
command: `${k} --config ${_.LINT_STAGED_CONFIG}`
|
|
221
|
+
}),
|
|
222
|
+
configureGitHook: t({
|
|
223
|
+
type: e.STRING,
|
|
224
|
+
command: `${Y} config core.hooksPath ${_.GIT_HOOK}`
|
|
225
|
+
}),
|
|
226
|
+
build: t({
|
|
227
|
+
type: e.STRING,
|
|
228
|
+
command: `${p} run --if-present build`
|
|
229
|
+
}),
|
|
230
|
+
pnpmInstallStandard: t({
|
|
231
|
+
type: e.STRING,
|
|
232
|
+
command: `${p} install --ignore-scripts`
|
|
233
|
+
}),
|
|
234
|
+
pnpmInstallLegacy: t({
|
|
235
|
+
type: e.STRING,
|
|
236
|
+
command: `${p} install --ignore-scripts --legacy-peer-deps`
|
|
237
|
+
}),
|
|
238
|
+
pnpmInstallForce: t({
|
|
239
|
+
type: e.STRING,
|
|
240
|
+
command: `${p} install --ignore-scripts --force`
|
|
241
|
+
}),
|
|
242
|
+
pnpmPruneStore: t({
|
|
243
|
+
type: e.STRING,
|
|
244
|
+
command: `${p} store prune`
|
|
245
|
+
}),
|
|
246
|
+
pnpmCleanCache: t({
|
|
247
|
+
type: e.STRING,
|
|
248
|
+
command: `${p} cache delete`
|
|
249
|
+
})
|
|
250
|
+
};
|
|
251
|
+
export {
|
|
252
|
+
J as BUILD_DIRECTORY,
|
|
253
|
+
K as COMMIT_LINT_CLI,
|
|
254
|
+
ne as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
|
|
255
|
+
te as COMMIT_LINT_PACKAGE_NAME,
|
|
256
|
+
ge as CYBERSKILL_CLI,
|
|
257
|
+
De as CYBERSKILL_CLI_PATH,
|
|
258
|
+
m as CYBERSKILL_DIRECTORY,
|
|
259
|
+
S as CYBERSKILL_PACKAGE_NAME,
|
|
260
|
+
A as ESLINT_CLI,
|
|
261
|
+
me as ESLINT_INSPECT_CLI,
|
|
262
|
+
Ie as ESLINT_INSPECT_PACKAGE_NAME,
|
|
263
|
+
y as ESLINT_PACKAGE_NAME,
|
|
264
|
+
Y as GIT_CLI,
|
|
265
|
+
Z as GIT_COMMIT_EDITMSG,
|
|
266
|
+
Q as GIT_HOOK,
|
|
267
|
+
X as GIT_IGNORE,
|
|
268
|
+
k as LINT_STAGED_CLI,
|
|
269
|
+
oe as LINT_STAGED_PACKAGE_NAME,
|
|
270
|
+
G as MIGRATE_MONGO_CLI,
|
|
271
|
+
ee as MIGRATE_MONGO_CONFIG,
|
|
272
|
+
l as MIGRATE_MONGO_PACKAGE_NAME,
|
|
273
|
+
$ as NODE_MODULES,
|
|
274
|
+
pe as NODE_MODULES_INSPECT_CLI,
|
|
275
|
+
ie as NODE_MODULES_INSPECT_PACKAGE_NAME,
|
|
276
|
+
R as PACKAGE_JSON,
|
|
277
|
+
B as PACKAGE_LOCK_JSON,
|
|
278
|
+
_ as PATH,
|
|
279
|
+
p as PNPM_CLI,
|
|
280
|
+
Ee as PNPM_EXEC_CLI,
|
|
281
|
+
z as PNPM_LOCK_YAML,
|
|
282
|
+
x as PUBLIC_DIRECTORY,
|
|
283
|
+
_e as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
|
|
284
|
+
ae as SIMPLE_GIT_HOOK_CLI,
|
|
285
|
+
q as SIMPLE_GIT_HOOK_JSON,
|
|
286
|
+
W as TSCONFIG_JSON,
|
|
287
|
+
ce as TSC_CLI,
|
|
288
|
+
se as TSC_PACKAGE_NAME,
|
|
289
|
+
i as TSX_CLI,
|
|
290
|
+
f as VITEST_CLI,
|
|
291
|
+
u as VITEST_PACKAGE_NAME,
|
|
292
|
+
D as WORKING_DIRECTORY,
|
|
293
|
+
de as command,
|
|
294
|
+
Le as createGitHooksConfig
|
|
295
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("node:path"),t=require("../../config/env/env.util.cjs"),o=t.getEnv(),n=r,i=n.dirname;function s(...e){return n.resolve(o.CWD,...e)}function u(...e){return n.resolve(...e)}function a(...e){return n.join(...e)}exports.dirname=i;exports.join=a;exports.path=n;exports.resolve=u;exports.resolveWorkingPath=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./storage.util.cjs");exports.storage=e.storage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("node-persist"),f=require("../../config/env/env.util.cjs"),u=require("../log/log.util.cjs");var l=(r,e,n)=>new Promise((h,a)=>{var d=t=>{try{c(n.next(t))}catch(s){a(s)}},v=t=>{try{c(n.throw(t))}catch(s){a(s)}},c=t=>t.done?h(t.value):Promise.resolve(t.value).then(d,v);c((n=n.apply(r,e)).next())});const y=f.getEnv();function o(){return l(this,null,function*(){i.defaultInstance||(yield i.init({dir:y.CYBERSKILL_STORAGE_DIRECTORY}))})}const E={get(r){return l(this,null,function*(){try{yield o();const e=yield i.getItem(r);return e!=null?e:null}catch(e){return u.catchError(e,{returnValue:null})}})},set(r,e){return l(this,null,function*(){try{yield o(),yield i.setItem(r,e)}catch(n){u.catchError(n)}})},remove(r){return l(this,null,function*(){try{yield o(),yield i.removeItem(r)}catch(e){u.catchError(e)}})},keys(){return l(this,null,function*(){try{yield o();const r=yield i.keys();return Array.isArray(r)?r:(u.log.warn("[Storage:keys] Invalid keys response:",r),[])}catch(r){return u.catchError(r,{returnValue:[]})}})},getLogLink(r){return l(this,null,function*(){try{return`${y.CYBERSKILL_STORAGE_DIRECTORY} (key: ${r})`}catch(e){return u.catchError(e,{returnValue:null})}})}};exports.storage=E;
|