@cyberskill/shared 1.208.0 → 1.210.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/{src/config → config}/config.type.d.ts +1 -1
- package/dist/config/config.type.js +4 -0
- package/dist/{src/config → config}/config.util.d.ts +1 -1
- package/dist/config/config.util.js +49 -0
- package/dist/{src/config → config}/env/env.util.js +7 -7
- package/dist/config/eslint/index.js +18 -0
- package/dist/config/graphql-codegen/graphql-codegen.util.js +37 -0
- package/dist/config/index.js +6 -0
- package/dist/config/vitest/vitest.e2e.js +23 -0
- package/dist/config/vitest/vitest.unit.js +19 -0
- package/dist/constant/common.js +4 -0
- package/dist/node/apollo-server/apollo-server.util.js +29 -0
- package/dist/node/cli/index.js +110 -0
- package/dist/node/command/command.type.js +4 -0
- package/dist/node/command/command.util.js +144 -0
- package/dist/node/command/index.js +11 -0
- package/dist/node/express/express.util.js +48 -0
- package/dist/node/express/index.js +13 -0
- package/dist/node/fs/fs.util.js +48 -0
- package/dist/node/log/index.js +8 -0
- package/dist/{log.type-DTOvZHyz.js → node/log/log.type.js} +1 -1
- package/dist/node/log/log.util.js +59 -0
- package/dist/node/mongo/index.js +17 -0
- package/dist/node/mongo/mongo.type.js +16 -0
- package/dist/node/mongo/mongo.util.js +488 -0
- package/dist/node/package/index.js +10 -0
- package/dist/node/package/package.type.js +4 -0
- package/dist/node/package/package.util.js +225 -0
- package/dist/node/path/index.js +52 -0
- package/dist/node/path/path.constant.js +273 -0
- package/dist/node/storage/storage.util.js +51 -0
- package/dist/node/upload/index.js +7 -0
- package/dist/node/upload/upload.type.js +4 -0
- package/dist/node/upload/upload.util.js +126 -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.js +6 -0
- package/dist/react/apollo-client/apollo-client.component.js +20 -0
- package/dist/{src/react → react}/apollo-client/apollo-client.context.js +2 -2
- package/dist/{src/react → react}/apollo-client/apollo-client.type.d.ts +1 -1
- package/dist/react/apollo-client/apollo-client.util.js +101 -0
- package/dist/react/apollo-client/index.js +29 -0
- package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.js +7 -8
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +14 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.component.js +8 -15
- package/dist/react/apollo-error/apollo-error.module.scss.js +11 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.provider.js +2 -2
- package/dist/react/apollo-error/apollo-error.util.js +11 -0
- package/dist/react/loading/loading.component.js +34 -0
- package/dist/react/loading/loading.module.scss.js +15 -0
- package/dist/{src/react → react}/loading/loading.provider.d.ts +1 -1
- package/dist/react/loading/loading.provider.js +17 -0
- package/dist/react/log/log.util.js +30 -0
- package/dist/{src/react → react}/next-intl/next-intl.hoc.d.ts +1 -1
- package/dist/react/next-intl/next-intl.hoc.js +23 -0
- package/dist/react/next-intl/next-intl.provider.js +23 -0
- package/dist/{src/react → react}/next-intl/next-intl.type.d.ts +1 -1
- package/dist/react/storage/storage.hook.js +61 -0
- package/dist/react/storage/storage.util.js +35 -0
- package/dist/react/userback/userback.component.js +27 -0
- package/dist/style.css +1 -1
- package/dist/typescript/index.d.ts +2 -0
- package/dist/typescript/index.js +4 -0
- package/dist/{src/util → util}/common/common.util.js +14 -25
- package/dist/{src/util → util}/object/object.util.d.ts +1 -1
- package/dist/util/object/object.util.js +67 -0
- package/dist/util/string/string.util.js +51 -0
- package/package.json +77 -110
- package/dist/config-B7WSlzSh.js +0 -8
- package/dist/config-DDQ9k8fw.cjs +0 -1
- package/dist/config.util-Ci2CZDut.cjs +0 -1
- package/dist/config.util-DKBwEBKR.js +0 -61
- package/dist/favicon/android-icon-144x144.png +0 -0
- package/dist/favicon/android-icon-192x192.png +0 -0
- package/dist/favicon/android-icon-36x36.png +0 -0
- package/dist/favicon/android-icon-48x48.png +0 -0
- package/dist/favicon/android-icon-72x72.png +0 -0
- package/dist/favicon/android-icon-96x96.png +0 -0
- package/dist/favicon/apple-icon-114x114.png +0 -0
- package/dist/favicon/apple-icon-120x120.png +0 -0
- package/dist/favicon/apple-icon-144x144.png +0 -0
- package/dist/favicon/apple-icon-152x152.png +0 -0
- package/dist/favicon/apple-icon-180x180.png +0 -0
- package/dist/favicon/apple-icon-57x57.png +0 -0
- package/dist/favicon/apple-icon-60x60.png +0 -0
- package/dist/favicon/apple-icon-72x72.png +0 -0
- package/dist/favicon/apple-icon-76x76.png +0 -0
- package/dist/favicon/apple-icon-precomposed.png +0 -0
- package/dist/favicon/apple-icon.png +0 -0
- package/dist/favicon/browserconfig.xml +0 -2
- package/dist/favicon/favicon-16x16.png +0 -0
- package/dist/favicon/favicon-32x32.png +0 -0
- package/dist/favicon/favicon-96x96.png +0 -0
- package/dist/favicon/favicon.ico +0 -0
- package/dist/favicon/manifest.json +0 -41
- package/dist/favicon/ms-icon-144x144.png +0 -0
- package/dist/favicon/ms-icon-150x150.png +0 -0
- package/dist/favicon/ms-icon-310x310.png +0 -0
- package/dist/favicon/ms-icon-70x70.png +0 -0
- package/dist/log.type-CMvG6Box.cjs +0 -1
- package/dist/magic-string.es-C6Zk6wMx.js +0 -671
- package/dist/magic-string.es-CjWtD8Pa.cjs +0 -10
- package/dist/path.constant-CWtb99gS.cjs +0 -2
- package/dist/path.constant-CvSr0Rrx.js +0 -682
- package/dist/src/config/commitlint/index.cjs +0 -1
- package/dist/src/config/config.util.cjs +0 -1
- package/dist/src/config/config.util.js +0 -9
- package/dist/src/config/env/env.constant.cjs +0 -1
- package/dist/src/config/env/env.d.cjs +0 -1
- package/dist/src/config/env/env.d.js +0 -1
- package/dist/src/config/env/env.util.cjs +0 -1
- package/dist/src/config/env/index.cjs +0 -1
- package/dist/src/config/eslint/index.cjs +0 -1
- package/dist/src/config/eslint/index.js +0 -29
- package/dist/src/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
- package/dist/src/config/graphql-codegen/graphql-codegen.util.js +0 -46
- package/dist/src/config/graphql-codegen/index.cjs +0 -1
- package/dist/src/config/index.cjs +0 -1
- package/dist/src/config/index.js +0 -5
- package/dist/src/config/lint-staged/index.cjs +0 -1
- package/dist/src/config/vitest/index.cjs +0 -1
- package/dist/src/config/vitest/vitest.e2e.cjs +0 -1
- package/dist/src/config/vitest/vitest.e2e.js +0 -33
- package/dist/src/config/vitest/vitest.unit.cjs +0 -1
- package/dist/src/config/vitest/vitest.unit.js +0 -30
- package/dist/src/config/vitest/vitest.unit.setup.cjs +0 -508
- package/dist/src/config/vitest/vitest.unit.setup.js +0 -31519
- package/dist/src/constant/common.cjs +0 -1
- package/dist/src/constant/common.js +0 -4
- package/dist/src/constant/index.cjs +0 -1
- package/dist/src/constant/response-status.cjs +0 -1
- package/dist/src/node/apollo-server/apollo-server.util.cjs +0 -1
- package/dist/src/node/apollo-server/apollo-server.util.js +0 -62
- package/dist/src/node/apollo-server/index.cjs +0 -1
- package/dist/src/node/cli/cli.util.cjs +0 -6
- package/dist/src/node/cli/cli.util.js +0 -171
- package/dist/src/node/cli/index.cjs +0 -1
- package/dist/src/node/cli/index.d.ts +0 -1
- package/dist/src/node/cli/index.js +0 -1
- package/dist/src/node/command/command.util.cjs +0 -1
- package/dist/src/node/command/command.util.js +0 -17
- package/dist/src/node/command/index.cjs +0 -1
- package/dist/src/node/command/index.js +0 -10
- package/dist/src/node/express/express.util.cjs +0 -1
- package/dist/src/node/express/express.util.js +0 -88
- package/dist/src/node/express/index.cjs +0 -1
- package/dist/src/node/express/index.js +0 -13
- package/dist/src/node/fs/fs.util.cjs +0 -1
- package/dist/src/node/fs/fs.util.js +0 -67
- package/dist/src/node/fs/index.cjs +0 -1
- package/dist/src/node/log/index.cjs +0 -1
- package/dist/src/node/log/index.js +0 -8
- package/dist/src/node/log/log.util.cjs +0 -1
- package/dist/src/node/log/log.util.js +0 -60
- package/dist/src/node/mongo/index.cjs +0 -1
- package/dist/src/node/mongo/index.js +0 -26
- package/dist/src/node/mongo/mongo.constant.cjs +0 -1
- package/dist/src/node/mongo/mongo.util.cjs +0 -5
- package/dist/src/node/mongo/mongo.util.js +0 -564
- package/dist/src/node/package/index.cjs +0 -1
- package/dist/src/node/package/index.js +0 -9
- package/dist/src/node/package/package.util.cjs +0 -1
- package/dist/src/node/package/package.util.js +0 -13
- package/dist/src/node/path/index.cjs +0 -1
- package/dist/src/node/path/index.js +0 -52
- package/dist/src/node/path/path.constant.cjs +0 -1
- package/dist/src/node/path/path.constant.js +0 -49
- package/dist/src/node/path/path.util.cjs +0 -1
- package/dist/src/node/storage/index.cjs +0 -1
- package/dist/src/node/storage/storage.util.cjs +0 -1
- package/dist/src/node/storage/storage.util.js +0 -81
- package/dist/src/node/upload/index.cjs +0 -1
- package/dist/src/node/upload/index.js +0 -6
- package/dist/src/node/upload/upload.util.cjs +0 -1
- package/dist/src/node/upload/upload.util.js +0 -8
- package/dist/src/node/ws/index.cjs +0 -1
- package/dist/src/node/ws/ts.util.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.component.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.component.js +0 -21
- package/dist/src/react/apollo-client/apollo-client.constant.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.context.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.hook.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.hook.js +0 -11
- package/dist/src/react/apollo-client/apollo-client.util.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.util.js +0 -116
- package/dist/src/react/apollo-client/index.cjs +0 -1
- package/dist/src/react/apollo-client/index.js +0 -30
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +0 -24
- package/dist/src/react/apollo-client-nextjs/index.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.component.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.context.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.hook.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.provider.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.util.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.util.js +0 -11
- package/dist/src/react/apollo-error/index.cjs +0 -1
- package/dist/src/react/i18next/i18next.hook.cjs +0 -1
- package/dist/src/react/i18next/i18next.util.cjs +0 -1
- package/dist/src/react/i18next/index.cjs +0 -1
- package/dist/src/react/loading/index.cjs +0 -1
- package/dist/src/react/loading/loading.component.cjs +0 -6
- package/dist/src/react/loading/loading.component.js +0 -61
- package/dist/src/react/loading/loading.context.cjs +0 -1
- package/dist/src/react/loading/loading.hook.cjs +0 -1
- package/dist/src/react/loading/loading.provider.cjs +0 -1
- package/dist/src/react/loading/loading.provider.js +0 -17
- package/dist/src/react/log/index.cjs +0 -1
- package/dist/src/react/log/log.util.cjs +0 -1
- package/dist/src/react/log/log.util.js +0 -30
- package/dist/src/react/next-intl/index.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.constant.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.context.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.hoc.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.hoc.js +0 -35
- package/dist/src/react/next-intl/next-intl.hook.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.provider.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.provider.js +0 -25
- package/dist/src/react/storage/index.cjs +0 -1
- package/dist/src/react/storage/storage.hook.cjs +0 -1
- package/dist/src/react/storage/storage.hook.js +0 -77
- package/dist/src/react/storage/storage.util.cjs +0 -1
- package/dist/src/react/storage/storage.util.js +0 -60
- package/dist/src/react/toast/index.cjs +0 -1
- package/dist/src/react/userback/index.cjs +0 -1
- package/dist/src/react/userback/userback.component.cjs +0 -1
- package/dist/src/react/userback/userback.component.js +0 -54
- package/dist/src/typescript/common.cjs +0 -1
- package/dist/src/typescript/index.cjs +0 -1
- package/dist/src/typescript/index.d.ts +0 -2
- package/dist/src/typescript/index.js +0 -4
- package/dist/src/typescript/react.cjs +0 -1
- package/dist/src/typescript/react.js +0 -1
- package/dist/src/typescript/style.d.cjs +0 -1
- package/dist/src/typescript/style.d.js +0 -1
- package/dist/src/util/common/common.util.cjs +0 -1
- package/dist/src/util/common/index.cjs +0 -1
- package/dist/src/util/index.cjs +0 -1
- package/dist/src/util/object/index.cjs +0 -1
- package/dist/src/util/object/object.util.cjs +0 -1
- package/dist/src/util/object/object.util.js +0 -77
- package/dist/src/util/serializer/index.cjs +0 -1
- package/dist/src/util/serializer/serializer.util.cjs +0 -1
- package/dist/src/util/string/index.cjs +0 -1
- package/dist/src/util/string/string.util.cjs +0 -1
- package/dist/src/util/string/string.util.js +0 -64
- package/dist/src/util/validate/index.cjs +0 -1
- package/dist/src/util/validate/validate.util.cjs +0 -1
- package/dist/tsconfig.base.json +0 -37
- package/dist/upload.util-CE3MjBdh.cjs +0 -1
- package/dist/upload.util-D4aUdmPo.js +0 -160
- /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}/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/cli/cli.util.d.ts → 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}/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.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/index.d.ts +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.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.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.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}/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/common.d.ts → typescript/common.type.d.ts} +0 -0
- /package/dist/{src/typescript/common.js → typescript/common.type.js} +0 -0
- /package/dist/{src/typescript/react.d.ts → 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}/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,225 @@
|
|
|
1
|
+
import J from "node-fetch";
|
|
2
|
+
import { E_PackageType as o } from "./package.type.js";
|
|
3
|
+
import { pathExistsSync as D, readJsonSync as p, writeFileSync as w } from "../fs/fs.util.js";
|
|
4
|
+
import { PATH as i, NODE_MODULES as S, PACKAGE_JSON as T, command as y } from "../path/path.constant.js";
|
|
5
|
+
import { join as _ } from "../path/path.util.js";
|
|
6
|
+
import { catchError as c, log as N } from "../log/log.util.js";
|
|
7
|
+
import { runCommand as A } from "../command/command.util.js";
|
|
8
|
+
import { getEnv as j } from "../../config/env/env.util.js";
|
|
9
|
+
const O = j();
|
|
10
|
+
async function U(e) {
|
|
11
|
+
try {
|
|
12
|
+
const s = await J(`https://registry.npmjs.org/${e}/latest`);
|
|
13
|
+
if (!s.ok)
|
|
14
|
+
throw new Error(`Failed to fetch latest version: ${s.status} ${s.statusText}`);
|
|
15
|
+
const { version: r } = await s.json();
|
|
16
|
+
return {
|
|
17
|
+
success: !0,
|
|
18
|
+
result: r
|
|
19
|
+
};
|
|
20
|
+
} catch (s) {
|
|
21
|
+
return c(s);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async function g(e) {
|
|
25
|
+
try {
|
|
26
|
+
if (!e) {
|
|
27
|
+
if (D(i.PACKAGE_JSON)) {
|
|
28
|
+
const C = p(i.PACKAGE_JSON), { name: v = "", version: P = "" } = C;
|
|
29
|
+
return {
|
|
30
|
+
success: !0,
|
|
31
|
+
result: {
|
|
32
|
+
name: v,
|
|
33
|
+
currentVersion: P,
|
|
34
|
+
latestVersion: P,
|
|
35
|
+
isCurrentProject: !0,
|
|
36
|
+
isInstalled: !0,
|
|
37
|
+
isUpToDate: !0,
|
|
38
|
+
isDependency: !1,
|
|
39
|
+
isDevDependency: !1,
|
|
40
|
+
installedPath: i.PACKAGE_JSON,
|
|
41
|
+
file: C
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
success: !0,
|
|
47
|
+
result: {
|
|
48
|
+
name: "",
|
|
49
|
+
currentVersion: "",
|
|
50
|
+
latestVersion: "",
|
|
51
|
+
isCurrentProject: !1,
|
|
52
|
+
isInstalled: !1,
|
|
53
|
+
isUpToDate: !1,
|
|
54
|
+
isDependency: !1,
|
|
55
|
+
isDevDependency: !1,
|
|
56
|
+
installedPath: "",
|
|
57
|
+
file: {}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if (!D(i.PACKAGE_JSON))
|
|
62
|
+
return {
|
|
63
|
+
success: !0,
|
|
64
|
+
result: {
|
|
65
|
+
name: e.name,
|
|
66
|
+
currentVersion: "",
|
|
67
|
+
latestVersion: "",
|
|
68
|
+
isCurrentProject: !1,
|
|
69
|
+
isInstalled: !1,
|
|
70
|
+
isUpToDate: !1,
|
|
71
|
+
isDependency: e.type === o.DEPENDENCY,
|
|
72
|
+
isDevDependency: e.type === o.DEV_DEPENDENCY,
|
|
73
|
+
installedPath: "",
|
|
74
|
+
file: {}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const s = p(i.PACKAGE_JSON), { name: r, version: n = "", dependencies: u = {}, devDependencies: d = {} } = s;
|
|
78
|
+
if (e.name === r)
|
|
79
|
+
return {
|
|
80
|
+
success: !0,
|
|
81
|
+
result: {
|
|
82
|
+
name: r,
|
|
83
|
+
currentVersion: n,
|
|
84
|
+
latestVersion: n,
|
|
85
|
+
isCurrentProject: !0,
|
|
86
|
+
isInstalled: !0,
|
|
87
|
+
isUpToDate: !0,
|
|
88
|
+
isDependency: e.type === o.DEPENDENCY,
|
|
89
|
+
isDevDependency: e.type === o.DEV_DEPENDENCY,
|
|
90
|
+
installedPath: i.PACKAGE_JSON,
|
|
91
|
+
file: s
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const a = e.name in u, t = e.name in d, l = await U(e.name);
|
|
95
|
+
if (!l.success)
|
|
96
|
+
return {
|
|
97
|
+
success: !0,
|
|
98
|
+
result: {
|
|
99
|
+
name: e.name,
|
|
100
|
+
currentVersion: "",
|
|
101
|
+
latestVersion: "",
|
|
102
|
+
isCurrentProject: !1,
|
|
103
|
+
isInstalled: !1,
|
|
104
|
+
isUpToDate: !1,
|
|
105
|
+
isDependency: a,
|
|
106
|
+
isDevDependency: t,
|
|
107
|
+
installedPath: "",
|
|
108
|
+
file: {}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
if (!a && !t)
|
|
112
|
+
return {
|
|
113
|
+
success: !0,
|
|
114
|
+
result: {
|
|
115
|
+
name: e.name,
|
|
116
|
+
currentVersion: "",
|
|
117
|
+
latestVersion: l.result,
|
|
118
|
+
isCurrentProject: !1,
|
|
119
|
+
isInstalled: !1,
|
|
120
|
+
isUpToDate: !1,
|
|
121
|
+
isDependency: e.type === o.DEPENDENCY,
|
|
122
|
+
isDevDependency: e.type === o.DEV_DEPENDENCY,
|
|
123
|
+
installedPath: "",
|
|
124
|
+
file: {}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const m = u[e.name] ?? d[e.name] ?? "", f = _(O.CWD, S, e.name, T);
|
|
128
|
+
if (!D(f))
|
|
129
|
+
return {
|
|
130
|
+
success: !0,
|
|
131
|
+
result: {
|
|
132
|
+
name: e.name,
|
|
133
|
+
currentVersion: "",
|
|
134
|
+
latestVersion: l.result,
|
|
135
|
+
isCurrentProject: !1,
|
|
136
|
+
isInstalled: !1,
|
|
137
|
+
isUpToDate: !1,
|
|
138
|
+
isDependency: a,
|
|
139
|
+
isDevDependency: t,
|
|
140
|
+
installedPath: "",
|
|
141
|
+
file: {}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
const E = p(f), { version: h = "" } = E;
|
|
145
|
+
return m !== h ? {
|
|
146
|
+
success: !0,
|
|
147
|
+
result: {
|
|
148
|
+
name: e.name,
|
|
149
|
+
currentVersion: h || m,
|
|
150
|
+
latestVersion: l.result,
|
|
151
|
+
isCurrentProject: !1,
|
|
152
|
+
isInstalled: !0,
|
|
153
|
+
isUpToDate: !1,
|
|
154
|
+
isDependency: a,
|
|
155
|
+
isDevDependency: t,
|
|
156
|
+
installedPath: f,
|
|
157
|
+
file: E
|
|
158
|
+
}
|
|
159
|
+
} : {
|
|
160
|
+
success: !0,
|
|
161
|
+
result: {
|
|
162
|
+
name: e.name,
|
|
163
|
+
currentVersion: m,
|
|
164
|
+
latestVersion: l.result,
|
|
165
|
+
isCurrentProject: !1,
|
|
166
|
+
isInstalled: !0,
|
|
167
|
+
isUpToDate: m === l.result,
|
|
168
|
+
isDependency: a,
|
|
169
|
+
isDevDependency: t,
|
|
170
|
+
installedPath: f,
|
|
171
|
+
file: E
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
} catch (s) {
|
|
175
|
+
return c(s);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
async function V(e) {
|
|
179
|
+
try {
|
|
180
|
+
const s = p(i.PACKAGE_JSON), r = s.dependencies ?? {}, n = s.devDependencies ?? {};
|
|
181
|
+
e.isDependency ? r[e.name] = e.latestVersion : e.isDevDependency && (n[e.name] = e.latestVersion), w(i.PACKAGE_JSON, JSON.stringify(s, null, 4)), N.info(`Updated "${e.name}" to version ${e.latestVersion}`);
|
|
182
|
+
} catch (s) {
|
|
183
|
+
c(s);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
async function G() {
|
|
187
|
+
try {
|
|
188
|
+
const e = [
|
|
189
|
+
{ command: () => y.pnpmInstallStandard(), message: "Installing dependencies (standard)" },
|
|
190
|
+
{ command: () => y.pnpmInstallLegacy(), message: "Retrying with legacy peer dependencies" },
|
|
191
|
+
{ command: () => y.pnpmInstallForce(), message: "Retrying with force install" }
|
|
192
|
+
];
|
|
193
|
+
for (const { command: s, message: r } of e)
|
|
194
|
+
try {
|
|
195
|
+
const n = await s();
|
|
196
|
+
await A(`${r} using: ${n}`, n);
|
|
197
|
+
return;
|
|
198
|
+
} catch (n) {
|
|
199
|
+
c(n);
|
|
200
|
+
}
|
|
201
|
+
} catch (e) {
|
|
202
|
+
c(e);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async function R(e, s) {
|
|
206
|
+
try {
|
|
207
|
+
if (!D(i.PACKAGE_JSON)) {
|
|
208
|
+
N.error("package.json not found. Aborting setup.");
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const n = (await Promise.all(e.map(g))).filter((t) => t.success && !!t.result && !t.result.isCurrentProject).map((t) => t.result), u = n.filter((t) => !t.isInstalled), d = n.filter((t) => !t.isUpToDate), a = [];
|
|
212
|
+
s?.install && u.length > 0 && a.push(...u.map(V)), s?.update && d.length > 0 && a.push(...d.map(V)), a.length > 0 && (await Promise.all(a), await G(), await A("Running ESLint with auto-fix", await y.eslintFix()));
|
|
213
|
+
for (const t of s?.callbacks ?? [])
|
|
214
|
+
await t();
|
|
215
|
+
} catch (r) {
|
|
216
|
+
c(r);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
export {
|
|
220
|
+
U as getLatestPackageVersion,
|
|
221
|
+
g as getPackage,
|
|
222
|
+
G as installDependencies,
|
|
223
|
+
R as setupPackages,
|
|
224
|
+
V as updatePackage
|
|
225
|
+
};
|
|
@@ -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,273 @@
|
|
|
1
|
+
import f from "fs-extra";
|
|
2
|
+
import { resolveWorkingPath as o, join as G } from "./path.util.js";
|
|
3
|
+
import { E_CommandType as t } from "../command/command.type.js";
|
|
4
|
+
import { formatCommand as g, rawCommand as N } from "../command/command.util.js";
|
|
5
|
+
import { setupPackages as u } from "../package/package.util.js";
|
|
6
|
+
import { E_PackageType as e } from "../package/package.type.js";
|
|
7
|
+
import { getEnv as k } from "../../config/env/env.util.js";
|
|
8
|
+
const K = k(), p = K.CWD, D = "@cyberskill/shared", d = "node_modules", Y = "dist", F = "public", P = "package.json", h = "package-lock.json", V = "tsconfig.json", U = ".gitignore", v = ".simple-git-hooks.json", H = "pnpm-lock.yaml", j = ".git/hooks/", J = ".git/COMMIT_EDITMSG", x = ".migrate-mongo.config.js", E = (() => {
|
|
9
|
+
const m = f.readJsonSync(o(P)).name === D ? p : G(p, d, D);
|
|
10
|
+
return G(m, Y);
|
|
11
|
+
})(), at = "cyberskill", it = "src/node/cli/index.ts", L = "eslint", M = "eslint", S = "vitest", l = "vitest", b = "@commitlint/cli", w = "@commitlint/config-conventional", A = "commitlint", B = "lint-staged", y = "lint-staged", W = "typescript", X = "tsc", I = "tsx", $ = "git", _ = "pnpm", q = "pnpm exec", z = "simple-git-hooks", Q = "simple-git-hooks", Z = "@eslint/config-inspector", tt = "eslint-config-inspector", nt = "node-modules-inspector", et = "node-modules-inspector", i = "migrate-mongo", C = "./node_modules/migrate-mongo/bin/migrate-mongo", s = {
|
|
12
|
+
CYBERSKILL_DIRECTORY: E,
|
|
13
|
+
WORKING_DIRECTORY: p,
|
|
14
|
+
PUBLIC_DIRECTORY: o(F),
|
|
15
|
+
TS_CONFIG: o(V),
|
|
16
|
+
GIT_IGNORE: o(U),
|
|
17
|
+
GIT_HOOK: o(j),
|
|
18
|
+
GIT_COMMIT_MSG: o(J),
|
|
19
|
+
SIMPLE_GIT_HOOKS_JSON: o(v),
|
|
20
|
+
PACKAGE_JSON: o(P),
|
|
21
|
+
PACKAGE_LOCK_JSON: o(h),
|
|
22
|
+
PNPM_LOCK_YAML: o(H),
|
|
23
|
+
NODE_MODULES: o(d),
|
|
24
|
+
MIGRATE_MONGO_CONFIG: o(x),
|
|
25
|
+
LINT_STAGED_CONFIG: o(`${E}/src/config/lint-staged/index.js`),
|
|
26
|
+
COMMITLINT_CONFIG: o(`${E}/src/config/commitlint/index.js`),
|
|
27
|
+
VITEST_UNIT_CONFIG: o(`${E}/src/config/vitest/vitest.unit.js`),
|
|
28
|
+
VITEST_UNIT_SETUP_CONFIG: o(`${E}/src/config/vitest/vitest.unit.setup.js`),
|
|
29
|
+
VITEST_E2E_CONFIG: o(`${E}/src/config/vitest/vitest.e2e.js`)
|
|
30
|
+
};
|
|
31
|
+
function Ct({ isCurrentProject: c }) {
|
|
32
|
+
return {
|
|
33
|
+
"pre-commit": y,
|
|
34
|
+
"commit-msg": A,
|
|
35
|
+
...c && { "pre-push": N(`${$} pull`) }
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function n({ type: c, packages: m, command: T }) {
|
|
39
|
+
const r = m?.reduce((a, O) => (a.some((R) => R.name === O.name) || a.push(O), a), []);
|
|
40
|
+
return async () => {
|
|
41
|
+
switch (c) {
|
|
42
|
+
case t.CLI:
|
|
43
|
+
return r?.length && await u(r, {
|
|
44
|
+
install: !0
|
|
45
|
+
}), g(N(`${q} ${T}`));
|
|
46
|
+
case t.STRING:
|
|
47
|
+
return g(N(T));
|
|
48
|
+
default:
|
|
49
|
+
throw new Error("Unsupported command type");
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const Nt = {
|
|
54
|
+
simpleGitHooks: n({
|
|
55
|
+
type: t.CLI,
|
|
56
|
+
packages: [
|
|
57
|
+
{
|
|
58
|
+
name: z,
|
|
59
|
+
type: e.DEV_DEPENDENCY
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
command: Q
|
|
63
|
+
}),
|
|
64
|
+
eslintInspect: n({
|
|
65
|
+
type: t.CLI,
|
|
66
|
+
packages: [
|
|
67
|
+
{
|
|
68
|
+
name: Z,
|
|
69
|
+
type: e.DEV_DEPENDENCY
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
command: tt
|
|
73
|
+
}),
|
|
74
|
+
nodeModulesInspect: n({
|
|
75
|
+
type: t.CLI,
|
|
76
|
+
packages: [
|
|
77
|
+
{
|
|
78
|
+
name: nt,
|
|
79
|
+
type: e.DEV_DEPENDENCY
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
command: et
|
|
83
|
+
}),
|
|
84
|
+
eslintCheck: n({
|
|
85
|
+
type: t.CLI,
|
|
86
|
+
packages: [
|
|
87
|
+
{
|
|
88
|
+
name: L,
|
|
89
|
+
type: e.DEV_DEPENDENCY
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
command: `${M} ${s.WORKING_DIRECTORY} --no-cache`
|
|
93
|
+
}),
|
|
94
|
+
eslintFix: n({
|
|
95
|
+
type: t.CLI,
|
|
96
|
+
packages: [
|
|
97
|
+
{
|
|
98
|
+
name: L,
|
|
99
|
+
type: e.DEV_DEPENDENCY
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
command: `${M} ${s.WORKING_DIRECTORY} --fix --no-cache`
|
|
103
|
+
}),
|
|
104
|
+
typescriptCheck: n({
|
|
105
|
+
type: t.CLI,
|
|
106
|
+
packages: [
|
|
107
|
+
{
|
|
108
|
+
name: W,
|
|
109
|
+
type: e.DEV_DEPENDENCY
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
command: `${X} -p ${s.TS_CONFIG} --noEmit`
|
|
113
|
+
}),
|
|
114
|
+
testUnit: n({
|
|
115
|
+
type: t.CLI,
|
|
116
|
+
packages: [
|
|
117
|
+
{
|
|
118
|
+
name: S,
|
|
119
|
+
type: e.DEV_DEPENDENCY
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
command: `${l} --config ${s.VITEST_UNIT_CONFIG}`
|
|
123
|
+
}),
|
|
124
|
+
testE2e: n({
|
|
125
|
+
type: t.CLI,
|
|
126
|
+
packages: [
|
|
127
|
+
{
|
|
128
|
+
name: S,
|
|
129
|
+
type: e.DEV_DEPENDENCY
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
command: `${l} --config ${s.VITEST_E2E_CONFIG}`
|
|
133
|
+
}),
|
|
134
|
+
mongoMigrateCreate: (c) => n({
|
|
135
|
+
type: t.CLI,
|
|
136
|
+
packages: [
|
|
137
|
+
{
|
|
138
|
+
name: I,
|
|
139
|
+
type: e.DEPENDENCY
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: i,
|
|
143
|
+
type: e.DEPENDENCY
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
command: `${I} ${C} create ${c} -f ${s.MIGRATE_MONGO_CONFIG}`
|
|
147
|
+
})(),
|
|
148
|
+
mongoMigrateUp: n({
|
|
149
|
+
type: t.CLI,
|
|
150
|
+
packages: [
|
|
151
|
+
{
|
|
152
|
+
name: I,
|
|
153
|
+
type: e.DEPENDENCY
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: i,
|
|
157
|
+
type: e.DEPENDENCY
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
command: `${I} ${C} up -f ${s.MIGRATE_MONGO_CONFIG}`
|
|
161
|
+
}),
|
|
162
|
+
mongoMigrateDown: n({
|
|
163
|
+
type: t.CLI,
|
|
164
|
+
packages: [
|
|
165
|
+
{
|
|
166
|
+
name: I,
|
|
167
|
+
type: e.DEPENDENCY
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: i,
|
|
171
|
+
type: e.DEPENDENCY
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
command: `${I} ${C} down -f ${s.MIGRATE_MONGO_CONFIG}`
|
|
175
|
+
}),
|
|
176
|
+
commitLint: n({
|
|
177
|
+
type: t.CLI,
|
|
178
|
+
packages: [
|
|
179
|
+
{
|
|
180
|
+
name: b,
|
|
181
|
+
type: e.DEV_DEPENDENCY
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: w,
|
|
185
|
+
type: e.DEV_DEPENDENCY
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
command: `${A} --edit ${s.GIT_COMMIT_MSG} --config ${s.COMMITLINT_CONFIG}`
|
|
189
|
+
}),
|
|
190
|
+
lintStaged: n({
|
|
191
|
+
type: t.CLI,
|
|
192
|
+
packages: [
|
|
193
|
+
{
|
|
194
|
+
name: B,
|
|
195
|
+
type: e.DEV_DEPENDENCY
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
command: `${y} --config ${s.LINT_STAGED_CONFIG}`
|
|
199
|
+
}),
|
|
200
|
+
configureGitHook: n({
|
|
201
|
+
type: t.STRING,
|
|
202
|
+
command: `${$} config core.hooksPath ${s.GIT_HOOK}`
|
|
203
|
+
}),
|
|
204
|
+
build: n({
|
|
205
|
+
type: t.STRING,
|
|
206
|
+
command: `${_} run --if-present build`
|
|
207
|
+
}),
|
|
208
|
+
pnpmInstallStandard: n({
|
|
209
|
+
type: t.STRING,
|
|
210
|
+
command: `${_} install --ignore-scripts`
|
|
211
|
+
}),
|
|
212
|
+
pnpmInstallLegacy: n({
|
|
213
|
+
type: t.STRING,
|
|
214
|
+
command: `${_} install --ignore-scripts --legacy-peer-deps`
|
|
215
|
+
}),
|
|
216
|
+
pnpmInstallForce: n({
|
|
217
|
+
type: t.STRING,
|
|
218
|
+
command: `${_} install --ignore-scripts --force`
|
|
219
|
+
}),
|
|
220
|
+
pnpmPruneStore: n({
|
|
221
|
+
type: t.STRING,
|
|
222
|
+
command: `${_} store prune`
|
|
223
|
+
}),
|
|
224
|
+
pnpmCleanCache: n({
|
|
225
|
+
type: t.STRING,
|
|
226
|
+
command: `${_} cache delete`
|
|
227
|
+
})
|
|
228
|
+
};
|
|
229
|
+
export {
|
|
230
|
+
Y as BUILD_DIRECTORY,
|
|
231
|
+
A as COMMIT_LINT_CLI,
|
|
232
|
+
w as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
|
|
233
|
+
b as COMMIT_LINT_PACKAGE_NAME,
|
|
234
|
+
at as CYBERSKILL_CLI,
|
|
235
|
+
it as CYBERSKILL_CLI_PATH,
|
|
236
|
+
E as CYBERSKILL_DIRECTORY,
|
|
237
|
+
D as CYBERSKILL_PACKAGE_NAME,
|
|
238
|
+
M as ESLINT_CLI,
|
|
239
|
+
tt as ESLINT_INSPECT_CLI,
|
|
240
|
+
Z as ESLINT_INSPECT_PACKAGE_NAME,
|
|
241
|
+
L as ESLINT_PACKAGE_NAME,
|
|
242
|
+
$ as GIT_CLI,
|
|
243
|
+
J as GIT_COMMIT_EDITMSG,
|
|
244
|
+
j as GIT_HOOK,
|
|
245
|
+
U as GIT_IGNORE,
|
|
246
|
+
y as LINT_STAGED_CLI,
|
|
247
|
+
B as LINT_STAGED_PACKAGE_NAME,
|
|
248
|
+
C as MIGRATE_MONGO_CLI,
|
|
249
|
+
x as MIGRATE_MONGO_CONFIG,
|
|
250
|
+
i as MIGRATE_MONGO_PACKAGE_NAME,
|
|
251
|
+
d as NODE_MODULES,
|
|
252
|
+
et as NODE_MODULES_INSPECT_CLI,
|
|
253
|
+
nt as NODE_MODULES_INSPECT_PACKAGE_NAME,
|
|
254
|
+
P as PACKAGE_JSON,
|
|
255
|
+
h as PACKAGE_LOCK_JSON,
|
|
256
|
+
s as PATH,
|
|
257
|
+
_ as PNPM_CLI,
|
|
258
|
+
q as PNPM_EXEC_CLI,
|
|
259
|
+
H as PNPM_LOCK_YAML,
|
|
260
|
+
F as PUBLIC_DIRECTORY,
|
|
261
|
+
z as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
|
|
262
|
+
Q as SIMPLE_GIT_HOOK_CLI,
|
|
263
|
+
v as SIMPLE_GIT_HOOK_JSON,
|
|
264
|
+
V as TSCONFIG_JSON,
|
|
265
|
+
X as TSC_CLI,
|
|
266
|
+
W as TSC_PACKAGE_NAME,
|
|
267
|
+
I as TSX_CLI,
|
|
268
|
+
l as VITEST_CLI,
|
|
269
|
+
S as VITEST_PACKAGE_NAME,
|
|
270
|
+
p as WORKING_DIRECTORY,
|
|
271
|
+
Nt as command,
|
|
272
|
+
Ct as createGitHooksConfig
|
|
273
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import e from "node-persist";
|
|
2
|
+
import { getEnv as c } from "../../config/env/env.util.js";
|
|
3
|
+
import { catchError as a, log as i } from "../log/log.util.js";
|
|
4
|
+
const s = c();
|
|
5
|
+
async function n() {
|
|
6
|
+
e.defaultInstance || await e.init({
|
|
7
|
+
dir: s.CYBERSKILL_STORAGE_DIRECTORY
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
const m = {
|
|
11
|
+
async get(r) {
|
|
12
|
+
try {
|
|
13
|
+
return await n(), await e.getItem(r) ?? null;
|
|
14
|
+
} catch (t) {
|
|
15
|
+
return a(t, { returnValue: null });
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
async set(r, t) {
|
|
19
|
+
try {
|
|
20
|
+
await n(), await e.setItem(r, t);
|
|
21
|
+
} catch (o) {
|
|
22
|
+
a(o);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
async remove(r) {
|
|
26
|
+
try {
|
|
27
|
+
await n(), await e.removeItem(r);
|
|
28
|
+
} catch (t) {
|
|
29
|
+
a(t);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
async keys() {
|
|
33
|
+
try {
|
|
34
|
+
await n();
|
|
35
|
+
const r = await e.keys();
|
|
36
|
+
return Array.isArray(r) ? r : (i.warn("[Storage:keys] Invalid keys response:", r), []);
|
|
37
|
+
} catch (r) {
|
|
38
|
+
return a(r, { returnValue: [] });
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
async getLogLink(r) {
|
|
42
|
+
try {
|
|
43
|
+
return `${s.CYBERSKILL_STORAGE_DIRECTORY} (key: ${r})`;
|
|
44
|
+
} catch (t) {
|
|
45
|
+
return a(t, { returnValue: null });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
m as storage
|
|
51
|
+
};
|