@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=typeof window!="undefined";exports.IS_BROWSER=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./common.cjs"),t=require("./response-status.cjs");exports.IS_BROWSER=S.IS_BROWSER;exports.RESPONSE_STATUS=t.RESPONSE_STATUS;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};exports.RESPONSE_STATUS=E;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var o=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var v=(e,l,r)=>l in e?p(e,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[l]=r,d=(e,l)=>{for(var r in l||(l={}))P.call(l,r)&&v(e,r,l[r]);if(o)for(var r of o(l))f.call(l,r)&&v(e,r,l[r]);return e};var i=(e,l,r)=>new Promise((a,c)=>{var S=t=>{try{n(r.next(t))}catch(u){c(u)}},g=t=>{try{n(r.throw(t))}catch(u){c(u)}},n=t=>t.done?a(t.value):Promise.resolve(t.value).then(S,g);n((r=r.apply(e,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@apollo/server"),q=require("@apollo/server/express4"),y=require("@apollo/server/plugin/drainHttpServer"),s=require("@apollo/server/plugin/landingPage/default"),D=require("../log/log.util.cjs");function _(e){return new A.ApolloServer(d({schema:e.schema,plugins:[e.isDev?s.ApolloServerPluginLandingPageLocalDefault():s.ApolloServerPluginLandingPageProductionDefault(),y.ApolloServerPluginDrainHttpServer({httpServer:e.server}),...e.drainServer?[{serverWillStart(){return i(this,null,function*(){return{drainServer(){return i(this,null,function*(){var a;(a=e.drainServer)==null||a.call(e),D.log.info("Apollo Server drainServer hook called")})}}})}}]:[]]},e.isDev&&{introspection:!0,includeStacktraceInErrorResponses:!0}))}Object.defineProperty(exports,"expressMiddleware",{enumerable:!0,get:()=>q.expressMiddleware});exports.createApolloServer=_;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
var f = Object.defineProperty;
|
|
2
|
-
var S = Object.getOwnPropertySymbols;
|
|
3
|
-
var g = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var c = (r, l, e) => l in r ? f(r, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[l] = e, u = (r, l) => {
|
|
5
|
-
for (var e in l || (l = {}))
|
|
6
|
-
g.call(l, e) && c(r, e, l[e]);
|
|
7
|
-
if (S)
|
|
8
|
-
for (var e of S(l))
|
|
9
|
-
p.call(l, e) && c(r, e, l[e]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
var t = (r, l, e) => new Promise((n, v) => {
|
|
13
|
-
var d = (a) => {
|
|
14
|
-
try {
|
|
15
|
-
o(e.next(a));
|
|
16
|
-
} catch (i) {
|
|
17
|
-
v(i);
|
|
18
|
-
}
|
|
19
|
-
}, m = (a) => {
|
|
20
|
-
try {
|
|
21
|
-
o(e.throw(a));
|
|
22
|
-
} catch (i) {
|
|
23
|
-
v(i);
|
|
24
|
-
}
|
|
25
|
-
}, o = (a) => a.done ? n(a.value) : Promise.resolve(a.value).then(d, m);
|
|
26
|
-
o((e = e.apply(r, l)).next());
|
|
27
|
-
});
|
|
28
|
-
import { ApolloServer as s } from "@apollo/server";
|
|
29
|
-
import { expressMiddleware as M } from "@apollo/server/express4";
|
|
30
|
-
import { ApolloServerPluginDrainHttpServer as A } from "@apollo/server/plugin/drainHttpServer";
|
|
31
|
-
import { ApolloServerPluginLandingPageLocalDefault as P, ApolloServerPluginLandingPageProductionDefault as D } from "@apollo/server/plugin/landingPage/default";
|
|
32
|
-
import { log as h } from "../log/log.util.js";
|
|
33
|
-
function E(r) {
|
|
34
|
-
return new s(u({
|
|
35
|
-
schema: r.schema,
|
|
36
|
-
plugins: [
|
|
37
|
-
r.isDev ? P() : D(),
|
|
38
|
-
A({ httpServer: r.server }),
|
|
39
|
-
...r.drainServer ? [{
|
|
40
|
-
serverWillStart() {
|
|
41
|
-
return t(this, null, function* () {
|
|
42
|
-
return {
|
|
43
|
-
drainServer() {
|
|
44
|
-
return t(this, null, function* () {
|
|
45
|
-
var n;
|
|
46
|
-
(n = r.drainServer) == null || n.call(r), h.info("Apollo Server drainServer hook called");
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}] : []
|
|
53
|
-
]
|
|
54
|
-
}, r.isDev && {
|
|
55
|
-
introspection: !0,
|
|
56
|
-
includeStacktraceInErrorResponses: !0
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
export {
|
|
60
|
-
E as createApolloServer,
|
|
61
|
-
M as expressMiddleware
|
|
62
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./apollo-server.util.cjs"),r=require("@apollo/server/express4");exports.createApolloServer=e.createApolloServer;Object.defineProperty(exports,"expressMiddleware",{enumerable:!0,get:()=>r.expressMiddleware});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";var s=(t,i,n)=>new Promise((a,g)=>{var w=o=>{try{l(n.next(o))}catch(p){g(p)}},h=o=>{try{l(n.throw(o))}catch(p){g(p)}},l=o=>o.done?a(o.value):Promise.resolve(o.value).then(w,h);l((n=n.apply(t,i)).next())});const m=require("node:process"),q=require("yargs/helpers"),k=require("yargs/yargs"),e=require("../../../path.constant-CWtb99gS.cjs"),r=require("../fs/fs.util.cjs"),u=require("../../../log.type-CMvG6Box.cjs"),c=require("../log/log.util.cjs");require("../path/path.util.cjs");const C="@cyberskill/shared",v="module",E="1.207.0",S="CyberSkill Shared",_="Stephen Cheng",b="MIT",I="https://github.com/cyberskill-world/shared#readme",L={type:"git",url:"git+https://github.com/cyberskill-world/shared.git"},T={url:"https://github.com/cyberskill-world/shared/issues"},M={"./config":{types:"./dist/src/config/index.d.ts",import:"./dist/src/config/index.js",require:"./dist/src/config/index.cjs"},"./config/commitlint":{types:"./dist/src/config/commitlint/index.d.ts",import:"./dist/src/config/commitlint/index.js",require:"./dist/src/config/commitlint/index.cjs"},"./config/env":{types:"./dist/src/config/env/index.d.ts",import:"./dist/src/config/env/index.js",require:"./dist/src/config/env/index.cjs"},"./config/eslint":{types:"./dist/src/config/eslint/index.d.ts",import:"./dist/src/config/eslint/index.js",require:"./dist/src/config/eslint/index.cjs"},"./config/graphql-codegen":{types:"./dist/src/config/graphql-codegen/index.d.ts",import:"./dist/src/config/graphql-codegen/index.js",require:"./dist/src/config/graphql-codegen/index.cjs"},"./config/lint-staged":{types:"./dist/src/config/lint-staged/index.d.ts",import:"./dist/src/config/lint-staged/index.js",require:"./dist/src/config/lint-staged/index.cjs"},"./config/vitest":{types:"./dist/src/config/vitest/index.d.ts",import:"./dist/src/config/vitest/index.js",require:"./dist/src/config/vitest/index.cjs"},"./constant":{types:"./dist/src/constant/index.d.ts",import:"./dist/src/constant/index.js",require:"./dist/src/constant/index.cjs"},"./node/apollo-server":{types:"./dist/src/node/apollo-server/index.d.ts",import:"./dist/src/node/apollo-server/index.js",require:"./dist/src/node/apollo-server/index.cjs"},"./node/cli":{types:"./dist/src/node/cli/index.d.ts",import:"./dist/src/node/cli/index.js",require:"./dist/src/node/cli/index.cjs"},"./node/command":{types:"./dist/src/node/command/index.d.ts",import:"./dist/src/node/command/index.js",require:"./dist/src/node/command/index.cjs"},"./node/express":{types:"./dist/src/node/express/index.d.ts",import:"./dist/src/node/express/index.js",require:"./dist/src/node/express/index.cjs"},"./node/fs":{types:"./dist/src/node/fs/index.d.ts",import:"./dist/src/node/fs/index.js",require:"./dist/src/node/fs/index.cjs"},"./node/log":{types:"./dist/src/node/log/index.d.ts",import:"./dist/src/node/log/index.js",require:"./dist/src/node/log/index.cjs"},"./node/mongo":{types:"./dist/src/node/mongo/index.d.ts",import:"./dist/src/node/mongo/index.js",require:"./dist/src/node/mongo/index.cjs"},"./node/package":{types:"./dist/src/node/package/index.d.ts",import:"./dist/src/node/package/index.js",require:"./dist/src/node/package/index.cjs"},"./node/path":{types:"./dist/src/node/path/index.d.ts",import:"./dist/src/node/path/index.js",require:"./dist/src/node/path/index.cjs"},"./node/storage":{types:"./dist/src/node/storage/index.d.ts",import:"./dist/src/node/storage/index.js",require:"./dist/src/node/storage/index.cjs"},"./node/upload":{types:"./dist/src/node/upload/index.d.ts",import:"./dist/src/node/upload/index.js",require:"./dist/src/node/upload/index.cjs"},"./node/ws":{types:"./dist/src/node/ws/index.d.ts",import:"./dist/src/node/ws/index.js",require:"./dist/src/node/ws/index.cjs"},"./react/apollo-client":{types:"./dist/src/react/apollo-client/index.d.ts",import:"./dist/src/react/apollo-client/index.js",require:"./dist/src/react/apollo-client/index.cjs"},"./react/apollo-client-nextjs":{types:"./dist/src/react/apollo-client-nextjs/index.d.ts",import:"./dist/src/react/apollo-client-nextjs/index.js",require:"./dist/src/react/apollo-client-nextjs/index.cjs"},"./react/apollo-client-nextjs/rsc":{types:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts",import:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js",require:"./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs"},"./react/apollo-error":{types:"./dist/src/react/apollo-error/index.d.ts",import:"./dist/src/react/apollo-error/index.js",require:"./dist/src/react/apollo-error/index.cjs"},"./react/i18next":{types:"./dist/src/react/i18next/index.d.ts",import:"./dist/src/react/i18next/index.js",require:"./dist/src/react/i18next/index.cjs"},"./react/loading":{types:"./dist/src/react/loading/index.d.ts",import:"./dist/src/react/loading/index.js",require:"./dist/src/react/loading/index.cjs"},"./react/log":{types:"./dist/src/react/log/index.d.ts",import:"./dist/src/react/log/index.js",require:"./dist/src/react/log/index.cjs"},"./react/next-intl":{types:"./dist/src/react/next-intl/index.d.ts",import:"./dist/src/react/next-intl/index.js",require:"./dist/src/react/next-intl/index.cjs"},"./react/storage":{types:"./dist/src/react/storage/index.d.ts",import:"./dist/src/react/storage/index.js",require:"./dist/src/react/storage/index.cjs"},"./react/toast":{types:"./dist/src/react/toast/index.d.ts",import:"./dist/src/react/toast/index.js",require:"./dist/src/react/toast/index.cjs"},"./react/userback":{types:"./dist/src/react/userback/index.d.ts",import:"./dist/src/react/userback/index.js",require:"./dist/src/react/userback/index.cjs"},"./typescript":{types:"./dist/src/typescript/index.d.ts",import:"./dist/src/typescript/index.js",require:"./dist/src/typescript/index.cjs"},"./util":{types:"./dist/src/util/index.d.ts",import:"./dist/src/util/index.js",require:"./dist/src/util/index.cjs"},"./style.css":{import:"./dist/style.css",require:"./dist/style.css"}},P={cyberskill:"dist/src/node/cli/index.js"},A=["dist","public"],O={build:"vite build",commitlint:"tsx src/node/cli/index.ts commitlint",dev:"vite build --watch",inspect:"tsx src/node/cli/index.ts inspect",lint:"tsx src/node/cli/index.ts lint","lint:fix":"tsx src/node/cli/index.ts lint:fix","lint:inspect":"tsx src/node/cli/index.ts lint:inspect",ready:"tsx src/node/cli/index.ts ready",reset:"tsx src/node/cli/index.ts reset","test:e2e":"tsx src/node/cli/index.ts test:e2e","test:unit":"tsx src/node/cli/index.ts test:unit"},G={"@antfu/eslint-config":"4.16.2","@apollo/client":"3.13.8","@apollo/client-integration-nextjs":"0.12.2","@apollo/server":"4.12.2","@dotenvx/dotenvx":"1.45.2","@eddeee888/gcg-typescript-resolver-files":"0.12.1","@eslint-react/eslint-plugin":"1.52.2","@graphql-codegen/cli":"5.0.7","@graphql-codegen/client-preset":"4.8.3","@nestjs/common":"11.1.3","@nestjs/core":"11.1.3","@userback/widget":"0.3.11","@vitejs/plugin-react-swc":"3.10.2","apollo-upload-client":"18.0.1","body-parser":"2.2.0",chalk:"5.4.1",clsx:"2.1.1",compression:"1.8.0",consola:"3.4.2","cookie-parser":"1.4.7",cors:"2.8.5","crypto-js":"4.2.0","date-fns":"4.1.0",envalid:"8.0.0","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.20",express:"4.21.2","express-session":"1.18.1","express-useragent":"1.0.15","fs-extra":"11.3.0",globals:"16.3.0",graphql:"16.11.0","graphql-upload":"17.0.0","graphql-ws":"6.0.5",i18next:"25.3.1",jsdom:"26.1.0",localforage:"1.10.0","migrate-mongo":"12.1.3",mongodb:"6.17.0",mongoose:"8.16.1","mongoose-aggregate-paginate-v2":"1.1.4","mongoose-paginate-v2":"1.9.1","next-intl":"4.3.4","node-fetch":"3.3.2","node-persist":"4.0.4",qs:"6.14.0",react:"19.1.0","react-dom":"19.1.0","react-hot-toast":"2.5.2","react-i18next":"15.6.0",slugify:"1.6.6",unorm:"1.6.0",uuid:"11.1.0",vite:"7.0.2",ws:"8.18.3",yargs:"18.0.0"},R={"@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@eslint/config-inspector":"1.1.0","@microsoft/api-extractor":"7.52.8","@next/eslint-plugin-next":"15.3.5","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.0","@types/apollo-upload-client":"18.0.0","@types/body-parser":"1.19.6","@types/compression":"1.8.1","@types/cookie-parser":"1.4.9","@types/cors":"2.8.19","@types/crypto-js":"4.2.2","@types/express":"4.17.21","@types/express-session":"1.18.2","@types/express-useragent":"1.0.5","@types/fs-extra":"11.0.4","@types/graphql-upload":"17.0.0","@types/migrate-mongo":"10.0.5","@types/node":"24.0.10","@types/node-persist":"3.1.8","@types/react":"19.1.8","@types/react-dom":"19.1.6","@types/unorm":"1.3.31","@types/uuid":"10.0.0","@types/ws":"8.18.1","@types/yargs":"17.0.33","@vitest/browser":"3.2.4",eslint:"9.30.1","eslint-config-next":"15.3.5",glob:"11.0.3","lint-staged":"16.1.2","node-modules-inspector":"1.0.0",sass:"1.89.2","simple-git-hooks":"2.13.0",tsx:"4.20.3",typescript:"5.8.3",vite:"7.0.2","vite-plugin-dts":"4.5.4",vitest:"3.2.4"},H={access:"public",registry:"https://registry.npmjs.org/"},N={name:C,type:v,version:E,description:S,author:_,license:b,homepage:I,repository:L,bugs:T,exports:M,bin:P,files:A,scripts:O,dependencies:G,devDependencies:R,publishConfig:H};function y(){return s(this,null,function*(){r.pathExistsSync(e.PATH.TS_CONFIG)?yield e.runCommand("Performing TypeScript validation",yield e.command.typescriptCheck()):c.log.warn("No TypeScript configuration found. Skipping type check.")})}function f(t=!1){return s(this,null,function*(){t?yield e.runCommand("Running ESLint with auto-fix",yield e.command.eslintFix()):yield e.runCommand("Running ESLint check",yield e.command.eslintCheck())})}function x(t,i){if(!i.length)return;const n=t==="Errors"?"red":"yellow";c.log.printBoxedLog(t==="Errors"?"✖ Errors":"⚠ Warnings",i,n)}function d(){return s(this,null,function*(){setTimeout(()=>s(null,null,function*(){const t=yield e.getStoredErrorLists(),i=t.filter(a=>a.type===u.E_IssueType.Error),n=t.filter(a=>a.type===u.E_IssueType.Warning);!i.length&&!n.length?c.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(x("Warnings",n),x("Errors",i),i.length>0&&m.exit(1))}),0)})}function D(){return s(this,null,function*(){yield e.clearAllErrorLists();const t=yield e.getPackage({name:e.CYBERSKILL_PACKAGE_NAME});if(!t.success){c.log.error("Failed to retrieve package information. Aborting lint-staged.");return}t.result.isCurrentProject&&(yield e.runCommand(`Building package: ${e.CYBERSKILL_PACKAGE_NAME}`,yield e.command.build())),yield e.runCommand("Executing lint-staged",yield e.command.lintStaged()),d()})}function B(){return s(this,null,function*(){yield e.runCommand("Inspecting ESLint configuration",yield e.command.eslintInspect())})}function F(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f()]),d()})}function K(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f(!0)]),d()})}function U(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield e.runCommand("Validating commit message",yield e.command.commitLint()),d()})}function j(){return s(this,null,function*(){yield e.runCommand("Configuring Git hooks",yield e.command.configureGitHook()),r.removeSync(e.PATH.GIT_HOOK);const t=yield e.resolveCommands(e.createGitHooksConfig);r.writeFileSync(e.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(t,null,4));const i=`
|
|
3
|
-
${e.SIMPLE_GIT_HOOK_JSON}
|
|
4
|
-
`;r.pathExistsSync(e.PATH.GIT_IGNORE)?r.readFileSync(e.PATH.GIT_IGNORE,"utf-8").split(`
|
|
5
|
-
`).includes(e.SIMPLE_GIT_HOOK_JSON)||r.appendFileSync(e.PATH.GIT_IGNORE,i):r.writeFileSync(e.PATH.GIT_IGNORE,i),yield e.runCommand("Setting up simple-git-hooks",yield e.command.simpleGitHooks())})}function J(){return s(this,null,function*(){yield e.installDependencies(),yield j()})}function Y(){return s(this,null,function*(){r.removeSync(e.PATH.NODE_MODULES,e.PATH.PNPM_LOCK_YAML),yield e.runCommand("Pruning pnpm store",yield e.command.pnpmPruneStore()),yield e.runCommand("Clearing pnpm cache",yield e.command.pnpmCleanCache()),yield e.installDependencies(),yield j()})}function $(){return s(this,null,function*(){yield e.runCommand("Inspecting project dependencies",yield e.command.nodeModulesInspect())})}function V(){return s(this,null,function*(){yield e.runCommand("Running unit tests",yield e.command.testUnit())})}function W(){return s(this,null,function*(){yield e.runCommand("Running end-to-end tests",yield e.command.testE2e())})}function z(t){return s(this,null,function*(){yield e.runCommand("Creating MongoDB migration",yield e.command.mongoMigrateCreate(t))})}function Q(){return s(this,null,function*(){yield e.runCommand("Running MongoDB migrations",yield e.command.mongoMigrateUp())})}function X(){return s(this,null,function*(){yield e.runCommand("Rolling back MongoDB migration",yield e.command.mongoMigrateDown())})}s(null,null,function*(){try{yield k(q.hideBin(m.argv)).scriptName(e.CYBERSKILL_CLI).usage("$0 <command> [options]").command("lint","Check code for linting issues",F).command("lint:fix","Fix linting issues automatically",K).command("lint:inspect","View active ESLint configuration",B).command("lint-staged","Run lint checks on staged files",D).command("commitlint","Validate commit message format",U).command("ready","Initialize project and dependencies",J).command("reset","Reset the project and reinstall dependencies",Y).command("inspect","Analyze installed project dependencies",$).command("test:unit","Run unit test suite",V).command("test:e2e","Run end-to-end test suite",W).command("mongo:migrate:create <name>","Create a MongoDB migration",t=>t.positional("name",{describe:"Migration name",type:"string"}),t=>s(null,null,function*(){if(!t.name){c.log.error("Migration name is required.");return}yield z(t.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",Q).command("mongo:migrate:down","Rollback last MongoDB migration",X).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(N.version).epilog(`💡 Tip: Use "--help" with any command to see options
|
|
6
|
-
`).parse()}catch(t){c.catchError(t),m.exit(1)}});
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var L = (e, n) => () => (n || e((n = { exports: {} }).exports, n), n.exports);
|
|
3
|
-
var t = (e, n, r) => new Promise((a, y) => {
|
|
4
|
-
var I = (c) => {
|
|
5
|
-
try {
|
|
6
|
-
g(r.next(c));
|
|
7
|
-
} catch (m) {
|
|
8
|
-
y(m);
|
|
9
|
-
}
|
|
10
|
-
}, M = (c) => {
|
|
11
|
-
try {
|
|
12
|
-
g(r.throw(c));
|
|
13
|
-
} catch (m) {
|
|
14
|
-
y(m);
|
|
15
|
-
}
|
|
16
|
-
}, g = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(I, M);
|
|
17
|
-
g((r = r.apply(e, n)).next());
|
|
18
|
-
});
|
|
19
|
-
import x from "node:process";
|
|
20
|
-
import { hideBin as O } from "yargs/helpers";
|
|
21
|
-
import R from "yargs/yargs";
|
|
22
|
-
import { g as _, Z as l, a1 as s, I as i, O as G, C as f, R as k, F as o, Y as T, a0 as N, S as j, H as D } from "../../../path.constant-CvSr0Rrx.js";
|
|
23
|
-
import { removeSync as v, pathExistsSync as b, writeFileSync as w, readFileSync as P, appendFileSync as B } from "../fs/fs.util.js";
|
|
24
|
-
import { E as h } from "../../../log.type-DTOvZHyz.js";
|
|
25
|
-
import { log as d, catchError as F } from "../log/log.util.js";
|
|
26
|
-
import "../path/path.util.js";
|
|
27
|
-
var fe = L((u) => {
|
|
28
|
-
const A = "@cyberskill/shared", H = "module", U = "1.207.0", K = "CyberSkill Shared", Y = "Stephen Cheng", J = "MIT", V = "https://github.com/cyberskill-world/shared#readme", W = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, $ = { url: "https://github.com/cyberskill-world/shared/issues" }, z = { "./config": { types: "./dist/src/config/index.d.ts", import: "./dist/src/config/index.js", require: "./dist/src/config/index.cjs" }, "./config/commitlint": { types: "./dist/src/config/commitlint/index.d.ts", import: "./dist/src/config/commitlint/index.js", require: "./dist/src/config/commitlint/index.cjs" }, "./config/env": { types: "./dist/src/config/env/index.d.ts", import: "./dist/src/config/env/index.js", require: "./dist/src/config/env/index.cjs" }, "./config/eslint": { types: "./dist/src/config/eslint/index.d.ts", import: "./dist/src/config/eslint/index.js", require: "./dist/src/config/eslint/index.cjs" }, "./config/graphql-codegen": { types: "./dist/src/config/graphql-codegen/index.d.ts", import: "./dist/src/config/graphql-codegen/index.js", require: "./dist/src/config/graphql-codegen/index.cjs" }, "./config/lint-staged": { types: "./dist/src/config/lint-staged/index.d.ts", import: "./dist/src/config/lint-staged/index.js", require: "./dist/src/config/lint-staged/index.cjs" }, "./config/vitest": { types: "./dist/src/config/vitest/index.d.ts", import: "./dist/src/config/vitest/index.js", require: "./dist/src/config/vitest/index.cjs" }, "./constant": { types: "./dist/src/constant/index.d.ts", import: "./dist/src/constant/index.js", require: "./dist/src/constant/index.cjs" }, "./node/apollo-server": { types: "./dist/src/node/apollo-server/index.d.ts", import: "./dist/src/node/apollo-server/index.js", require: "./dist/src/node/apollo-server/index.cjs" }, "./node/cli": { types: "./dist/src/node/cli/index.d.ts", import: "./dist/src/node/cli/index.js", require: "./dist/src/node/cli/index.cjs" }, "./node/command": { types: "./dist/src/node/command/index.d.ts", import: "./dist/src/node/command/index.js", require: "./dist/src/node/command/index.cjs" }, "./node/express": { types: "./dist/src/node/express/index.d.ts", import: "./dist/src/node/express/index.js", require: "./dist/src/node/express/index.cjs" }, "./node/fs": { types: "./dist/src/node/fs/index.d.ts", import: "./dist/src/node/fs/index.js", require: "./dist/src/node/fs/index.cjs" }, "./node/log": { types: "./dist/src/node/log/index.d.ts", import: "./dist/src/node/log/index.js", require: "./dist/src/node/log/index.cjs" }, "./node/mongo": { types: "./dist/src/node/mongo/index.d.ts", import: "./dist/src/node/mongo/index.js", require: "./dist/src/node/mongo/index.cjs" }, "./node/package": { types: "./dist/src/node/package/index.d.ts", import: "./dist/src/node/package/index.js", require: "./dist/src/node/package/index.cjs" }, "./node/path": { types: "./dist/src/node/path/index.d.ts", import: "./dist/src/node/path/index.js", require: "./dist/src/node/path/index.cjs" }, "./node/storage": { types: "./dist/src/node/storage/index.d.ts", import: "./dist/src/node/storage/index.js", require: "./dist/src/node/storage/index.cjs" }, "./node/upload": { types: "./dist/src/node/upload/index.d.ts", import: "./dist/src/node/upload/index.js", require: "./dist/src/node/upload/index.cjs" }, "./node/ws": { types: "./dist/src/node/ws/index.d.ts", import: "./dist/src/node/ws/index.js", require: "./dist/src/node/ws/index.cjs" }, "./react/apollo-client": { types: "./dist/src/react/apollo-client/index.d.ts", import: "./dist/src/react/apollo-client/index.js", require: "./dist/src/react/apollo-client/index.cjs" }, "./react/apollo-client-nextjs": { types: "./dist/src/react/apollo-client-nextjs/index.d.ts", import: "./dist/src/react/apollo-client-nextjs/index.js", require: "./dist/src/react/apollo-client-nextjs/index.cjs" }, "./react/apollo-client-nextjs/rsc": { types: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts", import: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js", require: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs" }, "./react/apollo-error": { types: "./dist/src/react/apollo-error/index.d.ts", import: "./dist/src/react/apollo-error/index.js", require: "./dist/src/react/apollo-error/index.cjs" }, "./react/i18next": { types: "./dist/src/react/i18next/index.d.ts", import: "./dist/src/react/i18next/index.js", require: "./dist/src/react/i18next/index.cjs" }, "./react/loading": { types: "./dist/src/react/loading/index.d.ts", import: "./dist/src/react/loading/index.js", require: "./dist/src/react/loading/index.cjs" }, "./react/log": { types: "./dist/src/react/log/index.d.ts", import: "./dist/src/react/log/index.js", require: "./dist/src/react/log/index.cjs" }, "./react/next-intl": { types: "./dist/src/react/next-intl/index.d.ts", import: "./dist/src/react/next-intl/index.js", require: "./dist/src/react/next-intl/index.cjs" }, "./react/storage": { types: "./dist/src/react/storage/index.d.ts", import: "./dist/src/react/storage/index.js", require: "./dist/src/react/storage/index.cjs" }, "./react/toast": { types: "./dist/src/react/toast/index.d.ts", import: "./dist/src/react/toast/index.js", require: "./dist/src/react/toast/index.cjs" }, "./react/userback": { types: "./dist/src/react/userback/index.d.ts", import: "./dist/src/react/userback/index.js", require: "./dist/src/react/userback/index.cjs" }, "./typescript": { types: "./dist/src/typescript/index.d.ts", import: "./dist/src/typescript/index.js", require: "./dist/src/typescript/index.cjs" }, "./util": { types: "./dist/src/util/index.d.ts", import: "./dist/src/util/index.js", require: "./dist/src/util/index.cjs" }, "./style.css": { import: "./dist/style.css", require: "./dist/style.css" } }, Z = { cyberskill: "dist/src/node/cli/index.js" }, Q = ["dist", "public"], X = { build: "vite build", commitlint: "tsx src/node/cli/index.ts commitlint", dev: "vite build --watch", inspect: "tsx src/node/cli/index.ts inspect", lint: "tsx src/node/cli/index.ts lint", "lint:fix": "tsx src/node/cli/index.ts lint:fix", "lint:inspect": "tsx src/node/cli/index.ts lint:inspect", ready: "tsx src/node/cli/index.ts ready", reset: "tsx src/node/cli/index.ts reset", "test:e2e": "tsx src/node/cli/index.ts test:e2e", "test:unit": "tsx src/node/cli/index.ts test:unit" }, ee = { "@antfu/eslint-config": "4.16.2", "@apollo/client": "3.13.8", "@apollo/client-integration-nextjs": "0.12.2", "@apollo/server": "4.12.2", "@dotenvx/dotenvx": "1.45.2", "@eddeee888/gcg-typescript-resolver-files": "0.12.1", "@eslint-react/eslint-plugin": "1.52.2", "@graphql-codegen/cli": "5.0.7", "@graphql-codegen/client-preset": "4.8.3", "@nestjs/common": "11.1.3", "@nestjs/core": "11.1.3", "@userback/widget": "0.3.11", "@vitejs/plugin-react-swc": "3.10.2", "apollo-upload-client": "18.0.1", "body-parser": "2.2.0", chalk: "5.4.1", clsx: "2.1.1", compression: "1.8.0", consola: "3.4.2", "cookie-parser": "1.4.7", cors: "2.8.5", "crypto-js": "4.2.0", "date-fns": "4.1.0", envalid: "8.0.0", "eslint-plugin-format": "1.0.1", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.20", express: "4.21.2", "express-session": "1.18.1", "express-useragent": "1.0.15", "fs-extra": "11.3.0", globals: "16.3.0", graphql: "16.11.0", "graphql-upload": "17.0.0", "graphql-ws": "6.0.5", i18next: "25.3.1", jsdom: "26.1.0", localforage: "1.10.0", "migrate-mongo": "12.1.3", mongodb: "6.17.0", mongoose: "8.16.1", "mongoose-aggregate-paginate-v2": "1.1.4", "mongoose-paginate-v2": "1.9.1", "next-intl": "4.3.4", "node-fetch": "3.3.2", "node-persist": "4.0.4", qs: "6.14.0", react: "19.1.0", "react-dom": "19.1.0", "react-hot-toast": "2.5.2", "react-i18next": "15.6.0", slugify: "1.6.6", unorm: "1.6.0", uuid: "11.1.0", vite: "7.0.2", ws: "8.18.3", yargs: "18.0.0" }, te = { "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", "@eslint/config-inspector": "1.1.0", "@microsoft/api-extractor": "7.52.8", "@next/eslint-plugin-next": "15.3.5", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.3.0", "@types/apollo-upload-client": "18.0.0", "@types/body-parser": "1.19.6", "@types/compression": "1.8.1", "@types/cookie-parser": "1.4.9", "@types/cors": "2.8.19", "@types/crypto-js": "4.2.2", "@types/express": "4.17.21", "@types/express-session": "1.18.2", "@types/express-useragent": "1.0.5", "@types/fs-extra": "11.0.4", "@types/graphql-upload": "17.0.0", "@types/migrate-mongo": "10.0.5", "@types/node": "24.0.10", "@types/node-persist": "3.1.8", "@types/react": "19.1.8", "@types/react-dom": "19.1.6", "@types/unorm": "1.3.31", "@types/uuid": "10.0.0", "@types/ws": "8.18.1", "@types/yargs": "17.0.33", "@vitest/browser": "3.2.4", eslint: "9.30.1", "eslint-config-next": "15.3.5", glob: "11.0.3", "lint-staged": "16.1.2", "node-modules-inspector": "1.0.0", sass: "1.89.2", "simple-git-hooks": "2.13.0", tsx: "4.20.3", typescript: "5.8.3", vite: "7.0.2", "vite-plugin-dts": "4.5.4", vitest: "3.2.4" }, se = { access: "public", registry: "https://registry.npmjs.org/" }, ie = {
|
|
29
|
-
name: A,
|
|
30
|
-
type: H,
|
|
31
|
-
version: U,
|
|
32
|
-
description: K,
|
|
33
|
-
author: Y,
|
|
34
|
-
license: J,
|
|
35
|
-
homepage: V,
|
|
36
|
-
repository: W,
|
|
37
|
-
bugs: $,
|
|
38
|
-
exports: z,
|
|
39
|
-
bin: Z,
|
|
40
|
-
files: Q,
|
|
41
|
-
scripts: X,
|
|
42
|
-
dependencies: ee,
|
|
43
|
-
devDependencies: te,
|
|
44
|
-
publishConfig: se
|
|
45
|
-
};
|
|
46
|
-
function E() {
|
|
47
|
-
return t(this, null, function* () {
|
|
48
|
-
b(o.TS_CONFIG) ? yield s("Performing TypeScript validation", yield i.typescriptCheck()) : d.warn("No TypeScript configuration found. Skipping type check.");
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function S(e = !1) {
|
|
52
|
-
return t(this, null, function* () {
|
|
53
|
-
e ? yield s("Running ESLint with auto-fix", yield i.eslintFix()) : yield s("Running ESLint check", yield i.eslintCheck());
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function q(e, n) {
|
|
57
|
-
if (!n.length)
|
|
58
|
-
return;
|
|
59
|
-
const r = e === "Errors" ? "red" : "yellow";
|
|
60
|
-
d.printBoxedLog(e === "Errors" ? "✖ Errors" : "⚠ Warnings", n, r);
|
|
61
|
-
}
|
|
62
|
-
function p() {
|
|
63
|
-
return t(this, null, function* () {
|
|
64
|
-
setTimeout(() => t(null, null, function* () {
|
|
65
|
-
const e = yield T(), n = e.filter((a) => a.type === h.Error), r = e.filter((a) => a.type === h.Warning);
|
|
66
|
-
!n.length && !r.length ? d.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (q("Warnings", r), q("Errors", n), n.length > 0 && x.exit(1));
|
|
67
|
-
}), 0);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function ne() {
|
|
71
|
-
return t(this, null, function* () {
|
|
72
|
-
yield l();
|
|
73
|
-
const e = yield G({ name: f });
|
|
74
|
-
if (!e.success) {
|
|
75
|
-
d.error("Failed to retrieve package information. Aborting lint-staged.");
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
e.result.isCurrentProject && (yield s(`Building package: ${f}`, yield i.build())), yield s("Executing lint-staged", yield i.lintStaged()), p();
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function re() {
|
|
82
|
-
return t(this, null, function* () {
|
|
83
|
-
yield s("Inspecting ESLint configuration", yield i.eslintInspect());
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
function oe() {
|
|
87
|
-
return t(this, null, function* () {
|
|
88
|
-
yield l(), yield Promise.all([E(), S()]), p();
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function ce() {
|
|
92
|
-
return t(this, null, function* () {
|
|
93
|
-
yield l(), yield Promise.all([E(), S(!0)]), p();
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function ae() {
|
|
97
|
-
return t(this, null, function* () {
|
|
98
|
-
yield l(), yield s("Validating commit message", yield i.commitLint()), p();
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function C() {
|
|
102
|
-
return t(this, null, function* () {
|
|
103
|
-
yield s("Configuring Git hooks", yield i.configureGitHook()), v(o.GIT_HOOK);
|
|
104
|
-
const e = yield N(D);
|
|
105
|
-
w(o.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(e, null, 4));
|
|
106
|
-
const n = `
|
|
107
|
-
${j}
|
|
108
|
-
`;
|
|
109
|
-
b(o.GIT_IGNORE) ? P(o.GIT_IGNORE, "utf-8").split(`
|
|
110
|
-
`).includes(j) || B(o.GIT_IGNORE, n) : w(o.GIT_IGNORE, n), yield s("Setting up simple-git-hooks", yield i.simpleGitHooks());
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function de() {
|
|
114
|
-
return t(this, null, function* () {
|
|
115
|
-
yield k(), yield C();
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function le() {
|
|
119
|
-
return t(this, null, function* () {
|
|
120
|
-
v(o.NODE_MODULES, o.PNPM_LOCK_YAML), yield s("Pruning pnpm store", yield i.pnpmPruneStore()), yield s("Clearing pnpm cache", yield i.pnpmCleanCache()), yield k(), yield C();
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function pe() {
|
|
124
|
-
return t(this, null, function* () {
|
|
125
|
-
yield s("Inspecting project dependencies", yield i.nodeModulesInspect());
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function ge() {
|
|
129
|
-
return t(this, null, function* () {
|
|
130
|
-
yield s("Running unit tests", yield i.testUnit());
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function me() {
|
|
134
|
-
return t(this, null, function* () {
|
|
135
|
-
yield s("Running end-to-end tests", yield i.testE2e());
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
function xe(e) {
|
|
139
|
-
return t(this, null, function* () {
|
|
140
|
-
yield s("Creating MongoDB migration", yield i.mongoMigrateCreate(e));
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
function ue() {
|
|
144
|
-
return t(this, null, function* () {
|
|
145
|
-
yield s("Running MongoDB migrations", yield i.mongoMigrateUp());
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function ye() {
|
|
149
|
-
return t(this, null, function* () {
|
|
150
|
-
yield s("Rolling back MongoDB migration", yield i.mongoMigrateDown());
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
t(null, null, function* () {
|
|
154
|
-
try {
|
|
155
|
-
yield R(O(x.argv)).scriptName(_).usage("$0 <command> [options]").command("lint", "Check code for linting issues", oe).command("lint:fix", "Fix linting issues automatically", ce).command("lint:inspect", "View active ESLint configuration", re).command("lint-staged", "Run lint checks on staged files", ne).command("commitlint", "Validate commit message format", ae).command("ready", "Initialize project and dependencies", de).command("reset", "Reset the project and reinstall dependencies", le).command("inspect", "Analyze installed project dependencies", pe).command("test:unit", "Run unit test suite", ge).command("test:e2e", "Run end-to-end test suite", me).command("mongo:migrate:create <name>", "Create a MongoDB migration", (e) => e.positional("name", {
|
|
156
|
-
describe: "Migration name",
|
|
157
|
-
type: "string"
|
|
158
|
-
}), (e) => t(null, null, function* () {
|
|
159
|
-
if (!e.name) {
|
|
160
|
-
d.error("Migration name is required.");
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
yield xe(e.name);
|
|
164
|
-
})).command("mongo:migrate:up", "Apply all MongoDB migrations", ue).command("mongo:migrate:down", "Rollback last MongoDB migration", ye).demandCommand(1, "Please specify a valid command.").strict().help().alias("h", "help").alias("v", "version").version(ie.version).epilog(`💡 Tip: Use "--help" with any command to see options
|
|
165
|
-
`).parse();
|
|
166
|
-
} catch (e) {
|
|
167
|
-
F(e), x.exit(1);
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
export default fe();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("./cli.util.cjs");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cli.util.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./cli.util.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("node:child_process");require("node:process");require("node:util");require("../../config/env/env.util.cjs");require("../../../log.type-CMvG6Box.cjs");require("../log/log.util.cjs");const r=require("../../../path.constant-CWtb99gS.cjs");require("../path/path.util.cjs");require("../storage/storage.util.cjs");exports.clearAllErrorLists=r.clearAllErrorLists;exports.formatCommand=r.formatCommand;exports.getStoredErrorLists=r.getStoredErrorLists;exports.rawCommand=r.rawCommand;exports.resolveCommands=r.resolveCommands;exports.runCommand=r.runCommand;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "node:child_process";
|
|
2
|
-
import "node:process";
|
|
3
|
-
import "node:util";
|
|
4
|
-
import "../../config/env/env.util.js";
|
|
5
|
-
import "../../../log.type-DTOvZHyz.js";
|
|
6
|
-
import "../log/log.util.js";
|
|
7
|
-
import { Z as n, $ as l, Y as C, _ as f, a0 as E, a1 as L } from "../../../path.constant-CvSr0Rrx.js";
|
|
8
|
-
import "../path/path.util.js";
|
|
9
|
-
import "../storage/storage.util.js";
|
|
10
|
-
export {
|
|
11
|
-
n as clearAllErrorLists,
|
|
12
|
-
l as formatCommand,
|
|
13
|
-
C as getStoredErrorLists,
|
|
14
|
-
f as rawCommand,
|
|
15
|
-
E as resolveCommands,
|
|
16
|
-
L as runCommand
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../path.constant-CWtb99gS.cjs");exports.E_CommandType=r.E_CommandType;exports.clearAllErrorLists=r.clearAllErrorLists;exports.formatCommand=r.formatCommand;exports.getStoredErrorLists=r.getStoredErrorLists;exports.rawCommand=r.rawCommand;exports.resolveCommands=r.resolveCommands;exports.runCommand=r.runCommand;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { X as s, Z as m, $ as o, Y as e, _ as d, a0 as n, a1 as t } from "../../../path.constant-CvSr0Rrx.js";
|
|
2
|
-
export {
|
|
3
|
-
s as E_CommandType,
|
|
4
|
-
m as clearAllErrorLists,
|
|
5
|
-
o as formatCommand,
|
|
6
|
-
e as getStoredErrorLists,
|
|
7
|
-
d as rawCommand,
|
|
8
|
-
n as resolveCommands,
|
|
9
|
-
t as runCommand
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty;var o=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var d=(e,r,s)=>r in e?P(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,y=(e,r)=>{for(var s in r||(r={}))p.call(r,s)&&d(e,s,r[s]);if(o)for(var s of o(r))q.call(r,s)&&d(e,s,r[s]);return e};var x=(e,r)=>{var s={};for(var t in e)p.call(e,t)&&r.indexOf(t)<0&&(s[t]=e[t]);if(e!=null&&o)for(var t of o(e))r.indexOf(t)<0&&q.call(e,t)&&(s[t]=e[t]);return s};var b=(e,r,s)=>new Promise((t,n)=>{var u=c=>{try{l(s.next(c))}catch(f){n(f)}},a=c=>{try{l(s.throw(c))}catch(f){n(f)}},l=c=>c.done?t(c.value):Promise.resolve(c.value).then(u,a);l((s=s.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@nestjs/core"),A=require("body-parser"),N=require("compression"),O=require("cookie-parser"),m=require("cors"),i=require("express"),G=require("express-session"),H=require("express-useragent"),I=require("graphql-upload/graphqlUploadExpress.mjs");function S(t){var n=t,{isDev:e,whiteList:r}=n,s=x(n,["isDev","whiteList"]);return y({origin:(u,a)=>{e||!u||r!=null&&r.includes(u!=null?u:"")?a(null,!0):a(new Error("Not allowed by CORS"),!1)},credentials:!0},s)}function M(e){return m(S(e))}function j(e){return G(e)}function C(e){e.set("trust proxy",1),e.use(O()),e.use(i.urlencoded({extended:!0})),e.use(N()),e.use(H.express())}function E(e,r){r&&(Array.isArray(r)?r:[r]).forEach(t=>{e.use(i.static(t))})}function v(e){const r=i();return C(r),E(r,e==null?void 0:e.static),r.use(I()),r}function R(e){return b(this,null,function*(){const r=yield g.NestFactory.create(e.module);return C(r.getHttpAdapter().getInstance()),E(r.getHttpAdapter().getInstance(),e.static),e.filters&&r.useGlobalFilters(...e.filters),e.pipes&&r.useGlobalPipes(...e.pipes),r})}exports.bodyParser=A;exports.express=i;exports.createCors=M;exports.createCorsOptions=S;exports.createExpress=v;exports.createNest=R;exports.createSession=j;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
var C = Object.defineProperty;
|
|
2
|
-
var f = Object.getOwnPropertySymbols;
|
|
3
|
-
var d = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var l = (e, r, t) => r in e ? C(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, x = (e, r) => {
|
|
5
|
-
for (var t in r || (r = {}))
|
|
6
|
-
d.call(r, t) && l(e, t, r[t]);
|
|
7
|
-
if (f)
|
|
8
|
-
for (var t of f(r))
|
|
9
|
-
i.call(r, t) && l(e, t, r[t]);
|
|
10
|
-
return e;
|
|
11
|
-
};
|
|
12
|
-
var y = (e, r) => {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var s in e)
|
|
15
|
-
d.call(e, s) && r.indexOf(s) < 0 && (t[s] = e[s]);
|
|
16
|
-
if (e != null && f)
|
|
17
|
-
for (var s of f(e))
|
|
18
|
-
r.indexOf(s) < 0 && i.call(e, s) && (t[s] = e[s]);
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
|
-
var A = (e, r, t) => new Promise((s, o) => {
|
|
22
|
-
var a = (u) => {
|
|
23
|
-
try {
|
|
24
|
-
n(t.next(u));
|
|
25
|
-
} catch (m) {
|
|
26
|
-
o(m);
|
|
27
|
-
}
|
|
28
|
-
}, c = (u) => {
|
|
29
|
-
try {
|
|
30
|
-
n(t.throw(u));
|
|
31
|
-
} catch (m) {
|
|
32
|
-
o(m);
|
|
33
|
-
}
|
|
34
|
-
}, n = (u) => u.done ? s(u.value) : Promise.resolve(u.value).then(a, c);
|
|
35
|
-
n((t = t.apply(e, r)).next());
|
|
36
|
-
});
|
|
37
|
-
import { NestFactory as N } from "@nestjs/core";
|
|
38
|
-
import { default as T } from "body-parser";
|
|
39
|
-
import P from "compression";
|
|
40
|
-
import S from "cookie-parser";
|
|
41
|
-
import g from "cors";
|
|
42
|
-
import p from "express";
|
|
43
|
-
import { default as W } from "express";
|
|
44
|
-
import G from "express-session";
|
|
45
|
-
import H from "express-useragent";
|
|
46
|
-
import I from "graphql-upload/graphqlUploadExpress.mjs";
|
|
47
|
-
function O(s) {
|
|
48
|
-
var o = s, { isDev: e, whiteList: r } = o, t = y(o, ["isDev", "whiteList"]);
|
|
49
|
-
return x({
|
|
50
|
-
origin: (a, c) => {
|
|
51
|
-
e || !a || r != null && r.includes(a != null ? a : "") ? c(null, !0) : c(new Error("Not allowed by CORS"), !1);
|
|
52
|
-
},
|
|
53
|
-
credentials: !0
|
|
54
|
-
}, t);
|
|
55
|
-
}
|
|
56
|
-
function B(e) {
|
|
57
|
-
return g(O(e));
|
|
58
|
-
}
|
|
59
|
-
function D(e) {
|
|
60
|
-
return G(e);
|
|
61
|
-
}
|
|
62
|
-
function E(e) {
|
|
63
|
-
e.set("trust proxy", 1), e.use(S()), e.use(p.urlencoded({ extended: !0 })), e.use(P()), e.use(H.express());
|
|
64
|
-
}
|
|
65
|
-
function b(e, r) {
|
|
66
|
-
r && (Array.isArray(r) ? r : [r]).forEach((s) => {
|
|
67
|
-
e.use(p.static(s));
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function F(e) {
|
|
71
|
-
const r = p();
|
|
72
|
-
return E(r), b(r, e == null ? void 0 : e.static), r.use(I()), r;
|
|
73
|
-
}
|
|
74
|
-
function J(e) {
|
|
75
|
-
return A(this, null, function* () {
|
|
76
|
-
const r = yield N.create(e.module);
|
|
77
|
-
return E(r.getHttpAdapter().getInstance()), b(r.getHttpAdapter().getInstance(), e.static), e.filters && r.useGlobalFilters(...e.filters), e.pipes && r.useGlobalPipes(...e.pipes), r;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
T as bodyParser,
|
|
82
|
-
B as createCors,
|
|
83
|
-
O as createCorsOptions,
|
|
84
|
-
F as createExpress,
|
|
85
|
-
J as createNest,
|
|
86
|
-
D as createSession,
|
|
87
|
-
W as express
|
|
88
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("express"),e=require("./express.util.cjs"),s=require("body-parser");Object.defineProperty(exports,"Router",{enumerable:!0,get:()=>r.Router});exports.express=r;exports.createCors=e.createCors;exports.createCorsOptions=e.createCorsOptions;exports.createExpress=e.createExpress;exports.createNest=e.createNest;exports.createSession=e.createSession;exports.bodyParser=s;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Router as s, default as t } from "express";
|
|
2
|
-
import { createCors as a, createCorsOptions as p, createExpress as c, createNest as f, createSession as x } from "./express.util.js";
|
|
3
|
-
import { default as m } from "body-parser";
|
|
4
|
-
export {
|
|
5
|
-
s as Router,
|
|
6
|
-
m as bodyParser,
|
|
7
|
-
a as createCors,
|
|
8
|
-
p as createCorsOptions,
|
|
9
|
-
c as createExpress,
|
|
10
|
-
f as createNest,
|
|
11
|
-
x as createSession,
|
|
12
|
-
t as express
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var F=Object.defineProperty;var y=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var a=(e,n,c)=>n in e?F(e,n,{enumerable:!0,configurable:!0,writable:!0,value:c}):e[n]=c,d=(e,n)=>{for(var c in n||(n={}))u.call(n,c)&&a(e,c,n[c]);if(y)for(var c of y(n))s.call(n,c)&&a(e,c,n[c]);return e};var l=(e,n)=>{var c={};for(var r in e)u.call(e,r)&&n.indexOf(r)<0&&(c[r]=e[r]);if(e!=null&&y)for(var r of y(e))n.indexOf(r)<0&&s.call(e,r)&&(c[r]=e[r]);return c};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("fs-extra"),p=require("node:path"),x=t,{lstatSync:v,readdirSync:E,mkdirSync:h,readFileSync:k,unlinkSync:g,statSync:f,createWriteStream:w}=t,J=t.readJsonSync;function b(e,n,c){t.writeFileSync(e,n,c!=null?c:"utf-8")}function q(e,n,c){t.appendFileSync(e,n,c!=null?c:"utf-8")}function o(...e){return e.every(n=>t.pathExistsSync(n))}function W(...e){e.forEach(n=>{o(n)&&t.removeSync(n)})}function j(e,n,c={}){const S=c,{extensions:r}=S,m=l(S,["extensions"]);t.copySync(e,n,d({filter:i=>f(i).isDirectory()||!r||r.length===0?!0:r.includes(p.extname(i))},m))}exports.appendFileSync=q;exports.copySync=j;exports.createWriteStream=w;exports.fs=x;exports.lstatSync=v;exports.mkdirSync=h;exports.pathExistsSync=o;exports.readFileSync=k;exports.readJsonSync=J;exports.readdirSync=E;exports.removeSync=W;exports.statSync=f;exports.unlinkSync=g;exports.writeFileSync=b;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var y = Object.getOwnPropertySymbols;
|
|
3
|
-
var u = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var f = (n, e, r) => e in n ? m(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, s = (n, e) => {
|
|
5
|
-
for (var r in e || (e = {}))
|
|
6
|
-
u.call(e, r) && f(n, r, e[r]);
|
|
7
|
-
if (y)
|
|
8
|
-
for (var r of y(e))
|
|
9
|
-
a.call(e, r) && f(n, r, e[r]);
|
|
10
|
-
return n;
|
|
11
|
-
};
|
|
12
|
-
var d = (n, e) => {
|
|
13
|
-
var r = {};
|
|
14
|
-
for (var c in n)
|
|
15
|
-
u.call(n, c) && e.indexOf(c) < 0 && (r[c] = n[c]);
|
|
16
|
-
if (n != null && y)
|
|
17
|
-
for (var c of y(n))
|
|
18
|
-
e.indexOf(c) < 0 && a.call(n, c) && (r[c] = n[c]);
|
|
19
|
-
return r;
|
|
20
|
-
};
|
|
21
|
-
import t from "fs-extra";
|
|
22
|
-
import o from "node:path";
|
|
23
|
-
const v = t, {
|
|
24
|
-
lstatSync: k,
|
|
25
|
-
readdirSync: w,
|
|
26
|
-
mkdirSync: J,
|
|
27
|
-
readFileSync: g,
|
|
28
|
-
unlinkSync: D,
|
|
29
|
-
statSync: x,
|
|
30
|
-
createWriteStream: W
|
|
31
|
-
} = t, b = t.readJsonSync;
|
|
32
|
-
function j(n, e, r) {
|
|
33
|
-
t.writeFileSync(n, e, r != null ? r : "utf-8");
|
|
34
|
-
}
|
|
35
|
-
function q(n, e, r) {
|
|
36
|
-
t.appendFileSync(n, e, r != null ? r : "utf-8");
|
|
37
|
-
}
|
|
38
|
-
function F(...n) {
|
|
39
|
-
return n.every((e) => t.pathExistsSync(e));
|
|
40
|
-
}
|
|
41
|
-
function z(...n) {
|
|
42
|
-
n.forEach((e) => {
|
|
43
|
-
F(e) && t.removeSync(e);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function A(n, e, r = {}) {
|
|
47
|
-
const i = r, { extensions: c } = i, l = d(i, ["extensions"]);
|
|
48
|
-
t.copySync(n, e, s({
|
|
49
|
-
filter: (S) => x(S).isDirectory() || !c || c.length === 0 ? !0 : c.includes(o.extname(S))
|
|
50
|
-
}, l));
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
q as appendFileSync,
|
|
54
|
-
A as copySync,
|
|
55
|
-
W as createWriteStream,
|
|
56
|
-
v as fs,
|
|
57
|
-
k as lstatSync,
|
|
58
|
-
J as mkdirSync,
|
|
59
|
-
F as pathExistsSync,
|
|
60
|
-
g as readFileSync,
|
|
61
|
-
b as readJsonSync,
|
|
62
|
-
w as readdirSync,
|
|
63
|
-
z as removeSync,
|
|
64
|
-
x as statSync,
|
|
65
|
-
D as unlinkSync,
|
|
66
|
-
j as writeFileSync
|
|
67
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./fs.util.cjs");exports.appendFileSync=e.appendFileSync;exports.copySync=e.copySync;exports.createWriteStream=e.createWriteStream;exports.fs=e.fs;exports.lstatSync=e.lstatSync;exports.mkdirSync=e.mkdirSync;exports.pathExistsSync=e.pathExistsSync;exports.readFileSync=e.readFileSync;exports.readJsonSync=e.readJsonSync;exports.readdirSync=e.readdirSync;exports.removeSync=e.removeSync;exports.statSync=e.statSync;exports.unlinkSync=e.unlinkSync;exports.writeFileSync=e.writeFileSync;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../log.type-CMvG6Box.cjs"),r=require("./log.util.cjs");exports.E_IssueType=o.E_IssueType;exports.catchError=r.catchError;exports.log=r.log;exports.throwError=r.throwError;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("chalk"),r=require("consola"),u=require("graphql"),i=require("../../config/env/env.util.cjs"),E=require("../../constant/response-status.cjs"),h=i.getEnv();function R({message:o,status:e=E.RESPONSE_STATUS.INTERNAL_SERVER_ERROR,type:t="graphql"}){var n;const c=(n=o!=null?o:e.MESSAGE)!=null?n:"Internal server error";throw t==="graphql"?new u.GraphQLError(c,{extensions:{code:e.CODE}}):new Error(c)}h.DEBUG||(r.level=4);function g(o){const e=a[o];return typeof e=="function"?e:a.green}const f={silent:r.silent,level:r.level,fatal:r.fatal,error:r.error,warn:r.warn,log:r.log,info:r.info,success:r.success,ready:r.ready,start:r.start,box:r.box,debug:r.debug,trace:r.trace,verbose:r.verbose,printBoxedLog(o,e,t="red"){if(!(e!=null&&e.length)){r.box(a.green(o));return}e.forEach(({file:c,position:n,rule:l,message:s})=>{r.log(`${a.gray("File:")} ${a.blue(`${c}${n?`:${n}`:""}`)}`),l&&r.log(` ${g(t)("Rule:")} ${l}`),r.log(` ${g(t)("Message:")} ${s}`)}),r.box(g(t)(`${o} : ${e.length}`)),r.log(a.gray("─".repeat(40)))}};function S(o,e){const{shouldLog:t=!0,returnValue:c,callback:n}=e!=null?e:{},l=o instanceof Error?o:new Error(typeof o=="string"?o:"Unknown error");return t&&f.error(l.message),n&&typeof n=="function"&&n(l),c||{success:!1,message:l.message,code:E.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}exports.catchError=S;exports.log=f;exports.throwError=R;
|