@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,49 @@
|
|
|
1
|
+
import a from "@antfu/eslint-config";
|
|
2
|
+
import { E_ConfigType as n } from "./config.type.js";
|
|
3
|
+
import g from "./eslint/index.js";
|
|
4
|
+
import { vitestE2E as E } from "./vitest/vitest.e2e.js";
|
|
5
|
+
import { vitestUnit as T } from "./vitest/vitest.unit.js";
|
|
6
|
+
import { deepMerge as i } from "../util/object/object.util.js";
|
|
7
|
+
const c = (...r) => {
|
|
8
|
+
const e = i(
|
|
9
|
+
g,
|
|
10
|
+
...r.map((o) => o)
|
|
11
|
+
), { ignores: t, ...m } = e, s = Array.isArray(t) && t.every((o) => typeof o == "string") ? { ignores: t } : void 0, f = [
|
|
12
|
+
m,
|
|
13
|
+
...s ? [s] : []
|
|
14
|
+
];
|
|
15
|
+
return a(
|
|
16
|
+
{
|
|
17
|
+
stylistic: {
|
|
18
|
+
semi: !0,
|
|
19
|
+
indent: 4,
|
|
20
|
+
quotes: "single"
|
|
21
|
+
},
|
|
22
|
+
formatters: {
|
|
23
|
+
css: !0,
|
|
24
|
+
html: !0,
|
|
25
|
+
markdown: "prettier"
|
|
26
|
+
},
|
|
27
|
+
yaml: !1,
|
|
28
|
+
react: !0
|
|
29
|
+
},
|
|
30
|
+
...f
|
|
31
|
+
);
|
|
32
|
+
}, p = {
|
|
33
|
+
[n.ESLINT]: (r) => c(r),
|
|
34
|
+
[n.COMMITLINT]: (r) => i(r),
|
|
35
|
+
[n.LINT_STAGED]: (r) => i(r),
|
|
36
|
+
[n.VITEST_REACT_UNIT]: (r) => T(r),
|
|
37
|
+
[n.VITEST_REACT_E2E]: (r) => E(r)
|
|
38
|
+
};
|
|
39
|
+
function A(r, ...e) {
|
|
40
|
+
const t = p[r];
|
|
41
|
+
if (!e || e.length === 0)
|
|
42
|
+
return t({});
|
|
43
|
+
if (!t)
|
|
44
|
+
throw new Error(`Unknown config type: ${r}`);
|
|
45
|
+
return t(...e);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
A as mergeConfigs
|
|
49
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import n from "@dotenvx/dotenvx";
|
|
2
|
-
import {
|
|
2
|
+
import { cleanEnv as E, str as r, makeValidator as f } from "envalid";
|
|
3
3
|
import i from "node:os";
|
|
4
4
|
import a from "node:path";
|
|
5
5
|
import o from "node:process";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { CYBERSKILL_STORAGE_DIRECTORY as m } from "./env.constant.js";
|
|
7
|
+
import { E_Environment as R } from "../../typescript/common.type.js";
|
|
8
8
|
let t = !1;
|
|
9
|
-
const l =
|
|
9
|
+
const l = f((e) => typeof e == "boolean" ? e : typeof e == "string");
|
|
10
10
|
function d() {
|
|
11
|
-
o.env.NODE_ENV !==
|
|
11
|
+
o.env.NODE_ENV !== R.PRODUCTION && !t && (n.config(), t = !0);
|
|
12
12
|
}
|
|
13
13
|
function p() {
|
|
14
14
|
d();
|
|
15
|
-
const e =
|
|
15
|
+
const e = E(o.env, {
|
|
16
16
|
CWD: r({ default: o.cwd() }),
|
|
17
17
|
DEBUG: l({ default: !1 }),
|
|
18
|
-
CYBERSKILL_STORAGE_DIRECTORY: r({ default: a.join(i.homedir(),
|
|
18
|
+
CYBERSKILL_STORAGE_DIRECTORY: r({ default: a.join(i.homedir(), m) })
|
|
19
19
|
});
|
|
20
20
|
return {
|
|
21
21
|
CWD: e.CWD,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as o from "globals";
|
|
2
|
+
const t = [
|
|
3
|
+
{
|
|
4
|
+
languageOptions: {
|
|
5
|
+
globals: { ...o.node, ...o.browser }
|
|
6
|
+
},
|
|
7
|
+
rules: {
|
|
8
|
+
"perfectionist/sort-imports": ["error", {
|
|
9
|
+
internalPattern: ["^#.*", "^@/.*"]
|
|
10
|
+
}],
|
|
11
|
+
"dot-notation": "off"
|
|
12
|
+
},
|
|
13
|
+
ignores: ["build", "dist"]
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
export {
|
|
17
|
+
t as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineConfig as s } from "@eddeee888/gcg-typescript-resolver-files";
|
|
2
|
+
import { loadEnvFile as c } from "../env/env.util.js";
|
|
3
|
+
c();
|
|
4
|
+
function u({
|
|
5
|
+
uri: t,
|
|
6
|
+
from: o,
|
|
7
|
+
to: e,
|
|
8
|
+
target: r = "client"
|
|
9
|
+
}) {
|
|
10
|
+
const n = r === "client", i = r === "server";
|
|
11
|
+
return {
|
|
12
|
+
schema: t,
|
|
13
|
+
ignoreNoDocuments: !0,
|
|
14
|
+
overwrite: !0,
|
|
15
|
+
...n && { documents: [o] },
|
|
16
|
+
generates: {
|
|
17
|
+
...n && {
|
|
18
|
+
[e]: {
|
|
19
|
+
preset: "client",
|
|
20
|
+
presetConfig: {
|
|
21
|
+
fragmentMasking: !1,
|
|
22
|
+
persistedDocuments: !0
|
|
23
|
+
},
|
|
24
|
+
config: {
|
|
25
|
+
useTypeImports: !0
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
...i && {
|
|
30
|
+
[e]: s()
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
u as createGraphqlCodegenConfig
|
|
37
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import r from "@vitejs/plugin-react-swc";
|
|
2
|
+
import { defineConfig as t } from "../../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";
|
|
3
|
+
function s(e) {
|
|
4
|
+
return t({
|
|
5
|
+
plugins: [r()],
|
|
6
|
+
test: {
|
|
7
|
+
include: ["**/*.test.e2e.?(c|m)[jt]s?(x)"],
|
|
8
|
+
browser: {
|
|
9
|
+
enabled: !0,
|
|
10
|
+
provider: "playwright",
|
|
11
|
+
instances: [
|
|
12
|
+
{ browser: "chromium" },
|
|
13
|
+
{ browser: "firefox" },
|
|
14
|
+
{ browser: "webkit" }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
...e
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
s as vitestE2E
|
|
23
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import e from "@vitejs/plugin-react-swc";
|
|
2
|
+
import { defineConfig as o } from "../../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";
|
|
3
|
+
import { PATH as i } from "../../node/path/path.constant.js";
|
|
4
|
+
function s(t) {
|
|
5
|
+
return o({
|
|
6
|
+
plugins: [e()],
|
|
7
|
+
test: {
|
|
8
|
+
globals: !0,
|
|
9
|
+
environment: "jsdom",
|
|
10
|
+
pool: "vmThreads",
|
|
11
|
+
include: ["**/*.test.unit.?(c|m)[jt]s?(x)"],
|
|
12
|
+
setupFiles: [i.VITEST_UNIT_SETUP_CONFIG]
|
|
13
|
+
},
|
|
14
|
+
...t
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
s as vitestUnit
|
|
19
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ApolloServer as e } from "@apollo/server";
|
|
2
|
+
import { ApolloServerPluginDrainHttpServer as l } from "@apollo/server/plugin/drainHttpServer";
|
|
3
|
+
import { ApolloServerPluginLandingPageLocalDefault as o, ApolloServerPluginLandingPageProductionDefault as n } from "@apollo/server/plugin/landingPage/default";
|
|
4
|
+
import { log as a } from "../log/log.util.js";
|
|
5
|
+
function c(r) {
|
|
6
|
+
return new e({
|
|
7
|
+
schema: r.schema,
|
|
8
|
+
plugins: [
|
|
9
|
+
r.isDev ? o() : n(),
|
|
10
|
+
l({ httpServer: r.server }),
|
|
11
|
+
...r.drainServer ? [{
|
|
12
|
+
async serverWillStart() {
|
|
13
|
+
return {
|
|
14
|
+
async drainServer() {
|
|
15
|
+
r.drainServer?.(), a.info("Apollo Server drainServer hook called");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}] : []
|
|
20
|
+
],
|
|
21
|
+
...r.isDev && {
|
|
22
|
+
introspection: !0,
|
|
23
|
+
includeStacktraceInErrorResponses: !0
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
c as createApolloServer
|
|
29
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import g from "node:process";
|
|
3
|
+
import { hideBin as C } from "yargs/helpers";
|
|
4
|
+
import L from "yargs/yargs";
|
|
5
|
+
import { clearAllErrorLists as s, runCommand as t, getStoredErrorLists as M, resolveCommands as _ } from "../command/command.util.js";
|
|
6
|
+
import { getPackage as O, installDependencies as w } from "../package/package.util.js";
|
|
7
|
+
import { removeSync as y, readFileSync as E, pathExistsSync as h, writeFileSync as l, appendFileSync as R } from "../fs/fs.util.js";
|
|
8
|
+
import { resolve as G } from "../path/path.util.js";
|
|
9
|
+
import { CYBERSKILL_CLI as N, command as i, CYBERSKILL_PACKAGE_NAME as p, PATH as e, SIMPLE_GIT_HOOK_JSON as u, createGitHooksConfig as T } from "../path/path.constant.js";
|
|
10
|
+
import { log as r, catchError as P } from "../log/log.util.js";
|
|
11
|
+
import { E_IssueType as d } from "../log/log.type.js";
|
|
12
|
+
function D() {
|
|
13
|
+
try {
|
|
14
|
+
return JSON.parse(
|
|
15
|
+
E(G(__dirname, "../../../package.json"), "utf-8")
|
|
16
|
+
).version;
|
|
17
|
+
} catch {
|
|
18
|
+
return "1.0.0";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async function S() {
|
|
22
|
+
h(e.TS_CONFIG) ? await t("Performing TypeScript validation", await i.typescriptCheck()) : r.warn("No TypeScript configuration found. Skipping type check.");
|
|
23
|
+
}
|
|
24
|
+
async function k(n = !1) {
|
|
25
|
+
n ? await t("Running ESLint with auto-fix", await i.eslintFix()) : await t("Running ESLint check", await i.eslintCheck());
|
|
26
|
+
}
|
|
27
|
+
function f(n, a) {
|
|
28
|
+
if (!a.length)
|
|
29
|
+
return;
|
|
30
|
+
const o = n === "Errors" ? "red" : "yellow";
|
|
31
|
+
r.printBoxedLog(n === "Errors" ? "✖ Errors" : "⚠ Warnings", a, o);
|
|
32
|
+
}
|
|
33
|
+
async function c() {
|
|
34
|
+
setTimeout(async () => {
|
|
35
|
+
const n = await M(), a = n.filter((m) => m.type === d.Error), o = n.filter((m) => m.type === d.Warning);
|
|
36
|
+
!a.length && !o.length ? r.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (f("Warnings", o), f("Errors", a), a.length > 0 && g.exit(1));
|
|
37
|
+
}, 0);
|
|
38
|
+
}
|
|
39
|
+
async function v() {
|
|
40
|
+
await s();
|
|
41
|
+
const n = await O({ name: p });
|
|
42
|
+
if (!n.success) {
|
|
43
|
+
r.error("Failed to retrieve package information. Aborting lint-staged.");
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
n.result.isCurrentProject && await t(`Building package: ${p}`, await i.build()), await t("Executing lint-staged", await i.lintStaged()), c();
|
|
47
|
+
}
|
|
48
|
+
async function B() {
|
|
49
|
+
await t("Inspecting ESLint configuration", await i.eslintInspect());
|
|
50
|
+
}
|
|
51
|
+
async function x() {
|
|
52
|
+
await s(), await Promise.all([S(), k()]), c();
|
|
53
|
+
}
|
|
54
|
+
async function A() {
|
|
55
|
+
await s(), await Promise.all([S(), k(!0)]), c();
|
|
56
|
+
}
|
|
57
|
+
async function F() {
|
|
58
|
+
await s(), await t("Validating commit message", await i.commitLint()), c();
|
|
59
|
+
}
|
|
60
|
+
async function I() {
|
|
61
|
+
await t("Configuring Git hooks", await i.configureGitHook()), y(e.GIT_HOOK);
|
|
62
|
+
const n = await _(T);
|
|
63
|
+
l(e.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(n, null, 4));
|
|
64
|
+
const a = `
|
|
65
|
+
${u}
|
|
66
|
+
`;
|
|
67
|
+
h(e.GIT_IGNORE) ? E(e.GIT_IGNORE, "utf-8").split(`
|
|
68
|
+
`).includes(u) || R(e.GIT_IGNORE, a) : l(e.GIT_IGNORE, a), await t("Setting up simple-git-hooks", await i.simpleGitHooks());
|
|
69
|
+
}
|
|
70
|
+
async function H() {
|
|
71
|
+
await w(), await I();
|
|
72
|
+
}
|
|
73
|
+
async function U() {
|
|
74
|
+
y(e.NODE_MODULES, e.PNPM_LOCK_YAML), await t("Pruning pnpm store", await i.pnpmPruneStore()), await t("Clearing pnpm cache", await i.pnpmCleanCache()), await w(), await I();
|
|
75
|
+
}
|
|
76
|
+
async function K() {
|
|
77
|
+
await t("Inspecting project dependencies", await i.nodeModulesInspect());
|
|
78
|
+
}
|
|
79
|
+
async function b() {
|
|
80
|
+
await t("Running unit tests", await i.testUnit());
|
|
81
|
+
}
|
|
82
|
+
async function j() {
|
|
83
|
+
await t("Running end-to-end tests", await i.testE2e());
|
|
84
|
+
}
|
|
85
|
+
async function J(n) {
|
|
86
|
+
await t("Creating MongoDB migration", await i.mongoMigrateCreate(n));
|
|
87
|
+
}
|
|
88
|
+
async function V() {
|
|
89
|
+
await t("Running MongoDB migrations", await i.mongoMigrateUp());
|
|
90
|
+
}
|
|
91
|
+
async function W() {
|
|
92
|
+
await t("Rolling back MongoDB migration", await i.mongoMigrateDown());
|
|
93
|
+
}
|
|
94
|
+
(async () => {
|
|
95
|
+
try {
|
|
96
|
+
await L(C(g.argv)).scriptName(N).usage("$0 <command> [options]").command("lint", "Check code for linting issues", x).command("lint:fix", "Fix linting issues automatically", A).command("lint:inspect", "View active ESLint configuration", B).command("lint-staged", "Run lint checks on staged files", v).command("commitlint", "Validate commit message format", F).command("ready", "Initialize project and dependencies", H).command("reset", "Reset the project and reinstall dependencies", U).command("inspect", "Analyze installed project dependencies", K).command("test:unit", "Run unit test suite", b).command("test:e2e", "Run end-to-end test suite", j).command("mongo:migrate:create <name>", "Create a MongoDB migration", (n) => n.positional("name", {
|
|
97
|
+
describe: "Migration name",
|
|
98
|
+
type: "string"
|
|
99
|
+
}), async (n) => {
|
|
100
|
+
if (!n.name) {
|
|
101
|
+
r.error("Migration name is required.");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
await J(n.name);
|
|
105
|
+
}).command("mongo:migrate:up", "Apply all MongoDB migrations", V).command("mongo:migrate:down", "Rollback last MongoDB migration", W).demandCommand(1, "Please specify a valid command.").strict().help().alias("h", "help").alias("v", "version").version(D()).epilog(`💡 Tip: Use "--help" with any command to see options
|
|
106
|
+
`).parse();
|
|
107
|
+
} catch (n) {
|
|
108
|
+
P(n), g.exit(1);
|
|
109
|
+
}
|
|
110
|
+
})();
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { exec as d } from "node:child_process";
|
|
2
|
+
import E from "node:process";
|
|
3
|
+
import * as P from "node:util";
|
|
4
|
+
import { storage as l } from "../storage/storage.util.js";
|
|
5
|
+
import { getPackage as C } from "../package/package.util.js";
|
|
6
|
+
import { E_IssueType as a } from "../log/log.type.js";
|
|
7
|
+
import { CYBERSKILL_PACKAGE_NAME as x, PNPM_EXEC_CLI as y, TSX_CLI as S, CYBERSKILL_CLI_PATH as I, CYBERSKILL_CLI as T } from "../path/path.constant.js";
|
|
8
|
+
import { catchError as g, log as u } from "../log/log.util.js";
|
|
9
|
+
import { getEnv as _ } from "../../config/env/env.util.js";
|
|
10
|
+
const w = _(), k = P.promisify(d);
|
|
11
|
+
async function h() {
|
|
12
|
+
const r = await C();
|
|
13
|
+
return r.success ? r.result.name : Date.now().toString();
|
|
14
|
+
}
|
|
15
|
+
async function L(r) {
|
|
16
|
+
if (r.length === 0)
|
|
17
|
+
return;
|
|
18
|
+
const t = await h();
|
|
19
|
+
try {
|
|
20
|
+
await l.set(t, r), setTimeout(async () => {
|
|
21
|
+
const e = await l.getLogLink(t);
|
|
22
|
+
e && u.info(`📂 Open the error list manually: ${e}`);
|
|
23
|
+
}, 0);
|
|
24
|
+
} catch (e) {
|
|
25
|
+
g(e);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function W() {
|
|
29
|
+
try {
|
|
30
|
+
const r = await h();
|
|
31
|
+
return await l.get(r) ?? [];
|
|
32
|
+
} catch (r) {
|
|
33
|
+
return g(r, {
|
|
34
|
+
returnValue: []
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function U() {
|
|
39
|
+
try {
|
|
40
|
+
const r = await h();
|
|
41
|
+
await l.remove(r);
|
|
42
|
+
} catch (r) {
|
|
43
|
+
g(r);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function N(r) {
|
|
47
|
+
const t = [], e = [];
|
|
48
|
+
let s = "";
|
|
49
|
+
const i = /^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/, n = /^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/, m = /^✖\s+(.*?)\s+\[(.*?)\]$/;
|
|
50
|
+
r.split(`
|
|
51
|
+
`).forEach((o) => {
|
|
52
|
+
if (o.startsWith("/"))
|
|
53
|
+
s = o.trim();
|
|
54
|
+
else {
|
|
55
|
+
const c = i.exec(o) || [], f = n.exec(o) || [], p = m.exec(o) || [];
|
|
56
|
+
c.length && s ? t.push({
|
|
57
|
+
file: s,
|
|
58
|
+
position: `${c[1]}:${c[2]}`,
|
|
59
|
+
type: c[3] === a.Error ? a.Error : a.Warning,
|
|
60
|
+
message: c?.[4]?.trim() ?? "",
|
|
61
|
+
rule: c?.[5]?.trim() ?? ""
|
|
62
|
+
}) : f.length ? t.push({
|
|
63
|
+
file: f?.[1] ?? "",
|
|
64
|
+
position: `${f[2]}:${f[3]}`,
|
|
65
|
+
type: f[4] === a.Error ? a.Error : a.Warning,
|
|
66
|
+
message: f?.[5]?.trim() ?? ""
|
|
67
|
+
}) : p.length ? t.push({
|
|
68
|
+
file: "commitlint",
|
|
69
|
+
type: a.Error,
|
|
70
|
+
message: p?.[1]?.trim() ?? "",
|
|
71
|
+
rule: p?.[2]?.trim() ?? ""
|
|
72
|
+
}) : e.push(o.trim());
|
|
73
|
+
}
|
|
74
|
+
}), t.length && L(t), w.DEBUG && e.length && (u.warn("Unmatched lines:"), e.forEach((o) => u.info(` ${o}`)));
|
|
75
|
+
}
|
|
76
|
+
function j(r) {
|
|
77
|
+
try {
|
|
78
|
+
const t = JSON.parse(r), e = [];
|
|
79
|
+
t.forEach(({ filePath: s, messages: i }) => {
|
|
80
|
+
i.forEach(({ severity: n, line: m, column: o, ruleId: c, message: f }) => {
|
|
81
|
+
e.push({
|
|
82
|
+
type: n === 2 ? a.Error : a.Warning,
|
|
83
|
+
file: s,
|
|
84
|
+
position: `${m}:${o}`,
|
|
85
|
+
rule: c,
|
|
86
|
+
message: f
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}), e.length && L(e);
|
|
90
|
+
} catch {
|
|
91
|
+
N(r);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
async function A(r, t = j) {
|
|
95
|
+
const e = new AbortController();
|
|
96
|
+
E.on("SIGINT", () => {
|
|
97
|
+
u.warn("Process interrupted. Terminating..."), e.abort(), E.exit();
|
|
98
|
+
});
|
|
99
|
+
try {
|
|
100
|
+
if (typeof r == "string") {
|
|
101
|
+
const { stdout: s, stderr: i } = await k(r, {
|
|
102
|
+
maxBuffer: 104857600,
|
|
103
|
+
signal: e.signal
|
|
104
|
+
});
|
|
105
|
+
[s, i].forEach((n) => n && t(n));
|
|
106
|
+
}
|
|
107
|
+
} catch (s) {
|
|
108
|
+
const { stdout: i, stderr: n, message: m } = s;
|
|
109
|
+
[i, n].forEach((o) => o && t(o)), !n && !i && u.error(`Command failed: ${m}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function Y(r) {
|
|
113
|
+
return { raw: !0, cmd: r };
|
|
114
|
+
}
|
|
115
|
+
function $(r, t) {
|
|
116
|
+
return t?.isCurrentProject ? `${y} ${S} ${I} ${r}` : `${y} ${T} ${r}`;
|
|
117
|
+
}
|
|
118
|
+
function B(r, t) {
|
|
119
|
+
return typeof r == "function" ? $(r(t), t) : typeof r == "object" && r?.raw === !0 ? r.cmd : typeof r == "string" ? $(r, t) : r;
|
|
120
|
+
}
|
|
121
|
+
async function X(r) {
|
|
122
|
+
const t = await C({ name: x });
|
|
123
|
+
if (t.success) {
|
|
124
|
+
const e = { isCurrentProject: t.result.isCurrentProject }, s = typeof r == "function" ? r(e) : r;
|
|
125
|
+
return Object.fromEntries(
|
|
126
|
+
Object.entries(s).map(([i, n]) => [i, B(n, e)])
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async function F(r, t) {
|
|
131
|
+
try {
|
|
132
|
+
u.start(`${r}`), w.DEBUG && u.info(`→ ${t}`), await A(t), u.success(`${r} done.`);
|
|
133
|
+
} catch (e) {
|
|
134
|
+
g(e);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
U as clearAllErrorLists,
|
|
139
|
+
B as formatCommand,
|
|
140
|
+
W as getStoredErrorLists,
|
|
141
|
+
Y as rawCommand,
|
|
142
|
+
X as resolveCommands,
|
|
143
|
+
F as runCommand
|
|
144
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { E_CommandType as m } from "./command.type.js";
|
|
2
|
+
import { clearAllErrorLists as e, formatCommand as t, getStoredErrorLists as d, rawCommand as n, resolveCommands as s, runCommand as C } from "./command.util.js";
|
|
3
|
+
export {
|
|
4
|
+
m as E_CommandType,
|
|
5
|
+
e as clearAllErrorLists,
|
|
6
|
+
t as formatCommand,
|
|
7
|
+
d as getStoredErrorLists,
|
|
8
|
+
n as rawCommand,
|
|
9
|
+
s as resolveCommands,
|
|
10
|
+
C as runCommand
|
|
11
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { NestFactory as a } from "@nestjs/core";
|
|
2
|
+
import c from "compression";
|
|
3
|
+
import f from "cookie-parser";
|
|
4
|
+
import p from "cors";
|
|
5
|
+
import s from "express";
|
|
6
|
+
import { default as P } from "express";
|
|
7
|
+
import m from "express-session";
|
|
8
|
+
import l from "express-useragent";
|
|
9
|
+
import d from "graphql-upload/graphqlUploadExpress.mjs";
|
|
10
|
+
function x({ isDev: e, whiteList: r, ...o }) {
|
|
11
|
+
return {
|
|
12
|
+
origin: (t, i) => {
|
|
13
|
+
e || !t || r?.includes(t ?? "") ? i(null, !0) : i(new Error("Not allowed by CORS"), !1);
|
|
14
|
+
},
|
|
15
|
+
credentials: !0,
|
|
16
|
+
...o
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function b(e) {
|
|
20
|
+
return p(x(e));
|
|
21
|
+
}
|
|
22
|
+
function h(e) {
|
|
23
|
+
return m(e);
|
|
24
|
+
}
|
|
25
|
+
function n(e) {
|
|
26
|
+
e.set("trust proxy", 1), e.use(f()), e.use(s.urlencoded({ extended: !0 })), e.use(c()), e.use(l.express());
|
|
27
|
+
}
|
|
28
|
+
function u(e, r) {
|
|
29
|
+
r && (Array.isArray(r) ? r : [r]).forEach((t) => {
|
|
30
|
+
e.use(s.static(t));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function G(e) {
|
|
34
|
+
const r = s();
|
|
35
|
+
return n(r), u(r, e?.static), r.use(d()), r;
|
|
36
|
+
}
|
|
37
|
+
async function H(e) {
|
|
38
|
+
const r = await a.create(e.module);
|
|
39
|
+
return n(r.getHttpAdapter().getInstance()), u(r.getHttpAdapter().getInstance(), e.static), e.filters && r.useGlobalFilters(...e.filters), e.pipes && r.useGlobalPipes(...e.pipes), r;
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
b as createCors,
|
|
43
|
+
x as createCorsOptions,
|
|
44
|
+
G as createExpress,
|
|
45
|
+
H as createNest,
|
|
46
|
+
h as createSession,
|
|
47
|
+
P as express
|
|
48
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createCors as s, createCorsOptions as t, createExpress as o, createNest as a, createSession as p } from "./express.util.js";
|
|
2
|
+
import { Router as f, default as x } from "express";
|
|
3
|
+
import { default as m } from "body-parser";
|
|
4
|
+
export {
|
|
5
|
+
f as Router,
|
|
6
|
+
m as bodyParser,
|
|
7
|
+
s as createCors,
|
|
8
|
+
t as createCorsOptions,
|
|
9
|
+
o as createExpress,
|
|
10
|
+
a as createNest,
|
|
11
|
+
p as createSession,
|
|
12
|
+
x as express
|
|
13
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import e from "fs-extra";
|
|
2
|
+
import y from "node:path";
|
|
3
|
+
const a = e, {
|
|
4
|
+
lstatSync: p,
|
|
5
|
+
readdirSync: d,
|
|
6
|
+
mkdirSync: l,
|
|
7
|
+
readFileSync: m,
|
|
8
|
+
unlinkSync: x,
|
|
9
|
+
statSync: S,
|
|
10
|
+
createWriteStream: F
|
|
11
|
+
} = e, E = e.readJsonSync;
|
|
12
|
+
function h(t, n, r) {
|
|
13
|
+
e.writeFileSync(t, n, r ?? "utf-8");
|
|
14
|
+
}
|
|
15
|
+
function v(t, n, r) {
|
|
16
|
+
e.appendFileSync(t, n, r ?? "utf-8");
|
|
17
|
+
}
|
|
18
|
+
function s(...t) {
|
|
19
|
+
return t.every((n) => e.pathExistsSync(n));
|
|
20
|
+
}
|
|
21
|
+
function k(...t) {
|
|
22
|
+
t.forEach((n) => {
|
|
23
|
+
s(n) && e.removeSync(n);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function w(t, n, r = {}) {
|
|
27
|
+
const { extensions: c, ...o } = r;
|
|
28
|
+
e.copySync(t, n, {
|
|
29
|
+
filter: (i) => S(i).isDirectory() || !c || c.length === 0 ? !0 : c.includes(y.extname(i)),
|
|
30
|
+
...o
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
v as appendFileSync,
|
|
35
|
+
w as copySync,
|
|
36
|
+
F as createWriteStream,
|
|
37
|
+
a as fs,
|
|
38
|
+
p as lstatSync,
|
|
39
|
+
l as mkdirSync,
|
|
40
|
+
s as pathExistsSync,
|
|
41
|
+
m as readFileSync,
|
|
42
|
+
E as readJsonSync,
|
|
43
|
+
d as readdirSync,
|
|
44
|
+
k as removeSync,
|
|
45
|
+
S as statSync,
|
|
46
|
+
x as unlinkSync,
|
|
47
|
+
h as writeFileSync
|
|
48
|
+
};
|