@cyberskill/shared 2.19.0 → 2.20.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.
Files changed (58) hide show
  1. package/dist/config/eslint/index.d.ts +5 -0
  2. package/dist/config/storybook/index.cjs +1 -0
  3. package/dist/config/storybook/index.d.ts +2 -0
  4. package/dist/config/storybook/index.js +6 -0
  5. package/dist/config/storybook/storybook.main.cjs +1 -0
  6. package/dist/config/storybook/storybook.main.d.ts +17 -0
  7. package/dist/config/storybook/storybook.main.js +18 -0
  8. package/dist/config/storybook/storybook.preview.cjs +1 -0
  9. package/dist/config/storybook/storybook.preview.d.ts +18 -0
  10. package/dist/config/storybook/storybook.preview.js +39 -0
  11. package/dist/config/vitest/vitest.e2e.cjs +1 -1
  12. package/dist/config/vitest/vitest.e2e.js +1 -1
  13. package/dist/config/vitest/vitest.unit.cjs +1 -1
  14. package/dist/config/vitest/vitest.unit.js +1 -1
  15. package/dist/node/cli/index.cjs +2 -2
  16. package/dist/node/cli/index.js +51 -41
  17. package/dist/node/express/express.util.cjs +1 -1
  18. package/dist/node/express/express.util.js +21 -21
  19. package/dist/node/mongo/mongo.type.d.ts +3 -3
  20. package/dist/node/mongo/mongo.util.cjs +1 -1
  21. package/dist/node/mongo/mongo.util.d.ts +1019 -125
  22. package/dist/node/mongo/mongo.util.js +1 -1
  23. package/dist/node/path/index.cjs +1 -1
  24. package/dist/node/path/index.js +27 -25
  25. package/dist/node/path/path.constant.cjs +1 -1
  26. package/dist/node/path/path.constant.d.ts +6 -0
  27. package/dist/node/path/path.constant.js +152 -128
  28. package/dist/node/storage/index.cjs +1 -1
  29. package/dist/node/storage/index.d.ts +2 -0
  30. package/dist/node/storage/index.js +7 -2
  31. package/dist/node/storage/storage.constant.cjs +1 -0
  32. package/dist/node/storage/storage.constant.d.ts +4 -0
  33. package/dist/node/storage/storage.constant.js +7 -0
  34. package/dist/node/storage/storage.type.d.ts +14 -0
  35. package/dist/node/storage/storage.util.cjs +1 -1
  36. package/dist/node/storage/storage.util.d.ts +1 -1
  37. package/dist/node/storage/storage.util.js +160 -50
  38. package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
  39. package/dist/react/apollo-client/apollo-client.component.d.ts +3 -2
  40. package/dist/react/apollo-client/apollo-client.component.js +12 -12
  41. package/dist/react/apollo-client/apollo-client.type.d.ts +6 -0
  42. package/dist/react/apollo-client/apollo-client.util.cjs +1 -1
  43. package/dist/react/apollo-client/apollo-client.util.js +32 -34
  44. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -1
  45. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +3 -2
  46. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.js +10 -10
  47. package/dist/react/apollo-error/apollo-error.provider.cjs +1 -1
  48. package/dist/react/apollo-error/apollo-error.provider.d.ts +5 -4
  49. package/dist/react/apollo-error/apollo-error.provider.js +21 -15
  50. package/dist/react/apollo-error/apollo-error.type.d.ts +5 -0
  51. package/dist/react/apollo-error/apollo-error.util.cjs +1 -1
  52. package/dist/react/apollo-error/apollo-error.util.d.ts +13 -1
  53. package/dist/react/apollo-error/apollo-error.util.js +15 -7
  54. package/dist/react/apollo-error/index.cjs +1 -1
  55. package/dist/react/apollo-error/index.js +8 -6
  56. package/package.json +45 -41
  57. /package/dist/node_modules/.pnpm/{vitest@4.0.6_@types_debug@4.1.12_@types_node@24.9.2_jiti@2.6.1_jsdom@27.1.0_sass@1.93.3_tsx@4.20.6_yaml@2.8.1 → vitest@4.0.13_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.2_tsx@4.20.6_yaml@2.8.1}/node_modules/vitest/dist/config.cjs +0 -0
  58. /package/dist/node_modules/.pnpm/{vitest@4.0.6_@types_debug@4.1.12_@types_node@24.9.2_jiti@2.6.1_jsdom@27.1.0_sass@1.93.3_tsx@4.20.6_yaml@2.8.1 → vitest@4.0.13_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.2_tsx@4.20.6_yaml@2.8.1}/node_modules/vitest/dist/config.js +0 -0
@@ -88,7 +88,7 @@ const x = {
88
88
  createGenericSchema(n) {
89
89
  return new n.Schema(
90
90
  {
91
- id: { type: String, default: W, unique: !0 },
91
+ id: { type: String, default: () => W(), unique: !0 },
92
92
  isDel: { type: Boolean, default: !1 }
93
93
  },
94
94
  { timestamps: !0 }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./path.constant.cjs"),I=require("./path.util.cjs");exports.BUILD_DIRECTORY=_.BUILD_DIRECTORY;exports.COMMIT_LINT_CLI=_.COMMIT_LINT_CLI;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=_.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME;exports.COMMIT_LINT_PACKAGE_NAME=_.COMMIT_LINT_PACKAGE_NAME;exports.CYBERSKILL_CLI=_.CYBERSKILL_CLI;exports.CYBERSKILL_CLI_PATH=_.CYBERSKILL_CLI_PATH;exports.CYBERSKILL_DIRECTORY=_.CYBERSKILL_DIRECTORY;exports.CYBERSKILL_PACKAGE_NAME=_.CYBERSKILL_PACKAGE_NAME;exports.ESLINT_CLI=_.ESLINT_CLI;exports.ESLINT_INSPECT_CLI=_.ESLINT_INSPECT_CLI;exports.ESLINT_INSPECT_PACKAGE_NAME=_.ESLINT_INSPECT_PACKAGE_NAME;exports.ESLINT_PACKAGE_NAME=_.ESLINT_PACKAGE_NAME;exports.GIT_CLI=_.GIT_CLI;exports.GIT_COMMIT_EDITMSG=_.GIT_COMMIT_EDITMSG;exports.GIT_HOOK=_.GIT_HOOK;exports.GIT_IGNORE=_.GIT_IGNORE;exports.LINT_STAGED_CLI=_.LINT_STAGED_CLI;exports.LINT_STAGED_PACKAGE_NAME=_.LINT_STAGED_PACKAGE_NAME;exports.MIGRATE_MONGO_CLI=_.MIGRATE_MONGO_CLI;exports.MIGRATE_MONGO_CONFIG=_.MIGRATE_MONGO_CONFIG;exports.MIGRATE_MONGO_PACKAGE_NAME=_.MIGRATE_MONGO_PACKAGE_NAME;exports.NODE_MODULES=_.NODE_MODULES;exports.NODE_MODULES_INSPECT_CLI=_.NODE_MODULES_INSPECT_CLI;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=_.NODE_MODULES_INSPECT_PACKAGE_NAME;exports.PACKAGE_JSON=_.PACKAGE_JSON;exports.PACKAGE_LOCK_JSON=_.PACKAGE_LOCK_JSON;exports.PATH=_.PATH;exports.PNPM_CLI=_.PNPM_CLI;exports.PNPM_EXEC_CLI=_.PNPM_EXEC_CLI;exports.PNPM_LOCK_YAML=_.PNPM_LOCK_YAML;exports.PUBLIC_DIRECTORY=_.PUBLIC_DIRECTORY;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=_.SIMPLE_GIT_HOOKS_PACKAGE_NAME;exports.SIMPLE_GIT_HOOK_CLI=_.SIMPLE_GIT_HOOK_CLI;exports.SIMPLE_GIT_HOOK_JSON=_.SIMPLE_GIT_HOOK_JSON;exports.TSCONFIG_JSON=_.TSCONFIG_JSON;exports.TSC_CLI=_.TSC_CLI;exports.TSC_PACKAGE_NAME=_.TSC_PACKAGE_NAME;exports.TSX_CLI=_.TSX_CLI;exports.VITEST_CLI=_.VITEST_CLI;exports.VITEST_PACKAGE_NAME=_.VITEST_PACKAGE_NAME;exports.WORKING_DIRECTORY=_.WORKING_DIRECTORY;exports.command=_.command;exports.createGitHooksConfig=_.createGitHooksConfig;exports.dirname=I.dirname;exports.join=I.join;exports.path=I.path;exports.resolve=I.resolve;exports.resolveWorkingPath=I.resolveWorkingPath;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./path.constant.cjs"),I=require("./path.util.cjs");exports.BUILD_DIRECTORY=_.BUILD_DIRECTORY;exports.COMMIT_LINT_CLI=_.COMMIT_LINT_CLI;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=_.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME;exports.COMMIT_LINT_PACKAGE_NAME=_.COMMIT_LINT_PACKAGE_NAME;exports.CYBERSKILL_CLI=_.CYBERSKILL_CLI;exports.CYBERSKILL_CLI_PATH=_.CYBERSKILL_CLI_PATH;exports.CYBERSKILL_DIRECTORY=_.CYBERSKILL_DIRECTORY;exports.CYBERSKILL_PACKAGE_NAME=_.CYBERSKILL_PACKAGE_NAME;exports.ESLINT_CLI=_.ESLINT_CLI;exports.ESLINT_INSPECT_CLI=_.ESLINT_INSPECT_CLI;exports.ESLINT_INSPECT_PACKAGE_NAME=_.ESLINT_INSPECT_PACKAGE_NAME;exports.ESLINT_PACKAGE_NAME=_.ESLINT_PACKAGE_NAME;exports.GIT_CLI=_.GIT_CLI;exports.GIT_COMMIT_EDITMSG=_.GIT_COMMIT_EDITMSG;exports.GIT_HOOK=_.GIT_HOOK;exports.GIT_IGNORE=_.GIT_IGNORE;exports.LINT_STAGED_CLI=_.LINT_STAGED_CLI;exports.LINT_STAGED_PACKAGE_NAME=_.LINT_STAGED_PACKAGE_NAME;exports.MIGRATE_MONGO_CLI=_.MIGRATE_MONGO_CLI;exports.MIGRATE_MONGO_CONFIG=_.MIGRATE_MONGO_CONFIG;exports.MIGRATE_MONGO_PACKAGE_NAME=_.MIGRATE_MONGO_PACKAGE_NAME;exports.NODE_MODULES=_.NODE_MODULES;exports.NODE_MODULES_INSPECT_CLI=_.NODE_MODULES_INSPECT_CLI;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=_.NODE_MODULES_INSPECT_PACKAGE_NAME;exports.PACKAGE_JSON=_.PACKAGE_JSON;exports.PACKAGE_LOCK_JSON=_.PACKAGE_LOCK_JSON;exports.PATH=_.PATH;exports.PNPM_CLI=_.PNPM_CLI;exports.PNPM_EXEC_CLI=_.PNPM_EXEC_CLI;exports.PNPM_LOCK_YAML=_.PNPM_LOCK_YAML;exports.PUBLIC_DIRECTORY=_.PUBLIC_DIRECTORY;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=_.SIMPLE_GIT_HOOKS_PACKAGE_NAME;exports.SIMPLE_GIT_HOOK_CLI=_.SIMPLE_GIT_HOOK_CLI;exports.SIMPLE_GIT_HOOK_JSON=_.SIMPLE_GIT_HOOK_JSON;exports.STORYBOOK_CLI=_.STORYBOOK_CLI;exports.STORYBOOK_PACKAGE_NAME=_.STORYBOOK_PACKAGE_NAME;exports.TSCONFIG_JSON=_.TSCONFIG_JSON;exports.TSC_CLI=_.TSC_CLI;exports.TSC_PACKAGE_NAME=_.TSC_PACKAGE_NAME;exports.TSX_CLI=_.TSX_CLI;exports.VITEST_CLI=_.VITEST_CLI;exports.VITEST_PACKAGE_NAME=_.VITEST_PACKAGE_NAME;exports.WORKING_DIRECTORY=_.WORKING_DIRECTORY;exports.command=_.command;exports.createGitHooksConfig=_.createGitHooksConfig;exports.dirname=I.dirname;exports.join=I.join;exports.path=I.path;exports.resolve=I.resolve;exports.resolveWorkingPath=I.resolveWorkingPath;
@@ -1,13 +1,13 @@
1
- import { BUILD_DIRECTORY as E, COMMIT_LINT_CLI as C, COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as A, COMMIT_LINT_PACKAGE_NAME as N, CYBERSKILL_CLI as T, CYBERSKILL_CLI_PATH as L, CYBERSKILL_DIRECTORY as O, CYBERSKILL_PACKAGE_NAME as M, ESLINT_CLI as G, ESLINT_INSPECT_CLI as S, ESLINT_INSPECT_PACKAGE_NAME as P, ESLINT_PACKAGE_NAME as K, GIT_CLI as R, GIT_COMMIT_EDITMSG as D, GIT_HOOK as o, GIT_IGNORE as e, LINT_STAGED_CLI as r, LINT_STAGED_PACKAGE_NAME as Y, MIGRATE_MONGO_CLI as H, MIGRATE_MONGO_CONFIG as t, MIGRATE_MONGO_PACKAGE_NAME as B, NODE_MODULES as a, NODE_MODULES_INSPECT_CLI as i, NODE_MODULES_INSPECT_PACKAGE_NAME as m, PACKAGE_JSON as n, PACKAGE_LOCK_JSON as U, PATH as J, PNPM_CLI as f, PNPM_EXEC_CLI as p, PNPM_LOCK_YAML as s, PUBLIC_DIRECTORY as F, SIMPLE_GIT_HOOKS_PACKAGE_NAME as V, SIMPLE_GIT_HOOK_CLI as c, SIMPLE_GIT_HOOK_JSON as d, TSCONFIG_JSON as g, TSC_CLI as h, TSC_PACKAGE_NAME as k, TSX_CLI as l, VITEST_CLI as v, VITEST_PACKAGE_NAME as x, WORKING_DIRECTORY as W, command as X, createGitHooksConfig as j } from "./path.constant.js";
2
- import { dirname as q, join as u, path as w, resolve as y, resolveWorkingPath as z } from "./path.util.js";
1
+ import { BUILD_DIRECTORY as E, COMMIT_LINT_CLI as C, COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as A, COMMIT_LINT_PACKAGE_NAME as O, CYBERSKILL_CLI as T, CYBERSKILL_CLI_PATH as N, CYBERSKILL_DIRECTORY as L, CYBERSKILL_PACKAGE_NAME as M, ESLINT_CLI as G, ESLINT_INSPECT_CLI as S, ESLINT_INSPECT_PACKAGE_NAME as P, ESLINT_PACKAGE_NAME as K, GIT_CLI as R, GIT_COMMIT_EDITMSG as D, GIT_HOOK as o, GIT_IGNORE as Y, LINT_STAGED_CLI as e, LINT_STAGED_PACKAGE_NAME as r, MIGRATE_MONGO_CLI as B, MIGRATE_MONGO_CONFIG as H, MIGRATE_MONGO_PACKAGE_NAME as t, NODE_MODULES as a, NODE_MODULES_INSPECT_CLI as i, NODE_MODULES_INSPECT_PACKAGE_NAME as m, PACKAGE_JSON as n, PACKAGE_LOCK_JSON as U, PATH as J, PNPM_CLI as f, PNPM_EXEC_CLI as p, PNPM_LOCK_YAML as s, PUBLIC_DIRECTORY as F, SIMPLE_GIT_HOOKS_PACKAGE_NAME as V, SIMPLE_GIT_HOOK_CLI as c, SIMPLE_GIT_HOOK_JSON as d, STORYBOOK_CLI as g, STORYBOOK_PACKAGE_NAME as h, TSCONFIG_JSON as k, TSC_CLI as l, TSC_PACKAGE_NAME as v, TSX_CLI as x, VITEST_CLI as W, VITEST_PACKAGE_NAME as X, WORKING_DIRECTORY as j, command as b, createGitHooksConfig as q } from "./path.constant.js";
2
+ import { dirname as w, join as y, path as z, resolve as Q, resolveWorkingPath as Z } from "./path.util.js";
3
3
  export {
4
4
  E as BUILD_DIRECTORY,
5
5
  C as COMMIT_LINT_CLI,
6
6
  A as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
7
- N as COMMIT_LINT_PACKAGE_NAME,
7
+ O as COMMIT_LINT_PACKAGE_NAME,
8
8
  T as CYBERSKILL_CLI,
9
- L as CYBERSKILL_CLI_PATH,
10
- O as CYBERSKILL_DIRECTORY,
9
+ N as CYBERSKILL_CLI_PATH,
10
+ L as CYBERSKILL_DIRECTORY,
11
11
  M as CYBERSKILL_PACKAGE_NAME,
12
12
  G as ESLINT_CLI,
13
13
  S as ESLINT_INSPECT_CLI,
@@ -16,12 +16,12 @@ export {
16
16
  R as GIT_CLI,
17
17
  D as GIT_COMMIT_EDITMSG,
18
18
  o as GIT_HOOK,
19
- e as GIT_IGNORE,
20
- r as LINT_STAGED_CLI,
21
- Y as LINT_STAGED_PACKAGE_NAME,
22
- H as MIGRATE_MONGO_CLI,
23
- t as MIGRATE_MONGO_CONFIG,
24
- B as MIGRATE_MONGO_PACKAGE_NAME,
19
+ Y as GIT_IGNORE,
20
+ e as LINT_STAGED_CLI,
21
+ r as LINT_STAGED_PACKAGE_NAME,
22
+ B as MIGRATE_MONGO_CLI,
23
+ H as MIGRATE_MONGO_CONFIG,
24
+ t as MIGRATE_MONGO_PACKAGE_NAME,
25
25
  a as NODE_MODULES,
26
26
  i as NODE_MODULES_INSPECT_CLI,
27
27
  m as NODE_MODULES_INSPECT_PACKAGE_NAME,
@@ -35,18 +35,20 @@ export {
35
35
  V as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
36
36
  c as SIMPLE_GIT_HOOK_CLI,
37
37
  d as SIMPLE_GIT_HOOK_JSON,
38
- g as TSCONFIG_JSON,
39
- h as TSC_CLI,
40
- k as TSC_PACKAGE_NAME,
41
- l as TSX_CLI,
42
- v as VITEST_CLI,
43
- x as VITEST_PACKAGE_NAME,
44
- W as WORKING_DIRECTORY,
45
- X as command,
46
- j as createGitHooksConfig,
47
- q as dirname,
48
- u as join,
49
- w as path,
50
- y as resolve,
51
- z as resolveWorkingPath
38
+ g as STORYBOOK_CLI,
39
+ h as STORYBOOK_PACKAGE_NAME,
40
+ k as TSCONFIG_JSON,
41
+ l as TSC_CLI,
42
+ v as TSC_PACKAGE_NAME,
43
+ x as TSX_CLI,
44
+ W as VITEST_CLI,
45
+ X as VITEST_PACKAGE_NAME,
46
+ j as WORKING_DIRECTORY,
47
+ b as command,
48
+ q as createGitHooksConfig,
49
+ w as dirname,
50
+ y as join,
51
+ z as path,
52
+ Q as resolve,
53
+ Z as resolveWorkingPath
52
54
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("fs-extra"),o=require("./path.util.cjs"),e=require("../command/command.type.cjs"),p=require("../command/command.util.cjs"),oe=require("../package/package.util.cjs"),E=require("../package/package.type.cjs"),te=require("../../config/env/env.util.cjs");var Ee=Object.defineProperty,f=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,v=(a,t,_)=>t in a?Ee(a,t,{enumerable:!0,configurable:!0,writable:!0,value:_}):a[t]=_,Ce=(a,t)=>{for(var _ in t||(t={}))ae.call(t,_)&&v(a,_,t[_]);if(f)for(var _ of f(t))Ie.call(t,_)&&v(a,_,t[_]);return a},ce=(a,t,_)=>new Promise((N,m)=>{var r=C=>{try{L(_.next(C))}catch(l){m(l)}},G=C=>{try{L(_.throw(C))}catch(l){m(l)}},L=C=>C.done?N(C.value):Promise.resolve(C.value).then(r,G);L((_=_.apply(a,t)).next())});const se=te.getEnv(),P=se.CWD,g="@cyberskill/shared",D="node_modules",A="dist",h="public",k="package.json",$="package-lock.json",Y="tsconfig.json",F=".gitignore",V=".simple-git-hooks.json",W="pnpm-lock.yaml",H=".git/hooks/",U=".git/COMMIT_EDITMSG",w=".migrate-mongo.config.js",T=_e.readJsonSync(o.resolveWorkingPath(k)).name===g?o.join(P,A):o.join(P,D,g,A),me="cyberskill",Te="src/node/cli/index.ts",y="eslint",M="eslint",d="vitest",S="vitest",j="@commitlint/cli",J="@commitlint/config-conventional",u="commitlint",b="lint-staged",K="lint-staged",B="typescript",q="tsc",c="tsx",R="git",s="pnpm",x="pnpm exec",X="simple-git-hooks",z="simple-git-hooks",Q="@eslint/config-inspector",Z="eslint-config-inspector",ee="node-modules-inspector",ne="node-modules-inspector",i="migrate-mongo",O="./node_modules/migrate-mongo/bin/migrate-mongo",I={CYBERSKILL_DIRECTORY:T,WORKING_DIRECTORY:P,PUBLIC_DIRECTORY:o.resolveWorkingPath(h),TS_CONFIG:o.resolveWorkingPath(Y),GIT_IGNORE:o.resolveWorkingPath(F),GIT_HOOK:o.resolveWorkingPath(H),GIT_COMMIT_MSG:o.resolveWorkingPath(U),SIMPLE_GIT_HOOKS_JSON:o.resolveWorkingPath(V),PACKAGE_JSON:o.resolveWorkingPath(k),PACKAGE_LOCK_JSON:o.resolveWorkingPath($),PNPM_LOCK_YAML:o.resolveWorkingPath(W),NODE_MODULES:o.resolveWorkingPath(D),MIGRATE_MONGO_CONFIG:o.resolveWorkingPath(w),LINT_STAGED_CONFIG:o.resolveWorkingPath(`${T}/config/lint-staged/index.js`),COMMITLINT_CONFIG:o.resolveWorkingPath(`${T}/config/commitlint/index.js`),VITEST_UNIT_CONFIG:o.resolveWorkingPath(`${T}/config/vitest/vitest.unit.js`),VITEST_E2E_CONFIG:o.resolveWorkingPath(`${T}/config/vitest/vitest.e2e.js`)};function Ne({isCurrentProject:a}){return Ce({"pre-commit":K,"commit-msg":u},a&&{"pre-push":p.rawCommand(`${R} pull`)})}function n({type:a,packages:t,command:_}){const N=t==null?void 0:t.reduce((m,r)=>(m.some(G=>G.name===r.name)||m.push(r),m),[]);return()=>ce(null,null,function*(){switch(a){case e.E_CommandType.CLI:return N!=null&&N.length&&(yield oe.setupPackages(N,{install:!0})),p.formatCommand(p.rawCommand(`${x} ${_}`));case e.E_CommandType.STRING:return p.formatCommand(p.rawCommand(_));default:throw new Error("Unsupported command type")}})}const pe={simpleGitHooks:n({type:e.E_CommandType.CLI,packages:[{name:X,type:E.E_PackageType.DEV_DEPENDENCY}],command:z}),eslintInspect:n({type:e.E_CommandType.CLI,packages:[{name:Q,type:E.E_PackageType.DEV_DEPENDENCY}],command:Z}),nodeModulesInspect:n({type:e.E_CommandType.CLI,packages:[{name:ee,type:E.E_PackageType.DEV_DEPENDENCY}],command:ne}),eslintCheck:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --no-cache`}),eslintFix:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --fix --no-cache`}),typescriptCheck:n({type:e.E_CommandType.CLI,packages:[{name:B,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${q} -p ${I.TS_CONFIG} --noEmit`}),testUnit:n({type:e.E_CommandType.CLI,packages:[{name:d,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_UNIT_CONFIG}`}),testE2e:n({type:e.E_CommandType.CLI,packages:[{name:d,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_E2E_CONFIG}`}),mongoMigrateCreate:a=>n({type:e.E_CommandType.CLI,packages:[{name:c,type:E.E_PackageType.DEPENDENCY},{name:i,type:E.E_PackageType.DEPENDENCY}],command:`${c} ${O} create ${a} -f ${I.MIGRATE_MONGO_CONFIG}`})(),mongoMigrateUp:n({type:e.E_CommandType.CLI,packages:[{name:c,type:E.E_PackageType.DEPENDENCY},{name:i,type:E.E_PackageType.DEPENDENCY}],command:`${c} ${O} up -f ${I.MIGRATE_MONGO_CONFIG}`}),mongoMigrateDown:n({type:e.E_CommandType.CLI,packages:[{name:c,type:E.E_PackageType.DEPENDENCY},{name:i,type:E.E_PackageType.DEPENDENCY}],command:`${c} ${O} down -f ${I.MIGRATE_MONGO_CONFIG}`}),commitLint:n({type:e.E_CommandType.CLI,packages:[{name:j,type:E.E_PackageType.DEV_DEPENDENCY},{name:J,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${u} --edit ${I.GIT_COMMIT_MSG} --config ${I.COMMITLINT_CONFIG}`}),lintStaged:n({type:e.E_CommandType.CLI,packages:[{name:b,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${K} --config ${I.LINT_STAGED_CONFIG}`}),configureGitHook:n({type:e.E_CommandType.STRING,command:`${R} config core.hooksPath ${I.GIT_HOOK}`}),build:n({type:e.E_CommandType.STRING,command:`${s} run --if-present build`}),pnpmInstallStandard:n({type:e.E_CommandType.STRING,command:`${s} install --ignore-scripts`}),pnpmInstallLegacy:n({type:e.E_CommandType.STRING,command:`${s} install --ignore-scripts --legacy-peer-deps`}),pnpmInstallForce:n({type:e.E_CommandType.STRING,command:`${s} install --ignore-scripts --force`}),pnpmPruneStore:n({type:e.E_CommandType.STRING,command:`${s} store prune`}),pnpmCleanCache:n({type:e.E_CommandType.STRING,command:`${s} cache delete`})};exports.BUILD_DIRECTORY=A;exports.COMMIT_LINT_CLI=u;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=J;exports.COMMIT_LINT_PACKAGE_NAME=j;exports.CYBERSKILL_CLI=me;exports.CYBERSKILL_CLI_PATH=Te;exports.CYBERSKILL_DIRECTORY=T;exports.CYBERSKILL_PACKAGE_NAME=g;exports.ESLINT_CLI=M;exports.ESLINT_INSPECT_CLI=Z;exports.ESLINT_INSPECT_PACKAGE_NAME=Q;exports.ESLINT_PACKAGE_NAME=y;exports.GIT_CLI=R;exports.GIT_COMMIT_EDITMSG=U;exports.GIT_HOOK=H;exports.GIT_IGNORE=F;exports.LINT_STAGED_CLI=K;exports.LINT_STAGED_PACKAGE_NAME=b;exports.MIGRATE_MONGO_CLI=O;exports.MIGRATE_MONGO_CONFIG=w;exports.MIGRATE_MONGO_PACKAGE_NAME=i;exports.NODE_MODULES=D;exports.NODE_MODULES_INSPECT_CLI=ne;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=ee;exports.PACKAGE_JSON=k;exports.PACKAGE_LOCK_JSON=$;exports.PATH=I;exports.PNPM_CLI=s;exports.PNPM_EXEC_CLI=x;exports.PNPM_LOCK_YAML=W;exports.PUBLIC_DIRECTORY=h;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=X;exports.SIMPLE_GIT_HOOK_CLI=z;exports.SIMPLE_GIT_HOOK_JSON=V;exports.TSCONFIG_JSON=Y;exports.TSC_CLI=q;exports.TSC_PACKAGE_NAME=B;exports.TSX_CLI=c;exports.VITEST_CLI=S;exports.VITEST_PACKAGE_NAME=d;exports.WORKING_DIRECTORY=P;exports.command=pe;exports.createGitHooksConfig=Ne;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("fs-extra"),n=require("./path.util.cjs"),e=require("../command/command.type.cjs"),p=require("../command/command.util.cjs"),Ee=require("../package/package.util.cjs"),_=require("../package/package.type.cjs"),ae=require("../../config/env/env.util.cjs");var Ce=Object.defineProperty,Y=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,$=(a,E,t)=>E in a?Ce(a,E,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[E]=t,se=(a,E)=>{for(var t in E||(E={}))Ie.call(E,t)&&$(a,t,E[t]);if(Y)for(var t of Y(E))ce.call(E,t)&&$(a,t,E[t]);return a},me=(a,E,t)=>new Promise((r,T)=>{var N=c=>{try{y(t.next(c))}catch(L){T(L)}},G=c=>{try{y(t.throw(c))}catch(L){T(L)}},y=c=>c.done?r(c.value):Promise.resolve(c.value).then(N,G);y((t=t.apply(a,E)).next())});const Te=ae.getEnv(),P=Te.CWD,g="@cyberskill/shared",u="node_modules",l="dist",h="public",K="package.json",V="package-lock.json",F="tsconfig.json",W=".gitignore",b=".simple-git-hooks.json",B="pnpm-lock.yaml",H=".git/hooks/",U=".git/COMMIT_EDITMSG",j=".migrate-mongo.config.js",I=te.readJsonSync(n.resolveWorkingPath(K)).name===g?n.join(P,l):n.join(P,u,g,l),re="cyberskill",pe="src/node/cli/index.ts",A="eslint",d="eslint",M="vitest",S="vitest",w="@commitlint/cli",J="@commitlint/config-conventional",R="commitlint",q="lint-staged",v="lint-staged",x="typescript",X="tsc",s="tsx",f="git",m="pnpm",z="pnpm exec",Q="simple-git-hooks",Z="simple-git-hooks",ee="@eslint/config-inspector",oe="eslint-config-inspector",ne="node-modules-inspector",_e="node-modules-inspector",i="migrate-mongo",O="./node_modules/migrate-mongo/bin/migrate-mongo",D="storybook",k="storybook",C={CYBERSKILL_DIRECTORY:I,WORKING_DIRECTORY:P,PUBLIC_DIRECTORY:n.resolveWorkingPath(h),TS_CONFIG:n.resolveWorkingPath(F),GIT_IGNORE:n.resolveWorkingPath(W),GIT_HOOK:n.resolveWorkingPath(H),GIT_COMMIT_MSG:n.resolveWorkingPath(U),SIMPLE_GIT_HOOKS_JSON:n.resolveWorkingPath(b),PACKAGE_JSON:n.resolveWorkingPath(K),PACKAGE_LOCK_JSON:n.resolveWorkingPath(V),PNPM_LOCK_YAML:n.resolveWorkingPath(B),NODE_MODULES:n.resolveWorkingPath(u),MIGRATE_MONGO_CONFIG:n.resolveWorkingPath(j),LINT_STAGED_CONFIG:n.resolveWorkingPath(`${I}/config/lint-staged/index.js`),COMMITLINT_CONFIG:n.resolveWorkingPath(`${I}/config/commitlint/index.js`),VITEST_UNIT_CONFIG:n.resolveWorkingPath(`${I}/config/vitest/vitest.unit.js`),VITEST_E2E_CONFIG:n.resolveWorkingPath(`${I}/config/vitest/vitest.e2e.js`),STORYBOOK_MAIN_CONFIG:n.resolveWorkingPath(`${I}/config/storybook/storybook.main.js`),STORYBOOK_PREVIEW_CONFIG:n.resolveWorkingPath(`${I}/config/storybook/storybook.preview.js`)};function Ne({isCurrentProject:a}){return se({"pre-commit":v,"commit-msg":R},a&&{"pre-push":p.rawCommand(`${f} pull`)})}function o({type:a,packages:E,command:t}){const r=E==null?void 0:E.reduce((T,N)=>(T.some(G=>G.name===N.name)||T.push(N),T),[]);return()=>me(null,null,function*(){switch(a){case e.E_CommandType.CLI:return r!=null&&r.length&&(yield Ee.setupPackages(r,{install:!0})),p.formatCommand(p.rawCommand(`${z} ${t}`));case e.E_CommandType.STRING:return p.formatCommand(p.rawCommand(t));default:throw new Error("Unsupported command type")}})}const ie={simpleGitHooks:o({type:e.E_CommandType.CLI,packages:[{name:Q,type:_.E_PackageType.DEV_DEPENDENCY}],command:Z}),eslintInspect:o({type:e.E_CommandType.CLI,packages:[{name:ee,type:_.E_PackageType.DEV_DEPENDENCY}],command:oe}),nodeModulesInspect:o({type:e.E_CommandType.CLI,packages:[{name:ne,type:_.E_PackageType.DEV_DEPENDENCY}],command:_e}),eslintCheck:o({type:e.E_CommandType.CLI,packages:[{name:A,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${d} ${C.WORKING_DIRECTORY} --no-cache`}),eslintFix:o({type:e.E_CommandType.CLI,packages:[{name:A,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${d} ${C.WORKING_DIRECTORY} --fix --no-cache`}),typescriptCheck:o({type:e.E_CommandType.CLI,packages:[{name:x,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${X} -p ${C.TS_CONFIG} --noEmit`}),testUnit:o({type:e.E_CommandType.CLI,packages:[{name:M,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${C.VITEST_UNIT_CONFIG}`}),testE2e:o({type:e.E_CommandType.CLI,packages:[{name:M,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${C.VITEST_E2E_CONFIG}`}),mongoMigrateCreate:a=>o({type:e.E_CommandType.CLI,packages:[{name:s,type:_.E_PackageType.DEPENDENCY},{name:i,type:_.E_PackageType.DEPENDENCY}],command:`${s} ${O} create ${a} -f ${C.MIGRATE_MONGO_CONFIG}`})(),mongoMigrateUp:o({type:e.E_CommandType.CLI,packages:[{name:s,type:_.E_PackageType.DEPENDENCY},{name:i,type:_.E_PackageType.DEPENDENCY}],command:`${s} ${O} up -f ${C.MIGRATE_MONGO_CONFIG}`}),mongoMigrateDown:o({type:e.E_CommandType.CLI,packages:[{name:s,type:_.E_PackageType.DEPENDENCY},{name:i,type:_.E_PackageType.DEPENDENCY}],command:`${s} ${O} down -f ${C.MIGRATE_MONGO_CONFIG}`}),commitLint:o({type:e.E_CommandType.CLI,packages:[{name:w,type:_.E_PackageType.DEV_DEPENDENCY},{name:J,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${R} --edit ${C.GIT_COMMIT_MSG} --config ${C.COMMITLINT_CONFIG}`}),lintStaged:o({type:e.E_CommandType.CLI,packages:[{name:q,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${v} --config ${C.LINT_STAGED_CONFIG}`}),configureGitHook:o({type:e.E_CommandType.STRING,command:`${f} config core.hooksPath ${C.GIT_HOOK}`}),build:o({type:e.E_CommandType.STRING,command:`${m} run --if-present build`}),pnpmInstallStandard:o({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts`}),pnpmInstallLegacy:o({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts --legacy-peer-deps`}),pnpmInstallForce:o({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts --force`}),pnpmPruneStore:o({type:e.E_CommandType.STRING,command:`${m} store prune`}),pnpmCleanCache:o({type:e.E_CommandType.STRING,command:`${m} cache delete`}),storybookDev:o({type:e.E_CommandType.CLI,packages:[{name:D,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${k} dev`}),storybookBuild:o({type:e.E_CommandType.CLI,packages:[{name:D,type:_.E_PackageType.DEV_DEPENDENCY}],command:`${k} build`})};exports.BUILD_DIRECTORY=l;exports.COMMIT_LINT_CLI=R;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=J;exports.COMMIT_LINT_PACKAGE_NAME=w;exports.CYBERSKILL_CLI=re;exports.CYBERSKILL_CLI_PATH=pe;exports.CYBERSKILL_DIRECTORY=I;exports.CYBERSKILL_PACKAGE_NAME=g;exports.ESLINT_CLI=d;exports.ESLINT_INSPECT_CLI=oe;exports.ESLINT_INSPECT_PACKAGE_NAME=ee;exports.ESLINT_PACKAGE_NAME=A;exports.GIT_CLI=f;exports.GIT_COMMIT_EDITMSG=U;exports.GIT_HOOK=H;exports.GIT_IGNORE=W;exports.LINT_STAGED_CLI=v;exports.LINT_STAGED_PACKAGE_NAME=q;exports.MIGRATE_MONGO_CLI=O;exports.MIGRATE_MONGO_CONFIG=j;exports.MIGRATE_MONGO_PACKAGE_NAME=i;exports.NODE_MODULES=u;exports.NODE_MODULES_INSPECT_CLI=_e;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=ne;exports.PACKAGE_JSON=K;exports.PACKAGE_LOCK_JSON=V;exports.PATH=C;exports.PNPM_CLI=m;exports.PNPM_EXEC_CLI=z;exports.PNPM_LOCK_YAML=B;exports.PUBLIC_DIRECTORY=h;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=Q;exports.SIMPLE_GIT_HOOK_CLI=Z;exports.SIMPLE_GIT_HOOK_JSON=b;exports.STORYBOOK_CLI=k;exports.STORYBOOK_PACKAGE_NAME=D;exports.TSCONFIG_JSON=F;exports.TSC_CLI=X;exports.TSC_PACKAGE_NAME=x;exports.TSX_CLI=s;exports.VITEST_CLI=S;exports.VITEST_PACKAGE_NAME=M;exports.WORKING_DIRECTORY=P;exports.command=ie;exports.createGitHooksConfig=Ne;
@@ -39,6 +39,8 @@ export declare const NODE_MODULES_INSPECT_PACKAGE_NAME = "node-modules-inspector
39
39
  export declare const NODE_MODULES_INSPECT_CLI = "node-modules-inspector";
40
40
  export declare const MIGRATE_MONGO_PACKAGE_NAME = "migrate-mongo";
41
41
  export declare const MIGRATE_MONGO_CLI = "./node_modules/migrate-mongo/bin/migrate-mongo";
42
+ export declare const STORYBOOK_PACKAGE_NAME = "storybook";
43
+ export declare const STORYBOOK_CLI = "storybook";
42
44
  export declare const PATH: {
43
45
  CYBERSKILL_DIRECTORY: string;
44
46
  WORKING_DIRECTORY: string;
@@ -57,6 +59,8 @@ export declare const PATH: {
57
59
  COMMITLINT_CONFIG: string;
58
60
  VITEST_UNIT_CONFIG: string;
59
61
  VITEST_E2E_CONFIG: string;
62
+ STORYBOOK_MAIN_CONFIG: string;
63
+ STORYBOOK_PREVIEW_CONFIG: string;
60
64
  };
61
65
  /**
62
66
  * Creates Git hooks configuration based on whether this is the current project.
@@ -96,4 +100,6 @@ export declare const command: {
96
100
  pnpmInstallForce: () => Promise<string>;
97
101
  pnpmPruneStore: () => Promise<string>;
98
102
  pnpmCleanCache: () => Promise<string>;
103
+ storybookDev: () => Promise<string>;
104
+ storybookBuild: () => Promise<string>;
99
105
  };
@@ -1,110 +1,112 @@
1
- import h from "fs-extra";
2
- import { resolveWorkingPath as E, join as d } from "./path.util.js";
1
+ import F from "fs-extra";
2
+ import { resolveWorkingPath as s, join as g } from "./path.util.js";
3
3
  import { E_CommandType as e } from "../command/command.type.js";
4
- import { formatCommand as g, rawCommand as D } from "../command/command.util.js";
5
- import { setupPackages as F } from "../package/package.util.js";
6
- import { E_PackageType as c } from "../package/package.type.js";
7
- import { getEnv as V } from "../../config/env/env.util.js";
8
- var w = Object.defineProperty, P = Object.getOwnPropertySymbols, j = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable, M = (s, o, n) => o in s ? w(s, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[o] = n, U = (s, o) => {
9
- for (var n in o || (o = {}))
10
- j.call(o, n) && M(s, n, o[n]);
11
- if (P)
12
- for (var n of P(o))
13
- H.call(o, n) && M(s, n, o[n]);
14
- return s;
15
- }, b = (s, o, n) => new Promise((p, I) => {
4
+ import { formatCommand as y, rawCommand as D } from "../command/command.util.js";
5
+ import { setupPackages as b } from "../package/package.util.js";
6
+ import { E_PackageType as o } from "../package/package.type.js";
7
+ import { getEnv as j } from "../../config/env/env.util.js";
8
+ var w = Object.defineProperty, L = Object.getOwnPropertySymbols, B = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable, P = (E, c, n) => c in E ? w(E, c, { enumerable: !0, configurable: !0, writable: !0, value: n }) : E[c] = n, U = (E, c) => {
9
+ for (var n in c || (c = {}))
10
+ B.call(c, n) && P(E, n, c[n]);
11
+ if (L)
12
+ for (var n of L(c))
13
+ H.call(c, n) && P(E, n, c[n]);
14
+ return E;
15
+ }, J = (E, c, n) => new Promise((r, m) => {
16
16
  var C = (a) => {
17
17
  try {
18
18
  O(n.next(a));
19
19
  } catch (T) {
20
- I(T);
20
+ m(T);
21
21
  }
22
22
  }, N = (a) => {
23
23
  try {
24
24
  O(n.throw(a));
25
25
  } catch (T) {
26
- I(T);
26
+ m(T);
27
27
  }
28
- }, O = (a) => a.done ? p(a.value) : Promise.resolve(a.value).then(C, N);
29
- O((n = n.apply(s, o)).next());
28
+ }, O = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(C, N);
29
+ O((n = n.apply(E, c)).next());
30
30
  });
31
- const J = V(), L = J.CWD, S = "@cyberskill/shared", R = "node_modules", y = "dist", x = "public", K = "package.json", B = "package-lock.json", W = "tsconfig.json", X = ".gitignore", q = ".simple-git-hooks.json", z = "pnpm-lock.yaml", Q = ".git/hooks/", Z = ".git/COMMIT_EDITMSG", ee = ".migrate-mongo.config.js", r = h.readJsonSync(E(K)).name === S ? d(L, y) : d(L, R, S, y), De = "cyberskill", Le = "src/node/cli/index.ts", A = "eslint", u = "eslint", f = "vitest", $ = "vitest", te = "@commitlint/cli", ne = "@commitlint/config-conventional", k = "commitlint", oe = "lint-staged", Y = "lint-staged", ce = "typescript", se = "tsc", m = "tsx", v = "git", i = "pnpm", Ee = "pnpm exec", _e = "simple-git-hooks", ae = "simple-git-hooks", Ie = "@eslint/config-inspector", me = "eslint-config-inspector", ie = "node-modules-inspector", pe = "node-modules-inspector", l = "migrate-mongo", G = "./node_modules/migrate-mongo/bin/migrate-mongo", _ = {
32
- CYBERSKILL_DIRECTORY: r,
33
- WORKING_DIRECTORY: L,
34
- PUBLIC_DIRECTORY: E(x),
35
- TS_CONFIG: E(W),
36
- GIT_IGNORE: E(X),
37
- GIT_HOOK: E(Q),
38
- GIT_COMMIT_MSG: E(Z),
39
- SIMPLE_GIT_HOOKS_JSON: E(q),
40
- PACKAGE_JSON: E(K),
41
- PACKAGE_LOCK_JSON: E(B),
42
- PNPM_LOCK_YAML: E(z),
43
- NODE_MODULES: E(R),
44
- MIGRATE_MONGO_CONFIG: E(ee),
45
- LINT_STAGED_CONFIG: E(`${r}/config/lint-staged/index.js`),
46
- COMMITLINT_CONFIG: E(`${r}/config/commitlint/index.js`),
47
- VITEST_UNIT_CONFIG: E(`${r}/config/vitest/vitest.unit.js`),
48
- VITEST_E2E_CONFIG: E(`${r}/config/vitest/vitest.e2e.js`)
31
+ const x = j(), d = x.CWD, M = "@cyberskill/shared", K = "node_modules", S = "dist", W = "public", Y = "package.json", X = "package-lock.json", q = "tsconfig.json", z = ".gitignore", Q = ".simple-git-hooks.json", Z = "pnpm-lock.yaml", ee = ".git/hooks/", te = ".git/COMMIT_EDITMSG", oe = ".migrate-mongo.config.js", I = F.readJsonSync(s(Y)).name === M ? g(d, S) : g(d, K, M, S), ge = "cyberskill", ye = "src/node/cli/index.ts", A = "eslint", u = "eslint", f = "vitest", $ = "vitest", ne = "@commitlint/cli", se = "@commitlint/config-conventional", v = "commitlint", ce = "lint-staged", h = "lint-staged", Ee = "typescript", _e = "tsc", i = "tsx", V = "git", p = "pnpm", ae = "pnpm exec", Ie = "simple-git-hooks", me = "simple-git-hooks", ie = "@eslint/config-inspector", pe = "eslint-config-inspector", re = "node-modules-inspector", Ce = "node-modules-inspector", l = "migrate-mongo", G = "./node_modules/migrate-mongo/bin/migrate-mongo", R = "storybook", k = "storybook", _ = {
32
+ CYBERSKILL_DIRECTORY: I,
33
+ WORKING_DIRECTORY: d,
34
+ PUBLIC_DIRECTORY: s(W),
35
+ TS_CONFIG: s(q),
36
+ GIT_IGNORE: s(z),
37
+ GIT_HOOK: s(ee),
38
+ GIT_COMMIT_MSG: s(te),
39
+ SIMPLE_GIT_HOOKS_JSON: s(Q),
40
+ PACKAGE_JSON: s(Y),
41
+ PACKAGE_LOCK_JSON: s(X),
42
+ PNPM_LOCK_YAML: s(Z),
43
+ NODE_MODULES: s(K),
44
+ MIGRATE_MONGO_CONFIG: s(oe),
45
+ LINT_STAGED_CONFIG: s(`${I}/config/lint-staged/index.js`),
46
+ COMMITLINT_CONFIG: s(`${I}/config/commitlint/index.js`),
47
+ VITEST_UNIT_CONFIG: s(`${I}/config/vitest/vitest.unit.js`),
48
+ VITEST_E2E_CONFIG: s(`${I}/config/vitest/vitest.e2e.js`),
49
+ STORYBOOK_MAIN_CONFIG: s(`${I}/config/storybook/storybook.main.js`),
50
+ STORYBOOK_PREVIEW_CONFIG: s(`${I}/config/storybook/storybook.preview.js`)
49
51
  };
50
- function de({ isCurrentProject: s }) {
52
+ function Le({ isCurrentProject: E }) {
51
53
  return U({
52
- "pre-commit": Y,
53
- "commit-msg": k
54
- }, s && { "pre-push": D(`${v} pull`) });
54
+ "pre-commit": h,
55
+ "commit-msg": v
56
+ }, E && { "pre-push": D(`${V} pull`) });
55
57
  }
56
- function t({ type: s, packages: o, command: n }) {
57
- const p = o == null ? void 0 : o.reduce((I, C) => (I.some((N) => N.name === C.name) || I.push(C), I), []);
58
- return () => b(null, null, function* () {
59
- switch (s) {
58
+ function t({ type: E, packages: c, command: n }) {
59
+ const r = c == null ? void 0 : c.reduce((m, C) => (m.some((N) => N.name === C.name) || m.push(C), m), []);
60
+ return () => J(null, null, function* () {
61
+ switch (E) {
60
62
  case e.CLI:
61
- return p != null && p.length && (yield F(p, {
63
+ return r != null && r.length && (yield b(r, {
62
64
  install: !0
63
- })), g(D(`${Ee} ${n}`));
65
+ })), y(D(`${ae} ${n}`));
64
66
  case e.STRING:
65
- return g(D(n));
67
+ return y(D(n));
66
68
  default:
67
69
  throw new Error("Unsupported command type");
68
70
  }
69
71
  });
70
72
  }
71
- const ge = {
73
+ const Pe = {
72
74
  simpleGitHooks: t({
73
75
  type: e.CLI,
74
76
  packages: [
75
77
  {
76
- name: _e,
77
- type: c.DEV_DEPENDENCY
78
+ name: Ie,
79
+ type: o.DEV_DEPENDENCY
78
80
  }
79
81
  ],
80
- command: ae
82
+ command: me
81
83
  }),
82
84
  eslintInspect: t({
83
85
  type: e.CLI,
84
86
  packages: [
85
87
  {
86
- name: Ie,
87
- type: c.DEV_DEPENDENCY
88
+ name: ie,
89
+ type: o.DEV_DEPENDENCY
88
90
  }
89
91
  ],
90
- command: me
92
+ command: pe
91
93
  }),
92
94
  nodeModulesInspect: t({
93
95
  type: e.CLI,
94
96
  packages: [
95
97
  {
96
- name: ie,
97
- type: c.DEV_DEPENDENCY
98
+ name: re,
99
+ type: o.DEV_DEPENDENCY
98
100
  }
99
101
  ],
100
- command: pe
102
+ command: Ce
101
103
  }),
102
104
  eslintCheck: t({
103
105
  type: e.CLI,
104
106
  packages: [
105
107
  {
106
108
  name: A,
107
- type: c.DEV_DEPENDENCY
109
+ type: o.DEV_DEPENDENCY
108
110
  }
109
111
  ],
110
112
  command: `${u} ${_.WORKING_DIRECTORY} --no-cache`
@@ -114,7 +116,7 @@ const ge = {
114
116
  packages: [
115
117
  {
116
118
  name: A,
117
- type: c.DEV_DEPENDENCY
119
+ type: o.DEV_DEPENDENCY
118
120
  }
119
121
  ],
120
122
  command: `${u} ${_.WORKING_DIRECTORY} --fix --no-cache`
@@ -123,18 +125,18 @@ const ge = {
123
125
  type: e.CLI,
124
126
  packages: [
125
127
  {
126
- name: ce,
127
- type: c.DEV_DEPENDENCY
128
+ name: Ee,
129
+ type: o.DEV_DEPENDENCY
128
130
  }
129
131
  ],
130
- command: `${se} -p ${_.TS_CONFIG} --noEmit`
132
+ command: `${_e} -p ${_.TS_CONFIG} --noEmit`
131
133
  }),
132
134
  testUnit: t({
133
135
  type: e.CLI,
134
136
  packages: [
135
137
  {
136
138
  name: f,
137
- type: c.DEV_DEPENDENCY
139
+ type: o.DEV_DEPENDENCY
138
140
  }
139
141
  ],
140
142
  command: `${$} --config ${_.VITEST_UNIT_CONFIG}`
@@ -144,148 +146,170 @@ const ge = {
144
146
  packages: [
145
147
  {
146
148
  name: f,
147
- type: c.DEV_DEPENDENCY
149
+ type: o.DEV_DEPENDENCY
148
150
  }
149
151
  ],
150
152
  command: `${$} --config ${_.VITEST_E2E_CONFIG}`
151
153
  }),
152
- mongoMigrateCreate: (s) => t({
154
+ mongoMigrateCreate: (E) => t({
153
155
  type: e.CLI,
154
156
  packages: [
155
157
  {
156
- name: m,
157
- type: c.DEPENDENCY
158
+ name: i,
159
+ type: o.DEPENDENCY
158
160
  },
159
161
  {
160
162
  name: l,
161
- type: c.DEPENDENCY
163
+ type: o.DEPENDENCY
162
164
  }
163
165
  ],
164
- command: `${m} ${G} create ${s} -f ${_.MIGRATE_MONGO_CONFIG}`
166
+ command: `${i} ${G} create ${E} -f ${_.MIGRATE_MONGO_CONFIG}`
165
167
  })(),
166
168
  mongoMigrateUp: t({
167
169
  type: e.CLI,
168
170
  packages: [
169
171
  {
170
- name: m,
171
- type: c.DEPENDENCY
172
+ name: i,
173
+ type: o.DEPENDENCY
172
174
  },
173
175
  {
174
176
  name: l,
175
- type: c.DEPENDENCY
177
+ type: o.DEPENDENCY
176
178
  }
177
179
  ],
178
- command: `${m} ${G} up -f ${_.MIGRATE_MONGO_CONFIG}`
180
+ command: `${i} ${G} up -f ${_.MIGRATE_MONGO_CONFIG}`
179
181
  }),
180
182
  mongoMigrateDown: t({
181
183
  type: e.CLI,
182
184
  packages: [
183
185
  {
184
- name: m,
185
- type: c.DEPENDENCY
186
+ name: i,
187
+ type: o.DEPENDENCY
186
188
  },
187
189
  {
188
190
  name: l,
189
- type: c.DEPENDENCY
191
+ type: o.DEPENDENCY
190
192
  }
191
193
  ],
192
- command: `${m} ${G} down -f ${_.MIGRATE_MONGO_CONFIG}`
194
+ command: `${i} ${G} down -f ${_.MIGRATE_MONGO_CONFIG}`
193
195
  }),
194
196
  commitLint: t({
195
197
  type: e.CLI,
196
198
  packages: [
197
199
  {
198
- name: te,
199
- type: c.DEV_DEPENDENCY
200
+ name: ne,
201
+ type: o.DEV_DEPENDENCY
200
202
  },
201
203
  {
202
- name: ne,
203
- type: c.DEV_DEPENDENCY
204
+ name: se,
205
+ type: o.DEV_DEPENDENCY
204
206
  }
205
207
  ],
206
- command: `${k} --edit ${_.GIT_COMMIT_MSG} --config ${_.COMMITLINT_CONFIG}`
208
+ command: `${v} --edit ${_.GIT_COMMIT_MSG} --config ${_.COMMITLINT_CONFIG}`
207
209
  }),
208
210
  lintStaged: t({
209
211
  type: e.CLI,
210
212
  packages: [
211
213
  {
212
- name: oe,
213
- type: c.DEV_DEPENDENCY
214
+ name: ce,
215
+ type: o.DEV_DEPENDENCY
214
216
  }
215
217
  ],
216
- command: `${Y} --config ${_.LINT_STAGED_CONFIG}`
218
+ command: `${h} --config ${_.LINT_STAGED_CONFIG}`
217
219
  }),
218
220
  configureGitHook: t({
219
221
  type: e.STRING,
220
- command: `${v} config core.hooksPath ${_.GIT_HOOK}`
222
+ command: `${V} config core.hooksPath ${_.GIT_HOOK}`
221
223
  }),
222
224
  build: t({
223
225
  type: e.STRING,
224
- command: `${i} run --if-present build`
226
+ command: `${p} run --if-present build`
225
227
  }),
226
228
  pnpmInstallStandard: t({
227
229
  type: e.STRING,
228
- command: `${i} install --ignore-scripts`
230
+ command: `${p} install --ignore-scripts`
229
231
  }),
230
232
  pnpmInstallLegacy: t({
231
233
  type: e.STRING,
232
- command: `${i} install --ignore-scripts --legacy-peer-deps`
234
+ command: `${p} install --ignore-scripts --legacy-peer-deps`
233
235
  }),
234
236
  pnpmInstallForce: t({
235
237
  type: e.STRING,
236
- command: `${i} install --ignore-scripts --force`
238
+ command: `${p} install --ignore-scripts --force`
237
239
  }),
238
240
  pnpmPruneStore: t({
239
241
  type: e.STRING,
240
- command: `${i} store prune`
242
+ command: `${p} store prune`
241
243
  }),
242
244
  pnpmCleanCache: t({
243
245
  type: e.STRING,
244
- command: `${i} cache delete`
246
+ command: `${p} cache delete`
247
+ }),
248
+ storybookDev: t({
249
+ type: e.CLI,
250
+ packages: [
251
+ {
252
+ name: R,
253
+ type: o.DEV_DEPENDENCY
254
+ }
255
+ ],
256
+ command: `${k} dev`
257
+ }),
258
+ storybookBuild: t({
259
+ type: e.CLI,
260
+ packages: [
261
+ {
262
+ name: R,
263
+ type: o.DEV_DEPENDENCY
264
+ }
265
+ ],
266
+ command: `${k} build`
245
267
  })
246
268
  };
247
269
  export {
248
- y as BUILD_DIRECTORY,
249
- k as COMMIT_LINT_CLI,
250
- ne as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
251
- te as COMMIT_LINT_PACKAGE_NAME,
252
- De as CYBERSKILL_CLI,
253
- Le as CYBERSKILL_CLI_PATH,
254
- r as CYBERSKILL_DIRECTORY,
255
- S as CYBERSKILL_PACKAGE_NAME,
270
+ S as BUILD_DIRECTORY,
271
+ v as COMMIT_LINT_CLI,
272
+ se as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
273
+ ne as COMMIT_LINT_PACKAGE_NAME,
274
+ ge as CYBERSKILL_CLI,
275
+ ye as CYBERSKILL_CLI_PATH,
276
+ I as CYBERSKILL_DIRECTORY,
277
+ M as CYBERSKILL_PACKAGE_NAME,
256
278
  u as ESLINT_CLI,
257
- me as ESLINT_INSPECT_CLI,
258
- Ie as ESLINT_INSPECT_PACKAGE_NAME,
279
+ pe as ESLINT_INSPECT_CLI,
280
+ ie as ESLINT_INSPECT_PACKAGE_NAME,
259
281
  A as ESLINT_PACKAGE_NAME,
260
- v as GIT_CLI,
261
- Z as GIT_COMMIT_EDITMSG,
262
- Q as GIT_HOOK,
263
- X as GIT_IGNORE,
264
- Y as LINT_STAGED_CLI,
265
- oe as LINT_STAGED_PACKAGE_NAME,
282
+ V as GIT_CLI,
283
+ te as GIT_COMMIT_EDITMSG,
284
+ ee as GIT_HOOK,
285
+ z as GIT_IGNORE,
286
+ h as LINT_STAGED_CLI,
287
+ ce as LINT_STAGED_PACKAGE_NAME,
266
288
  G as MIGRATE_MONGO_CLI,
267
- ee as MIGRATE_MONGO_CONFIG,
289
+ oe as MIGRATE_MONGO_CONFIG,
268
290
  l as MIGRATE_MONGO_PACKAGE_NAME,
269
- R as NODE_MODULES,
270
- pe as NODE_MODULES_INSPECT_CLI,
271
- ie as NODE_MODULES_INSPECT_PACKAGE_NAME,
272
- K as PACKAGE_JSON,
273
- B as PACKAGE_LOCK_JSON,
291
+ K as NODE_MODULES,
292
+ Ce as NODE_MODULES_INSPECT_CLI,
293
+ re as NODE_MODULES_INSPECT_PACKAGE_NAME,
294
+ Y as PACKAGE_JSON,
295
+ X as PACKAGE_LOCK_JSON,
274
296
  _ as PATH,
275
- i as PNPM_CLI,
276
- Ee as PNPM_EXEC_CLI,
277
- z as PNPM_LOCK_YAML,
278
- x as PUBLIC_DIRECTORY,
279
- _e as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
280
- ae as SIMPLE_GIT_HOOK_CLI,
281
- q as SIMPLE_GIT_HOOK_JSON,
282
- W as TSCONFIG_JSON,
283
- se as TSC_CLI,
284
- ce as TSC_PACKAGE_NAME,
285
- m as TSX_CLI,
297
+ p as PNPM_CLI,
298
+ ae as PNPM_EXEC_CLI,
299
+ Z as PNPM_LOCK_YAML,
300
+ W as PUBLIC_DIRECTORY,
301
+ Ie as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
302
+ me as SIMPLE_GIT_HOOK_CLI,
303
+ Q as SIMPLE_GIT_HOOK_JSON,
304
+ k as STORYBOOK_CLI,
305
+ R as STORYBOOK_PACKAGE_NAME,
306
+ q as TSCONFIG_JSON,
307
+ _e as TSC_CLI,
308
+ Ee as TSC_PACKAGE_NAME,
309
+ i as TSX_CLI,
286
310
  $ as VITEST_CLI,
287
311
  f as VITEST_PACKAGE_NAME,
288
- L as WORKING_DIRECTORY,
289
- ge as command,
290
- de as createGitHooksConfig
312
+ d as WORKING_DIRECTORY,
313
+ Pe as command,
314
+ Le as createGitHooksConfig
291
315
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./storage.util.cjs");exports.storage=e.storage;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./storage.constant.cjs"),_=require("./storage.util.cjs");exports.NODE_FS_DRIVER_NAME=E.NODE_FS_DRIVER_NAME;exports.STORAGE_INSTANCE_NAME=E.STORAGE_INSTANCE_NAME;exports.STORAGE_KEY_EXTENSION=E.STORAGE_KEY_EXTENSION;exports.STORAGE_STORE_NAME=E.STORAGE_STORE_NAME;exports.storage=_.storage;
@@ -1 +1,3 @@
1
+ export * from './storage.constant.js';
2
+ export * from './storage.type.js';
1
3
  export * from './storage.util.js';
@@ -1,4 +1,9 @@
1
- import { storage as e } from "./storage.util.js";
1
+ import { NODE_FS_DRIVER_NAME as N, STORAGE_INSTANCE_NAME as A, STORAGE_KEY_EXTENSION as S, STORAGE_STORE_NAME as O } from "./storage.constant.js";
2
+ import { storage as T } from "./storage.util.js";
2
3
  export {
3
- e as storage
4
+ N as NODE_FS_DRIVER_NAME,
5
+ A as STORAGE_INSTANCE_NAME,
6
+ S as STORAGE_KEY_EXTENSION,
7
+ O as STORAGE_STORE_NAME,
8
+ T as storage
4
9
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="localforage-node-fs",_=".json",N="cyberskill",S="node-storage";exports.NODE_FS_DRIVER_NAME=E;exports.STORAGE_INSTANCE_NAME=N;exports.STORAGE_KEY_EXTENSION=_;exports.STORAGE_STORE_NAME=S;
@@ -0,0 +1,4 @@
1
+ export declare const NODE_FS_DRIVER_NAME = "localforage-node-fs";
2
+ export declare const STORAGE_KEY_EXTENSION = ".json";
3
+ export declare const STORAGE_INSTANCE_NAME = "cyberskill";
4
+ export declare const STORAGE_STORE_NAME = "node-storage";