@cyberskill/shared 1.200.0 → 1.201.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.
@@ -1,6 +1,6 @@
1
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"),v=require("yargs/yargs"),e=require("../../../path.constant-Y6ImOuVK.cjs"),r=require("../fs/fs.util.cjs"),u=require("../log/log.type.cjs"),c=require("../log/log.util.cjs");require("../path/path.util.cjs");const k="@cyberskill/shared",C="module",E="1.199.0",_="CyberSkill Shared",b="Stephen Cheng",S="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={"./favicon":{import:"./dist/favicon/favicon.ico",require:"./dist/favicon/favicon.ico"},"./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-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"},"./tsconfig.base.json":{types:"./dist/tsconfig.base.json",import:"./dist/tsconfig.base.json",require:"./dist/tsconfig.base.json"}},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.1","@apollo/client":"3.13.8","@apollo/client-integration-nextjs":"0.12.2","@apollo/server":"4.12.2","@dotenvx/dotenvx":"1.45.1","@eddeee888/gcg-typescript-resolver-files":"0.12.1","@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","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",express:"4.21.2","express-session":"1.18.1","express-useragent":"1.0.15","fs-extra":"11.3.0",globals:"16.2.0",graphql:"16.11.0","graphql-ws":"6.0.5",i18next:"25.2.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.1","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.5.3",slugify:"1.6.6",unorm:"1.6.0",uuid:"11.1.0",vite:"7.0.0",ws:"8.18.3",yargs:"18.0.0"},R={"@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@eslint-react/eslint-plugin":"1.52.2","@eslint/config-inspector":"1.1.0","@microsoft/api-extractor":"7.52.8","@next/eslint-plugin-next":"15.3.4","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.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/migrate-mongo":"10.0.5","@types/node":"24.0.7","@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.0","eslint-config-next":"15.3.4","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.20",glob:"11.0.3","lint-staged":"16.1.2","node-modules-inspector":"1.0.0",playwright:"1.53.1",postcss:"8.5.6","postcss-modules":"6.0.1",sass:"1.89.2","simple-git-hooks":"2.13.0",tsx:"4.20.3",typescript:"5.8.3",vite:"7.0.0","vite-plugin-dts":"4.5.4",vitest:"3.2.4"},H={access:"public",registry:"https://registry.npmjs.org/"},N={name:k,type:C,version:E,description:_,author:b,license:S,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||n.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=`
2
+ "use strict";var s=(t,i,n)=>new Promise((d,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?d(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-Y6ImOuVK.cjs"),r=require("../fs/fs.util.cjs"),u=require("../log/log.type.cjs"),c=require("../log/log.util.cjs");require("../path/path.util.cjs");const C="@cyberskill/shared",v="module",E="1.200.0",_="CyberSkill Shared",S="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-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.1","@apollo/client":"3.13.8","@apollo/client-integration-nextjs":"0.12.2","@apollo/server":"4.12.2","@dotenvx/dotenvx":"1.45.1","@eddeee888/gcg-typescript-resolver-files":"0.12.1","@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","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",express:"4.21.2","express-session":"1.18.1","express-useragent":"1.0.15","fs-extra":"11.3.0",globals:"16.2.0",graphql:"16.11.0","graphql-ws":"6.0.5",i18next:"25.2.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.1","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.5.3",slugify:"1.6.6",unorm:"1.6.0",uuid:"11.1.0",vite:"7.0.0",ws:"8.18.3",yargs:"18.0.0"},R={"@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@eslint-react/eslint-plugin":"1.52.2","@eslint/config-inspector":"1.1.0","@microsoft/api-extractor":"7.52.8","@next/eslint-plugin-next":"15.3.4","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.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/migrate-mongo":"10.0.5","@types/node":"24.0.7","@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.0","eslint-config-next":"15.3.4","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.20",glob:"11.0.3","lint-staged":"16.1.2","node-modules-inspector":"1.0.0",playwright:"1.53.1",postcss:"8.5.6","postcss-modules":"6.0.1",sass:"1.89.2","simple-git-hooks":"2.13.0",tsx:"4.20.3",typescript:"5.8.3",vite:"7.0.0","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:_,author:S,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 a(){return s(this,null,function*(){setTimeout(()=>s(null,null,function*(){const t=yield e.getStoredErrorLists(),i=t.filter(d=>d.type===u.E_IssueType.Error),n=t.filter(d=>d.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||n.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()),a()})}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()]),a()})}function K(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f(!0)]),a()})}function U(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield e.runCommand("Validating commit message",yield e.command.commitLint()),a()})}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
3
  ${e.SIMPLE_GIT_HOOK_JSON}
4
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 v(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
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
6
  `).parse()}catch(t){c.catchError(t),m.exit(1)}});
@@ -19,13 +19,13 @@ var t = (e, n, r) => new Promise((a, y) => {
19
19
  import x from "node:process";
20
20
  import { hideBin as O } from "yargs/helpers";
21
21
  import R from "yargs/yargs";
22
- import { g as _, Y as l, a0 as s, J as i, O as G, C as f, R as k, H as o, X as T, $ as N, S as j, I as D } from "../../../path.constant-CFKXX6cG.js";
23
- import { removeSync as q, pathExistsSync as b, writeFileSync as w, readFileSync as P, appendFileSync as B } from "../fs/fs.util.js";
22
+ import { g as _, Y as l, a0 as s, J as i, O as G, C as f, R as q, H as o, X as T, $ as N, S as j, I as D } from "../../../path.constant-CFKXX6cG.js";
23
+ import { removeSync as v, pathExistsSync as b, writeFileSync as w, readFileSync as P, appendFileSync as B } from "../fs/fs.util.js";
24
24
  import { E_IssueType as h } from "../log/log.type.js";
25
25
  import { log as d, catchError as A } from "../log/log.util.js";
26
26
  import "../path/path.util.js";
27
27
  var fe = L((u) => {
28
- const F = "@cyberskill/shared", H = "module", U = "1.199.0", K = "CyberSkill Shared", J = "Stephen Cheng", Y = "MIT", $ = "https://github.com/cyberskill-world/shared#readme", V = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, W = { url: "https://github.com/cyberskill-world/shared/issues" }, z = { "./favicon": { import: "./dist/favicon/favicon.ico", require: "./dist/favicon/favicon.ico" }, "./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-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" }, "./tsconfig.base.json": { types: "./dist/tsconfig.base.json", import: "./dist/tsconfig.base.json", require: "./dist/tsconfig.base.json" } }, X = { cyberskill: "dist/src/node/cli/index.js" }, Q = ["dist", "public"], Z = { 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.1", "@apollo/client": "3.13.8", "@apollo/client-integration-nextjs": "0.12.2", "@apollo/server": "4.12.2", "@dotenvx/dotenvx": "1.45.1", "@eddeee888/gcg-typescript-resolver-files": "0.12.1", "@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", "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", express: "4.21.2", "express-session": "1.18.1", "express-useragent": "1.0.15", "fs-extra": "11.3.0", globals: "16.2.0", graphql: "16.11.0", "graphql-ws": "6.0.5", i18next: "25.2.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.1", "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.5.3", slugify: "1.6.6", unorm: "1.6.0", uuid: "11.1.0", vite: "7.0.0", ws: "8.18.3", yargs: "18.0.0" }, te = { "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", "@eslint-react/eslint-plugin": "1.52.2", "@eslint/config-inspector": "1.1.0", "@microsoft/api-extractor": "7.52.8", "@next/eslint-plugin-next": "15.3.4", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.3.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/migrate-mongo": "10.0.5", "@types/node": "24.0.7", "@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.0", "eslint-config-next": "15.3.4", "eslint-plugin-format": "1.0.1", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.20", glob: "11.0.3", "lint-staged": "16.1.2", "node-modules-inspector": "1.0.0", playwright: "1.53.1", postcss: "8.5.6", "postcss-modules": "6.0.1", sass: "1.89.2", "simple-git-hooks": "2.13.0", tsx: "4.20.3", typescript: "5.8.3", vite: "7.0.0", "vite-plugin-dts": "4.5.4", vitest: "3.2.4" }, se = { access: "public", registry: "https://registry.npmjs.org/" }, ie = {
28
+ const F = "@cyberskill/shared", H = "module", U = "1.200.0", K = "CyberSkill Shared", J = "Stephen Cheng", Y = "MIT", $ = "https://github.com/cyberskill-world/shared#readme", V = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, W = { 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-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" } }, X = { cyberskill: "dist/src/node/cli/index.js" }, Q = ["dist", "public"], Z = { 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.1", "@apollo/client": "3.13.8", "@apollo/client-integration-nextjs": "0.12.2", "@apollo/server": "4.12.2", "@dotenvx/dotenvx": "1.45.1", "@eddeee888/gcg-typescript-resolver-files": "0.12.1", "@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", "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", express: "4.21.2", "express-session": "1.18.1", "express-useragent": "1.0.15", "fs-extra": "11.3.0", globals: "16.2.0", graphql: "16.11.0", "graphql-ws": "6.0.5", i18next: "25.2.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.1", "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.5.3", slugify: "1.6.6", unorm: "1.6.0", uuid: "11.1.0", vite: "7.0.0", ws: "8.18.3", yargs: "18.0.0" }, te = { "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", "@eslint-react/eslint-plugin": "1.52.2", "@eslint/config-inspector": "1.1.0", "@microsoft/api-extractor": "7.52.8", "@next/eslint-plugin-next": "15.3.4", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.3.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/migrate-mongo": "10.0.5", "@types/node": "24.0.7", "@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.0", "eslint-config-next": "15.3.4", "eslint-plugin-format": "1.0.1", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.20", glob: "11.0.3", "lint-staged": "16.1.2", "node-modules-inspector": "1.0.0", playwright: "1.53.1", postcss: "8.5.6", "postcss-modules": "6.0.1", sass: "1.89.2", "simple-git-hooks": "2.13.0", tsx: "4.20.3", typescript: "5.8.3", vite: "7.0.0", "vite-plugin-dts": "4.5.4", vitest: "3.2.4" }, se = { access: "public", registry: "https://registry.npmjs.org/" }, ie = {
29
29
  name: F,
30
30
  type: H,
31
31
  version: U,
@@ -53,7 +53,7 @@ var fe = L((u) => {
53
53
  e ? yield s("Running ESLint with auto-fix", yield i.eslintFix()) : yield s("Running ESLint check", yield i.eslintCheck());
54
54
  });
55
55
  }
56
- function v(e, n) {
56
+ function k(e, n) {
57
57
  if (!n.length)
58
58
  return;
59
59
  const r = e === "Errors" ? "red" : "yellow";
@@ -63,7 +63,7 @@ var fe = L((u) => {
63
63
  return t(this, null, function* () {
64
64
  setTimeout(() => t(null, null, function* () {
65
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") : (v("Warnings", r), v("Errors", n), (n.length > 0 || r.length > 0) && x.exit(1));
66
+ !n.length && !r.length ? d.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (k("Warnings", r), k("Errors", n), (n.length > 0 || r.length > 0) && x.exit(1));
67
67
  }), 0);
68
68
  });
69
69
  }
@@ -100,7 +100,7 @@ var fe = L((u) => {
100
100
  }
101
101
  function C() {
102
102
  return t(this, null, function* () {
103
- yield s("Configuring Git hooks", yield i.configureGitHook()), q(o.GIT_HOOK);
103
+ yield s("Configuring Git hooks", yield i.configureGitHook()), v(o.GIT_HOOK);
104
104
  const e = yield N(D);
105
105
  w(o.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(e, null, 4));
106
106
  const n = `
@@ -112,12 +112,12 @@ ${j}
112
112
  }
113
113
  function de() {
114
114
  return t(this, null, function* () {
115
- yield k(), yield C();
115
+ yield q(), yield C();
116
116
  });
117
117
  }
118
118
  function le() {
119
119
  return t(this, null, function* () {
120
- q(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();
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 q(), yield C();
121
121
  });
122
122
  }
123
123
  function pe() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./apollo-client.component.cjs"),o=require("./apollo-client.constant.cjs"),t=require("./apollo-client.context.cjs");require("react");const r=require("./apollo-client.util.cjs"),e=require("@apollo/client/react/hooks/hooks.cjs");exports.ApolloProvider=u.ApolloProvider;exports.GRAPHQL_URI_DEFAULT=o.GRAPHQL_URI_DEFAULT;exports.ApolloClientContext=t.ApolloClientContext;exports.ApolloClientProvider=t.ApolloClientProvider;exports.DevLoggerLink=r.DevLoggerLink;exports.createApolloLinks=r.createApolloLinks;exports.getClient=r.getClient;Object.defineProperty(exports,"useApolloClient",{enumerable:!0,get:()=>e.useApolloClient});Object.defineProperty(exports,"useBackgroundQuery",{enumerable:!0,get:()=>e.useBackgroundQuery});Object.defineProperty(exports,"useFragment",{enumerable:!0,get:()=>e.useFragment});Object.defineProperty(exports,"useLazyQuery",{enumerable:!0,get:()=>e.useLazyQuery});Object.defineProperty(exports,"useLoadableQuery",{enumerable:!0,get:()=>e.useLoadableQuery});Object.defineProperty(exports,"useMutation",{enumerable:!0,get:()=>e.useMutation});Object.defineProperty(exports,"useQuery",{enumerable:!0,get:()=>e.useQuery});Object.defineProperty(exports,"useQueryRefHandlers",{enumerable:!0,get:()=>e.useQueryRefHandlers});Object.defineProperty(exports,"useReactiveVar",{enumerable:!0,get:()=>e.useReactiveVar});Object.defineProperty(exports,"useReadQuery",{enumerable:!0,get:()=>e.useReadQuery});Object.defineProperty(exports,"useSubscription",{enumerable:!0,get:()=>e.useSubscription});Object.defineProperty(exports,"useSuspenseFragment",{enumerable:!0,get:()=>e.useSuspenseFragment});Object.defineProperty(exports,"useSuspenseQuery",{enumerable:!0,get:()=>e.useSuspenseQuery});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./apollo-client.component.cjs"),o=require("./apollo-client.constant.cjs"),t=require("./apollo-client.context.cjs");require("react");const r=require("./apollo-client.util.cjs"),n=require("@apollo/client/cache/cache.cjs"),e=require("@apollo/client/react/hooks/hooks.cjs");exports.ApolloProvider=u.ApolloProvider;exports.GRAPHQL_URI_DEFAULT=o.GRAPHQL_URI_DEFAULT;exports.ApolloClientContext=t.ApolloClientContext;exports.ApolloClientProvider=t.ApolloClientProvider;exports.DevLoggerLink=r.DevLoggerLink;exports.createApolloLinks=r.createApolloLinks;exports.getClient=r.getClient;Object.defineProperty(exports,"makeVar",{enumerable:!0,get:()=>n.makeVar});Object.defineProperty(exports,"useApolloClient",{enumerable:!0,get:()=>e.useApolloClient});Object.defineProperty(exports,"useBackgroundQuery",{enumerable:!0,get:()=>e.useBackgroundQuery});Object.defineProperty(exports,"useFragment",{enumerable:!0,get:()=>e.useFragment});Object.defineProperty(exports,"useLazyQuery",{enumerable:!0,get:()=>e.useLazyQuery});Object.defineProperty(exports,"useLoadableQuery",{enumerable:!0,get:()=>e.useLoadableQuery});Object.defineProperty(exports,"useMutation",{enumerable:!0,get:()=>e.useMutation});Object.defineProperty(exports,"useQuery",{enumerable:!0,get:()=>e.useQuery});Object.defineProperty(exports,"useQueryRefHandlers",{enumerable:!0,get:()=>e.useQueryRefHandlers});Object.defineProperty(exports,"useReactiveVar",{enumerable:!0,get:()=>e.useReactiveVar});Object.defineProperty(exports,"useReadQuery",{enumerable:!0,get:()=>e.useReadQuery});Object.defineProperty(exports,"useSubscription",{enumerable:!0,get:()=>e.useSubscription});Object.defineProperty(exports,"useSuspenseFragment",{enumerable:!0,get:()=>e.useSuspenseFragment});Object.defineProperty(exports,"useSuspenseQuery",{enumerable:!0,get:()=>e.useSuspenseQuery});
@@ -4,4 +4,5 @@ export * from './apollo-client.context.js';
4
4
  export * from './apollo-client.hook.js';
5
5
  export * from './apollo-client.type.js';
6
6
  export * from './apollo-client.util.js';
7
+ export { makeVar } from '@apollo/client/cache/cache.cjs';
7
8
  export { useApolloClient, useBackgroundQuery, useFragment, useLazyQuery, useLoadableQuery, useMutation, useQuery, useQueryRefHandlers, useReactiveVar, useReadQuery, useSubscription, useSuspenseFragment, useSuspenseQuery } from '@apollo/client/react/hooks/hooks.cjs';
@@ -1,28 +1,30 @@
1
1
  import { ApolloProvider as u } from "./apollo-client.component.js";
2
- import { GRAPHQL_URI_DEFAULT as t } from "./apollo-client.constant.js";
2
+ import { GRAPHQL_URI_DEFAULT as s } from "./apollo-client.constant.js";
3
3
  import { ApolloClientContext as n, ApolloClientProvider as p } from "./apollo-client.context.js";
4
4
  import "react";
5
- import { DevLoggerLink as a, createApolloLinks as m, getClient as y } from "./apollo-client.util.js";
6
- import { useApolloClient as A, useBackgroundQuery as L, useFragment as d, useLazyQuery as f, useLoadableQuery as g, useMutation as x, useQuery as C, useQueryRefHandlers as R, useReactiveVar as c, useReadQuery as v, useSubscription as k, useSuspenseFragment as F, useSuspenseQuery as P } from "@apollo/client/react/hooks/hooks.cjs";
5
+ import { DevLoggerLink as i, createApolloLinks as m, getClient as y } from "./apollo-client.util.js";
6
+ import { makeVar as f } from "@apollo/client/cache/cache.cjs";
7
+ import { useApolloClient as A, useBackgroundQuery as L, useFragment as d, useLazyQuery as g, useLoadableQuery as C, useMutation as R, useQuery as c, useQueryRefHandlers as k, useReactiveVar as v, useReadQuery as F, useSubscription as P, useSuspenseFragment as S, useSuspenseQuery as b } from "@apollo/client/react/hooks/hooks.cjs";
7
8
  export {
8
9
  n as ApolloClientContext,
9
10
  p as ApolloClientProvider,
10
11
  u as ApolloProvider,
11
- a as DevLoggerLink,
12
- t as GRAPHQL_URI_DEFAULT,
12
+ i as DevLoggerLink,
13
+ s as GRAPHQL_URI_DEFAULT,
13
14
  m as createApolloLinks,
14
15
  y as getClient,
16
+ f as makeVar,
15
17
  A as useApolloClient,
16
18
  L as useBackgroundQuery,
17
19
  d as useFragment,
18
- f as useLazyQuery,
19
- g as useLoadableQuery,
20
- x as useMutation,
21
- C as useQuery,
22
- R as useQueryRefHandlers,
23
- c as useReactiveVar,
24
- v as useReadQuery,
25
- k as useSubscription,
26
- F as useSuspenseFragment,
27
- P as useSuspenseQuery
20
+ g as useLazyQuery,
21
+ C as useLoadableQuery,
22
+ R as useMutation,
23
+ c as useQuery,
24
+ k as useQueryRefHandlers,
25
+ v as useReactiveVar,
26
+ F as useReadQuery,
27
+ P as useSubscription,
28
+ S as useSuspenseFragment,
29
+ b as useSuspenseQuery
28
30
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@apollo/client-integration-nextjs"),e=require("react");require("@apollo/client/react/react.cjs");const i=require("../apollo-error/apollo-error.component.cjs");require("../apollo-error/apollo-error.context.cjs");const n=require("../apollo-error/apollo-error.provider.cjs"),c=require("react-hot-toast"),u=require("../apollo-client/apollo-client.context.cjs");require("@apollo/client/core/core.cjs");require("@apollo/client/link/core/core.cjs");require("@apollo/client/link/error/error.cjs");require("@apollo/client/link/http/http.cjs");require("@apollo/client/link/remove-typename/remove-typename.cjs");require("@apollo/client/link/subscriptions/subscriptions.cjs");require("@apollo/client/utilities/utilities.cjs");require("graphql-ws");require("../log/log.util.cjs");require("@apollo/client/react/hooks/hooks.cjs");const a=require("./apollo-client.util.cjs");function p({options:r,children:t}){const o=e.useMemo(()=>a.getClientNextJS(r||{}),[r]);return e.createElement(e.Fragment,null,e.createElement(n.ApolloErrorProvider,null,e.createElement(u.ApolloClientProvider,{client:o},e.createElement(l.ApolloNextAppProvider,{makeClient:()=>o},t)),e.createElement(i.ApolloErrorComponent,null)),e.createElement(c.Toaster,{position:"top-right"}))}exports.ApolloProviderNextJS=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@apollo/client-integration-nextjs"),e=require("react");require("@apollo/client/react/react.cjs");const i=require("../apollo-error/apollo-error.component.cjs");require("../apollo-error/apollo-error.context.cjs");const n=require("../apollo-error/apollo-error.provider.cjs"),c=require("react-hot-toast"),u=require("../apollo-client/apollo-client.context.cjs");require("@apollo/client/core/core.cjs");require("@apollo/client/link/core/core.cjs");require("@apollo/client/link/error/error.cjs");require("@apollo/client/link/http/http.cjs");require("@apollo/client/link/remove-typename/remove-typename.cjs");require("@apollo/client/link/subscriptions/subscriptions.cjs");require("@apollo/client/utilities/utilities.cjs");require("graphql-ws");require("../log/log.util.cjs");require("@apollo/client/cache/cache.cjs");require("@apollo/client/react/hooks/hooks.cjs");const a=require("./apollo-client.util.cjs");function p({options:r,children:t}){const o=e.useMemo(()=>a.getClientNextJS(r||{}),[r]);return e.createElement(e.Fragment,null,e.createElement(n.ApolloErrorProvider,null,e.createElement(u.ApolloClientProvider,{client:o},e.createElement(l.ApolloNextAppProvider,{makeClient:()=>o},t)),e.createElement(i.ApolloErrorComponent,null)),e.createElement(c.Toaster,{position:"top-right"}))}exports.ApolloProviderNextJS=p;
@@ -15,9 +15,10 @@ import "@apollo/client/link/subscriptions/subscriptions.cjs";
15
15
  import "@apollo/client/utilities/utilities.cjs";
16
16
  import "graphql-ws";
17
17
  import "../log/log.util.js";
18
+ import "@apollo/client/cache/cache.cjs";
18
19
  import "@apollo/client/react/hooks/hooks.cjs";
19
20
  import { getClientNextJS as c } from "./apollo-client.util.js";
20
- function R({
21
+ function T({
21
22
  options: o,
22
23
  children: e
23
24
  }) {
@@ -28,5 +29,5 @@ function R({
28
29
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(l, null, /* @__PURE__ */ r.createElement(a, { client: t }, /* @__PURE__ */ r.createElement(m, { makeClient: () => t }, e)), /* @__PURE__ */ r.createElement(p, null)), /* @__PURE__ */ r.createElement(n, { position: "top-right" }));
29
30
  }
30
31
  export {
31
- R as ApolloProviderNextJS
32
+ T as ApolloProviderNextJS
32
33
  };
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var i=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var n=(r,e,t)=>e in r?c(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,l=(r,e)=>{for(var t in e||(e={}))u.call(e,t)&&n(r,t,e[t]);if(i)for(var t of i(e))a.call(e,t)&&n(r,t,e[t]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@apollo/client-integration-nextjs"),q=require("@apollo/client/link/core/core.cjs");require("@apollo/client/react/react.cjs");require("react");require("../apollo-error/apollo-error.context.cjs");require("react-hot-toast");require("../apollo-client/apollo-client.context.cjs");const s=require("../apollo-client/apollo-client.util.cjs");require("@apollo/client/react/hooks/hooks.cjs");function C(r={}){const e=q.from(s.createApolloLinks(r));return new o.ApolloClient(l({link:e,cache:new o.InMemoryCache},r))}exports.getClientNextJS=C;
1
+ "use strict";var c=Object.defineProperty;var i=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var n=(r,e,t)=>e in r?c(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,l=(r,e)=>{for(var t in e||(e={}))u.call(e,t)&&n(r,t,e[t]);if(i)for(var t of i(e))q.call(e,t)&&n(r,t,e[t]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@apollo/client-integration-nextjs"),a=require("@apollo/client/link/core/core.cjs");require("@apollo/client/react/react.cjs");require("react");require("../apollo-error/apollo-error.context.cjs");require("react-hot-toast");require("../apollo-client/apollo-client.context.cjs");const s=require("../apollo-client/apollo-client.util.cjs");require("@apollo/client/cache/cache.cjs");require("@apollo/client/react/hooks/hooks.cjs");function C(r={}){const e=a.from(s.createApolloLinks(r));return new o.ApolloClient(l({link:e,cache:new o.InMemoryCache},r))}exports.getClientNextJS=C;
@@ -1,12 +1,12 @@
1
1
  var p = Object.defineProperty;
2
2
  var m = Object.getOwnPropertySymbols;
3
3
  var n = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
4
- var e = (r, o, t) => o in r ? p(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t, i = (r, o) => {
4
+ var i = (r, o, t) => o in r ? p(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t, e = (r, o) => {
5
5
  for (var t in o || (o = {}))
6
- n.call(o, t) && e(r, t, o[t]);
6
+ n.call(o, t) && i(r, t, o[t]);
7
7
  if (m)
8
8
  for (var t of m(o))
9
- l.call(o, t) && e(r, t, o[t]);
9
+ l.call(o, t) && i(r, t, o[t]);
10
10
  return r;
11
11
  };
12
12
  import { ApolloClient as c, InMemoryCache as f } from "@apollo/client-integration-nextjs";
@@ -17,14 +17,15 @@ import "../apollo-error/apollo-error.context.js";
17
17
  import "react-hot-toast";
18
18
  import "../apollo-client/apollo-client.context.js";
19
19
  import { createApolloLinks as C } from "../apollo-client/apollo-client.util.js";
20
+ import "@apollo/client/cache/cache.cjs";
20
21
  import "@apollo/client/react/hooks/hooks.cjs";
21
- function J(r = {}) {
22
+ function L(r = {}) {
22
23
  const o = a(C(r));
23
- return new c(i({
24
+ return new c(e({
24
25
  link: o,
25
26
  cache: new f()
26
27
  }, r));
27
28
  }
28
29
  export {
29
- J as getClientNextJS
30
+ L as getClientNextJS
30
31
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),s=require("./apollo-error.context.cjs"),t=require("./apollo-error.module.cjs");function m(){const o=e.use(s.ApolloErrorContext),r=o==null?void 0:o.error;if(!r)return null;const n=(c,l)=>l!=null&&l.length?e.createElement("div",null,e.createElement("strong",null,c,":"),e.createElement("ul",null,l.map(a=>e.createElement("li",{key:a.message},a.message)))):null;return e.createElement("div",{className:t.default["modal-backdrop"]},e.createElement("div",{className:t.default["modal-content"]},e.createElement("button",{type:"button",className:t.default["btn-close"],onClick:o.hideError},"✕"),e.createElement("div",{className:t.default["error-title"]},e.createElement("button",{type:"button",className:t.default["btn-retry"],onClick:()=>window.location.reload()},"Reload")," ",r.message),e.createElement("div",{className:t.default["error-details"]},r.networkError&&e.createElement("pre",{className:"network"},e.createElement("strong",null,"Network Error:")," ",r.networkError.message),n("GraphQL Errors",[...r.graphQLErrors]),n("Protocol Errors",[...r.protocolErrors]),n("Client Errors",[...r.clientErrors]),r.extraInfo&&e.createElement("pre",{className:"extra"},e.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}exports.ApolloErrorComponent=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),s=require("./apollo-error.context.cjs"),t={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54"};function m(){const o=e.use(s.ApolloErrorContext),r=o==null?void 0:o.error;if(!r)return null;const n=(c,l)=>l!=null&&l.length?e.createElement("div",null,e.createElement("strong",null,c,":"),e.createElement("ul",null,l.map(a=>e.createElement("li",{key:a.message},a.message)))):null;return e.createElement("div",{className:t["modal-backdrop"]},e.createElement("div",{className:t["modal-content"]},e.createElement("button",{type:"button",className:t["btn-close"],onClick:o.hideError},"✕"),e.createElement("div",{className:t["error-title"]},e.createElement("button",{type:"button",className:t["btn-retry"],onClick:()=>window.location.reload()},"Reload")," ",r.message),e.createElement("div",{className:t["error-details"]},r.networkError&&e.createElement("pre",{className:"network"},e.createElement("strong",null,"Network Error:")," ",r.networkError.message),n("GraphQL Errors",[...r.graphQLErrors]),n("Protocol Errors",[...r.protocolErrors]),n("Client Errors",[...r.clientErrors]),r.extraInfo&&e.createElement("pre",{className:"extra"},e.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}exports.ApolloErrorComponent=m;
@@ -1,11 +1,18 @@
1
- import e, { use as m } from "react";
2
- import { ApolloErrorContext as c } from "./apollo-error.context.js";
3
- import t from "./apollo-error.module.js";
4
- function p() {
5
- const o = m(c), r = o == null ? void 0 : o.error;
1
+ import e, { use as s } from "react";
2
+ import { ApolloErrorContext as m } from "./apollo-error.context.js";
3
+ const t = {
4
+ "modal-backdrop": "_modal-backdrop_8fveh_1",
5
+ "modal-content": "_modal-content_8fveh_11",
6
+ "btn-close": "_btn-close_8fveh_22",
7
+ "error-title": "_error-title_8fveh_36",
8
+ "btn-retry": "_btn-retry_8fveh_41",
9
+ "error-details": "_error-details_8fveh_54"
10
+ };
11
+ function i() {
12
+ const o = s(m), r = o == null ? void 0 : o.error;
6
13
  if (!r)
7
14
  return null;
8
- const l = (s, n) => n != null && n.length ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("strong", null, s, ":"), /* @__PURE__ */ e.createElement("ul", null, n.map((a) => /* @__PURE__ */ e.createElement("li", { key: a.message }, a.message)))) : null;
15
+ const n = (c, l) => l != null && l.length ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("strong", null, c, ":"), /* @__PURE__ */ e.createElement("ul", null, l.map((a) => /* @__PURE__ */ e.createElement("li", { key: a.message }, a.message)))) : null;
9
16
  return /* @__PURE__ */ e.createElement("div", { className: t["modal-backdrop"] }, /* @__PURE__ */ e.createElement("div", { className: t["modal-content"] }, /* @__PURE__ */ e.createElement(
10
17
  "button",
11
18
  {
@@ -22,8 +29,8 @@ function p() {
22
29
  onClick: () => window.location.reload()
23
30
  },
24
31
  "Reload"
25
- ), " ", r.message), /* @__PURE__ */ e.createElement("div", { className: t["error-details"] }, r.networkError && /* @__PURE__ */ e.createElement("pre", { className: "network" }, /* @__PURE__ */ e.createElement("strong", null, "Network Error:"), " ", r.networkError.message), l("GraphQL Errors", [...r.graphQLErrors]), l("Protocol Errors", [...r.protocolErrors]), l("Client Errors", [...r.clientErrors]), r.extraInfo && /* @__PURE__ */ e.createElement("pre", { className: "extra" }, /* @__PURE__ */ e.createElement("strong", null, "Extra Info:"), " ", JSON.stringify(r.extraInfo, null, 4)))));
32
+ ), " ", r.message), /* @__PURE__ */ e.createElement("div", { className: t["error-details"] }, r.networkError && /* @__PURE__ */ e.createElement("pre", { className: "network" }, /* @__PURE__ */ e.createElement("strong", null, "Network Error:"), " ", r.networkError.message), n("GraphQL Errors", [...r.graphQLErrors]), n("Protocol Errors", [...r.protocolErrors]), n("Client Errors", [...r.clientErrors]), r.extraInfo && /* @__PURE__ */ e.createElement("pre", { className: "extra" }, /* @__PURE__ */ e.createElement("strong", null, "Extra Info:"), " ", JSON.stringify(r.extraInfo, null, 4)))));
26
33
  }
27
34
  export {
28
- p as ApolloErrorComponent
35
+ i as ApolloErrorComponent
29
36
  };
@@ -1,6 +1,6 @@
1
- "use strict";var L=Object.defineProperty;var c=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var i=(e,n,t)=>n in e?L(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,f=(e,n)=>{for(var t in n||(n={}))u.call(n,t)&&i(e,t,n[t]);if(c)for(var t of c(n))m.call(n,t)&&i(e,t,n[t]);return e};var v=(e,n)=>{var t={};for(var l in e)u.call(e,l)&&n.indexOf(l)<0&&(t[l]=e[l]);if(e!=null&&c)for(var l of c(e))n.indexOf(l)<0&&m.call(e,l)&&(t[l]=e[l]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("clsx"),r=require("react"),a=require("./loading.module.cjs");function N(){if(document.getElementById("noscroll-style"))return;const e=document.createElement("style");e.id="noscroll-style",e.innerHTML=`
1
+ "use strict";var y=Object.defineProperty;var o=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;var d=(e,t,n)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f=(e,t)=>{for(var n in t||(t={}))m.call(t,n)&&d(e,n,t[n]);if(o)for(var n of o(t))u.call(t,n)&&d(e,n,t[n]);return e};var g=(e,t)=>{var n={};for(var c in e)m.call(e,c)&&t.indexOf(c)<0&&(n[c]=e[c]);if(e!=null&&o)for(var c of o(e))t.indexOf(c)<0&&u.call(e,c)&&(n[c]=e[c]);return n};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("clsx"),r=require("react"),k="_fullscreen_1ank4_1",L="_block_1ank4_2",b="_container_1ank4_35",N="_ring_1ank4_45",h="_message_1ank4_69",s={fullscreen:k,block:L,container:b,ring:N,message:h};function p(){if(document.getElementById("noscroll-style"))return;const e=document.createElement("style");e.id="noscroll-style",e.innerHTML=`
2
2
  .noscroll {
3
3
  overflow: hidden !important;
4
4
  height: 100vh !important;
5
5
  }
6
- `,document.head.appendChild(e)}function h(p){var d=p,{full:e=!1,block:n=!1,className:t="",message:l="Loading"}=d,E=v(d,["full","block","className","message"]);r.useEffect(()=>{if(e){document.body.classList.add("noscroll");const s=y=>y.preventDefault();return document.addEventListener("contextmenu",s),()=>{document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",s)}}},[e]),r.useEffect(()=>{N()},[]);function o(){return r.createElement("div",f({className:a.default.container},E),r.createElement("div",{className:a.default.ring}),r.createElement("div",{className:a.default.ring}),r.createElement("div",{className:a.default.ring}),r.createElement("div",{className:a.default.ring}),l&&r.createElement("div",{className:a.default.message},l))}return e?r.createElement("div",{className:g(a.default.fullscreen,t)},o()):n?r.createElement("div",{className:g(a.default.block,t)},o()):o()}exports.Loading=h;
6
+ `,document.head.appendChild(e)}function x(S){var a=S,{full:e=!1,block:t=!1,className:n="",message:c="Loading"}=a,_=g(a,["full","block","className","message"]);r.useEffect(()=>{if(e){document.body.classList.add("noscroll");const i=E=>E.preventDefault();return document.addEventListener("contextmenu",i),()=>{document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",i)}}},[e]),r.useEffect(()=>{p()},[]);function l(){return r.createElement("div",f({className:s.container},_),r.createElement("div",{className:s.ring}),r.createElement("div",{className:s.ring}),r.createElement("div",{className:s.ring}),r.createElement("div",{className:s.ring}),c&&r.createElement("div",{className:s.message},c))}return e?r.createElement("div",{className:v(s.fullscreen,n)},l()):t?r.createElement("div",{className:v(s.block,n)},l()):l()}exports.Loading=x;
@@ -1,27 +1,33 @@
1
- var L = Object.defineProperty;
2
- var l = Object.getOwnPropertySymbols;
1
+ var y = Object.defineProperty;
2
+ var s = Object.getOwnPropertySymbols;
3
3
  var d = Object.prototype.hasOwnProperty, u = Object.prototype.propertyIsEnumerable;
4
- var m = (e, n, t) => n in e ? L(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, f = (e, n) => {
5
- for (var t in n || (n = {}))
6
- d.call(n, t) && m(e, t, n[t]);
7
- if (l)
8
- for (var t of l(n))
9
- u.call(n, t) && m(e, t, n[t]);
4
+ var m = (e, t, n) => t in e ? y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, f = (e, t) => {
5
+ for (var n in t || (t = {}))
6
+ d.call(t, n) && m(e, n, t[n]);
7
+ if (s)
8
+ for (var n of s(t))
9
+ u.call(t, n) && m(e, n, t[n]);
10
10
  return e;
11
11
  };
12
- var v = (e, n) => {
13
- var t = {};
14
- for (var r in e)
15
- d.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]);
16
- if (e != null && l)
17
- for (var r of l(e))
18
- n.indexOf(r) < 0 && u.call(e, r) && (t[r] = e[r]);
19
- return t;
12
+ var _ = (e, t) => {
13
+ var n = {};
14
+ for (var c in e)
15
+ d.call(e, c) && t.indexOf(c) < 0 && (n[c] = e[c]);
16
+ if (e != null && s)
17
+ for (var c of s(e))
18
+ t.indexOf(c) < 0 && u.call(e, c) && (n[c] = e[c]);
19
+ return n;
20
20
  };
21
- import E from "clsx";
22
- import o, { useEffect as g } from "react";
23
- import c from "./loading.module.js";
24
- function N() {
21
+ import g from "clsx";
22
+ import r, { useEffect as v } from "react";
23
+ const p = "_fullscreen_1ank4_1", L = "_block_1ank4_2", N = "_container_1ank4_35", h = "_ring_1ank4_45", b = "_message_1ank4_69", o = {
24
+ fullscreen: p,
25
+ block: L,
26
+ container: N,
27
+ ring: h,
28
+ message: b
29
+ };
30
+ function x() {
25
31
  if (document.getElementById("noscroll-style"))
26
32
  return;
27
33
  const e = document.createElement("style");
@@ -32,24 +38,24 @@ function N() {
32
38
  }
33
39
  `, document.head.appendChild(e);
34
40
  }
35
- function M(h) {
36
- var s = h, { full: e = !1, block: n = !1, className: t = "", message: r = "Loading" } = s, p = v(s, ["full", "block", "className", "message"]);
37
- g(() => {
41
+ function w(C) {
42
+ var a = C, { full: e = !1, block: t = !1, className: n = "", message: c = "Loading" } = a, E = _(a, ["full", "block", "className", "message"]);
43
+ v(() => {
38
44
  if (e) {
39
45
  document.body.classList.add("noscroll");
40
- const i = (y) => y.preventDefault();
46
+ const i = (k) => k.preventDefault();
41
47
  return document.addEventListener("contextmenu", i), () => {
42
48
  document.body.classList.remove("noscroll"), document.removeEventListener("contextmenu", i);
43
49
  };
44
50
  }
45
- }, [e]), g(() => {
46
- N();
51
+ }, [e]), v(() => {
52
+ x();
47
53
  }, []);
48
- function a() {
49
- return /* @__PURE__ */ o.createElement("div", f({ className: c.container }, p), /* @__PURE__ */ o.createElement("div", { className: c.ring }), /* @__PURE__ */ o.createElement("div", { className: c.ring }), /* @__PURE__ */ o.createElement("div", { className: c.ring }), /* @__PURE__ */ o.createElement("div", { className: c.ring }), r && /* @__PURE__ */ o.createElement("div", { className: c.message }, r));
54
+ function l() {
55
+ return /* @__PURE__ */ r.createElement("div", f({ className: o.container }, E), /* @__PURE__ */ r.createElement("div", { className: o.ring }), /* @__PURE__ */ r.createElement("div", { className: o.ring }), /* @__PURE__ */ r.createElement("div", { className: o.ring }), /* @__PURE__ */ r.createElement("div", { className: o.ring }), c && /* @__PURE__ */ r.createElement("div", { className: o.message }, c));
50
56
  }
51
- return e ? /* @__PURE__ */ o.createElement("div", { className: E(c.fullscreen, t) }, a()) : n ? /* @__PURE__ */ o.createElement("div", { className: E(c.block, t) }, a()) : a();
57
+ return e ? /* @__PURE__ */ r.createElement("div", { className: g(o.fullscreen, n) }, l()) : t ? /* @__PURE__ */ r.createElement("div", { className: g(o.block, n) }, l()) : l();
52
58
  }
53
59
  export {
54
- M as Loading
60
+ w as Loading
55
61
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cyberskill/shared",
3
3
  "type": "module",
4
- "version": "1.200.0",
4
+ "version": "1.201.0",
5
5
  "description": "CyberSkill Shared",
6
6
  "author": "Stephen Cheng",
7
7
  "license": "MIT",
@@ -14,10 +14,6 @@
14
14
  "url": "https://github.com/cyberskill-world/shared/issues"
15
15
  },
16
16
  "exports": {
17
- "./favicon": {
18
- "import": "./dist/favicon/favicon.ico",
19
- "require": "./dist/favicon/favicon.ico"
20
- },
21
17
  "./config": {
22
18
  "types": "./dist/src/config/index.d.ts",
23
19
  "import": "./dist/src/config/index.js",
@@ -181,11 +177,6 @@
181
177
  "./style.css": {
182
178
  "import": "./dist/style.css",
183
179
  "require": "./dist/style.css"
184
- },
185
- "./tsconfig.base.json": {
186
- "types": "./dist/tsconfig.base.json",
187
- "import": "./dist/tsconfig.base.json",
188
- "require": "./dist/tsconfig.base.json"
189
180
  }
190
181
  },
191
182
  "bin": {
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_main_8fveh_72",t="_network_8fveh_75",r="_extra_8fveh_78",_={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54",main:e,network:t,extra:r};exports.default=_;exports.extra=r;exports.main=e;exports.network=t;
@@ -1,17 +0,0 @@
1
- const e = "_main_8fveh_72", t = "_network_8fveh_75", _ = "_extra_8fveh_78", r = {
2
- "modal-backdrop": "_modal-backdrop_8fveh_1",
3
- "modal-content": "_modal-content_8fveh_11",
4
- "btn-close": "_btn-close_8fveh_22",
5
- "error-title": "_error-title_8fveh_36",
6
- "btn-retry": "_btn-retry_8fveh_41",
7
- "error-details": "_error-details_8fveh_54",
8
- main: e,
9
- network: t,
10
- extra: _
11
- };
12
- export {
13
- r as default,
14
- _ as extra,
15
- e as main,
16
- t as network
17
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_overlay_1ank4_1",t="_fullscreen_1ank4_1",a="_block_1ank4_2",o="_container_1ank4_35",n="_ring_1ank4_45",r="_rotate1_1ank4_1",_="_rotate2_1ank4_1",s="_rotate3_1ank4_1",c="_rotate4_1ank4_1",l="_message_1ank4_69",k={overlay:e,fullscreen:t,block:a,"overlay-fade-in":"_overlay-fade-in_1ank4_1",container:o,ring:n,rotate1:r,rotate2:_,rotate3:s,rotate4:c,message:l,"text-fade":"_text-fade_1ank4_1"};exports.block=a;exports.container=o;exports.default=k;exports.fullscreen=t;exports.message=l;exports.overlay=e;exports.ring=n;exports.rotate1=r;exports.rotate2=_;exports.rotate3=s;exports.rotate4=c;
@@ -1,27 +0,0 @@
1
- const t = "_overlay_1ank4_1", a = "_fullscreen_1ank4_1", e = "_block_1ank4_2", n = "_container_1ank4_35", _ = "_ring_1ank4_45", o = "_rotate1_1ank4_1", r = "_rotate2_1ank4_1", s = "_rotate3_1ank4_1", c = "_rotate4_1ank4_1", l = "_message_1ank4_69", k = {
2
- overlay: t,
3
- fullscreen: a,
4
- block: e,
5
- "overlay-fade-in": "_overlay-fade-in_1ank4_1",
6
- container: n,
7
- ring: _,
8
- rotate1: o,
9
- rotate2: r,
10
- rotate3: s,
11
- rotate4: c,
12
- message: l,
13
- "text-fade": "_text-fade_1ank4_1"
14
- };
15
- export {
16
- e as block,
17
- n as container,
18
- k as default,
19
- a as fullscreen,
20
- l as message,
21
- t as overlay,
22
- _ as ring,
23
- o as rotate1,
24
- r as rotate2,
25
- s as rotate3,
26
- c as rotate4
27
- };