@cyberskill/shared 1.63.0 → 1.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.cts +88 -18
- package/dist/_tsup-dts-rollup.d.ts +88 -18
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/configs/graphql/graphql-codegen.cjs +1 -1
- package/dist/configs/graphql/graphql-codegen.js +1 -1
- package/dist/configs/graphql/index.cjs +1 -1
- package/dist/configs/graphql/index.js +1 -1
- package/dist/configs/index.cjs +1 -1
- package/dist/configs/index.js +1 -1
- package/dist/configs/vitest/react/unit.cjs +1 -1
- package/dist/configs/vitest/react/unit.js +1 -1
- package/dist/constants/cli.cjs +1 -0
- package/dist/constants/cli.d.cts +1 -0
- package/dist/constants/cli.d.ts +1 -0
- package/dist/constants/cli.js +1 -0
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.d.cts +2 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +1 -1
- package/dist/constants/package.cjs +1 -0
- package/dist/constants/package.d.cts +1 -0
- package/dist/constants/package.d.ts +1 -0
- package/dist/constants/package.js +1 -0
- package/dist/constants/path.cjs +1 -1
- package/dist/constants/path.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1 -1
- package/dist/react/apollo-client.cjs +1 -1
- package/dist/react/apollo-client.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/dist/typescript/apollo-error.d.cts +1 -1
- package/dist/typescript/apollo-error.d.ts +1 -1
- package/dist/typescript/index.d.cts +4 -0
- package/dist/typescript/index.d.ts +4 -0
- package/dist/typescript/package.cjs +1 -0
- package/dist/typescript/package.d.cts +3 -0
- package/dist/typescript/package.d.ts +3 -0
- package/dist/typescript/package.js +0 -0
- package/dist/utils/command.cjs +1 -1
- package/dist/utils/command.js +1 -1
- package/dist/utils/index-nodejs.cjs +1 -1
- package/dist/utils/index-nodejs.d.cts +1 -1
- package/dist/utils/index-nodejs.d.ts +1 -1
- package/dist/utils/index-nodejs.js +1 -1
- package/dist/utils/package.cjs +1 -1
- package/dist/utils/package.d.cts +1 -1
- package/dist/utils/package.d.ts +1 -1
- package/dist/utils/package.js +1 -1
- package/dist/utils/path.cjs +1 -1
- package/dist/utils/path.js +1 -1
- package/dist/utils/storage-server.cjs +1 -1
- package/dist/utils/storage-server.js +1 -1
- package/package.json +4 -4
|
@@ -131,14 +131,14 @@ export { C_Model }
|
|
|
131
131
|
export { C_Model as C_Model_alias_1 }
|
|
132
132
|
export { C_Model as C_Model_alias_2 }
|
|
133
133
|
|
|
134
|
-
declare
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}>;
|
|
134
|
+
declare const CHECK_PACKAGE_EMPTY_RESULT: I_CheckPackage_2;
|
|
135
|
+
export { CHECK_PACKAGE_EMPTY_RESULT }
|
|
136
|
+
export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_1 }
|
|
137
|
+
export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_2 }
|
|
138
|
+
|
|
139
|
+
declare function checkPackage(packageName: string, options?: {
|
|
140
|
+
update?: boolean;
|
|
141
|
+
}): Promise<I_CheckPackage_2>;
|
|
142
142
|
export { checkPackage }
|
|
143
143
|
export { checkPackage as checkPackage_alias_1 }
|
|
144
144
|
export { checkPackage as checkPackage_alias_2 }
|
|
@@ -172,6 +172,22 @@ export { COMMAND }
|
|
|
172
172
|
export { COMMAND as COMMAND_alias_1 }
|
|
173
173
|
export { COMMAND as COMMAND_alias_2 }
|
|
174
174
|
|
|
175
|
+
declare const COMMAND_DESCRIPTIONS: {
|
|
176
|
+
lint: string;
|
|
177
|
+
'lint:fix': string;
|
|
178
|
+
'lint:inspect': string;
|
|
179
|
+
'lint-staged': string;
|
|
180
|
+
commitlint: string;
|
|
181
|
+
setup: string;
|
|
182
|
+
reset: string;
|
|
183
|
+
inspect: string;
|
|
184
|
+
'test:unit': string;
|
|
185
|
+
'test:e2e': string;
|
|
186
|
+
};
|
|
187
|
+
export { COMMAND_DESCRIPTIONS }
|
|
188
|
+
export { COMMAND_DESCRIPTIONS as COMMAND_DESCRIPTIONS_alias_1 }
|
|
189
|
+
export { COMMAND_DESCRIPTIONS as COMMAND_DESCRIPTIONS_alias_2 }
|
|
190
|
+
|
|
175
191
|
declare const COMMIT_LINT_CLI = "commitlint";
|
|
176
192
|
export { COMMIT_LINT_CLI }
|
|
177
193
|
export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_1 }
|
|
@@ -1468,19 +1484,15 @@ export { generateSlug }
|
|
|
1468
1484
|
export { generateSlug as generateSlug_alias_1 }
|
|
1469
1485
|
export { generateSlug as generateSlug_alias_2 }
|
|
1470
1486
|
|
|
1471
|
-
declare function getLatestPackageVersion(packageName: string
|
|
1487
|
+
declare function getLatestPackageVersion(packageName: string): Promise<string>;
|
|
1472
1488
|
export { getLatestPackageVersion }
|
|
1473
1489
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
|
|
1474
1490
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
|
|
1475
1491
|
|
|
1476
|
-
declare function
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
} | false;
|
|
1481
|
-
export { getPackageJson }
|
|
1482
|
-
export { getPackageJson as getPackageJson_alias_1 }
|
|
1483
|
-
export { getPackageJson as getPackageJson_alias_2 }
|
|
1492
|
+
declare function getPackage(packageName: string): I_GetPackage_2 | false;
|
|
1493
|
+
export { getPackage }
|
|
1494
|
+
export { getPackage as getPackage_alias_1 }
|
|
1495
|
+
export { getPackage as getPackage_alias_2 }
|
|
1484
1496
|
|
|
1485
1497
|
declare function getStorageDir(): string;
|
|
1486
1498
|
export { getStorageDir }
|
|
@@ -1529,11 +1541,14 @@ export { HOOK }
|
|
|
1529
1541
|
export { HOOK as HOOK_alias_1 }
|
|
1530
1542
|
export { HOOK as HOOK_alias_2 }
|
|
1531
1543
|
|
|
1532
|
-
|
|
1544
|
+
declare interface I_ApolloErrorViewerContext {
|
|
1533
1545
|
error: ApolloError | null;
|
|
1534
1546
|
showError: (error: ApolloError) => void;
|
|
1535
1547
|
hideError: () => void;
|
|
1536
1548
|
}
|
|
1549
|
+
export { I_ApolloErrorViewerContext }
|
|
1550
|
+
export { I_ApolloErrorViewerContext as I_ApolloErrorViewerContext_alias_1 }
|
|
1551
|
+
export { I_ApolloErrorViewerContext as I_ApolloErrorViewerContext_alias_2 }
|
|
1537
1552
|
|
|
1538
1553
|
declare interface I_ApolloErrorViewerContext_2 {
|
|
1539
1554
|
error: ApolloError | null;
|
|
@@ -1583,6 +1598,23 @@ declare interface I_ApolloProviderProps_2 {
|
|
|
1583
1598
|
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1584
1599
|
}
|
|
1585
1600
|
|
|
1601
|
+
declare interface I_CheckPackage {
|
|
1602
|
+
isCurrentProject: boolean;
|
|
1603
|
+
installedPath: string;
|
|
1604
|
+
file: T_PackageJson;
|
|
1605
|
+
isUpToDate: boolean;
|
|
1606
|
+
}
|
|
1607
|
+
export { I_CheckPackage }
|
|
1608
|
+
export { I_CheckPackage as I_CheckPackage_alias_1 }
|
|
1609
|
+
export { I_CheckPackage as I_CheckPackage_alias_2 }
|
|
1610
|
+
|
|
1611
|
+
declare interface I_CheckPackage_2 {
|
|
1612
|
+
isCurrentProject: boolean;
|
|
1613
|
+
installedPath: string;
|
|
1614
|
+
file: T_PackageJson_2;
|
|
1615
|
+
isUpToDate: boolean;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1586
1618
|
declare interface I_Command {
|
|
1587
1619
|
raw: boolean;
|
|
1588
1620
|
cmd: string;
|
|
@@ -1692,6 +1724,25 @@ declare interface I_GenericDocument_2 extends Partial<C_Document_2> {
|
|
|
1692
1724
|
updatedAt: string | Date;
|
|
1693
1725
|
}
|
|
1694
1726
|
|
|
1727
|
+
declare interface I_GetPackage {
|
|
1728
|
+
path: string;
|
|
1729
|
+
file: T_PackageJson;
|
|
1730
|
+
isCurrentProject: boolean;
|
|
1731
|
+
isDepend: boolean;
|
|
1732
|
+
isDevDepend: boolean;
|
|
1733
|
+
}
|
|
1734
|
+
export { I_GetPackage }
|
|
1735
|
+
export { I_GetPackage as I_GetPackage_alias_1 }
|
|
1736
|
+
export { I_GetPackage as I_GetPackage_alias_2 }
|
|
1737
|
+
|
|
1738
|
+
declare interface I_GetPackage_2 {
|
|
1739
|
+
path: string;
|
|
1740
|
+
file: T_PackageJson_2;
|
|
1741
|
+
isCurrentProject: boolean;
|
|
1742
|
+
isDepend: boolean;
|
|
1743
|
+
isDevDepend: boolean;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1695
1746
|
declare interface I_GraphqlCodegenConfig {
|
|
1696
1747
|
uri: string;
|
|
1697
1748
|
from: string;
|
|
@@ -2923,6 +2974,25 @@ export { T_OptionalUnlessRequiredId }
|
|
|
2923
2974
|
export { T_OptionalUnlessRequiredId as T_OptionalUnlessRequiredId_alias_1 }
|
|
2924
2975
|
export { T_OptionalUnlessRequiredId as T_OptionalUnlessRequiredId_alias_2 }
|
|
2925
2976
|
|
|
2977
|
+
declare interface T_PackageJson {
|
|
2978
|
+
name?: string;
|
|
2979
|
+
version?: string;
|
|
2980
|
+
dependencies?: Record<string, string>;
|
|
2981
|
+
devDependencies?: Record<string, string>;
|
|
2982
|
+
[key: string]: any;
|
|
2983
|
+
}
|
|
2984
|
+
export { T_PackageJson }
|
|
2985
|
+
export { T_PackageJson as T_PackageJson_alias_1 }
|
|
2986
|
+
export { T_PackageJson as T_PackageJson_alias_2 }
|
|
2987
|
+
|
|
2988
|
+
declare interface T_PackageJson_2 {
|
|
2989
|
+
name?: string;
|
|
2990
|
+
version?: string;
|
|
2991
|
+
dependencies?: Record<string, string>;
|
|
2992
|
+
devDependencies?: Record<string, string>;
|
|
2993
|
+
[key: string]: any;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2926
2996
|
declare type T_PaginateOptions = PaginateOptions;
|
|
2927
2997
|
export { T_PaginateOptions }
|
|
2928
2998
|
export { T_PaginateOptions as T_PaginateOptions_alias_1 }
|
|
@@ -131,14 +131,14 @@ export { C_Model }
|
|
|
131
131
|
export { C_Model as C_Model_alias_1 }
|
|
132
132
|
export { C_Model as C_Model_alias_2 }
|
|
133
133
|
|
|
134
|
-
declare
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}>;
|
|
134
|
+
declare const CHECK_PACKAGE_EMPTY_RESULT: I_CheckPackage_2;
|
|
135
|
+
export { CHECK_PACKAGE_EMPTY_RESULT }
|
|
136
|
+
export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_1 }
|
|
137
|
+
export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_2 }
|
|
138
|
+
|
|
139
|
+
declare function checkPackage(packageName: string, options?: {
|
|
140
|
+
update?: boolean;
|
|
141
|
+
}): Promise<I_CheckPackage_2>;
|
|
142
142
|
export { checkPackage }
|
|
143
143
|
export { checkPackage as checkPackage_alias_1 }
|
|
144
144
|
export { checkPackage as checkPackage_alias_2 }
|
|
@@ -172,6 +172,22 @@ export { COMMAND }
|
|
|
172
172
|
export { COMMAND as COMMAND_alias_1 }
|
|
173
173
|
export { COMMAND as COMMAND_alias_2 }
|
|
174
174
|
|
|
175
|
+
declare const COMMAND_DESCRIPTIONS: {
|
|
176
|
+
lint: string;
|
|
177
|
+
'lint:fix': string;
|
|
178
|
+
'lint:inspect': string;
|
|
179
|
+
'lint-staged': string;
|
|
180
|
+
commitlint: string;
|
|
181
|
+
setup: string;
|
|
182
|
+
reset: string;
|
|
183
|
+
inspect: string;
|
|
184
|
+
'test:unit': string;
|
|
185
|
+
'test:e2e': string;
|
|
186
|
+
};
|
|
187
|
+
export { COMMAND_DESCRIPTIONS }
|
|
188
|
+
export { COMMAND_DESCRIPTIONS as COMMAND_DESCRIPTIONS_alias_1 }
|
|
189
|
+
export { COMMAND_DESCRIPTIONS as COMMAND_DESCRIPTIONS_alias_2 }
|
|
190
|
+
|
|
175
191
|
declare const COMMIT_LINT_CLI = "commitlint";
|
|
176
192
|
export { COMMIT_LINT_CLI }
|
|
177
193
|
export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_1 }
|
|
@@ -1468,19 +1484,15 @@ export { generateSlug }
|
|
|
1468
1484
|
export { generateSlug as generateSlug_alias_1 }
|
|
1469
1485
|
export { generateSlug as generateSlug_alias_2 }
|
|
1470
1486
|
|
|
1471
|
-
declare function getLatestPackageVersion(packageName: string
|
|
1487
|
+
declare function getLatestPackageVersion(packageName: string): Promise<string>;
|
|
1472
1488
|
export { getLatestPackageVersion }
|
|
1473
1489
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
|
|
1474
1490
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
|
|
1475
1491
|
|
|
1476
|
-
declare function
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
} | false;
|
|
1481
|
-
export { getPackageJson }
|
|
1482
|
-
export { getPackageJson as getPackageJson_alias_1 }
|
|
1483
|
-
export { getPackageJson as getPackageJson_alias_2 }
|
|
1492
|
+
declare function getPackage(packageName: string): I_GetPackage_2 | false;
|
|
1493
|
+
export { getPackage }
|
|
1494
|
+
export { getPackage as getPackage_alias_1 }
|
|
1495
|
+
export { getPackage as getPackage_alias_2 }
|
|
1484
1496
|
|
|
1485
1497
|
declare function getStorageDir(): string;
|
|
1486
1498
|
export { getStorageDir }
|
|
@@ -1529,11 +1541,14 @@ export { HOOK }
|
|
|
1529
1541
|
export { HOOK as HOOK_alias_1 }
|
|
1530
1542
|
export { HOOK as HOOK_alias_2 }
|
|
1531
1543
|
|
|
1532
|
-
|
|
1544
|
+
declare interface I_ApolloErrorViewerContext {
|
|
1533
1545
|
error: ApolloError | null;
|
|
1534
1546
|
showError: (error: ApolloError) => void;
|
|
1535
1547
|
hideError: () => void;
|
|
1536
1548
|
}
|
|
1549
|
+
export { I_ApolloErrorViewerContext }
|
|
1550
|
+
export { I_ApolloErrorViewerContext as I_ApolloErrorViewerContext_alias_1 }
|
|
1551
|
+
export { I_ApolloErrorViewerContext as I_ApolloErrorViewerContext_alias_2 }
|
|
1537
1552
|
|
|
1538
1553
|
declare interface I_ApolloErrorViewerContext_2 {
|
|
1539
1554
|
error: ApolloError | null;
|
|
@@ -1583,6 +1598,23 @@ declare interface I_ApolloProviderProps_2 {
|
|
|
1583
1598
|
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1584
1599
|
}
|
|
1585
1600
|
|
|
1601
|
+
declare interface I_CheckPackage {
|
|
1602
|
+
isCurrentProject: boolean;
|
|
1603
|
+
installedPath: string;
|
|
1604
|
+
file: T_PackageJson;
|
|
1605
|
+
isUpToDate: boolean;
|
|
1606
|
+
}
|
|
1607
|
+
export { I_CheckPackage }
|
|
1608
|
+
export { I_CheckPackage as I_CheckPackage_alias_1 }
|
|
1609
|
+
export { I_CheckPackage as I_CheckPackage_alias_2 }
|
|
1610
|
+
|
|
1611
|
+
declare interface I_CheckPackage_2 {
|
|
1612
|
+
isCurrentProject: boolean;
|
|
1613
|
+
installedPath: string;
|
|
1614
|
+
file: T_PackageJson_2;
|
|
1615
|
+
isUpToDate: boolean;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1586
1618
|
declare interface I_Command {
|
|
1587
1619
|
raw: boolean;
|
|
1588
1620
|
cmd: string;
|
|
@@ -1692,6 +1724,25 @@ declare interface I_GenericDocument_2 extends Partial<C_Document_2> {
|
|
|
1692
1724
|
updatedAt: string | Date;
|
|
1693
1725
|
}
|
|
1694
1726
|
|
|
1727
|
+
declare interface I_GetPackage {
|
|
1728
|
+
path: string;
|
|
1729
|
+
file: T_PackageJson;
|
|
1730
|
+
isCurrentProject: boolean;
|
|
1731
|
+
isDepend: boolean;
|
|
1732
|
+
isDevDepend: boolean;
|
|
1733
|
+
}
|
|
1734
|
+
export { I_GetPackage }
|
|
1735
|
+
export { I_GetPackage as I_GetPackage_alias_1 }
|
|
1736
|
+
export { I_GetPackage as I_GetPackage_alias_2 }
|
|
1737
|
+
|
|
1738
|
+
declare interface I_GetPackage_2 {
|
|
1739
|
+
path: string;
|
|
1740
|
+
file: T_PackageJson_2;
|
|
1741
|
+
isCurrentProject: boolean;
|
|
1742
|
+
isDepend: boolean;
|
|
1743
|
+
isDevDepend: boolean;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1695
1746
|
declare interface I_GraphqlCodegenConfig {
|
|
1696
1747
|
uri: string;
|
|
1697
1748
|
from: string;
|
|
@@ -2923,6 +2974,25 @@ export { T_OptionalUnlessRequiredId }
|
|
|
2923
2974
|
export { T_OptionalUnlessRequiredId as T_OptionalUnlessRequiredId_alias_1 }
|
|
2924
2975
|
export { T_OptionalUnlessRequiredId as T_OptionalUnlessRequiredId_alias_2 }
|
|
2925
2976
|
|
|
2977
|
+
declare interface T_PackageJson {
|
|
2978
|
+
name?: string;
|
|
2979
|
+
version?: string;
|
|
2980
|
+
dependencies?: Record<string, string>;
|
|
2981
|
+
devDependencies?: Record<string, string>;
|
|
2982
|
+
[key: string]: any;
|
|
2983
|
+
}
|
|
2984
|
+
export { T_PackageJson }
|
|
2985
|
+
export { T_PackageJson as T_PackageJson_alias_1 }
|
|
2986
|
+
export { T_PackageJson as T_PackageJson_alias_2 }
|
|
2987
|
+
|
|
2988
|
+
declare interface T_PackageJson_2 {
|
|
2989
|
+
name?: string;
|
|
2990
|
+
version?: string;
|
|
2991
|
+
dependencies?: Record<string, string>;
|
|
2992
|
+
devDependencies?: Record<string, string>;
|
|
2993
|
+
[key: string]: any;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2926
2996
|
declare type T_PaginateOptions = PaginateOptions;
|
|
2927
2997
|
export { T_PaginateOptions }
|
|
2928
2998
|
export { T_PaginateOptions as T_PaginateOptions_alias_1 }
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";function t(t,e){if(e==null||e>t.length)e=t.length;for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function e(t){if(Array.isArray(t))return t}function n(e){if(Array.isArray(e))return t(e)}function r(t,e,n,r,s,i,c){try{var a=t[i](c);var o=a.value}catch(t){n(t);return}if(a.done){e(o)}else{Promise.resolve(o).then(r,s)}}function s(t){return function(){var e=this,n=arguments;return new Promise(function(s,i){var c=t.apply(e,n);function a(t){r(c,s,i,a,o,"next",t)}function o(t){r(c,s,i,a,o,"throw",t)}a(undefined)})}}function i(t,e,n){if(e in t){Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true})}else{t[e]=n}return t}function c(t){if(typeof Symbol!=="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function a(t,e){var n=t==null?null:typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n==null)return;var r=[];var s=true;var i=false;var c,a;try{for(n=n.call(t);!(s=(c=n.next()).done);s=true){r.push(c.value);if(e&&r.length===e)break}}catch(t){i=true;a=t}finally{try{if(!s&&n["return"]!=null)n["return"]()}finally{if(i)throw a}}return r}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))}r.forEach(function(e){i(t,e,n[e])})}return t}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);if(e){r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})}n.push.apply(n,r)}return n}function d(t,e){e=e!=null?e:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(e))}else{f(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function p(t,n){return e(t)||a(t,n)||y(t,n)||o()}function g(t){return n(t)||c(t)||y(t)||u()}function h(t){"@swc/helpers - typeof";return t&&typeof Symbol!=="undefined"&&t.constructor===Symbol?"symbol":typeof t}function y(e,n){if(!e)return;if(typeof e==="string")return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor)r=e.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}function m(t,e){var n,r,s,i,c={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),"throw":a(1),"return":a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(t){return function(e){return o([t,e])}}function o(i){if(n)throw new TypeError("Generator is already executing.");while(c)try{if(n=1,r&&(s=i[0]&2?r["return"]:i[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;if(r=0,s)i=[i[0]&2,s.value];switch(i[0]){case 0:case 1:s=i;break;case 4:c.label++;return{value:i[1],done:false};case 5:c.label++;r=i[1];i=[0];continue;case 7:i=c.ops.pop();c.trys.pop();continue;default:if(!(s=c.trys,s=s.length>0&&s[s.length-1])&&(i[0]===6||i[0]===2)){c=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){c.label=i[1];break}if(i[0]===6&&c.label<s[1]){c.label=s[1];s=i;break}if(s&&c.label<s[2]){c.label=s[2];c.ops.push(i);break}if(s[2])c.ops.pop();c.trys.pop();continue}i=e.call(t,c)}catch(t){i=[6,t];r=0}finally{n=s=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var v=Object.create;var b=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var j=function(t,e,n,r){var s=true,i=false,c=undefined;if(e&&(typeof e==="undefined"?"undefined":h(e))=="object"||typeof e=="function")try{var a=function(){var s=u.value;!S.call(t,s)&&s!==n&&b(t,s,{get:function(){return e[s]},enumerable:!(r=_(e,s))||r.enumerable})};for(var o=E(e)[Symbol.iterator](),u;!(s=(u=o.next()).done);s=true)a()}catch(t){i=true;c=t}finally{try{if(!s&&o.return!=null){o.return()}}finally{if(i){throw c}}}return t};var w=function(t,e,n){return n=t!=null?v(I(t)):{},j(e||!t||!t.__esModule?b(n,"default",{value:t,enumerable:!0}):n,t)};var O=w(require("process"),1),N=require("yargs/helpers"),T=w(require("yargs/yargs"),1);var P=w(require("process"),1),C=P.default.env.DEBUG==="true";var x=w(require("process"),1);var D=require("child_process"),A=w(require("process"),1),L=w(require("util"),1);var R=w(require("chalk"),1),k=w(require("consola"),1),M=require("graphql");C||(k.default.level=4);function G(t){var e=R.default[t];return typeof e=="function"?e:R.default.green}var q={silent:k.default.silent,level:k.default.level,fatal:k.default.fatal,error:k.default.error,warn:k.default.warn,log:k.default.log,info:k.default.info,success:k.default.success,ready:k.default.ready,start:k.default.start,box:k.default.box,debug:k.default.debug,trace:k.default.trace,verbose:k.default.verbose,printBoxedLog:function t(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(e===null||e===void 0?void 0:e.length)){k.default.box(R.default.green(t));return}e.forEach(function(t){var e=t.file,r=t.position,s=t.rule,i=t.message;k.default.log("".concat(R.default.gray("File:")," ").concat(R.default.blue("".concat(e).concat(r?":".concat(r):"")))),s&&k.default.log(" ".concat(G(n)("Rule:")," ").concat(s)),k.default.log(" ".concat(G(n)("Message:")," ").concat(i))}),k.default.box(G(n)("".concat(t," : ").concat(e.length))),k.default.log(R.default.gray("─".repeat(40)))}};var F=w(require("node-fetch"),1);var K=w(require("fs"),1);function U(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}return e.every(function(t){return K.existsSync(t)})}function Y(t,e){var n=K.readFileSync(t,"utf-8");if(e===null||e===void 0?void 0:e.asJson)try{var r=JSON.parse(n);if((typeof r==="undefined"?"undefined":h(r))=="object"&&r!==null)return r;throw new Error("Parsed JSON is not an object or array")}catch(e){throw new Error("Failed to parse JSON from file: ".concat(t))}return n}function B(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,s=r===void 0?!1:r,i=s&&(typeof e==="undefined"?"undefined":h(e))=="object"?JSON.stringify(e,null,4):String(e);K.writeFileSync(t,i,"utf-8")}function J(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,s=r===void 0?!1:r,i=s&&(typeof e==="undefined"?"undefined":h(e))=="object"?JSON.stringify(e,null,4):String(e);K.appendFileSync(t,i,"utf-8")}function V(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}e.forEach(function(t){U(t)&&K.rmSync(t,{recursive:!0,force:!0})})}var W=w(require("path"),1);function X(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}var r;return(r=W).resolve.apply(r,[tO].concat(g(e)))}function H(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}var r;return(r=W).join.apply(r,g(e))}var $=w(require("node-persist"),1),z=w(require("os"),1),Q=w(require("process"),1);function Z(){return Q.default.env.CYBERSKILL_STORAGE_DIR||H(z.default.homedir(),tT)}function tt(){return te.apply(this,arguments)}function te(){te=s(function(){var t;return m(this,function(e){switch(e.label){case 0:t=$.default.defaultInstance;if(t)return[3,2];return[4,$.default.init({dir:Z(),stringify:JSON.stringify,parse:JSON.parse,encoding:"utf8",logging:!1,forgiveParseErrors:!0})];case 1:t=e.sent();e.label=2;case 2:t;return[2]}})});return te.apply(this,arguments)}var tn={get:function t(t){return s(function(){var e,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,tt()];case 1:r.sent();return[4,$.default.getItem(t)];case 2:return[2,(e=r.sent())!==null&&e!==void 0?e:null];case 3:n=r.sent();return[2,(q.error('[Storage:get] Error getting key "'.concat(t,'":'),n),null)];case 4:return[2]}})})()},set:function t(t,e){return s(function(){var n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,tt()];case 1:r.sent();return[4,$.default.setItem(t,e)];case 2:r.sent();return[3,4];case 3:n=r.sent();q.error('[Storage:set] Error setting key "'.concat(t,'":'),n);return[3,4];case 4:return[2]}})})()},remove:function t(t){return s(function(){var e;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,tt()];case 1:n.sent();return[4,$.default.removeItem(t)];case 2:n.sent();return[3,4];case 3:e=n.sent();q.error('[Storage:remove] Error removing key "'.concat(t,'":'),e);return[3,4];case 4:return[2]}})})()},keys:function t(){return s(function(){var t,e;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,tt()];case 1:n.sent();return[4,$.default.keys()];case 2:t=n.sent();return[2,Array.isArray(t)?t:(q.warn("[Storage:keys] Invalid keys response:",t),[])];case 3:e=n.sent();return[2,(q.error("[Storage:keys] Error getting keys:",e),[])];case 4:return[2]}})})()},getLogLink:function t(t){return s(function(){return m(this,function(e){try{return[2,"".concat(Z()," (key: ").concat(t,")")]}catch(t){return[2,(q.error("[Storage:getLogLink] Error getting log link:",t),null)]}return[2]})})()}};var tr=24*60*60*1e3;function ts(t){var e=H(tO,tx);if(U(e))try{var n=Y(e,{asJson:!0});if(n.name===t)return{path:e,file:n,isCurrentProject:!0}}catch(t){q.warn("Failed to read local package.json: ".concat(t.message))}var r=H(tO,tP,t,tx);if(U(r))try{var s=Y(r,{asJson:!0});if(s.name===t)return{path:r,file:s,isCurrentProject:!1}}catch(e){q.warn("Failed to read node_modules package.json for ".concat(t,": ").concat(e.message))}return!1}function ti(t){return tc.apply(this,arguments)}function tc(){tc=s(function(t){var e,n,r,s,i,c,a,o,u,l;var f=arguments;return m(this,function(d){switch(d.label){case 0:e=f.length>1&&f[1]!==void 0?f[1]:!1;n="npm_version:".concat(t),r="npm_metadata:".concat(t);return[4,tn.get(n)];case 1:s=d.sent();return[4,tn.get(r)];case 2:i=d.sent(),c=s&&Date.now()-s.timestamp<tr;if(!e&&c)return[2,s.version];a={};(i===null||i===void 0?void 0:i.etag)&&(a["If-None-Match"]=i.etag),(i===null||i===void 0?void 0:i.lastModified)&&(a["If-Modified-Since"]=i.lastModified);d.label=3;case 3:d.trys.push([3,8,,9]);return[4,(0,F.default)("https://registry.npmjs.org/".concat(t,"/latest"),{headers:a})];case 4:o=d.sent();if(o.status===304&&s)return[2,s.version];if(!o.ok)throw new Error("Failed to fetch latest version: ".concat(o.statusText));return[4,o.json()];case 5:u=d.sent().version;return[4,tn.set(n,{version:u,timestamp:Date.now()})];case 6:d.sent();return[4,tn.set(r,{etag:o.headers.get("ETag")||void 0,lastModified:o.headers.get("Last-Modified")||void 0})];case 7:return[2,(d.sent(),u)];case 8:l=d.sent();if(q.error("Error fetching latest version for ".concat(t,": ").concat(l.message)),s)return[2,(q.warn("Falling back to cached version for ".concat(t,": ").concat(s.version)),s.version)];throw l;case 9:return[2]}})});return tc.apply(this,arguments)}function ta(t){return to.apply(this,arguments)}function to(){to=s(function(t){var e,n,r,s,i;return m(this,function(c){switch(c.label){case 0:e={isInstalled:!1,isCurrentProject:!1,installedPath:"",installedVersion:"",latestVersion:"",file:{}};c.label=1;case 1:c.trys.push([1,6,,7]);n=ts(t);r=n;if(!r)return[3,5];e.file=n.file,e.isInstalled=!0,e.installedPath=n.path,e.installedVersion=n.file.version,e.isCurrentProject=n.isCurrentProject;if(!n.isCurrentProject)return[3,2];s=n.file.version;return[3,4];case 2:return[4,ti(t,!0)];case 3:s=c.sent();c.label=4;case 4:r=e.latestVersion=s;c.label=5;case 5:return[2,(r,e)];case 6:i=c.sent();return[2,(q.error('Error checking package "'.concat(t,'": ').concat(i.message)),e)];case 7:return[2]}})});return to.apply(this,arguments)}var tu=L.promisify(D.exec);function tl(t){return"error_list:".concat(t)}function tf(t){return td.apply(this,arguments)}function td(){td=s(function(t){var e,n,r;return m(this,function(i){switch(i.label){case 0:if(t.length===0)return[2];e=Date.now(),n=tl(e);i.label=1;case 1:i.trys.push([1,3,,4]);return[4,tn.set(n,{errors:t,timestamp:e})];case 2:i.sent(),setTimeout(/*#__PURE__*/s(function(){var t;return m(this,function(e){switch(e.label){case 0:return[4,tn.getLogLink(n)];case 1:t=e.sent();t&&q.info("\uD83D\uDCC2 Open the error list manually: ".concat(t));return[2]}})}),10);return[3,4];case 3:r=i.sent();q.error("Failed to save errors: ".concat(r.message));return[3,4];case 4:return[2]}})});return td.apply(this,arguments)}function tp(){return tg.apply(this,arguments)}function tg(){tg=s(function(){var t,e,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,tn.keys()];case 1:t=r.sent(),e=Array.isArray(t)?t.filter(function(t){var e;return t===null||t===void 0?void 0:(e=t.startsWith)===null||e===void 0?void 0:e.call(t,"error_list:")}):[];return[4,Promise.all(e.map(/*#__PURE__*/function(){var t=s(function(t){var e;return m(this,function(n){switch(n.label){case 0:return[4,tn.get(t)];case 1:return[2,((e=n.sent())===null||e===void 0?void 0:e.errors)||[]]}})});return function(e){return t.apply(this,arguments)}}()))];case 2:return[2,r.sent().flat()];case 3:n=r.sent();return[2,(q.error("Failed to retrieve stored errors: ".concat(n.message)),[])];case 4:return[2]}})});return tg.apply(this,arguments)}function th(){return ty.apply(this,arguments)}function ty(){ty=s(function(){var t,e,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,tn.keys()];case 1:t=r.sent(),e=Array.isArray(t)?t.filter(function(t){var e;return t===null||t===void 0?void 0:(e=t.startsWith)===null||e===void 0?void 0:e.call(t,"error_list:")}):[];return[4,Promise.all(e.map(function(t){return tn.remove(t)}))];case 2:r.sent();return[3,4];case 3:n=r.sent();q.error("Failed to clear error lists: ".concat(n.message));return[3,4];case 4:return[2]}})});return ty.apply(this,arguments)}function tm(t){var e=[],n=[],r="",s=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,i=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,c=/^✖\s+(.*?)\s+\[(.*?)\]$/;t.split("\n").forEach(function(t){if(t.startsWith("/"))r=t.trim();else{var a=s.exec(t)||[],o=i.exec(t)||[],u=c.exec(t)||[];a.length&&r?e.push({file:r,position:"".concat(a[1],":").concat(a[2]),type:a[3]==="error"?"error":"warning",message:a[4].trim(),rule:a[5].trim()}):o.length?e.push({file:o[1],position:"".concat(o[2],":").concat(o[3]),type:o[4]==="error"?"error":"warning",message:o[5].trim()}):u.length?e.push({file:"commitlint",type:"error",message:u[1].trim(),rule:u[2].trim()}):n.push(t.trim())}}),e.length&&tf(e),C&&n.length&&(q.warn("Unmatched lines:"),n.forEach(function(t){return q.info(" ".concat(t))}))}function tv(t){try{var e=JSON.parse(t),n=[];e.forEach(function(t){var e=t.filePath,r=t.messages;r.forEach(function(t){var r=t.severity,s=t.line,i=t.column,c=t.ruleId,a=t.message;n.push({type:r===2?"error":"warning",file:e,position:"".concat(s,":").concat(i),rule:c,message:a})})}),n.length&&tf(n)}catch(e){tm(t)}}function tb(t){return t_.apply(this,arguments)}function t_(){t_=s(function(t){var e,n,r,s,i,c,a,o,u;var l=arguments;return m(this,function(f){switch(f.label){case 0:e=l.length>1&&l[1]!==void 0?l[1]:tv;n=new AbortController;A.default.on("SIGINT",function(){q.warn("Process interrupted. Terminating..."),n.abort(),A.default.exit()});f.label=1;case 1:f.trys.push([1,3,,4]);return[4,tu(t,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=f.sent(),s=r.stdout,i=r.stderr;[s,i].forEach(function(t){return t&&e(t)});return[3,4];case 3:c=f.sent();a=c.stdout,o=c.stderr,u=c.message;[a,o].forEach(function(t){return t&&e(t)}),!o&&!a&&q.error("Command failed: ".concat(u));return[3,4];case 4:return[2]}})});return t_.apply(this,arguments)}function tE(t){return{raw:!0,cmd:t}}function tI(t,e){return(e===null||e===void 0?void 0:e.isRemote)?"".concat(t0," ").concat(tN," ").concat(t):(e===null||e===void 0?void 0:e.isCurrentProject)?"".concat(t0," ").concat(tQ," src/cli.ts ").concat(t):"".concat(t0," ").concat(tF," ").concat(t)}function tS(t,e){return typeof t=="function"?tI(t(e),e):(typeof t==="undefined"?"undefined":h(t))=="object"&&(t===null||t===void 0?void 0:t.raw)===!0?t.cmd:typeof t=="string"?tI(t,e):t}function tj(t){return tw.apply(this,arguments)}function tw(){tw=s(function(t){var e,n,r,s,i,c,a;var o=arguments;return m(this,function(u){switch(u.label){case 0:e=o.length>1&&o[1]!==void 0?o[1]:{};r=(n=e===null||e===void 0?void 0:e.isRemote)!==null&&n!==void 0?n:!1;if(!r)return[3,1];a=!1;return[3,3];case 1:return[4,ta(tN)];case 2:a=u.sent().isCurrentProject;u.label=3;case 3:s=a,i={isRemote:r,isCurrentProject:s},c=typeof t=="function"?t(i):t;return[2,Object.fromEntries(Object.entries(c).map(function(t){var e=p(t,2),n=e[0],r=e[1];return[n,tS(r,i)]}))]}})});return tw.apply(this,arguments)}var tO=x.default.env.INIT_CWD||x.default.cwd(),tN="@cyberskill/shared",tT=".cyberskill-storage",tP="node_modules",tC="dist",tx="package.json",tD="package-lock.json",tA="tsconfig.json",tL=".gitignore",tR=".simple-git-hooks.json",tk="pnpm-lock.yaml",tM=".git/hooks/",tG=".git/COMMIT_EDITMSG",tq=H(tO,tP,tN,tC),tF="cyberskill",tK="eslint",tU="eslint",tY="vitest",tB="playwright",tJ="vitest",tV="@commitlint/cli",tW="commitlint",tX="lint-staged",tH="lint-staged",t$="typescript",tz="tsc",tQ="tsx",tZ="git",t1="pnpm",t0="pnpm exec",t2="simple-git-hooks",t4="simple-git-hooks",t3="@eslint/config-inspector",t6="eslint-config-inspector",t5="node-modules-inspector",t8="node-modules-inspector",t7={CYBERSKILL_DIRECTORY:tq,WORKING_DIRECTORY:tO,TS_CONFIG:X(tA),GIT_IGNORE:X(tL),GIT_HOOK:X(tM),GIT_COMMIT_MSG:X(tG),SIMPLE_GIT_HOOKS_JSON:X(tR),PACKAGE_JSON:X(tx),PACKAGE_LOCK_JSON:X(tD),PNPM_LOCK_YAML:X(tk),NODE_MODULES:X(tP),CYBERSKILL:{LINT_STAGED_CONFIG:X("".concat(tq,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:X("".concat(tq,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:X("".concat(tq,"/configs/vitest/react/unit.js")),UNIT_TEST_SETUP_CONFIG:X("".concat(tq,"/configs/vitest/react/unit.setup.js")),E2E_TEST_CONFIG:X("".concat(tq,"/configs/vitest/react/e2e.js"))}};function t9(t){var e=t.isCurrentProject;return l({"pre-commit":tH,"commit-msg":tW},e&&{"pre-push":tE("".concat(tZ," pull"))})}function et(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++){n[r-1]=arguments[r]}var s=p(n,2),i=s[0],c=s[1],a=t==="RAW"?!0:U.apply(void 0,g(i.split(" ").map(function(t){return H(t7.NODE_MODULES,t)})));switch(t){case"PNPM_ADD_AND_EXEC":return tS(tE("".concat(a?"":"".concat(t1," add ").concat(i," && ")).concat(t0," ").concat(c)));case"PNPM_ADD_DEV_AND_EXEC":return tS(tE("".concat(a?"":"".concat(t1," add -D ").concat(i," && ")).concat(t0," ").concat(c)));case"RAW":return tS(tE(i))}}var ee={SIMPLE_GIT_HOOKS:et("PNPM_ADD_DEV_AND_EXEC",t2,t4),ESLINT_INSPECT:et("PNPM_ADD_DEV_AND_EXEC",t3,t6),NODE_MODULES_INSPECT:et("PNPM_ADD_DEV_AND_EXEC",t5,t8),ESLINT_CHECK:et("PNPM_ADD_DEV_AND_EXEC",tK,"".concat(tU," ").concat(t7.WORKING_DIRECTORY)),ESLINT_FIX:et("PNPM_ADD_DEV_AND_EXEC",tK,"".concat(tU," ").concat(t7.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:et("PNPM_ADD_AND_EXEC",t$,"".concat(tz," -p ").concat(t7.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:et("RAW","".concat(tZ," config core.hooksPath ").concat(t7.GIT_HOOK)),BUILD:et("RAW","".concat(t1," run build")),STAGE_BUILD_DIRECTORY:et("RAW","".concat(tZ," add ").concat(tC)),PNPM_INSTALL_STANDARD:et("RAW","".concat(t1," install")),PNPM_INSTALL_LEGACY:et("RAW","".concat(t1," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:et("RAW","".concat(t1," install --force")),CYBERSKILL:{TEST_UNIT:et("PNPM_ADD_AND_EXEC",tY,"".concat(tJ," --config ").concat(t7.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:et("PNPM_ADD_AND_EXEC","".concat(tY," ").concat(tB),"".concat(tJ," --config ").concat(t7.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:et("PNPM_ADD_DEV_AND_EXEC",tV,"".concat(tW," --edit ").concat(t7.GIT_COMMIT_MSG," --config ").concat(t7.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:et("PNPM_ADD_DEV_AND_EXEC",tX,"".concat(tH," --config ").concat(t7.CYBERSKILL.LINT_STAGED_CONFIG))}};var en={name:"@cyberskill/shared",type:"module",version:"1.62.0",description:"CyberSkill Shared",author:"Stephen Cheng",license:"MIT",homepage:"https://github.com/cyberskill-world/shared#readme",repository:{type:"git",url:"git+https://github.com/cyberskill-world/shared.git"},bugs:{url:"https://github.com/cyberskill-world/shared/issues"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./configs":{types:"./dist/configs/index.d.ts",import:"./dist/configs/index.js",require:"./dist/configs/index.cjs"},"./configs/commitlint":{types:"./dist/configs/commitlint/base.d.ts",import:"./dist/configs/commitlint/base.js",require:"./dist/configs/commitlint/base.cjs"},"./configs/eslint":{types:"./dist/configs/eslint/base.d.ts",import:"./dist/configs/eslint/base.js",require:"./dist/configs/eslint/base.cjs"},"./configs/graphql":{types:"./dist/configs/graphql/index.d.ts",import:"./dist/configs/graphql/index.js",require:"./dist/configs/graphql/index.cjs"},"./configs/i18n/react":{types:"./dist/configs/i18n/react/index.d.ts",import:"./dist/configs/i18n/react/index.js",require:"./dist/configs/i18n/react/index.cjs"},"./configs/lint-staged":{types:"./dist/configs/lint-staged/base.d.ts",import:"./dist/configs/lint-staged/base.js",require:"./dist/configs/lint-staged/base.cjs"},"./configs/vitest/react/e2e":{types:"./dist/configs/vitest/react/e2e.d.ts",import:"./dist/configs/vitest/react/e2e.js",require:"./dist/configs/vitest/react/e2e.cjs"},"./configs/vitest/react/unit":{types:"./dist/configs/vitest/react/unit.d.ts",import:"./dist/configs/vitest/react/unit.js",require:"./dist/configs/vitest/react/unit.cjs"},"./constants":{types:"./dist/constants/index.d.ts",import:"./dist/constants/index.js",require:"./dist/constants/index.cjs"},"./nodejs":{types:"./dist/nodejs/index.d.ts",import:"./dist/nodejs/index.js",require:"./dist/nodejs/index.cjs"},"./nodejs/mongo":{types:"./dist/nodejs/mongo.d.ts",import:"./dist/nodejs/mongo.js",require:"./dist/nodejs/mongo.cjs"},"./react":{types:"./dist/react/index.d.ts",import:"./dist/react/index.js",require:"./dist/react/index.cjs"},"./react/apollo-client":{types:"./dist/react/apollo-client.d.ts",import:"./dist/react/apollo-client.js",require:"./dist/react/apollo-client.cjs"},"./react/loading":{types:"./dist/react/loading.d.ts",import:"./dist/react/loading.js",require:"./dist/react/loading.cjs"},"./react/next-intl":{types:"./dist/react/next-intl.d.ts",import:"./dist/react/next-intl.js",require:"./dist/react/next-intl.cjs"},"./react/storage":{types:"./dist/react/storage.d.ts",import:"./dist/react/storage.js",require:"./dist/react/storage.cjs"},"./styles/reset.css":{import:"./dist/styles/reset.css",require:"./dist/styles/reset.css"},"./typescript":{types:"./dist/typescript/index.d.ts",import:"./dist/typescript/index.js",require:"./dist/typescript/index.cjs"},"./utils":{types:"./dist/utils/index.d.ts",import:"./dist/utils/index.js",require:"./dist/utils/index.cjs"},"./utils-nodejs":{types:"./dist/utils/index-nodejs.d.ts",import:"./dist/utils/index-nodejs.js",require:"./dist/utils/index-nodejs.cjs"}},main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",bin:{cyberskill:"./dist/cli.js"},files:["dist","public"],scripts:{build:"tsup",dev:"dotenv -e .env -- tsup --watch",lint:"dotenv -e .env -- tsx src/cli.ts lint","lint:fix":"dotenv -e .env -- tsx src/cli.ts lint:fix","lint:inspect":"dotenv -e .env -- tsx src/cli.ts lint:inspect",reset:"dotenv -e .env -- tsx src/cli.ts reset",setup:"dotenv -e .env -- tsx src/cli.ts setup",inspect:"dotenv -e .env -- tsx src/cli.ts inspect","test:unit":"dotenv -e .env -- tsx src/cli.ts test:unit","test:e2e":"dotenv -e .env -- tsx src/cli.ts test:e2e",commitlint:"dotenv -e .env -- tsx src/cli.ts commitlint","lint-staged":"dotenv -e .env -- tsx src/cli.ts lint-staged"},dependencies:{"@antfu/eslint-config":"4.11.0","@apollo/client":"3.13.6","@eslint-react/eslint-plugin":"1.40.3","@graphql-codegen/cli":"5.0.5","@graphql-codegen/client-preset":"4.8.0","@graphql-codegen/typescript-react-apollo":"4.3.2","@microsoft/api-extractor":"7.52.3","@next/eslint-plugin-next":"15.2.4","@swc/core":"1.11.16","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.0","@vitejs/plugin-react-swc":"3.8.1","@vitest/browser":"3.1.1",chalk:"5.4.1",classnames:"2.5.1",consola:"3.4.2","crypto-js":"4.2.0","date-fns":"4.1.0","dotenv-cli":"8.0.0","eslint-config-next":"15.2.4","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.19",globals:"16.0.0",graphql:"16.10.0","graphql-ws":"6.0.4",i18next:"24.2.3",jsdom:"26.0.0",localforage:"1.10.0","modern-normalize":"3.0.1",mongodb:"6.15.0",mongoose:"8.13.2","mongoose-aggregate-paginate-v2":"1.1.4","mongoose-paginate-v2":"1.9.0","next-intl":"4.0.2","node-fetch":"3.3.2","node-persist":"4.0.4",ora:"8.2.0",playwright:"1.51.1","postcss-modules":"6.0.1",qs:"6.14.0",react:"19.1.0","react-dom":"19.1.0","react-hot-toast":"2.5.2","react-i18next":"15.4.1","react-icons":"5.5.0",sass:"1.86.3",slugify:"1.6.6",tsup:"8.4.0",tsx:"4.19.3",typescript:"5.8.3",unorm:"1.6.0",uuid:"11.1.0",vite:"6.2.5",vitest:"3.1.1","vitest-browser-react":"0.1.1",yargs:"17.7.2"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},devDependencies:{"@commitlint/cli":"19.8.0","@eslint/config-inspector":"1.0.2","@types/crypto-js":"4.2.2","@types/mongoose-aggregate-paginate-v2":"1.0.12","@types/node-persist":"3.1.8","@types/react":"19.1.0","@types/react-dom":"19.1.1","@types/unorm":"1.3.31","@types/uuid":"10.0.0","@types/yargs":"17.0.33",eslint:"9.24.0","lint-staged":"15.5.0","node-modules-inspector":"0.6.2","simple-git-hooks":"2.12.1"}};function er(t,e){return es.apply(this,arguments)}function es(){es=s(function(t,e){var n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);q.start("".concat(t)),C&&q.info("→ ".concat(e));return[4,tb(e)];case 1:r.sent(),q.success("".concat(t," done."));return[3,3];case 2:n=r.sent();throw q.error("".concat(t," failed: ").concat(n.message)),n;case 3:return[2]}})});return es.apply(this,arguments)}function ei(){return ec.apply(this,arguments)}function ec(){ec=s(function(){var t;return m(this,function(e){switch(e.label){case 0:if(!U(t7.TS_CONFIG))return[3,2];return[4,er("Performing TypeScript validation",ee.TYPESCRIPT_CHECK)];case 1:t=e.sent();return[3,3];case 2:t=q.warn("No TypeScript configuration found. Skipping type check.");e.label=3;case 3:t;return[2]}})});return ec.apply(this,arguments)}function ea(){return eo.apply(this,arguments)}function eo(){eo=s(function(){var t,e;var n=arguments;return m(this,function(r){switch(r.label){case 0:t=n.length>0&&n[0]!==void 0?n[0]:!1;if(!t)return[3,2];return[4,er("Running ESLint with auto-fix",ee.ESLINT_FIX)];case 1:e=r.sent();return[3,4];case 2:return[4,er("Running ESLint check",ee.ESLINT_CHECK)];case 3:e=r.sent();r.label=4;case 4:e;return[2]}})});return eo.apply(this,arguments)}function eu(t,e){if(!e.length)return;var n=t==="Errors"?"red":"yellow";q.printBoxedLog(t==="Errors"?"✖ Errors":"⚠ Warnings",e,n)}function el(){return ef.apply(this,arguments)}function ef(){ef=s(function(){var t,e,n;return m(this,function(r){switch(r.label){case 0:return[4,tp()];case 1:t=r.sent(),e=t.filter(function(t){return t.type==="error"}),n=t.filter(function(t){return t.type==="warning"});!e.length&&!n.length?q.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(eu("Warnings",n),eu("Errors",e));return[2]}})});return ef.apply(this,arguments)}function ed(){return ep.apply(this,arguments)}function ep(){ep=s(function(){var t,e,n;return m(this,function(r){switch(r.label){case 0:return[4,th()];case 1:r.sent();return[4,ta(tN)];case 2:t=r.sent(),e=t.isCurrentProject;if(!e)return[3,7];r.label=3;case 3:r.trys.push([3,6,,7]);return[4,er("Building package: ".concat(tN),ee.BUILD)];case 4:r.sent();return[4,er("Staging build artifacts",ee.STAGE_BUILD_DIRECTORY)];case 5:r.sent();return[3,7];case 6:n=r.sent();throw q.error("Error building and staging ".concat(tN,": ").concat(n.message)),n;case 7:return[4,er("Executing lint-staged",ee.CYBERSKILL.LINT_STAGED)];case 8:r.sent(),el();return[2]}})});return ep.apply(this,arguments)}function eg(){return eh.apply(this,arguments)}function eh(){eh=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,er("Inspecting ESLint configuration",ee.ESLINT_INSPECT)];case 1:t.sent();return[2]}})});return eh.apply(this,arguments)}function ey(){return em.apply(this,arguments)}function em(){em=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,th()];case 1:t.sent();return[4,Promise.all([ei(),ea()])];case 2:t.sent(),el();return[2]}})});return em.apply(this,arguments)}function ev(){return eb.apply(this,arguments)}function eb(){eb=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,th()];case 1:t.sent();return[4,Promise.all([ei(),ea(!0)])];case 2:t.sent(),el();return[2]}})});return eb.apply(this,arguments)}function e_(){return eE.apply(this,arguments)}function eE(){eE=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,th()];case 1:t.sent();return[4,er("Validating commit message",ee.CYBERSKILL.COMMIT_LINT)];case 2:t.sent(),el();return[2]}})});return eE.apply(this,arguments)}function eI(){return eS.apply(this,arguments)}function eS(){eS=s(function(){var t,e;return m(this,function(n){switch(n.label){case 0:return[4,er("Configuring Git hooks",ee.CONFIGURE_GIT_HOOK)];case 1:n.sent(),V(t7.GIT_HOOK);return[4,tj(t9)];case 2:t=n.sent();B(t7.SIMPLE_GIT_HOOKS_JSON,t,{isJson:!0});e="\n".concat(tR,"\n");U(t7.GIT_IGNORE)?Y(t7.GIT_IGNORE).split("\n").includes(tR)||J(t7.GIT_IGNORE,e):B(t7.GIT_IGNORE,e);return[4,er("Setting up simple-git-hooks",ee.SIMPLE_GIT_HOOKS)];case 3:n.sent();return[2]}})});return eS.apply(this,arguments)}function ej(){return ew.apply(this,arguments)}function ew(){ew=s(function(){var t,e,n,r,s,i,c,a,o,u,l;return m(this,function(f){switch(f.label){case 0:t=[{command:ee.PNPM_INSTALL_STANDARD,message:"Installing dependencies (standard)"},{command:ee.PNPM_INSTALL_LEGACY,message:"Retrying with legacy peer dependencies"},{command:ee.PNPM_INSTALL_FORCE,message:"Retrying with force install"}];e=true,n=false,r=undefined;f.label=1;case 1:f.trys.push([1,8,9,10]);s=t[Symbol.iterator]();f.label=2;case 2:if(!!(e=(i=s.next()).done))return[3,7];c=i.value,a=c.command,o=c.message;f.label=3;case 3:f.trys.push([3,5,,6]);return[4,er("".concat(o," using: ").concat(a),a)];case 4:f.sent();return[2];case 5:u=f.sent();q.warn("Installation attempt failed: ".concat(a)),q.error("Details: ".concat(u.message));return[3,6];case 6:e=true;return[3,2];case 7:return[3,10];case 8:l=f.sent();n=true;r=l;return[3,10];case 9:try{if(!e&&s.return!=null){s.return()}}finally{if(n){throw r}}return[7];case 10:throw new Error("All dependency installation strategies failed.")}})});return ew.apply(this,arguments)}function eO(t,e){return eN.apply(this,arguments)}function eN(){eN=s(function(t,e){var n,r,s,c,a,o,u,f,p,g,h,y,v,b,_,E,I;return m(this,function(m){switch(m.label){case 0:if(!U(t7.PACKAGE_JSON)){q.error("package.json not found. Aborting setup.");return[2]}m.label=1;case 1:m.trys.push([1,14,,15]);return[4,ta(t)];case 2:r=m.sent(),s=r.isInstalled,c=r.installedVersion,a=r.latestVersion,o=r.isCurrentProject,u=r.installedPath,f=r.file;p=true,g=false,h=undefined;y=!(o||s&&c===a)&&!(e===null||e===void 0?void 0:e.skipUpdate);if(!y)return[3,5];q.info('Updating "'.concat(t,'" from ').concat(c," to ").concat(a,"...")),f.dependencies=d(l({},f.dependencies),i({},t,a)),B(u,f,{isJson:!0});return[4,ej()];case 3:m.sent();return[4,ev()];case 4:y=m.sent();m.label=5;case 5:if(!(y,e===null||e===void 0?void 0:(n=e.postInstallActions)===null||n===void 0?void 0:n.length))return[3,13];m.label=6;case 6:m.trys.push([6,11,12,13]);v=e.postInstallActions[Symbol.iterator]();m.label=7;case 7:if(!!(p=(b=v.next()).done))return[3,10];_=b.value;return[4,_()];case 8:m.sent();m.label=9;case 9:p=true;return[3,7];case 10:return[3,13];case 11:E=m.sent();g=true;h=E;return[3,13];case 12:try{if(!p&&v.return!=null){v.return()}}finally{if(g){throw h}}return[7];case 13:q.success('"'.concat(t,'" setup completed.'));return[3,15];case 14:I=m.sent();throw q.error('Failed to setup "'.concat(t,'": ').concat(I.message)),I;case 15:return[2]}})});return eN.apply(this,arguments)}function eT(){return eP.apply(this,arguments)}function eP(){eP=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,eO(tN,{postInstallActions:[eI]})];case 1:t.sent();return[2]}})});return eP.apply(this,arguments)}function eC(){return ex.apply(this,arguments)}function ex(){ex=s(function(){return m(this,function(t){switch(t.label){case 0:V(t7.NODE_MODULES,t7.PNPM_LOCK_YAML);return[4,ej()];case 1:t.sent();return[4,eI()];case 2:t.sent();return[2]}})});return ex.apply(this,arguments)}function eD(){return eA.apply(this,arguments)}function eA(){eA=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,er("Inspecting project dependencies",ee.NODE_MODULES_INSPECT)];case 1:t.sent();return[2]}})});return eA.apply(this,arguments)}function eL(){return eR.apply(this,arguments)}function eR(){eR=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,er("Running unit tests",ee.CYBERSKILL.TEST_UNIT)];case 1:t.sent();return[2]}})});return eR.apply(this,arguments)}function ek(){return eM.apply(this,arguments)}function eM(){eM=s(function(){return m(this,function(t){switch(t.label){case 0:return[4,er("Running end-to-end tests",ee.CYBERSKILL.TEST_E2E)];case 1:t.sent();return[2]}})});return eM.apply(this,arguments)}var eG={lint:"Check code for linting issues","lint:fix":"Fix linting issues automatically","lint:inspect":"View active ESLint configuration","lint-staged":"Run lint checks on staged files",commitlint:"Validate commit message format",setup:"Initialize project setup and dependencies",reset:"Reset the project and reinstall dependencies",inspect:"Analyze installed project dependencies","test:unit":"Run unit test suite","test:e2e":"Run end-to-end test suite"};s(function(){var t;return m(this,function(e){switch(e.label){case 0:e.trys.push([0,2,,3]);return[4,(0,T.default)((0,N.hideBin)(O.default.argv)).scriptName(tF).usage("$0 <command> [options]").command("lint",eG.lint,ey).command("lint:fix",eG["lint:fix"],ev).command("lint:inspect",eG["lint:inspect"],eg).command("lint-staged",eG["lint-staged"],ed).command("commitlint",eG.commitlint,e_).command("setup",eG.setup,eT).command("reset",eG.reset,eC).command("inspect",eG.inspect,eD).command("test:unit",eG["test:unit"],eL).command("test:e2e",eG["test:e2e"],ek).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(en.version).epilog('\uD83D\uDCA1 Tip: Use "--help" with any command to see options\n').parse()];case 1:e.sent();return[3,3];case 2:t=e.sent();q.error("Fatal: ".concat(t.message)),O.default.exit(1);return[3,3];case 3:return[2]}})})();
|
|
2
|
+
"use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(t){if(Array.isArray(t))return e(t)}function r(e,t,n,r,s,i,c){try{var o=e[i](c);var a=o.value}catch(e){n(e);return}if(o.done){t(a)}else{Promise.resolve(a).then(r,s)}}function s(e){return function(){var t=this,n=arguments;return new Promise(function(s,i){var c=e.apply(t,n);function o(e){r(c,s,i,o,a,"next",e)}function a(e){r(c,s,i,o,a,"throw",e)}o(undefined)})}}function i(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function c(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var s=true;var i=false;var c,o;try{for(n=n.call(e);!(s=(c=n.next()).done);s=true){r.push(c.value);if(t&&r.length===t)break}}catch(e){i=true;o=e}finally{try{if(!s&&n["return"]!=null)n["return"]()}finally{if(i)throw o}}return r}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){i(e,t,n[t])})}return e}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);if(t){r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}n.push.apply(n,r)}return n}function f(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{d(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function p(e,n){return t(e)||o(e,n)||y(e,n)||a()}function g(e){return n(e)||c(e)||y(e)||u()}function h(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function y(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}function v(e,t){var n,r,s,i,c={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]};return i={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function o(e){return function(t){return a([e,t])}}function a(i){if(n)throw new TypeError("Generator is already executing.");while(c)try{if(n=1,r&&(s=i[0]&2?r["return"]:i[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;if(r=0,s)i=[i[0]&2,s.value];switch(i[0]){case 0:case 1:s=i;break;case 4:c.label++;return{value:i[1],done:false};case 5:c.label++;r=i[1];i=[0];continue;case 7:i=c.ops.pop();c.trys.pop();continue;default:if(!(s=c.trys,s=s.length>0&&s[s.length-1])&&(i[0]===6||i[0]===2)){c=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){c.label=i[1];break}if(i[0]===6&&c.label<s[1]){c.label=s[1];s=i;break}if(s&&c.label<s[2]){c.label=s[2];c.ops.push(i);break}if(s[2])c.ops.pop();c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e];r=0}finally{n=s=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var m=Object.create;var b=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var O=function(e,t,n,r){var s=true,i=false,c=undefined;if(t&&(typeof t==="undefined"?"undefined":h(t))=="object"||typeof t=="function")try{var o=function(){var s=u.value;!I.call(e,s)&&s!==n&&b(e,s,{get:function(){return t[s]},enumerable:!(r=E(t,s))||r.enumerable})};for(var a=_(t)[Symbol.iterator](),u;!(s=(u=a.next()).done);s=true)o()}catch(e){i=true;c=e}finally{try{if(!s&&a.return!=null){a.return()}}finally{if(i){throw c}}}return e};var j=function(e,t,n){return n=e!=null?m(S(e)):{},O(t||!e||!e.__esModule?b(n,"default",{value:e,enumerable:!0}):n,e)};var w=j(require("process"),1),N=require("yargs/helpers"),T=j(require("yargs/yargs"),1);var D={lint:"Check code for linting issues","lint:fix":"Fix linting issues automatically","lint:inspect":"View active ESLint configuration","lint-staged":"Run lint checks on staged files",commitlint:"Validate commit message format",setup:"Initialize project setup and dependencies",reset:"Reset the project and reinstall dependencies",inspect:"Analyze installed project dependencies","test:unit":"Run unit test suite","test:e2e":"Run end-to-end test suite"};var P=j(require("process"),1),C=P.default.env.DEBUG==="true";var x=j(require("process"),1);var A=require("child_process"),L=j(require("process"),1),R=j(require("util"),1);var k=j(require("chalk"),1),G=j(require("consola"),1),M=require("graphql");C||(G.default.level=4);function q(e){var t=k.default[e];return typeof t=="function"?t:k.default.green}var K={silent:G.default.silent,level:G.default.level,fatal:G.default.fatal,error:G.default.error,warn:G.default.warn,log:G.default.log,info:G.default.info,success:G.default.success,ready:G.default.ready,start:G.default.start,box:G.default.box,debug:G.default.debug,trace:G.default.trace,verbose:G.default.verbose,printBoxedLog:function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(t===null||t===void 0?void 0:t.length)){G.default.box(k.default.green(e));return}t.forEach(function(e){var t=e.file,r=e.position,s=e.rule,i=e.message;G.default.log("".concat(k.default.gray("File:")," ").concat(k.default.blue("".concat(t).concat(r?":".concat(r):"")))),s&&G.default.log(" ".concat(q(n)("Rule:")," ").concat(s)),G.default.log(" ".concat(q(n)("Message:")," ").concat(i))}),G.default.box(q(n)("".concat(e," : ").concat(t.length))),G.default.log(k.default.gray("─".repeat(40)))}};var F=j(require("node-fetch"),1);var U={isCurrentProject:!1,installedPath:"",file:{},isUpToDate:!1};var Y=j(require("fs"),1);function B(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return t.every(function(e){return Y.existsSync(e)})}function J(e,t){var n=Y.readFileSync(e,"utf-8");if(t===null||t===void 0?void 0:t.asJson)try{var r=JSON.parse(n);if((typeof r==="undefined"?"undefined":h(r))=="object"&&r!==null)return r;throw new Error("Parsed JSON is not an object or array")}catch(t){throw new Error("Failed to parse JSON from file: ".concat(e))}return n}function W(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,s=r===void 0?!1:r,i=s&&(typeof t==="undefined"?"undefined":h(t))=="object"?JSON.stringify(t,null,4):String(t);Y.writeFileSync(e,i,"utf-8")}function X(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,s=r===void 0?!1:r,i=s&&(typeof t==="undefined"?"undefined":h(t))=="object"?JSON.stringify(t,null,4):String(t);Y.appendFileSync(e,i,"utf-8")}function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}t.forEach(function(e){B(e)&&Y.rmSync(e,{recursive:!0,force:!0})})}var V=j(require("path"),1);function $(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=V).resolve.apply(r,[eT].concat(g(t)))}function z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=V).join.apply(r,g(t))}var Q={};function Z(e){if(e in Q)return Q[e];var t=z(eT,eA);if(!B(t))return Q[e]=!1;try{var n,r;var s=J(t,{asJson:!0}),i=s.name===e,c=!!((n=s.dependencies)===null||n===void 0?void 0:n[e]),o=!!((r=s.devDependencies)===null||r===void 0?void 0:r[e]);return i||c||o?Q[e]={path:t,file:s,isCurrentProject:i,isDepend:c,isDevDepend:o}:Q[e]=!1}catch(t){return K.warn("Failed to read package.json: ".concat(t.message)),Q[e]=!1}}function ee(e){return et.apply(this,arguments)}function et(){et=s(function(e){var t,n,r,s;return v(this,function(i){switch(i.label){case 0:i.trys.push([0,3,,4]);return[4,(0,F.default)("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:t=i.sent();if(!t.ok)throw new Error("Failed to fetch latest version: ".concat(t.status," ").concat(t.statusText));return[4,t.json()];case 2:n=i.sent(),r=n.version;return[2,r];case 3:s=i.sent();throw K.error('Failed to fetch version for "'.concat(e,'": ').concat(s.message)),s;case 4:return[2]}})});return et.apply(this,arguments)}function en(e,t){return er.apply(this,arguments)}function er(){er=s(function(e,t){var n,r,s,c,o,a,u,d,p,g,h,y,m,b,E;return v(this,function(v){switch(v.label){case 0:v.trys.push([0,4,,5]);o=Z(e);if(!o)return[2,l({},U)];a=o.path,u=o.file,d=o.isCurrentProject,p=o.isDepend,g=o.isDevDepend,h="0.0.0";d&&u.version?h=u.version:p&&((n=u.dependencies)===null||n===void 0?void 0:n[e])?h=(r=u.dependencies)===null||r===void 0?void 0:r[e]:g&&((s=u.devDependencies)===null||s===void 0?void 0:s[e])&&(h=(c=u.devDependencies)===null||c===void 0?void 0:c[e]);if(!d)return[3,1];b=h;return[3,3];case 1:return[4,ee(e)];case 2:b=v.sent();v.label=3;case 3:y=b,m=d||h===y;return[2,(!m&&(t===null||t===void 0?void 0:t.update)&&(p?u.dependencies=f(l({},u.dependencies||{}),i({},e,y)):g&&(u.devDependencies=f(l({},u.devDependencies||{}),i({},e,y))),K.info('Updating package "'.concat(e,'" to version ').concat(y)),W(a,u,{isJson:!0})),{isCurrentProject:d,installedPath:a,file:u,isUpToDate:m})];case 4:E=v.sent();return[2,(K.error('Error checking package "'.concat(e,'": ').concat(E.message)),l({},U))];case 5:return[2]}})});return er.apply(this,arguments)}var es=j(require("node-persist"),1),ei=j(require("os"),1),ec=j(require("process"),1);function eo(){return ec.default.env.CYBERSKILL_STORAGE_DIR||z(ei.default.homedir(),eP)}function ea(){return eu.apply(this,arguments)}function eu(){eu=s(function(){var e;return v(this,function(t){switch(t.label){case 0:e=es.default.defaultInstance;if(e)return[3,2];return[4,es.default.init({dir:eo(),stringify:JSON.stringify,parse:JSON.parse,encoding:"utf8",logging:!1,forgiveParseErrors:!0})];case 1:e=t.sent();t.label=2;case 2:e;return[2]}})});return eu.apply(this,arguments)}var el={get:function e(e){return s(function(){var t,n;return v(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ea()];case 1:r.sent();return[4,es.default.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,(K.error('[Storage:get] Error getting key "'.concat(e,'":'),n),null)];case 4:return[2]}})})()},set:function e(e,t){return s(function(){var n;return v(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ea()];case 1:r.sent();return[4,es.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();K.error('[Storage:set] Error setting key "'.concat(e,'":'),n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return s(function(){var t;return v(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,ea()];case 1:n.sent();return[4,es.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();K.error('[Storage:remove] Error removing key "'.concat(e,'":'),t);return[3,4];case 4:return[2]}})})()},keys:function e(){return s(function(){var e,t;return v(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,ea()];case 1:n.sent();return[4,es.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(K.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,(K.error("[Storage:keys] Error getting keys:",t),[])];case 4:return[2]}})})()},getLogLink:function e(e){return s(function(){return v(this,function(t){try{return[2,"".concat(eo()," (key: ").concat(e,")")]}catch(e){return[2,(K.error("[Storage:getLogLink] Error getting log link:",e),null)]}return[2]})})()}};var ed=R.promisify(A.exec);function ef(e){return"error_list:".concat(e)}function ep(e){return eg.apply(this,arguments)}function eg(){eg=s(function(e){var t,n,r;return v(this,function(i){switch(i.label){case 0:if(e.length===0)return[2];t=Date.now(),n=ef(t);i.label=1;case 1:i.trys.push([1,3,,4]);return[4,el.set(n,{errors:e,timestamp:t})];case 2:i.sent(),setTimeout(/*#__PURE__*/s(function(){var e;return v(this,function(t){switch(t.label){case 0:return[4,el.getLogLink(n)];case 1:e=t.sent();e&&K.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})}),10);return[3,4];case 3:r=i.sent();K.error("Failed to save errors: ".concat(r.message));return[3,4];case 4:return[2]}})});return eg.apply(this,arguments)}function eh(){return ey.apply(this,arguments)}function ey(){ey=s(function(){var e,t,n;return v(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,el.keys()];case 1:e=r.sent(),t=Array.isArray(e)?e.filter(function(e){var t;return e===null||e===void 0?void 0:(t=e.startsWith)===null||t===void 0?void 0:t.call(e,"error_list:")}):[];return[4,Promise.all(t.map(/*#__PURE__*/function(){var e=s(function(e){var t;return v(this,function(n){switch(n.label){case 0:return[4,el.get(e)];case 1:return[2,((t=n.sent())===null||t===void 0?void 0:t.errors)||[]]}})});return function(t){return e.apply(this,arguments)}}()))];case 2:return[2,r.sent().flat()];case 3:n=r.sent();return[2,(K.error("Failed to retrieve stored errors: ".concat(n.message)),[])];case 4:return[2]}})});return ey.apply(this,arguments)}function ev(){return em.apply(this,arguments)}function em(){em=s(function(){var e,t,n;return v(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,el.keys()];case 1:e=r.sent(),t=Array.isArray(e)?e.filter(function(e){var t;return e===null||e===void 0?void 0:(t=e.startsWith)===null||t===void 0?void 0:t.call(e,"error_list:")}):[];return[4,Promise.all(t.map(function(e){return el.remove(e)}))];case 2:r.sent();return[3,4];case 3:n=r.sent();K.error("Failed to clear error lists: ".concat(n.message));return[3,4];case 4:return[2]}})});return em.apply(this,arguments)}function eb(e){var t=[],n=[],r="",s=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,i=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,c=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var o=s.exec(e)||[],a=i.exec(e)||[],u=c.exec(e)||[];o.length&&r?t.push({file:r,position:"".concat(o[1],":").concat(o[2]),type:o[3]==="error"?"error":"warning",message:o[4].trim(),rule:o[5].trim()}):a.length?t.push({file:a[1],position:"".concat(a[2],":").concat(a[3]),type:a[4]==="error"?"error":"warning",message:a[5].trim()}):u.length?t.push({file:"commitlint",type:"error",message:u[1].trim(),rule:u[2].trim()}):n.push(e.trim())}}),t.length&&ep(t),C&&n.length&&(K.warn("Unmatched lines:"),n.forEach(function(e){return K.info(" ".concat(e))}))}function eE(e){try{var t=JSON.parse(e),n=[];t.forEach(function(e){var t=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,s=e.line,i=e.column,c=e.ruleId,o=e.message;n.push({type:r===2?"error":"warning",file:t,position:"".concat(s,":").concat(i),rule:c,message:o})})}),n.length&&ep(n)}catch(t){eb(e)}}function e_(e){return eS.apply(this,arguments)}function eS(){eS=s(function(e){var t,n,r,s,i,c,o,a,u;var l=arguments;return v(this,function(d){switch(d.label){case 0:t=l.length>1&&l[1]!==void 0?l[1]:eE;n=new AbortController;L.default.on("SIGINT",function(){K.warn("Process interrupted. Terminating..."),n.abort(),L.default.exit()});d.label=1;case 1:d.trys.push([1,3,,4]);return[4,ed(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=d.sent(),s=r.stdout,i=r.stderr;[s,i].forEach(function(e){return e&&t(e)});return[3,4];case 3:c=d.sent();o=c.stdout,a=c.stderr,u=c.message;[o,a].forEach(function(e){return e&&t(e)}),!a&&!o&&K.error("Command failed: ".concat(u));return[3,4];case 4:return[2]}})});return eS.apply(this,arguments)}function eI(e){return{raw:!0,cmd:e}}function eO(e,t){return(t===null||t===void 0?void 0:t.isRemote)?"".concat(e4," ").concat(eD," ").concat(e):(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(e4," ").concat(e0," src/cli.ts ").concat(e):"".concat(e4," ").concat(eU," ").concat(e)}function ej(e,t){return typeof e=="function"?eO(e(t),t):(typeof e==="undefined"?"undefined":h(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eO(e,t):e}function ew(e){return eN.apply(this,arguments)}function eN(){eN=s(function(e){var t,n,r,s,i,c,o;var a=arguments;return v(this,function(u){switch(u.label){case 0:t=a.length>1&&a[1]!==void 0?a[1]:{};r=(n=t===null||t===void 0?void 0:t.isRemote)!==null&&n!==void 0?n:!1;if(!r)return[3,1];o=!1;return[3,3];case 1:return[4,en(eD)];case 2:o=u.sent().isCurrentProject;u.label=3;case 3:s=o,i={isRemote:r,isCurrentProject:s},c=typeof e=="function"?e(i):e;return[2,Object.fromEntries(Object.entries(c).map(function(e){var t=p(e,2),n=t[0],r=t[1];return[n,ej(r,i)]}))]}})});return eN.apply(this,arguments)}var eT=x.default.env.INIT_CWD||x.default.cwd(),eD="@cyberskill/shared",eP=".cyberskill-storage",eC="node_modules",ex="dist",eA="package.json",eL="package-lock.json",eR="tsconfig.json",ek=".gitignore",eG=".simple-git-hooks.json",eM="pnpm-lock.yaml",eq=".git/hooks/",eK=".git/COMMIT_EDITMSG",eF=z(eT,eC,eD,ex),eU="cyberskill",eY="eslint",eB="eslint",eJ="vitest",eW="playwright",eX="vitest",eH="@commitlint/cli",eV="commitlint",e$="lint-staged",ez="lint-staged",eQ="typescript",eZ="tsc",e0="tsx",e1="git",e2="pnpm",e4="pnpm exec",e3="simple-git-hooks",e5="simple-git-hooks",e6="@eslint/config-inspector",e8="eslint-config-inspector",e7="node-modules-inspector",e9="node-modules-inspector",te={CYBERSKILL_DIRECTORY:eF,WORKING_DIRECTORY:eT,TS_CONFIG:$(eR),GIT_IGNORE:$(ek),GIT_HOOK:$(eq),GIT_COMMIT_MSG:$(eK),SIMPLE_GIT_HOOKS_JSON:$(eG),PACKAGE_JSON:$(eA),PACKAGE_LOCK_JSON:$(eL),PNPM_LOCK_YAML:$(eM),NODE_MODULES:$(eC),CYBERSKILL:{LINT_STAGED_CONFIG:$("".concat(eF,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:$("".concat(eF,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:$("".concat(eF,"/configs/vitest/react/unit.js")),UNIT_TEST_SETUP_CONFIG:$("".concat(eF,"/configs/vitest/react/unit.setup.js")),E2E_TEST_CONFIG:$("".concat(eF,"/configs/vitest/react/e2e.js"))}};function tt(e){var t=e.isCurrentProject;return l({"pre-commit":ez,"commit-msg":eV},t&&{"pre-push":eI("".concat(e1," pull"))})}function tn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}var s=p(n,2),i=s[0],c=s[1],o=e==="RAW"?!0:B.apply(void 0,g(i.split(" ").map(function(e){return z(te.NODE_MODULES,e)})));switch(e){case"PNPM_ADD_AND_EXEC":return ej(eI("".concat(o?"":"".concat(e2," add ").concat(i," && ")).concat(e4," ").concat(c)));case"PNPM_ADD_DEV_AND_EXEC":return ej(eI("".concat(o?"":"".concat(e2," add -D ").concat(i," && ")).concat(e4," ").concat(c)));case"RAW":return ej(eI(i))}}var tr={SIMPLE_GIT_HOOKS:tn("PNPM_ADD_DEV_AND_EXEC",e3,e5),ESLINT_INSPECT:tn("PNPM_ADD_DEV_AND_EXEC",e6,e8),NODE_MODULES_INSPECT:tn("PNPM_ADD_DEV_AND_EXEC",e7,e9),ESLINT_CHECK:tn("PNPM_ADD_DEV_AND_EXEC",eY,"".concat(eB," ").concat(te.WORKING_DIRECTORY)),ESLINT_FIX:tn("PNPM_ADD_DEV_AND_EXEC",eY,"".concat(eB," ").concat(te.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:tn("PNPM_ADD_AND_EXEC",eQ,"".concat(eZ," -p ").concat(te.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:tn("RAW","".concat(e1," config core.hooksPath ").concat(te.GIT_HOOK)),BUILD:tn("RAW","".concat(e2," run build")),STAGE_BUILD_DIRECTORY:tn("RAW","".concat(e1," add ").concat(ex)),PNPM_INSTALL_STANDARD:tn("RAW","".concat(e2," install")),PNPM_INSTALL_LEGACY:tn("RAW","".concat(e2," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:tn("RAW","".concat(e2," install --force")),CYBERSKILL:{TEST_UNIT:tn("PNPM_ADD_AND_EXEC",eJ,"".concat(eX," --config ").concat(te.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:tn("PNPM_ADD_AND_EXEC","".concat(eJ," ").concat(eW),"".concat(eX," --config ").concat(te.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:tn("PNPM_ADD_DEV_AND_EXEC",eH,"".concat(eV," --edit ").concat(te.GIT_COMMIT_MSG," --config ").concat(te.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:tn("PNPM_ADD_DEV_AND_EXEC",e$,"".concat(ez," --config ").concat(te.CYBERSKILL.LINT_STAGED_CONFIG))}};var ts={name:"@cyberskill/shared",type:"module",version:"1.63.0",description:"CyberSkill Shared",author:"Stephen Cheng",license:"MIT",homepage:"https://github.com/cyberskill-world/shared#readme",repository:{type:"git",url:"git+https://github.com/cyberskill-world/shared.git"},bugs:{url:"https://github.com/cyberskill-world/shared/issues"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./configs":{types:"./dist/configs/index.d.ts",import:"./dist/configs/index.js",require:"./dist/configs/index.cjs"},"./configs/commitlint":{types:"./dist/configs/commitlint/base.d.ts",import:"./dist/configs/commitlint/base.js",require:"./dist/configs/commitlint/base.cjs"},"./configs/eslint":{types:"./dist/configs/eslint/base.d.ts",import:"./dist/configs/eslint/base.js",require:"./dist/configs/eslint/base.cjs"},"./configs/graphql":{types:"./dist/configs/graphql/index.d.ts",import:"./dist/configs/graphql/index.js",require:"./dist/configs/graphql/index.cjs"},"./configs/i18n/react":{types:"./dist/configs/i18n/react/index.d.ts",import:"./dist/configs/i18n/react/index.js",require:"./dist/configs/i18n/react/index.cjs"},"./configs/lint-staged":{types:"./dist/configs/lint-staged/base.d.ts",import:"./dist/configs/lint-staged/base.js",require:"./dist/configs/lint-staged/base.cjs"},"./configs/vitest/react/e2e":{types:"./dist/configs/vitest/react/e2e.d.ts",import:"./dist/configs/vitest/react/e2e.js",require:"./dist/configs/vitest/react/e2e.cjs"},"./configs/vitest/react/unit":{types:"./dist/configs/vitest/react/unit.d.ts",import:"./dist/configs/vitest/react/unit.js",require:"./dist/configs/vitest/react/unit.cjs"},"./constants":{types:"./dist/constants/index.d.ts",import:"./dist/constants/index.js",require:"./dist/constants/index.cjs"},"./nodejs":{types:"./dist/nodejs/index.d.ts",import:"./dist/nodejs/index.js",require:"./dist/nodejs/index.cjs"},"./nodejs/mongo":{types:"./dist/nodejs/mongo.d.ts",import:"./dist/nodejs/mongo.js",require:"./dist/nodejs/mongo.cjs"},"./react":{types:"./dist/react/index.d.ts",import:"./dist/react/index.js",require:"./dist/react/index.cjs"},"./react/apollo-client":{types:"./dist/react/apollo-client.d.ts",import:"./dist/react/apollo-client.js",require:"./dist/react/apollo-client.cjs"},"./react/loading":{types:"./dist/react/loading.d.ts",import:"./dist/react/loading.js",require:"./dist/react/loading.cjs"},"./react/next-intl":{types:"./dist/react/next-intl.d.ts",import:"./dist/react/next-intl.js",require:"./dist/react/next-intl.cjs"},"./react/storage":{types:"./dist/react/storage.d.ts",import:"./dist/react/storage.js",require:"./dist/react/storage.cjs"},"./styles/reset.css":{import:"./dist/styles/reset.css",require:"./dist/styles/reset.css"},"./typescript":{types:"./dist/typescript/index.d.ts",import:"./dist/typescript/index.js",require:"./dist/typescript/index.cjs"},"./utils":{types:"./dist/utils/index.d.ts",import:"./dist/utils/index.js",require:"./dist/utils/index.cjs"},"./utils-nodejs":{types:"./dist/utils/index-nodejs.d.ts",import:"./dist/utils/index-nodejs.js",require:"./dist/utils/index-nodejs.cjs"}},main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",bin:{cyberskill:"./dist/cli.js"},files:["dist","public"],scripts:{build:"tsup",dev:"dotenv -e .env -- tsup --watch",lint:"dotenv -e .env -- tsx src/cli.ts lint","lint:fix":"dotenv -e .env -- tsx src/cli.ts lint:fix","lint:inspect":"dotenv -e .env -- tsx src/cli.ts lint:inspect",reset:"dotenv -e .env -- tsx src/cli.ts reset",setup:"dotenv -e .env -- tsx src/cli.ts setup",inspect:"dotenv -e .env -- tsx src/cli.ts inspect","test:unit":"dotenv -e .env -- tsx src/cli.ts test:unit","test:e2e":"dotenv -e .env -- tsx src/cli.ts test:e2e",commitlint:"dotenv -e .env -- tsx src/cli.ts commitlint","lint-staged":"dotenv -e .env -- tsx src/cli.ts lint-staged"},dependencies:{"@antfu/eslint-config":"4.11.0","@apollo/client":"3.13.6","@eslint-react/eslint-plugin":"1.41.0","@graphql-codegen/cli":"5.0.5","@graphql-codegen/client-preset":"4.8.0","@graphql-codegen/typescript-react-apollo":"4.3.2","@microsoft/api-extractor":"7.52.3","@next/eslint-plugin-next":"15.2.4","@swc/core":"1.11.18","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.0","@vitejs/plugin-react-swc":"3.8.1","@vitest/browser":"3.1.1",chalk:"5.4.1",classnames:"2.5.1",consola:"3.4.2","crypto-js":"4.2.0","date-fns":"4.1.0","dotenv-cli":"8.0.0","eslint-config-next":"15.2.4","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.19",globals:"16.0.0",graphql:"16.10.0","graphql-ws":"6.0.4",i18next:"24.2.3",jsdom:"26.0.0",localforage:"1.10.0","modern-normalize":"3.0.1",mongodb:"6.15.0",mongoose:"8.13.2","mongoose-aggregate-paginate-v2":"1.1.4","mongoose-paginate-v2":"1.9.0","next-intl":"4.0.2","node-fetch":"3.3.2","node-persist":"4.0.4",ora:"8.2.0",playwright:"1.51.1","postcss-modules":"6.0.1",qs:"6.14.0",react:"19.1.0","react-dom":"19.1.0","react-hot-toast":"2.5.2","react-i18next":"15.4.1","react-icons":"5.5.0",sass:"1.86.3",slugify:"1.6.6",tsup:"8.4.0",tsx:"4.19.3",typescript:"5.8.3",unorm:"1.6.0",uuid:"11.1.0",vite:"6.2.5",vitest:"3.1.1","vitest-browser-react":"0.1.1",yargs:"17.7.2"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},devDependencies:{"@commitlint/cli":"19.8.0","@eslint/config-inspector":"1.0.2","@types/crypto-js":"4.2.2","@types/mongoose-aggregate-paginate-v2":"1.0.12","@types/node-persist":"3.1.8","@types/react":"19.1.0","@types/react-dom":"19.1.1","@types/unorm":"1.3.31","@types/uuid":"10.0.0","@types/yargs":"17.0.33",eslint:"9.24.0","lint-staged":"15.5.0","node-modules-inspector":"0.6.3","simple-git-hooks":"2.12.1"}};function ti(e,t){return tc.apply(this,arguments)}function tc(){tc=s(function(e,t){var n;return v(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);K.start("".concat(e)),C&&K.info("→ ".concat(t));return[4,e_(t)];case 1:r.sent(),K.success("".concat(e," done."));return[3,3];case 2:n=r.sent();throw K.error("".concat(e," failed: ").concat(n.message)),n;case 3:return[2]}})});return tc.apply(this,arguments)}function to(){return ta.apply(this,arguments)}function ta(){ta=s(function(){var e;return v(this,function(t){switch(t.label){case 0:if(!B(te.TS_CONFIG))return[3,2];return[4,ti("Performing TypeScript validation",tr.TYPESCRIPT_CHECK)];case 1:e=t.sent();return[3,3];case 2:e=K.warn("No TypeScript configuration found. Skipping type check.");t.label=3;case 3:e;return[2]}})});return ta.apply(this,arguments)}function tu(){return tl.apply(this,arguments)}function tl(){tl=s(function(){var e,t;var n=arguments;return v(this,function(r){switch(r.label){case 0:e=n.length>0&&n[0]!==void 0?n[0]:!1;if(!e)return[3,2];return[4,ti("Running ESLint with auto-fix",tr.ESLINT_FIX)];case 1:t=r.sent();return[3,4];case 2:return[4,ti("Running ESLint check",tr.ESLINT_CHECK)];case 3:t=r.sent();r.label=4;case 4:t;return[2]}})});return tl.apply(this,arguments)}function td(e,t){if(!t.length)return;var n=e==="Errors"?"red":"yellow";K.printBoxedLog(e==="Errors"?"✖ Errors":"⚠ Warnings",t,n)}function tf(){return tp.apply(this,arguments)}function tp(){tp=s(function(){var e,t,n;return v(this,function(r){switch(r.label){case 0:return[4,eh()];case 1:e=r.sent(),t=e.filter(function(e){return e.type==="error"}),n=e.filter(function(e){return e.type==="warning"});!t.length&&!n.length?K.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(td("Warnings",n),td("Errors",t));return[2]}})});return tp.apply(this,arguments)}function tg(){return th.apply(this,arguments)}function th(){th=s(function(){var e,t,n;return v(this,function(r){switch(r.label){case 0:return[4,ev()];case 1:r.sent();return[4,en(eD)];case 2:e=r.sent(),t=e.isCurrentProject;if(!t)return[3,7];r.label=3;case 3:r.trys.push([3,6,,7]);return[4,ti("Building package: ".concat(eD),tr.BUILD)];case 4:r.sent();return[4,ti("Staging build artifacts",tr.STAGE_BUILD_DIRECTORY)];case 5:r.sent();return[3,7];case 6:n=r.sent();throw K.error("Error building and staging ".concat(eD,": ").concat(n.message)),n;case 7:return[4,ti("Executing lint-staged",tr.CYBERSKILL.LINT_STAGED)];case 8:r.sent(),tf();return[2]}})});return th.apply(this,arguments)}function ty(){return tv.apply(this,arguments)}function tv(){tv=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,ti("Inspecting ESLint configuration",tr.ESLINT_INSPECT)];case 1:e.sent();return[2]}})});return tv.apply(this,arguments)}function tm(){return tb.apply(this,arguments)}function tb(){tb=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,ev()];case 1:e.sent();return[4,Promise.all([to(),tu()])];case 2:e.sent(),tf();return[2]}})});return tb.apply(this,arguments)}function tE(){return t_.apply(this,arguments)}function t_(){t_=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,ev()];case 1:e.sent();return[4,Promise.all([to(),tu(!0)])];case 2:e.sent(),tf();return[2]}})});return t_.apply(this,arguments)}function tS(){return tI.apply(this,arguments)}function tI(){tI=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,ev()];case 1:e.sent();return[4,ti("Validating commit message",tr.CYBERSKILL.COMMIT_LINT)];case 2:e.sent(),tf();return[2]}})});return tI.apply(this,arguments)}function tO(){return tj.apply(this,arguments)}function tj(){tj=s(function(){var e,t;return v(this,function(n){switch(n.label){case 0:return[4,ti("Configuring Git hooks",tr.CONFIGURE_GIT_HOOK)];case 1:n.sent(),H(te.GIT_HOOK);return[4,ew(tt)];case 2:e=n.sent();W(te.SIMPLE_GIT_HOOKS_JSON,e,{isJson:!0});t="\n".concat(eG,"\n");B(te.GIT_IGNORE)?J(te.GIT_IGNORE).split("\n").includes(eG)||X(te.GIT_IGNORE,t):W(te.GIT_IGNORE,t);return[4,ti("Setting up simple-git-hooks",tr.SIMPLE_GIT_HOOKS)];case 3:n.sent();return[2]}})});return tj.apply(this,arguments)}function tw(){return tN.apply(this,arguments)}function tN(){tN=s(function(){var e,t,n,r,s,i,c,o,a,u,l;return v(this,function(d){switch(d.label){case 0:e=[{command:tr.PNPM_INSTALL_STANDARD,message:"Installing dependencies (standard)"},{command:tr.PNPM_INSTALL_LEGACY,message:"Retrying with legacy peer dependencies"},{command:tr.PNPM_INSTALL_FORCE,message:"Retrying with force install"}];t=true,n=false,r=undefined;d.label=1;case 1:d.trys.push([1,8,9,10]);s=e[Symbol.iterator]();d.label=2;case 2:if(!!(t=(i=s.next()).done))return[3,7];c=i.value,o=c.command,a=c.message;d.label=3;case 3:d.trys.push([3,5,,6]);return[4,ti("".concat(a," using: ").concat(o),o)];case 4:d.sent();return[2];case 5:u=d.sent();K.warn("Installation attempt failed: ".concat(o)),K.error("Details: ".concat(u.message));return[3,6];case 6:t=true;return[3,2];case 7:return[3,10];case 8:l=d.sent();n=true;r=l;return[3,10];case 9:try{if(!t&&s.return!=null){s.return()}}finally{if(n){throw r}}return[7];case 10:throw new Error("All dependency installation strategies failed.")}})});return tN.apply(this,arguments)}function tT(e,t){return tD.apply(this,arguments)}function tD(){tD=s(function(e,t){var n,r,s,i,c,o,a,u,l,d,f,p;return v(this,function(g){switch(g.label){case 0:if(!B(te.PACKAGE_JSON)){K.error("package.json not found. Aborting setup.");return[2]}g.label=1;case 1:g.trys.push([1,14,,15]);return[4,en(e,{update:t===null||t===void 0?void 0:t.update})];case 2:n=g.sent(),r=n.isUpToDate;s=r;if(s)return[3,5];return[4,tw()];case 3:g.sent();return[4,tE()];case 4:s=g.sent();g.label=5;case 5:s;c=true,o=false,a=undefined;g.label=6;case 6:g.trys.push([6,11,12,13]);u=((i=t===null||t===void 0?void 0:t.postInstallActions)!==null&&i!==void 0?i:[])[Symbol.iterator]();g.label=7;case 7:if(!!(c=(l=u.next()).done))return[3,10];d=l.value;return[4,d()];case 8:g.sent();g.label=9;case 9:c=true;return[3,7];case 10:return[3,13];case 11:f=g.sent();o=true;a=f;return[3,13];case 12:try{if(!c&&u.return!=null){u.return()}}finally{if(o){throw a}}return[7];case 13:K.success('"'.concat(e,'" setup completed.'));return[3,15];case 14:p=g.sent();throw K.error('Failed to setup "'.concat(e,'": ').concat(p.message)),p;case 15:return[2]}})});return tD.apply(this,arguments)}function tP(){return tC.apply(this,arguments)}function tC(){tC=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,tT(eD,{update:!0,postInstallActions:[tO]})];case 1:e.sent();return[2]}})});return tC.apply(this,arguments)}function tx(){return tA.apply(this,arguments)}function tA(){tA=s(function(){return v(this,function(e){switch(e.label){case 0:H(te.NODE_MODULES,te.PNPM_LOCK_YAML);return[4,tw()];case 1:e.sent();return[4,tO()];case 2:e.sent();return[2]}})});return tA.apply(this,arguments)}function tL(){return tR.apply(this,arguments)}function tR(){tR=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,ti("Inspecting project dependencies",tr.NODE_MODULES_INSPECT)];case 1:e.sent();return[2]}})});return tR.apply(this,arguments)}function tk(){return tG.apply(this,arguments)}function tG(){tG=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,ti("Running unit tests",tr.CYBERSKILL.TEST_UNIT)];case 1:e.sent();return[2]}})});return tG.apply(this,arguments)}function tM(){return tq.apply(this,arguments)}function tq(){tq=s(function(){return v(this,function(e){switch(e.label){case 0:return[4,ti("Running end-to-end tests",tr.CYBERSKILL.TEST_E2E)];case 1:e.sent();return[2]}})});return tq.apply(this,arguments)}s(function(){var e;return v(this,function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,(0,T.default)((0,N.hideBin)(w.default.argv)).scriptName(eU).usage("$0 <command> [options]").command("lint",D.lint,tm).command("lint:fix",D["lint:fix"],tE).command("lint:inspect",D["lint:inspect"],ty).command("lint-staged",D["lint-staged"],tg).command("commitlint",D.commitlint,tS).command("setup",D.setup,tP).command("reset",D.reset,tx).command("inspect",D.inspect,tL).command("test:unit",D["test:unit"],tk).command("test:e2e",D["test:e2e"],tM).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(ts.version).epilog('\uD83D\uDCA1 Tip: Use "--help" with any command to see options\n').parse()];case 1:t.sent();return[3,3];case 2:e=t.sent();K.error("Fatal: ".concat(e.message)),w.default.exit(1);return[3,3];case 3:return[2]}})})();
|