@cyberskill/shared 1.58.0 → 1.60.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 +81 -10
- package/dist/_tsup-dts-rollup.d.ts +81 -10
- 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/common.cjs +1 -1
- package/dist/constants/common.d.cts +1 -0
- package/dist/constants/common.d.ts +1 -0
- package/dist/constants/common.js +1 -1
- package/dist/constants/graphql.cjs +1 -0
- package/dist/constants/graphql.d.cts +1 -0
- package/dist/constants/graphql.d.ts +1 -0
- package/dist/constants/graphql.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/path.cjs +1 -1
- package/dist/constants/path.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- 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/apollo-error.cjs +1 -0
- package/dist/react/apollo-error.d.cts +6 -0
- package/dist/react/apollo-error.d.ts +6 -0
- package/dist/react/apollo-error.js +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.cts +6 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +1 -1
- package/dist/typescript/apollo-error.cjs +1 -0
- package/dist/typescript/apollo-error.d.cts +2 -0
- package/dist/typescript/apollo-error.d.ts +2 -0
- package/dist/typescript/apollo-error.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.js +1 -1
- package/dist/utils/package.cjs +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 +8 -5
|
@@ -5,6 +5,8 @@ import type { AggregatePaginateResult } from 'mongoose';
|
|
|
5
5
|
import { ApolloCache } from '@apollo/client';
|
|
6
6
|
import { ApolloClient } from '@apollo/client';
|
|
7
7
|
import { ApolloClientOptions } from '@apollo/client';
|
|
8
|
+
import type { ApolloError } from '@apollo/client';
|
|
9
|
+
import type { ApolloLink } from '@apollo/client';
|
|
8
10
|
import type { ClientSession } from 'mongoose';
|
|
9
11
|
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
10
12
|
import { Collection } from 'mongodb';
|
|
@@ -29,6 +31,7 @@ import { Model } from 'mongoose';
|
|
|
29
31
|
import type mongoose from 'mongoose';
|
|
30
32
|
import mongoosePaginate from 'mongoose-paginate-v2';
|
|
31
33
|
import type mongooseRaw from 'mongoose';
|
|
34
|
+
import type { NormalizedCacheObject } from '@apollo/client';
|
|
32
35
|
import type { OptionalUnlessRequiredId } from 'mongodb';
|
|
33
36
|
import type { PaginateModel } from 'mongoose';
|
|
34
37
|
import type { PaginateOptions } from 'mongoose';
|
|
@@ -70,6 +73,33 @@ export { ApolloClientOptions }
|
|
|
70
73
|
export { ApolloClientOptions as ApolloClientOptions_alias_1 }
|
|
71
74
|
export { ApolloClientOptions as ApolloClientOptions_alias_2 }
|
|
72
75
|
|
|
76
|
+
declare function ApolloErrorScreen({ error, refetch }: ApolloErrorScreenProps_2): JSX_2.Element;
|
|
77
|
+
export { ApolloErrorScreen }
|
|
78
|
+
export { ApolloErrorScreen as ApolloErrorScreen_alias_1 }
|
|
79
|
+
export { ApolloErrorScreen as ApolloErrorScreen_alias_2 }
|
|
80
|
+
|
|
81
|
+
export declare interface ApolloErrorScreenProps {
|
|
82
|
+
error: ApolloError;
|
|
83
|
+
refetch?: () => void;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare interface ApolloErrorScreenProps_2 {
|
|
87
|
+
error: ApolloError;
|
|
88
|
+
refetch?: () => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare function ApolloErrorViewerModal(): JSX_2.Element | null;
|
|
92
|
+
export { ApolloErrorViewerModal }
|
|
93
|
+
export { ApolloErrorViewerModal as ApolloErrorViewerModal_alias_1 }
|
|
94
|
+
export { ApolloErrorViewerModal as ApolloErrorViewerModal_alias_2 }
|
|
95
|
+
|
|
96
|
+
declare function ApolloErrorViewerProvider({ children }: {
|
|
97
|
+
children: ReactNode;
|
|
98
|
+
}): JSX_2.Element;
|
|
99
|
+
export { ApolloErrorViewerProvider }
|
|
100
|
+
export { ApolloErrorViewerProvider as ApolloErrorViewerProvider_alias_1 }
|
|
101
|
+
export { ApolloErrorViewerProvider as ApolloErrorViewerProvider_alias_2 }
|
|
102
|
+
|
|
73
103
|
declare function ApolloProvider({ isNextJS, options, children, client: CustomClient, provider: CustomProvider, cache: CustomCache, }: I_ApolloProviderProps_2): JSX_2.Element;
|
|
74
104
|
export { ApolloProvider }
|
|
75
105
|
export { ApolloProvider as ApolloProvider_alias_1 }
|
|
@@ -1507,6 +1537,11 @@ export { GIT_IGNORE }
|
|
|
1507
1537
|
export { GIT_IGNORE as GIT_IGNORE_alias_1 }
|
|
1508
1538
|
export { GIT_IGNORE as GIT_IGNORE_alias_2 }
|
|
1509
1539
|
|
|
1540
|
+
declare const GRAPHQL_URI_DEFAULT = "/graphql";
|
|
1541
|
+
export { GRAPHQL_URI_DEFAULT }
|
|
1542
|
+
export { GRAPHQL_URI_DEFAULT as GRAPHQL_URI_DEFAULT_alias_1 }
|
|
1543
|
+
export { GRAPHQL_URI_DEFAULT as GRAPHQL_URI_DEFAULT_alias_2 }
|
|
1544
|
+
|
|
1510
1545
|
declare function HOOK({ isCurrentProject }: Partial<I_CommandContext_2>): {
|
|
1511
1546
|
'pre-push'?: {
|
|
1512
1547
|
raw: boolean;
|
|
@@ -1519,29 +1554,45 @@ export { HOOK }
|
|
|
1519
1554
|
export { HOOK as HOOK_alias_1 }
|
|
1520
1555
|
export { HOOK as HOOK_alias_2 }
|
|
1521
1556
|
|
|
1522
|
-
declare interface
|
|
1557
|
+
export declare interface I_ApolloErrorViewerContext {
|
|
1558
|
+
error: ApolloError | null;
|
|
1559
|
+
showError: (error: ApolloError) => void;
|
|
1560
|
+
hideError: () => void;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
declare interface I_ApolloErrorViewerContext_2 {
|
|
1564
|
+
error: ApolloError | null;
|
|
1565
|
+
showError: (error: ApolloError) => void;
|
|
1566
|
+
hideError: () => void;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
declare interface I_ApolloOptions extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
|
|
1523
1570
|
uri?: string;
|
|
1524
1571
|
wsUrl?: string;
|
|
1525
|
-
cache?: ApolloCache<
|
|
1572
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1573
|
+
customLinks?: ApolloLink[];
|
|
1574
|
+
ssrMode?: boolean;
|
|
1526
1575
|
}
|
|
1527
1576
|
export { I_ApolloOptions }
|
|
1528
1577
|
export { I_ApolloOptions as I_ApolloOptions_alias_1 }
|
|
1529
1578
|
export { I_ApolloOptions as I_ApolloOptions_alias_2 }
|
|
1530
1579
|
|
|
1531
|
-
declare interface I_ApolloOptions_2 extends Omit<ApolloClientOptions<
|
|
1580
|
+
declare interface I_ApolloOptions_2 extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
|
|
1532
1581
|
uri?: string;
|
|
1533
1582
|
wsUrl?: string;
|
|
1534
|
-
cache?: ApolloCache<
|
|
1583
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1584
|
+
customLinks?: ApolloLink[];
|
|
1585
|
+
ssrMode?: boolean;
|
|
1535
1586
|
}
|
|
1536
1587
|
|
|
1537
1588
|
declare interface I_ApolloProviderProps {
|
|
1538
1589
|
children: T_Children;
|
|
1539
1590
|
isNextJS?: boolean;
|
|
1540
1591
|
options?: I_ApolloOptions;
|
|
1541
|
-
client?: ApolloClient<
|
|
1542
|
-
makeClient?: () => ApolloClient<
|
|
1592
|
+
client?: ApolloClient<NormalizedCacheObject>;
|
|
1593
|
+
makeClient?: () => ApolloClient<NormalizedCacheObject>;
|
|
1543
1594
|
provider?: ComponentType<I_ApolloProviderProps>;
|
|
1544
|
-
cache?: ApolloCache<
|
|
1595
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1545
1596
|
}
|
|
1546
1597
|
export { I_ApolloProviderProps }
|
|
1547
1598
|
export { I_ApolloProviderProps as I_ApolloProviderProps_alias_1 }
|
|
@@ -1551,10 +1602,10 @@ declare interface I_ApolloProviderProps_2 {
|
|
|
1551
1602
|
children: T_Children_2;
|
|
1552
1603
|
isNextJS?: boolean;
|
|
1553
1604
|
options?: I_ApolloOptions_2;
|
|
1554
|
-
client?: ApolloClient<
|
|
1555
|
-
makeClient?: () => ApolloClient<
|
|
1605
|
+
client?: ApolloClient<NormalizedCacheObject>;
|
|
1606
|
+
makeClient?: () => ApolloClient<NormalizedCacheObject>;
|
|
1556
1607
|
provider?: ComponentType<I_ApolloProviderProps_2>;
|
|
1557
|
-
cache?: ApolloCache<
|
|
1608
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1558
1609
|
}
|
|
1559
1610
|
|
|
1560
1611
|
declare interface I_BoxedLogOptions {
|
|
@@ -2044,6 +2095,11 @@ export { initNodePersist }
|
|
|
2044
2095
|
export { initNodePersist as initNodePersist_alias_1 }
|
|
2045
2096
|
export { initNodePersist as initNodePersist_alias_2 }
|
|
2046
2097
|
|
|
2098
|
+
declare const IS_BROWSER: boolean;
|
|
2099
|
+
export { IS_BROWSER }
|
|
2100
|
+
export { IS_BROWSER as IS_BROWSER_alias_1 }
|
|
2101
|
+
export { IS_BROWSER as IS_BROWSER_alias_2 }
|
|
2102
|
+
|
|
2047
2103
|
declare function isJson(str: string): boolean;
|
|
2048
2104
|
export { isJson }
|
|
2049
2105
|
export { isJson as isJson_alias_1 }
|
|
@@ -2314,6 +2370,11 @@ export { regexSearchMapper }
|
|
|
2314
2370
|
export { regexSearchMapper as regexSearchMapper_alias_1 }
|
|
2315
2371
|
export { regexSearchMapper as regexSearchMapper_alias_2 }
|
|
2316
2372
|
|
|
2373
|
+
declare function registerApolloErrorViewerCallback(fn: (err: ApolloError) => void): void;
|
|
2374
|
+
export { registerApolloErrorViewerCallback }
|
|
2375
|
+
export { registerApolloErrorViewerCallback as registerApolloErrorViewerCallback_alias_1 }
|
|
2376
|
+
export { registerApolloErrorViewerCallback as registerApolloErrorViewerCallback_alias_2 }
|
|
2377
|
+
|
|
2317
2378
|
declare function removeAccent(str: string): string;
|
|
2318
2379
|
export { removeAccent }
|
|
2319
2380
|
export { removeAccent as removeAccent_alias_1 }
|
|
@@ -2600,6 +2661,11 @@ export { serializer }
|
|
|
2600
2661
|
export { serializer as serializer_alias_1 }
|
|
2601
2662
|
export { serializer as serializer_alias_2 }
|
|
2602
2663
|
|
|
2664
|
+
declare function showGlobalApolloError(error: ApolloError): void;
|
|
2665
|
+
export { showGlobalApolloError }
|
|
2666
|
+
export { showGlobalApolloError as showGlobalApolloError_alias_1 }
|
|
2667
|
+
export { showGlobalApolloError as showGlobalApolloError_alias_2 }
|
|
2668
|
+
|
|
2603
2669
|
declare const SIMPLE_GIT_HOOK_CLI = "simple-git-hooks";
|
|
2604
2670
|
export { SIMPLE_GIT_HOOK_CLI }
|
|
2605
2671
|
export { SIMPLE_GIT_HOOK_CLI as SIMPLE_GIT_HOOK_CLI_alias_1 }
|
|
@@ -2995,6 +3061,11 @@ export { TSX_CLI }
|
|
|
2995
3061
|
export { TSX_CLI as TSX_CLI_alias_1 }
|
|
2996
3062
|
export { TSX_CLI as TSX_CLI_alias_2 }
|
|
2997
3063
|
|
|
3064
|
+
declare function useApolloErrorViewer(): I_ApolloErrorViewerContext_2;
|
|
3065
|
+
export { useApolloErrorViewer }
|
|
3066
|
+
export { useApolloErrorViewer as useApolloErrorViewer_alias_1 }
|
|
3067
|
+
export { useApolloErrorViewer as useApolloErrorViewer_alias_2 }
|
|
3068
|
+
|
|
2998
3069
|
declare function useLoading(): I_LoadingContext_2;
|
|
2999
3070
|
export { useLoading }
|
|
3000
3071
|
export { useLoading as useLoading_alias_1 }
|
|
@@ -5,6 +5,8 @@ import type { AggregatePaginateResult } from 'mongoose';
|
|
|
5
5
|
import { ApolloCache } from '@apollo/client';
|
|
6
6
|
import { ApolloClient } from '@apollo/client';
|
|
7
7
|
import { ApolloClientOptions } from '@apollo/client';
|
|
8
|
+
import type { ApolloError } from '@apollo/client';
|
|
9
|
+
import type { ApolloLink } from '@apollo/client';
|
|
8
10
|
import type { ClientSession } from 'mongoose';
|
|
9
11
|
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
10
12
|
import { Collection } from 'mongodb';
|
|
@@ -29,6 +31,7 @@ import { Model } from 'mongoose';
|
|
|
29
31
|
import type mongoose from 'mongoose';
|
|
30
32
|
import mongoosePaginate from 'mongoose-paginate-v2';
|
|
31
33
|
import type mongooseRaw from 'mongoose';
|
|
34
|
+
import type { NormalizedCacheObject } from '@apollo/client';
|
|
32
35
|
import type { OptionalUnlessRequiredId } from 'mongodb';
|
|
33
36
|
import type { PaginateModel } from 'mongoose';
|
|
34
37
|
import type { PaginateOptions } from 'mongoose';
|
|
@@ -70,6 +73,33 @@ export { ApolloClientOptions }
|
|
|
70
73
|
export { ApolloClientOptions as ApolloClientOptions_alias_1 }
|
|
71
74
|
export { ApolloClientOptions as ApolloClientOptions_alias_2 }
|
|
72
75
|
|
|
76
|
+
declare function ApolloErrorScreen({ error, refetch }: ApolloErrorScreenProps_2): JSX_2.Element;
|
|
77
|
+
export { ApolloErrorScreen }
|
|
78
|
+
export { ApolloErrorScreen as ApolloErrorScreen_alias_1 }
|
|
79
|
+
export { ApolloErrorScreen as ApolloErrorScreen_alias_2 }
|
|
80
|
+
|
|
81
|
+
export declare interface ApolloErrorScreenProps {
|
|
82
|
+
error: ApolloError;
|
|
83
|
+
refetch?: () => void;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare interface ApolloErrorScreenProps_2 {
|
|
87
|
+
error: ApolloError;
|
|
88
|
+
refetch?: () => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare function ApolloErrorViewerModal(): JSX_2.Element | null;
|
|
92
|
+
export { ApolloErrorViewerModal }
|
|
93
|
+
export { ApolloErrorViewerModal as ApolloErrorViewerModal_alias_1 }
|
|
94
|
+
export { ApolloErrorViewerModal as ApolloErrorViewerModal_alias_2 }
|
|
95
|
+
|
|
96
|
+
declare function ApolloErrorViewerProvider({ children }: {
|
|
97
|
+
children: ReactNode;
|
|
98
|
+
}): JSX_2.Element;
|
|
99
|
+
export { ApolloErrorViewerProvider }
|
|
100
|
+
export { ApolloErrorViewerProvider as ApolloErrorViewerProvider_alias_1 }
|
|
101
|
+
export { ApolloErrorViewerProvider as ApolloErrorViewerProvider_alias_2 }
|
|
102
|
+
|
|
73
103
|
declare function ApolloProvider({ isNextJS, options, children, client: CustomClient, provider: CustomProvider, cache: CustomCache, }: I_ApolloProviderProps_2): JSX_2.Element;
|
|
74
104
|
export { ApolloProvider }
|
|
75
105
|
export { ApolloProvider as ApolloProvider_alias_1 }
|
|
@@ -1507,6 +1537,11 @@ export { GIT_IGNORE }
|
|
|
1507
1537
|
export { GIT_IGNORE as GIT_IGNORE_alias_1 }
|
|
1508
1538
|
export { GIT_IGNORE as GIT_IGNORE_alias_2 }
|
|
1509
1539
|
|
|
1540
|
+
declare const GRAPHQL_URI_DEFAULT = "/graphql";
|
|
1541
|
+
export { GRAPHQL_URI_DEFAULT }
|
|
1542
|
+
export { GRAPHQL_URI_DEFAULT as GRAPHQL_URI_DEFAULT_alias_1 }
|
|
1543
|
+
export { GRAPHQL_URI_DEFAULT as GRAPHQL_URI_DEFAULT_alias_2 }
|
|
1544
|
+
|
|
1510
1545
|
declare function HOOK({ isCurrentProject }: Partial<I_CommandContext_2>): {
|
|
1511
1546
|
'pre-push'?: {
|
|
1512
1547
|
raw: boolean;
|
|
@@ -1519,29 +1554,45 @@ export { HOOK }
|
|
|
1519
1554
|
export { HOOK as HOOK_alias_1 }
|
|
1520
1555
|
export { HOOK as HOOK_alias_2 }
|
|
1521
1556
|
|
|
1522
|
-
declare interface
|
|
1557
|
+
export declare interface I_ApolloErrorViewerContext {
|
|
1558
|
+
error: ApolloError | null;
|
|
1559
|
+
showError: (error: ApolloError) => void;
|
|
1560
|
+
hideError: () => void;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
declare interface I_ApolloErrorViewerContext_2 {
|
|
1564
|
+
error: ApolloError | null;
|
|
1565
|
+
showError: (error: ApolloError) => void;
|
|
1566
|
+
hideError: () => void;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
declare interface I_ApolloOptions extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
|
|
1523
1570
|
uri?: string;
|
|
1524
1571
|
wsUrl?: string;
|
|
1525
|
-
cache?: ApolloCache<
|
|
1572
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1573
|
+
customLinks?: ApolloLink[];
|
|
1574
|
+
ssrMode?: boolean;
|
|
1526
1575
|
}
|
|
1527
1576
|
export { I_ApolloOptions }
|
|
1528
1577
|
export { I_ApolloOptions as I_ApolloOptions_alias_1 }
|
|
1529
1578
|
export { I_ApolloOptions as I_ApolloOptions_alias_2 }
|
|
1530
1579
|
|
|
1531
|
-
declare interface I_ApolloOptions_2 extends Omit<ApolloClientOptions<
|
|
1580
|
+
declare interface I_ApolloOptions_2 extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
|
|
1532
1581
|
uri?: string;
|
|
1533
1582
|
wsUrl?: string;
|
|
1534
|
-
cache?: ApolloCache<
|
|
1583
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1584
|
+
customLinks?: ApolloLink[];
|
|
1585
|
+
ssrMode?: boolean;
|
|
1535
1586
|
}
|
|
1536
1587
|
|
|
1537
1588
|
declare interface I_ApolloProviderProps {
|
|
1538
1589
|
children: T_Children;
|
|
1539
1590
|
isNextJS?: boolean;
|
|
1540
1591
|
options?: I_ApolloOptions;
|
|
1541
|
-
client?: ApolloClient<
|
|
1542
|
-
makeClient?: () => ApolloClient<
|
|
1592
|
+
client?: ApolloClient<NormalizedCacheObject>;
|
|
1593
|
+
makeClient?: () => ApolloClient<NormalizedCacheObject>;
|
|
1543
1594
|
provider?: ComponentType<I_ApolloProviderProps>;
|
|
1544
|
-
cache?: ApolloCache<
|
|
1595
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1545
1596
|
}
|
|
1546
1597
|
export { I_ApolloProviderProps }
|
|
1547
1598
|
export { I_ApolloProviderProps as I_ApolloProviderProps_alias_1 }
|
|
@@ -1551,10 +1602,10 @@ declare interface I_ApolloProviderProps_2 {
|
|
|
1551
1602
|
children: T_Children_2;
|
|
1552
1603
|
isNextJS?: boolean;
|
|
1553
1604
|
options?: I_ApolloOptions_2;
|
|
1554
|
-
client?: ApolloClient<
|
|
1555
|
-
makeClient?: () => ApolloClient<
|
|
1605
|
+
client?: ApolloClient<NormalizedCacheObject>;
|
|
1606
|
+
makeClient?: () => ApolloClient<NormalizedCacheObject>;
|
|
1556
1607
|
provider?: ComponentType<I_ApolloProviderProps_2>;
|
|
1557
|
-
cache?: ApolloCache<
|
|
1608
|
+
cache?: ApolloCache<NormalizedCacheObject>;
|
|
1558
1609
|
}
|
|
1559
1610
|
|
|
1560
1611
|
declare interface I_BoxedLogOptions {
|
|
@@ -2044,6 +2095,11 @@ export { initNodePersist }
|
|
|
2044
2095
|
export { initNodePersist as initNodePersist_alias_1 }
|
|
2045
2096
|
export { initNodePersist as initNodePersist_alias_2 }
|
|
2046
2097
|
|
|
2098
|
+
declare const IS_BROWSER: boolean;
|
|
2099
|
+
export { IS_BROWSER }
|
|
2100
|
+
export { IS_BROWSER as IS_BROWSER_alias_1 }
|
|
2101
|
+
export { IS_BROWSER as IS_BROWSER_alias_2 }
|
|
2102
|
+
|
|
2047
2103
|
declare function isJson(str: string): boolean;
|
|
2048
2104
|
export { isJson }
|
|
2049
2105
|
export { isJson as isJson_alias_1 }
|
|
@@ -2314,6 +2370,11 @@ export { regexSearchMapper }
|
|
|
2314
2370
|
export { regexSearchMapper as regexSearchMapper_alias_1 }
|
|
2315
2371
|
export { regexSearchMapper as regexSearchMapper_alias_2 }
|
|
2316
2372
|
|
|
2373
|
+
declare function registerApolloErrorViewerCallback(fn: (err: ApolloError) => void): void;
|
|
2374
|
+
export { registerApolloErrorViewerCallback }
|
|
2375
|
+
export { registerApolloErrorViewerCallback as registerApolloErrorViewerCallback_alias_1 }
|
|
2376
|
+
export { registerApolloErrorViewerCallback as registerApolloErrorViewerCallback_alias_2 }
|
|
2377
|
+
|
|
2317
2378
|
declare function removeAccent(str: string): string;
|
|
2318
2379
|
export { removeAccent }
|
|
2319
2380
|
export { removeAccent as removeAccent_alias_1 }
|
|
@@ -2600,6 +2661,11 @@ export { serializer }
|
|
|
2600
2661
|
export { serializer as serializer_alias_1 }
|
|
2601
2662
|
export { serializer as serializer_alias_2 }
|
|
2602
2663
|
|
|
2664
|
+
declare function showGlobalApolloError(error: ApolloError): void;
|
|
2665
|
+
export { showGlobalApolloError }
|
|
2666
|
+
export { showGlobalApolloError as showGlobalApolloError_alias_1 }
|
|
2667
|
+
export { showGlobalApolloError as showGlobalApolloError_alias_2 }
|
|
2668
|
+
|
|
2603
2669
|
declare const SIMPLE_GIT_HOOK_CLI = "simple-git-hooks";
|
|
2604
2670
|
export { SIMPLE_GIT_HOOK_CLI }
|
|
2605
2671
|
export { SIMPLE_GIT_HOOK_CLI as SIMPLE_GIT_HOOK_CLI_alias_1 }
|
|
@@ -2995,6 +3061,11 @@ export { TSX_CLI }
|
|
|
2995
3061
|
export { TSX_CLI as TSX_CLI_alias_1 }
|
|
2996
3062
|
export { TSX_CLI as TSX_CLI_alias_2 }
|
|
2997
3063
|
|
|
3064
|
+
declare function useApolloErrorViewer(): I_ApolloErrorViewerContext_2;
|
|
3065
|
+
export { useApolloErrorViewer }
|
|
3066
|
+
export { useApolloErrorViewer as useApolloErrorViewer_alias_1 }
|
|
3067
|
+
export { useApolloErrorViewer as useApolloErrorViewer_alias_2 }
|
|
3068
|
+
|
|
2998
3069
|
declare function useLoading(): I_LoadingContext_2;
|
|
2999
3070
|
export { useLoading }
|
|
3000
3071
|
export { useLoading as useLoading_alias_1 }
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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,i,c,o){try{var a=e[c](o);var s=a.value}catch(e){n(e);return}if(a.done){t(s)}else{Promise.resolve(s).then(r,i)}}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,c){var o=e.apply(t,n);function a(e){r(o,i,c,a,s,"next",e)}function s(e){r(o,i,c,a,s,"throw",e)}a(undefined)})}}function c(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 o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function a(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var i=true;var c=false;var o,a;try{for(n=n.call(e);!(i=(o=n.next()).done);i=true){r.push(o.value);if(t&&r.length===t)break}}catch(e){c=true;a=e}finally{try{if(!i&&n["return"]!=null)n["return"]()}finally{if(c)throw a}}return r}function s(){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){c(e,t,n[t])})}return e}function f(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 p(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{f(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n){return t(e)||a(e,n)||y(e,n)||s()}function h(e){return n(e)||o(e)||y(e)||u()}function g(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 m(e,t){var n,r,i,c,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return c={next:a(0),"throw":a(1),"return":a(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(e){return function(t){return s([e,t])}}function s(c){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:o.label++;return{value:c[1],done:false};case 5:o.label++;r=c[1];c=[0];continue;case 7:c=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){o=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(c[0]===6&&o.label<i[1]){o.label=i[1];i=c;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(c);break}if(i[2])o.ops.pop();o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var v=Object.create;var _=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var O=function(e,t,n,r){var i=true,c=false,o=undefined;if(t&&(typeof t==="undefined"?"undefined":g(t))=="object"||typeof t=="function")try{var a=function(){var i=u.value;!S.call(e,i)&&i!==n&&_(e,i,{get:function(){return t[i]},enumerable:!(r=E(t,i))||r.enumerable})};for(var s=b(t)[Symbol.iterator](),u;!(i=(u=s.next()).done);i=true)a()}catch(e){c=true;o=e}finally{try{if(!i&&s.return!=null){s.return()}}finally{if(c){throw o}}}return e};var N=function(e,t,n){return n=e!=null?v(I(e)):{},O(t||!e||!e.__esModule?_(n,"default",{value:e,enumerable:!0}):n,e)};var w=N(require("process"),1),T=require("yargs/helpers"),P=N(require("yargs/yargs"),1);var C=process.env.DEBUG==="true";var D=N(require("process"),1);var L=N(require("boxen"),1),A=N(require("chalk"),1),R=require("child_process"),j=N(require("process"),1),G=N(require("util"),1);var M=N(require("node-fetch"),1);var k=N(require("fs"),1),F=function(e){return k.existsSync(e)};function K(e,t){var n=k.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":g(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 x(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,i=r===void 0?!1:r,c=i&&(typeof t==="undefined"?"undefined":g(t))=="object"?JSON.stringify(t,null,4):String(t);k.writeFileSync(e,c,"utf-8")}function U(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,i=r===void 0?!1:r,c=i&&(typeof t==="undefined"?"undefined":g(t))=="object"?JSON.stringify(t,null,4):String(t);k.appendFileSync(e,c,"utf-8")}function B(e){e.forEach(function(e){F(e)&&k.rmSync(e,{recursive:!0,force:!0})})}var Y=N(require("path"),1);function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=Y).resolve.apply(r,[eD].concat(h(t)))}function V(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=Y).join.apply(r,h(t))}var W=N(require("node-persist"),1),q=N(require("os"),1),X=N(require("process"),1);function H(){return X.default.env.CYBERSKILL_STORAGE_DIR||V(q.default.homedir(),eA)}function $(){return z.apply(this,arguments)}function z(){z=i(function(){var e;return m(this,function(t){switch(t.label){case 0:e=W.default.defaultInstance;if(e)return[3,2];return[4,W.default.init({dir:H(),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 z.apply(this,arguments)}var Q={get:function e(e){return i(function(){var t,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,$()];case 1:r.sent();return[4,W.default.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,(console.error('❌ [Storage:get] Error getting key "'.concat(e,'":'),n),null)];case 4:return[2]}})})()},set:function e(e,t){return i(function(){var n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,$()];case 1:r.sent();return[4,W.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();console.error('❌ [Storage:set] Error setting key "'.concat(e,'":'),n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return i(function(){var t;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,$()];case 1:n.sent();return[4,W.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();console.error('❌ [Storage:remove] Error removing key "'.concat(e,'":'),t);return[3,4];case 4:return[2]}})})()},keys:function e(){return i(function(){var e,t;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,$()];case 1:n.sent();return[4,W.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(console.warn("⚠️ [Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,(console.error("❌ [Storage:keys] Error getting keys:",t),[])];case 4:return[2]}})})()},getLogLink:function e(e){return i(function(){return m(this,function(t){try{return[2,"".concat(H()," (key: ").concat(e,")")]}catch(e){return[2,(console.error("❌ [Storage:getLogLink] Error getting log link:",e),null)]}return[2]})})()}};var Z=24*60*60*1e3;function ee(e){var t=V(eD,eG);if(F(t))try{var n=K(t,{asJson:!0});if(n.name===e)return{path:t,file:n,isCurrentProject:!0}}catch(e){ed.warning("Failed to read local package.json: ".concat(e.message))}var r=V(eD,eR,e,eG);if(F(r))try{var i=K(r,{asJson:!0});if(i.name===e)return{path:r,file:i,isCurrentProject:!1}}catch(t){ed.warning("Failed to read node_modules package.json for ".concat(e,": ").concat(t.message))}return!1}function et(e){return en.apply(this,arguments)}function en(){en=i(function(e){var t,n,r,i,c,o,a,s,u,l;var f=arguments;return m(this,function(p){switch(p.label){case 0:t=f.length>1&&f[1]!==void 0?f[1]:!1;n="npm_version:".concat(e),r="npm_metadata:".concat(e);return[4,Q.get(n)];case 1:i=p.sent();return[4,Q.get(r)];case 2:c=p.sent(),o=i&&Date.now()-i.timestamp<Z;if(!t&&o)return[2,i.version];a={};(c===null||c===void 0?void 0:c.etag)&&(a["If-None-Match"]=c.etag),(c===null||c===void 0?void 0:c.lastModified)&&(a["If-Modified-Since"]=c.lastModified);p.label=3;case 3:p.trys.push([3,8,,9]);return[4,(0,M.default)("https://registry.npmjs.org/".concat(e,"/latest"),{headers:a})];case 4:s=p.sent();if(s.status===304&&i)return[2,i.version];if(!s.ok)throw new Error("Failed to fetch latest version: ".concat(s.statusText));return[4,s.json()];case 5:u=p.sent().version;return[4,Q.set(n,{version:u,timestamp:Date.now()})];case 6:p.sent();return[4,Q.set(r,{etag:s.headers.get("ETag")||void 0,lastModified:s.headers.get("Last-Modified")||void 0})];case 7:return[2,(p.sent(),u)];case 8:l=p.sent();if(ed.error("Error fetching latest version for ".concat(e,": ").concat(l.message)),i)return[2,(ed.warning("Falling back to cached version for ".concat(e,": ").concat(i.version)),i.version)];throw l;case 9:return[2]}})});return en.apply(this,arguments)}function er(e){return ei.apply(this,arguments)}function ei(){ei=i(function(e){var t,n,r,i,c;return m(this,function(o){switch(o.label){case 0:t={isInstalled:!1,isCurrentProject:!1,installedPath:"",installedVersion:"",latestVersion:"",file:{}};o.label=1;case 1:o.trys.push([1,6,,7]);n=ee(e);r=n;if(!r)return[3,5];t.file=n.file,t.isInstalled=!0,t.installedPath=n.path,t.installedVersion=n.file.version,t.isCurrentProject=n.isCurrentProject;if(!n.isCurrentProject)return[3,2];i=n.file.version;return[3,4];case 2:return[4,et(e,!0)];case 3:i=o.sent();o.label=4;case 4:r=t.latestVersion=i;o.label=5;case 5:return[2,(r,t)];case 6:c=o.sent();return[2,(ed.error('Error checking package "'.concat(e,'": ').concat(c.message)),t)];case 7:return[2]}})});return ei.apply(this,arguments)}var ec=G.promisify(R.exec),eo=A.default,ea=eo.gray,es=eo.blue;function eu(){return ea("[".concat(new Date().toLocaleTimeString(),"]"))}function el(e){var t=A.default[e];return typeof t=="function"?t:A.default.green}function ef(e,t,n,r){var i=el(t);console.log("".concat(eu()," ").concat(i("".concat(n," ").concat(e))," ").concat(r))}function ep(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.color,i=r===void 0?"green":r,c=n.padding,o=c===void 0?1:c,a=n.margin,s=a===void 0?1:a,u=n.borderStyle,l=u===void 0?"round":u,f=n.titleColor,p=f===void 0?"bold":f;var d=el(i),h=el(p);if(typeof t=="string"){console.log((0,L.default)(h(d("".concat(e,"\n").concat(t))),{padding:o,margin:s,borderStyle:l,borderColor:i}));return}Array.isArray(t)&&t.length&&(t.forEach(function(e){var t=e.file,n=e.position,r=e.rule,i=e.message;console.log("".concat(eu()," ").concat(d("File:")," ").concat(es("".concat(t).concat(n?":".concat(n):"")))),r&&console.log(" ".concat(d("Rule:")," ").concat(d(r))),console.log(" ".concat(d("Message:")," ").concat(d(i)))}),console.log((0,L.default)(h(d("".concat(e,": ").concat(t.length))),{padding:o,margin:s,borderStyle:l,borderColor:i})),console.log(ea("─".repeat(40))))}var ed={success:function(e){return ef("SUCCESS","green","✔",e)},error:function(e){return ef("ERROR","red","✖",e)},warning:function(e){return ef("WARNING","yellow","⚠",e)},info:function(e){return ef("INFO","blue","ℹ",e)},printBoxedLog:ep};function eh(e){return"error_list:".concat(e)}function eg(e){return ey.apply(this,arguments)}function ey(){ey=i(function(e){var t,n,r;return m(this,function(c){switch(c.label){case 0:if(e.length===0)return[2];t=Date.now(),n=eh(t);c.label=1;case 1:c.trys.push([1,3,,4]);return[4,Q.set(n,{errors:e,timestamp:t})];case 2:c.sent(),setTimeout(/*#__PURE__*/i(function(){var e;return m(this,function(t){switch(t.label){case 0:return[4,Q.getLogLink(n)];case 1:e=t.sent();e&&ed.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})}),10);return[3,4];case 3:r=c.sent();ed.error("Failed to save errors: ".concat(r.message));return[3,4];case 4:return[2]}})});return ey.apply(this,arguments)}function em(){return ev.apply(this,arguments)}function ev(){ev=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,Q.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=i(function(e){var t;return m(this,function(n){switch(n.label){case 0:return[4,Q.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,(ed.error("Failed to retrieve stored errors: ".concat(n.message)),[])];case 4:return[2]}})});return ev.apply(this,arguments)}function e_(){return eE.apply(this,arguments)}function eE(){eE=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,Q.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 Q.remove(e)}))];case 2:r.sent();return[3,4];case 3:n=r.sent();ed.error("Failed to clear error lists: ".concat(n.message));return[3,4];case 4:return[2]}})});return eE.apply(this,arguments)}function eb(e){var t=[],n=[],r="",i=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,c=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,o=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var a=i.exec(e)||[],s=c.exec(e)||[],u=o.exec(e)||[];a.length&&r?t.push({file:r,position:"".concat(a[1],":").concat(a[2]),type:a[3]==="error"?"error":"warning",message:a[4].trim(),rule:a[5].trim()}):s.length?t.push({file:s[1],position:"".concat(s[2],":").concat(s[3]),type:s[4]==="error"?"error":"warning",message:s[5].trim()}):u.length?t.push({file:"commitlint",type:"error",message:u[1].trim(),rule:u[2].trim()}):n.push(e.trim())}}),t.length&&eg(t),n.length&&C&&(ed.warning("Unmatched lines:"),n.forEach(function(e){return console.log(" ".concat(e))}))}function eI(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,i=e.line,c=e.column,o=e.ruleId,a=e.message;n.push({type:r===2?"error":"warning",file:t,position:"".concat(i,":").concat(c),rule:o,message:a})})}),n.length&&eg(n)}catch(t){eb(e)}}function eS(e){return eO.apply(this,arguments)}function eO(){eO=i(function(e){var t,n,r,i,c,o,a,s,u;var l=arguments;return m(this,function(f){switch(f.label){case 0:t=l.length>1&&l[1]!==void 0?l[1]:eI;n=new AbortController;j.default.on("SIGINT",function(){ed.warning("Process interrupted. Terminating..."),n.abort(),j.default.exit()});f.label=1;case 1:f.trys.push([1,3,,4]);return[4,ec(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=f.sent(),i=r.stdout,c=r.stderr;[i,c].forEach(function(e){return e&&t(e)});return[3,4];case 3:o=f.sent();a=o.stdout,s=o.stderr,u=o.message;[a,s].forEach(function(e){return e&&t(e)}),!s&&!a&&ed.error("Command failed: ".concat(u));return[3,4];case 4:return[2]}})});return eO.apply(this,arguments)}function eN(e){return{raw:!0,cmd:e}}function ew(e,t){return(t===null||t===void 0?void 0:t.isRemote)?"".concat(e5," ").concat(eL," ").concat(e):(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(e5," ").concat(e2," src/cli.ts ").concat(e):"".concat(e5," ").concat(eJ," ").concat(e)}function eT(e,t){return typeof e=="function"?ew(e(t),t):(typeof e==="undefined"?"undefined":g(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?ew(e,t):e}function eP(e){return eC.apply(this,arguments)}function eC(){eC=i(function(e){var t,n,r,i,c,o,a;var s=arguments;return m(this,function(u){switch(u.label){case 0:t=s.length>1&&s[1]!==void 0?s[1]:{};r=(n=t===null||t===void 0?void 0:t.isRemote)!==null&&n!==void 0?n:!1;if(!r)return[3,1];a=!1;return[3,3];case 1:return[4,er(eL)];case 2:a=u.sent().isCurrentProject;u.label=3;case 3:i=a,c={isRemote:r,isCurrentProject:i},o=typeof e=="function"?e(c):e;return[2,Object.fromEntries(Object.entries(o).map(function(e){var t=d(e,2),n=t[0],r=t[1];return[n,eT(r,c)]}))]}})});return eC.apply(this,arguments)}var eD=D.default.env.INIT_CWD||D.default.cwd(),eL="@cyberskill/shared",eA=".cyberskill-storage",eR="node_modules",ej="dist",eG="package.json",eM="package-lock.json",ek="tsconfig.json",eF=".gitignore",eK=".simple-git-hooks.json",ex="pnpm-lock.yaml",eU=".git/hooks/",eB=".git/COMMIT_EDITMSG",eY=V(eD,eR,eL,ej),eJ="cyberskill",eV="eslint",eW="eslint",eq="vitest",eX="playwright",eH="vitest",e$="@commitlint/cli",ez="commitlint",eQ="lint-staged",eZ="lint-staged",e0="typescript",e1="tsc",e2="tsx",e4="git",e3="pnpm",e5="pnpm exec",e6="simple-git-hooks",e8="simple-git-hooks",e7="@eslint/config-inspector",e9="eslint-config-inspector",te="node-modules-inspector",tt="node-modules-inspector",tn={CYBERSKILL_DIRECTORY:eY,WORKING_DIRECTORY:eD,TS_CONFIG:J(ek),GIT_IGNORE:J(eF),GIT_HOOK:J(eU),GIT_COMMIT_MSG:J(eB),SIMPLE_GIT_HOOKS_JSON:J(eK),PACKAGE_JSON:J(eG),PACKAGE_LOCK_JSON:J(eM),PNPM_LOCK_YAML:J(ex),NODE_MODULES:J(eR),CYBERSKILL:{LINT_STAGED_CONFIG:J("".concat(eY,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:J("".concat(eY,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:J("".concat(eY,"/configs/vitest/react/unit.js")),UNIT_TEST_SETUP_CONFIG:J("".concat(eY,"/configs/vitest/react/unit.setup.js")),E2E_TEST_CONFIG:J("".concat(eY,"/configs/vitest/react/e2e.js"))}};function tr(e){var t=e.isCurrentProject;return l({"pre-commit":eZ,"commit-msg":ez},t&&{"pre-push":eN("".concat(e4," pull"))})}function ti(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 i=d(n,2),c=i[0],o=i[1];switch(e){case"PNPM_ADD_AND_EXEC":return eT(eN("".concat(e3," add ").concat(c," && ").concat(e5," ").concat(o)));case"PNPM_ADD_DEV_AND_EXEC":return eT(eN("".concat(e3," add -D ").concat(c," && ").concat(e5," ").concat(o)));case"RAW":return eT(eN(c))}}var tc={SIMPLE_GIT_HOOKS:ti("PNPM_ADD_DEV_AND_EXEC",e6,e8),ESLINT_INSPECT:ti("PNPM_ADD_DEV_AND_EXEC",e7,e9),NODE_MODULES_INSPECT:ti("PNPM_ADD_DEV_AND_EXEC",te,tt),ESLINT_CHECK:ti("PNPM_ADD_DEV_AND_EXEC",eV,"".concat(eW," ").concat(tn.WORKING_DIRECTORY)),ESLINT_FIX:ti("PNPM_ADD_DEV_AND_EXEC",eV,"".concat(eW," ").concat(tn.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:ti("PNPM_ADD_AND_EXEC",e0,"".concat(e1," -p ").concat(tn.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:ti("RAW","".concat(e4," config core.hooksPath ").concat(tn.GIT_HOOK)),BUILD:ti("RAW","".concat(e3," run build")),STAGE_BUILD_DIRECTORY:ti("RAW","".concat(e4," add ").concat(ej)),PNPM_INSTALL_STANDARD:ti("RAW","".concat(e3," install")),PNPM_INSTALL_LEGACY:ti("RAW","".concat(e3," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:ti("RAW","".concat(e3," install --force")),CYBERSKILL:{TEST_UNIT:ti("PNPM_ADD_AND_EXEC",eq,"".concat(eH," --config ").concat(tn.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:ti("PNPM_ADD_AND_EXEC","".concat(eq," ").concat(eX),"".concat(eH," --config ").concat(tn.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:ti("PNPM_ADD_DEV_AND_EXEC",e$,"".concat(ez," --edit ").concat(tn.GIT_COMMIT_MSG," --config ").concat(tn.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:ti("PNPM_ADD_DEV_AND_EXEC",eQ,"".concat(eZ," --config ").concat(tn.CYBERSKILL.LINT_STAGED_CONFIG))}};function to(e,t){return ta.apply(this,arguments)}function ta(){ta=i(function(e,t){return m(this,function(n){switch(n.label){case 0:ed.info("".concat(e,"...")),C&&ed.info("Executing command: ".concat(t));return[4,eS(t)];case 1:n.sent(),ed.success("".concat(e," completed successfully."));return[2]}})});return ta.apply(this,arguments)}function ts(){return tu.apply(this,arguments)}function tu(){tu=i(function(){var e;return m(this,function(t){switch(t.label){case 0:if(!F(tn.TS_CONFIG))return[3,2];return[4,to("Performing TypeScript validation",tc.TYPESCRIPT_CHECK)];case 1:e=t.sent();return[3,3];case 2:e=ed.warning("No TypeScript configuration found. Skipping type check.");t.label=3;case 3:e;return[2]}})});return tu.apply(this,arguments)}function tl(){return tf.apply(this,arguments)}function tf(){tf=i(function(){var e,t;var n=arguments;return m(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,to("Running ESLint with auto-fix",tc.ESLINT_FIX)];case 1:t=r.sent();return[3,4];case 2:return[4,to("Running ESLint check",tc.ESLINT_CHECK)];case 3:t=r.sent();r.label=4;case 4:t;return[2]}})});return tf.apply(this,arguments)}function tp(){return td.apply(this,arguments)}function td(){td=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:return[4,em()];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?ed.printBoxedLog("✔ NO ISSUES FOUND","",{color:"green"}):(ed.printBoxedLog("⚠ Warnings",n,{color:"yellow"}),ed.printBoxedLog("✖ Errors",t,{color:"red"}));return[2]}})});return td.apply(this,arguments)}function th(){return tg.apply(this,arguments)}function tg(){tg=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:return[4,e_()];case 1:r.sent();return[4,er(eL)];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,to("Building package: ".concat(eL),tc.BUILD)];case 4:r.sent();return[4,to("Staging build artifacts",tc.STAGE_BUILD_DIRECTORY)];case 5:r.sent();return[3,7];case 6:n=r.sent();throw ed.error("Error building and staging ".concat(eL,": ").concat(n.message)),n;case 7:return[4,to("Executing lint-staged",tc.CYBERSKILL.LINT_STAGED)];case 8:r.sent(),tp();return[2]}})});return tg.apply(this,arguments)}function ty(){return tm.apply(this,arguments)}function tm(){tm=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Inspecting ESLint configuration",tc.ESLINT_INSPECT)];case 1:e.sent();return[2]}})});return tm.apply(this,arguments)}function tv(){return t_.apply(this,arguments)}function t_(){t_=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,e_()];case 1:e.sent();return[4,Promise.all([ts(),tl()])];case 2:e.sent(),tp();return[2]}})});return t_.apply(this,arguments)}function tE(){return tb.apply(this,arguments)}function tb(){tb=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,e_()];case 1:e.sent();return[4,Promise.all([ts(),tl(!0)])];case 2:e.sent(),tp();return[2]}})});return tb.apply(this,arguments)}function tI(){return tS.apply(this,arguments)}function tS(){tS=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,e_()];case 1:e.sent();return[4,to("Validating commit message",tc.CYBERSKILL.COMMIT_LINT)];case 2:e.sent(),tp();return[2]}})});return tS.apply(this,arguments)}function tO(){return tN.apply(this,arguments)}function tN(){tN=i(function(){var e,t;return m(this,function(n){switch(n.label){case 0:return[4,to("Configuring Git hooks",tc.CONFIGURE_GIT_HOOK)];case 1:n.sent(),B([tn.GIT_HOOK]);return[4,eP(tr)];case 2:e=n.sent();x(tn.SIMPLE_GIT_HOOKS_JSON,e,{isJson:!0});t="\n".concat(eK,"\n");F(tn.GIT_IGNORE)?K(tn.GIT_IGNORE).split("\n").includes(eK)||U(tn.GIT_IGNORE,t):x(tn.GIT_IGNORE,t);return[4,to("Installing simple-git-hooks",tc.SIMPLE_GIT_HOOKS)];case 3:n.sent();return[2]}})});return tN.apply(this,arguments)}function tw(){return tT.apply(this,arguments)}function tT(){tT=i(function(){var e,t,n,r,i,c,o,a,s,u,l;return m(this,function(f){switch(f.label){case 0:e=[{command:tc.PNPM_INSTALL_STANDARD,message:"Installing dependencies (standard)"},{command:tc.PNPM_INSTALL_LEGACY,message:"Retrying with legacy peer dependencies"},{command:tc.PNPM_INSTALL_FORCE,message:"Retrying with force install"}];t=true,n=false,r=undefined;f.label=1;case 1:f.trys.push([1,8,9,10]);i=e[Symbol.iterator]();f.label=2;case 2:if(!!(t=(c=i.next()).done))return[3,7];o=c.value,a=o.command,s=o.message;f.label=3;case 3:f.trys.push([3,5,,6]);return[4,to("".concat(s," using: ").concat(a),a)];case 4:f.sent();return[2];case 5:u=f.sent();ed.warning("Installation attempt failed: ".concat(a)),ed.error("Details: ".concat(u.message));return[3,6];case 6:t=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(!t&&i.return!=null){i.return()}}finally{if(n){throw r}}return[7];case 10:throw new Error("All dependency installation strategies failed.")}})});return tT.apply(this,arguments)}function tP(e){return tC.apply(this,arguments)}function tC(){tC=i(function(e){var t,n,r,i,o;return m(this,function(a){switch(a.label){case 0:a.trys.push([0,4,,5]);return[4,er(e)];case 1:t=a.sent(),n=t.installedPath,r=t.latestVersion,i=t.file;i.dependencies=p(l({},i.dependencies),c({},i.name,r)),x(n,i,{isJson:!0});return[4,tw()];case 2:a.sent();return[4,tE()];case 3:a.sent();return[3,5];case 4:o=a.sent();throw ed.error('Failed to update "'.concat(e,'": ').concat(o.message)),o;case 5:return[2]}})});return tC.apply(this,arguments)}function tD(){return tL.apply(this,arguments)}function tL(){tL=i(function(){var e,t,n,r,i,c,o;return m(this,function(a){switch(a.label){case 0:if(!F(tn.PACKAGE_JSON)){ed.error("package.json not found. Aborting setup.");return[2]}a.label=1;case 1:a.trys.push([1,7,,8]);return[4,er(eL)];case 2:e=a.sent(),t=e.isInstalled,n=e.installedVersion,r=e.latestVersion,i=e.isCurrentProject;if(!(i||t&&n===r))return[3,3];c=ed.success("Cyberskill package is already up to date.");return[3,5];case 3:return[4,tP(eL)];case 4:c=a.sent();a.label=5;case 5:c;return[4,tO()];case 6:a.sent();return[3,8];case 7:o=a.sent();throw ed.error("Project setup failed: ".concat(o.message)),o;case 8:return[2]}})});return tL.apply(this,arguments)}function tA(){return tR.apply(this,arguments)}function tR(){tR=i(function(){return m(this,function(e){switch(e.label){case 0:B([tn.NODE_MODULES,tn.PNPM_LOCK_YAML]);return[4,tw()];case 1:e.sent();return[4,tO()];case 2:e.sent();return[2]}})});return tR.apply(this,arguments)}function tj(){return tG.apply(this,arguments)}function tG(){tG=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Inspecting project dependencies",tc.NODE_MODULES_INSPECT)];case 1:e.sent();return[2]}})});return tG.apply(this,arguments)}function tM(){return tk.apply(this,arguments)}function tk(){tk=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Running unit tests",tc.CYBERSKILL.TEST_UNIT)];case 1:e.sent();return[2]}})});return tk.apply(this,arguments)}function tF(){return tK.apply(this,arguments)}function tK(){tK=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Running end-to-end tests",tc.CYBERSKILL.TEST_E2E)];case 1:e.sent();return[2]}})});return tK.apply(this,arguments)}(0,P.default)((0,T.hideBin)(w.default.argv)).scriptName(eJ).usage("$0 <command> [options]").command("lint","Check code for linting issues",tv).command("lint:fix","Fix linting issues automatically",tE).command("lint:inspect","View active ESLint configuration",ty).command("lint-staged","Run lint checks on staged files",th).command("commitlint","Validate commit message format",tI).command("setup","Initialize project setup and dependencies",tD).command("reset","Reset the project and reinstall dependencies",tA).command("inspect","Analyze installed project dependencies",tj).command("test:unit","Run unit test suite",tM).command("test:e2e","Run end-to-end test suite",tF).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").epilog('\uD83D\uDCA1 Tip: Use "--help" with any command to see options\n').parse();
|
|
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,i,c,a){try{var o=e[c](a);var s=o.value}catch(e){n(e);return}if(o.done){t(s)}else{Promise.resolve(s).then(r,i)}}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,c){var a=e.apply(t,n);function o(e){r(a,i,c,o,s,"next",e)}function s(e){r(a,i,c,o,s,"throw",e)}o(undefined)})}}function c(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 a(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 i=true;var c=false;var a,o;try{for(n=n.call(e);!(i=(a=n.next()).done);i=true){r.push(a.value);if(t&&r.length===t)break}}catch(e){c=true;o=e}finally{try{if(!i&&n["return"]!=null)n["return"]()}finally{if(c)throw o}}return r}function s(){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){c(e,t,n[t])})}return e}function f(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 p(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{f(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d(e,n){return t(e)||o(e,n)||y(e,n)||s()}function h(e){return n(e)||a(e)||y(e)||u()}function g(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 m(e,t){var n,r,i,c,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return c={next:o(0),"throw":o(1),"return":o(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function o(e){return function(t){return s([e,t])}}function s(c){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:a.label++;return{value:c[1],done:false};case 5:a.label++;r=c[1];c=[0];continue;case 7:c=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1];i=c;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(c);break}if(i[2])a.ops.pop();a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var v=Object.create;var _=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var O=function(e,t,n,r){var i=true,c=false,a=undefined;if(t&&(typeof t==="undefined"?"undefined":g(t))=="object"||typeof t=="function")try{var o=function(){var i=u.value;!S.call(e,i)&&i!==n&&_(e,i,{get:function(){return t[i]},enumerable:!(r=E(t,i))||r.enumerable})};for(var s=b(t)[Symbol.iterator](),u;!(i=(u=s.next()).done);i=true)o()}catch(e){c=true;a=e}finally{try{if(!i&&s.return!=null){s.return()}}finally{if(c){throw a}}}return e};var N=function(e,t,n){return n=e!=null?v(I(e)):{},O(t||!e||!e.__esModule?_(n,"default",{value:e,enumerable:!0}):n,e)};var w=N(require("process"),1),T=require("yargs/helpers"),P=N(require("yargs/yargs"),1);var C=N(require("process"),1);var D=C.default.env.DEBUG==="true";var L=N(require("process"),1);var A=N(require("boxen"),1),R=N(require("chalk"),1),j=require("child_process"),G=N(require("process"),1),M=N(require("util"),1);var k=N(require("node-fetch"),1);var F=N(require("fs"),1),K=function(e){return F.existsSync(e)};function x(e,t){var n=F.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":g(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 U(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,i=r===void 0?!1:r,c=i&&(typeof t==="undefined"?"undefined":g(t))=="object"?JSON.stringify(t,null,4):String(t);F.writeFileSync(e,c,"utf-8")}function B(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=n.isJson,i=r===void 0?!1:r,c=i&&(typeof t==="undefined"?"undefined":g(t))=="object"?JSON.stringify(t,null,4):String(t);F.appendFileSync(e,c,"utf-8")}function Y(e){e.forEach(function(e){K(e)&&F.rmSync(e,{recursive:!0,force:!0})})}var J=N(require("path"),1);function V(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=J).resolve.apply(r,[eL].concat(h(t)))}function W(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=J).join.apply(r,h(t))}var q=N(require("node-persist"),1),X=N(require("os"),1),H=N(require("process"),1);function $(){return H.default.env.CYBERSKILL_STORAGE_DIR||W(X.default.homedir(),eR)}function z(){return Q.apply(this,arguments)}function Q(){Q=i(function(){var e;return m(this,function(t){switch(t.label){case 0:e=q.default.defaultInstance;if(e)return[3,2];return[4,q.default.init({dir:$(),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 Q.apply(this,arguments)}var Z={get:function e(e){return i(function(){var t,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,z()];case 1:r.sent();return[4,q.default.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,(console.error('❌ [Storage:get] Error getting key "'.concat(e,'":'),n),null)];case 4:return[2]}})})()},set:function e(e,t){return i(function(){var n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,z()];case 1:r.sent();return[4,q.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();console.error('❌ [Storage:set] Error setting key "'.concat(e,'":'),n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return i(function(){var t;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,z()];case 1:n.sent();return[4,q.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();console.error('❌ [Storage:remove] Error removing key "'.concat(e,'":'),t);return[3,4];case 4:return[2]}})})()},keys:function e(){return i(function(){var e,t;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,z()];case 1:n.sent();return[4,q.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(console.warn("⚠️ [Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,(console.error("❌ [Storage:keys] Error getting keys:",t),[])];case 4:return[2]}})})()},getLogLink:function e(e){return i(function(){return m(this,function(t){try{return[2,"".concat($()," (key: ").concat(e,")")]}catch(e){return[2,(console.error("❌ [Storage:getLogLink] Error getting log link:",e),null)]}return[2]})})()}};var ee=24*60*60*1e3;function et(e){var t=W(eL,eM);if(K(t))try{var n=x(t,{asJson:!0});if(n.name===e)return{path:t,file:n,isCurrentProject:!0}}catch(e){eh.warning("Failed to read local package.json: ".concat(e.message))}var r=W(eL,ej,e,eM);if(K(r))try{var i=x(r,{asJson:!0});if(i.name===e)return{path:r,file:i,isCurrentProject:!1}}catch(t){eh.warning("Failed to read node_modules package.json for ".concat(e,": ").concat(t.message))}return!1}function en(e){return er.apply(this,arguments)}function er(){er=i(function(e){var t,n,r,i,c,a,o,s,u,l;var f=arguments;return m(this,function(p){switch(p.label){case 0:t=f.length>1&&f[1]!==void 0?f[1]:!1;n="npm_version:".concat(e),r="npm_metadata:".concat(e);return[4,Z.get(n)];case 1:i=p.sent();return[4,Z.get(r)];case 2:c=p.sent(),a=i&&Date.now()-i.timestamp<ee;if(!t&&a)return[2,i.version];o={};(c===null||c===void 0?void 0:c.etag)&&(o["If-None-Match"]=c.etag),(c===null||c===void 0?void 0:c.lastModified)&&(o["If-Modified-Since"]=c.lastModified);p.label=3;case 3:p.trys.push([3,8,,9]);return[4,(0,k.default)("https://registry.npmjs.org/".concat(e,"/latest"),{headers:o})];case 4:s=p.sent();if(s.status===304&&i)return[2,i.version];if(!s.ok)throw new Error("Failed to fetch latest version: ".concat(s.statusText));return[4,s.json()];case 5:u=p.sent().version;return[4,Z.set(n,{version:u,timestamp:Date.now()})];case 6:p.sent();return[4,Z.set(r,{etag:s.headers.get("ETag")||void 0,lastModified:s.headers.get("Last-Modified")||void 0})];case 7:return[2,(p.sent(),u)];case 8:l=p.sent();if(eh.error("Error fetching latest version for ".concat(e,": ").concat(l.message)),i)return[2,(eh.warning("Falling back to cached version for ".concat(e,": ").concat(i.version)),i.version)];throw l;case 9:return[2]}})});return er.apply(this,arguments)}function ei(e){return ec.apply(this,arguments)}function ec(){ec=i(function(e){var t,n,r,i,c;return m(this,function(a){switch(a.label){case 0:t={isInstalled:!1,isCurrentProject:!1,installedPath:"",installedVersion:"",latestVersion:"",file:{}};a.label=1;case 1:a.trys.push([1,6,,7]);n=et(e);r=n;if(!r)return[3,5];t.file=n.file,t.isInstalled=!0,t.installedPath=n.path,t.installedVersion=n.file.version,t.isCurrentProject=n.isCurrentProject;if(!n.isCurrentProject)return[3,2];i=n.file.version;return[3,4];case 2:return[4,en(e,!0)];case 3:i=a.sent();a.label=4;case 4:r=t.latestVersion=i;a.label=5;case 5:return[2,(r,t)];case 6:c=a.sent();return[2,(eh.error('Error checking package "'.concat(e,'": ').concat(c.message)),t)];case 7:return[2]}})});return ec.apply(this,arguments)}var ea=M.promisify(j.exec),eo=R.default,es=eo.gray,eu=eo.blue;function el(){return es("[".concat(new Date().toLocaleTimeString(),"]"))}function ef(e){var t=R.default[e];return typeof t=="function"?t:R.default.green}function ep(e,t,n,r){var i=ef(t);console.log("".concat(el()," ").concat(i("".concat(n," ").concat(e))," ").concat(r))}function ed(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.color,i=r===void 0?"green":r,c=n.padding,a=c===void 0?1:c,o=n.margin,s=o===void 0?1:o,u=n.borderStyle,l=u===void 0?"round":u,f=n.titleColor,p=f===void 0?"bold":f;var d=ef(i),h=ef(p);if(typeof t=="string"){console.log((0,A.default)(h(d("".concat(e,"\n").concat(t))),{padding:a,margin:s,borderStyle:l,borderColor:i}));return}Array.isArray(t)&&t.length&&(t.forEach(function(e){var t=e.file,n=e.position,r=e.rule,i=e.message;console.log("".concat(el()," ").concat(d("File:")," ").concat(eu("".concat(t).concat(n?":".concat(n):"")))),r&&console.log(" ".concat(d("Rule:")," ").concat(d(r))),console.log(" ".concat(d("Message:")," ").concat(d(i)))}),console.log((0,A.default)(h(d("".concat(e,": ").concat(t.length))),{padding:a,margin:s,borderStyle:l,borderColor:i})),console.log(es("─".repeat(40))))}var eh={success:function(e){return ep("SUCCESS","green","✔",e)},error:function(e){return ep("ERROR","red","✖",e)},warning:function(e){return ep("WARNING","yellow","⚠",e)},info:function(e){return ep("INFO","blue","ℹ",e)},printBoxedLog:ed};function eg(e){return"error_list:".concat(e)}function ey(e){return em.apply(this,arguments)}function em(){em=i(function(e){var t,n,r;return m(this,function(c){switch(c.label){case 0:if(e.length===0)return[2];t=Date.now(),n=eg(t);c.label=1;case 1:c.trys.push([1,3,,4]);return[4,Z.set(n,{errors:e,timestamp:t})];case 2:c.sent(),setTimeout(/*#__PURE__*/i(function(){var e;return m(this,function(t){switch(t.label){case 0:return[4,Z.getLogLink(n)];case 1:e=t.sent();e&&eh.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})}),10);return[3,4];case 3:r=c.sent();eh.error("Failed to save errors: ".concat(r.message));return[3,4];case 4:return[2]}})});return em.apply(this,arguments)}function ev(){return e_.apply(this,arguments)}function e_(){e_=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,Z.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=i(function(e){var t;return m(this,function(n){switch(n.label){case 0:return[4,Z.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,(eh.error("Failed to retrieve stored errors: ".concat(n.message)),[])];case 4:return[2]}})});return e_.apply(this,arguments)}function eE(){return eb.apply(this,arguments)}function eb(){eb=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,Z.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 Z.remove(e)}))];case 2:r.sent();return[3,4];case 3:n=r.sent();eh.error("Failed to clear error lists: ".concat(n.message));return[3,4];case 4:return[2]}})});return eb.apply(this,arguments)}function eI(e){var t=[],n=[],r="",i=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,c=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,a=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var o=i.exec(e)||[],s=c.exec(e)||[],u=a.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()}):s.length?t.push({file:s[1],position:"".concat(s[2],":").concat(s[3]),type:s[4]==="error"?"error":"warning",message:s[5].trim()}):u.length?t.push({file:"commitlint",type:"error",message:u[1].trim(),rule:u[2].trim()}):n.push(e.trim())}}),t.length&&ey(t),n.length&&D&&(eh.warning("Unmatched lines:"),n.forEach(function(e){return console.log(" ".concat(e))}))}function eS(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,i=e.line,c=e.column,a=e.ruleId,o=e.message;n.push({type:r===2?"error":"warning",file:t,position:"".concat(i,":").concat(c),rule:a,message:o})})}),n.length&&ey(n)}catch(t){eI(e)}}function eO(e){return eN.apply(this,arguments)}function eN(){eN=i(function(e){var t,n,r,i,c,a,o,s,u;var l=arguments;return m(this,function(f){switch(f.label){case 0:t=l.length>1&&l[1]!==void 0?l[1]:eS;n=new AbortController;G.default.on("SIGINT",function(){eh.warning("Process interrupted. Terminating..."),n.abort(),G.default.exit()});f.label=1;case 1:f.trys.push([1,3,,4]);return[4,ea(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=f.sent(),i=r.stdout,c=r.stderr;[i,c].forEach(function(e){return e&&t(e)});return[3,4];case 3:a=f.sent();o=a.stdout,s=a.stderr,u=a.message;[o,s].forEach(function(e){return e&&t(e)}),!s&&!o&&eh.error("Command failed: ".concat(u));return[3,4];case 4:return[2]}})});return eN.apply(this,arguments)}function ew(e){return{raw:!0,cmd:e}}function eT(e,t){return(t===null||t===void 0?void 0:t.isRemote)?"".concat(e6," ").concat(eA," ").concat(e):(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(e6," ").concat(e4," src/cli.ts ").concat(e):"".concat(e6," ").concat(eV," ").concat(e)}function eP(e,t){return typeof e=="function"?eT(e(t),t):(typeof e==="undefined"?"undefined":g(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eT(e,t):e}function eC(e){return eD.apply(this,arguments)}function eD(){eD=i(function(e){var t,n,r,i,c,a,o;var s=arguments;return m(this,function(u){switch(u.label){case 0:t=s.length>1&&s[1]!==void 0?s[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,ei(eA)];case 2:o=u.sent().isCurrentProject;u.label=3;case 3:i=o,c={isRemote:r,isCurrentProject:i},a=typeof e=="function"?e(c):e;return[2,Object.fromEntries(Object.entries(a).map(function(e){var t=d(e,2),n=t[0],r=t[1];return[n,eP(r,c)]}))]}})});return eD.apply(this,arguments)}var eL=L.default.env.INIT_CWD||L.default.cwd(),eA="@cyberskill/shared",eR=".cyberskill-storage",ej="node_modules",eG="dist",eM="package.json",ek="package-lock.json",eF="tsconfig.json",eK=".gitignore",ex=".simple-git-hooks.json",eU="pnpm-lock.yaml",eB=".git/hooks/",eY=".git/COMMIT_EDITMSG",eJ=W(eL,ej,eA,eG),eV="cyberskill",eW="eslint",eq="eslint",eX="vitest",eH="playwright",e$="vitest",ez="@commitlint/cli",eQ="commitlint",eZ="lint-staged",e0="lint-staged",e1="typescript",e2="tsc",e4="tsx",e3="git",e5="pnpm",e6="pnpm exec",e8="simple-git-hooks",e7="simple-git-hooks",e9="@eslint/config-inspector",te="eslint-config-inspector",tt="node-modules-inspector",tn="node-modules-inspector",tr={CYBERSKILL_DIRECTORY:eJ,WORKING_DIRECTORY:eL,TS_CONFIG:V(eF),GIT_IGNORE:V(eK),GIT_HOOK:V(eB),GIT_COMMIT_MSG:V(eY),SIMPLE_GIT_HOOKS_JSON:V(ex),PACKAGE_JSON:V(eM),PACKAGE_LOCK_JSON:V(ek),PNPM_LOCK_YAML:V(eU),NODE_MODULES:V(ej),CYBERSKILL:{LINT_STAGED_CONFIG:V("".concat(eJ,"/configs/lint-staged/base.js")),COMMITLINT_CONFIG:V("".concat(eJ,"/configs/commitlint/base.js")),UNIT_TEST_CONFIG:V("".concat(eJ,"/configs/vitest/react/unit.js")),UNIT_TEST_SETUP_CONFIG:V("".concat(eJ,"/configs/vitest/react/unit.setup.js")),E2E_TEST_CONFIG:V("".concat(eJ,"/configs/vitest/react/e2e.js"))}};function ti(e){var t=e.isCurrentProject;return l({"pre-commit":e0,"commit-msg":eQ},t&&{"pre-push":ew("".concat(e3," pull"))})}function tc(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 i=d(n,2),c=i[0],a=i[1],o=e==="RAW"?!0:K(W(tr.NODE_MODULES,c));switch(e){case"PNPM_ADD_AND_EXEC":return eP(ew("".concat(o?"":"".concat(e5," add ").concat(c," && ")).concat(e6," ").concat(a)));case"PNPM_ADD_DEV_AND_EXEC":return eP(ew("".concat(o?"":"".concat(e5," add -D ").concat(c," && ")).concat(e6," ").concat(a)));case"RAW":return eP(ew(c))}}var ta={SIMPLE_GIT_HOOKS:tc("PNPM_ADD_DEV_AND_EXEC",e8,e7),ESLINT_INSPECT:tc("PNPM_ADD_DEV_AND_EXEC",e9,te),NODE_MODULES_INSPECT:tc("PNPM_ADD_DEV_AND_EXEC",tt,tn),ESLINT_CHECK:tc("PNPM_ADD_DEV_AND_EXEC",eW,"".concat(eq," ").concat(tr.WORKING_DIRECTORY)),ESLINT_FIX:tc("PNPM_ADD_DEV_AND_EXEC",eW,"".concat(eq," ").concat(tr.WORKING_DIRECTORY," --fix")),TYPESCRIPT_CHECK:tc("PNPM_ADD_AND_EXEC",e1,"".concat(e2," -p ").concat(tr.TS_CONFIG," --noEmit")),CONFIGURE_GIT_HOOK:tc("RAW","".concat(e3," config core.hooksPath ").concat(tr.GIT_HOOK)),BUILD:tc("RAW","".concat(e5," run build")),STAGE_BUILD_DIRECTORY:tc("RAW","".concat(e3," add ").concat(eG)),PNPM_INSTALL_STANDARD:tc("RAW","".concat(e5," install")),PNPM_INSTALL_LEGACY:tc("RAW","".concat(e5," install --legacy-peer-deps")),PNPM_INSTALL_FORCE:tc("RAW","".concat(e5," install --force")),CYBERSKILL:{TEST_UNIT:tc("PNPM_ADD_AND_EXEC",eX,"".concat(e$," --config ").concat(tr.CYBERSKILL.UNIT_TEST_CONFIG)),TEST_E2E:tc("PNPM_ADD_AND_EXEC","".concat(eX," ").concat(eH),"".concat(e$," --config ").concat(tr.CYBERSKILL.E2E_TEST_CONFIG)),COMMIT_LINT:tc("PNPM_ADD_DEV_AND_EXEC",ez,"".concat(eQ," --edit ").concat(tr.GIT_COMMIT_MSG," --config ").concat(tr.CYBERSKILL.COMMITLINT_CONFIG)),LINT_STAGED:tc("PNPM_ADD_DEV_AND_EXEC",eZ,"".concat(e0," --config ").concat(tr.CYBERSKILL.LINT_STAGED_CONFIG))}};function to(e,t){return ts.apply(this,arguments)}function ts(){ts=i(function(e,t){return m(this,function(n){switch(n.label){case 0:eh.info("".concat(e,"...")),D&&eh.info("Executing command: ".concat(t));return[4,eO(t)];case 1:n.sent(),eh.success("".concat(e," completed successfully."));return[2]}})});return ts.apply(this,arguments)}function tu(){return tl.apply(this,arguments)}function tl(){tl=i(function(){var e;return m(this,function(t){switch(t.label){case 0:if(!K(tr.TS_CONFIG))return[3,2];return[4,to("Performing TypeScript validation",ta.TYPESCRIPT_CHECK)];case 1:e=t.sent();return[3,3];case 2:e=eh.warning("No TypeScript configuration found. Skipping type check.");t.label=3;case 3:e;return[2]}})});return tl.apply(this,arguments)}function tf(){return tp.apply(this,arguments)}function tp(){tp=i(function(){var e,t;var n=arguments;return m(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,to("Running ESLint with auto-fix",ta.ESLINT_FIX)];case 1:t=r.sent();return[3,4];case 2:return[4,to("Running ESLint check",ta.ESLINT_CHECK)];case 3:t=r.sent();r.label=4;case 4:t;return[2]}})});return tp.apply(this,arguments)}function td(){return th.apply(this,arguments)}function th(){th=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:return[4,ev()];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?eh.printBoxedLog("✔ NO ISSUES FOUND","",{color:"green"}):(eh.printBoxedLog("⚠ Warnings",n,{color:"yellow"}),eh.printBoxedLog("✖ Errors",t,{color:"red"}));return[2]}})});return th.apply(this,arguments)}function tg(){return ty.apply(this,arguments)}function ty(){ty=i(function(){var e,t,n;return m(this,function(r){switch(r.label){case 0:return[4,eE()];case 1:r.sent();return[4,ei(eA)];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,to("Building package: ".concat(eA),ta.BUILD)];case 4:r.sent();return[4,to("Staging build artifacts",ta.STAGE_BUILD_DIRECTORY)];case 5:r.sent();return[3,7];case 6:n=r.sent();throw eh.error("Error building and staging ".concat(eA,": ").concat(n.message)),n;case 7:return[4,to("Executing lint-staged",ta.CYBERSKILL.LINT_STAGED)];case 8:r.sent(),td();return[2]}})});return ty.apply(this,arguments)}function tm(){return tv.apply(this,arguments)}function tv(){tv=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Inspecting ESLint configuration",ta.ESLINT_INSPECT)];case 1:e.sent();return[2]}})});return tv.apply(this,arguments)}function t_(){return tE.apply(this,arguments)}function tE(){tE=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,eE()];case 1:e.sent();return[4,Promise.all([tu(),tf()])];case 2:e.sent(),td();return[2]}})});return tE.apply(this,arguments)}function tb(){return tI.apply(this,arguments)}function tI(){tI=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,eE()];case 1:e.sent();return[4,Promise.all([tu(),tf(!0)])];case 2:e.sent(),td();return[2]}})});return tI.apply(this,arguments)}function tS(){return tO.apply(this,arguments)}function tO(){tO=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,eE()];case 1:e.sent();return[4,to("Validating commit message",ta.CYBERSKILL.COMMIT_LINT)];case 2:e.sent(),td();return[2]}})});return tO.apply(this,arguments)}function tN(){return tw.apply(this,arguments)}function tw(){tw=i(function(){var e,t;return m(this,function(n){switch(n.label){case 0:return[4,to("Configuring Git hooks",ta.CONFIGURE_GIT_HOOK)];case 1:n.sent(),Y([tr.GIT_HOOK]);return[4,eC(ti)];case 2:e=n.sent();U(tr.SIMPLE_GIT_HOOKS_JSON,e,{isJson:!0});t="\n".concat(ex,"\n");K(tr.GIT_IGNORE)?x(tr.GIT_IGNORE).split("\n").includes(ex)||B(tr.GIT_IGNORE,t):U(tr.GIT_IGNORE,t);return[4,to("Installing simple-git-hooks",ta.SIMPLE_GIT_HOOKS)];case 3:n.sent();return[2]}})});return tw.apply(this,arguments)}function tT(){return tP.apply(this,arguments)}function tP(){tP=i(function(){var e,t,n,r,i,c,a,o,s,u,l;return m(this,function(f){switch(f.label){case 0:e=[{command:ta.PNPM_INSTALL_STANDARD,message:"Installing dependencies (standard)"},{command:ta.PNPM_INSTALL_LEGACY,message:"Retrying with legacy peer dependencies"},{command:ta.PNPM_INSTALL_FORCE,message:"Retrying with force install"}];t=true,n=false,r=undefined;f.label=1;case 1:f.trys.push([1,8,9,10]);i=e[Symbol.iterator]();f.label=2;case 2:if(!!(t=(c=i.next()).done))return[3,7];a=c.value,o=a.command,s=a.message;f.label=3;case 3:f.trys.push([3,5,,6]);return[4,to("".concat(s," using: ").concat(o),o)];case 4:f.sent();return[2];case 5:u=f.sent();eh.warning("Installation attempt failed: ".concat(o)),eh.error("Details: ".concat(u.message));return[3,6];case 6:t=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(!t&&i.return!=null){i.return()}}finally{if(n){throw r}}return[7];case 10:throw new Error("All dependency installation strategies failed.")}})});return tP.apply(this,arguments)}function tC(e){return tD.apply(this,arguments)}function tD(){tD=i(function(e){var t,n,r,i,a;return m(this,function(o){switch(o.label){case 0:o.trys.push([0,4,,5]);return[4,ei(e)];case 1:t=o.sent(),n=t.installedPath,r=t.latestVersion,i=t.file;i.dependencies=p(l({},i.dependencies),c({},i.name,r)),U(n,i,{isJson:!0});return[4,tT()];case 2:o.sent();return[4,tb()];case 3:o.sent();return[3,5];case 4:a=o.sent();throw eh.error('Failed to update "'.concat(e,'": ').concat(a.message)),a;case 5:return[2]}})});return tD.apply(this,arguments)}function tL(){return tA.apply(this,arguments)}function tA(){tA=i(function(){var e,t,n,r,i,c,a;return m(this,function(o){switch(o.label){case 0:if(!K(tr.PACKAGE_JSON)){eh.error("package.json not found. Aborting setup.");return[2]}o.label=1;case 1:o.trys.push([1,7,,8]);return[4,ei(eA)];case 2:e=o.sent(),t=e.isInstalled,n=e.installedVersion,r=e.latestVersion,i=e.isCurrentProject;if(!(i||t&&n===r))return[3,3];c=eh.success("Cyberskill package is already up to date.");return[3,5];case 3:return[4,tC(eA)];case 4:c=o.sent();o.label=5;case 5:c;return[4,tN()];case 6:o.sent();return[3,8];case 7:a=o.sent();throw eh.error("Project setup failed: ".concat(a.message)),a;case 8:return[2]}})});return tA.apply(this,arguments)}function tR(){return tj.apply(this,arguments)}function tj(){tj=i(function(){return m(this,function(e){switch(e.label){case 0:Y([tr.NODE_MODULES,tr.PNPM_LOCK_YAML]);return[4,tT()];case 1:e.sent();return[4,tN()];case 2:e.sent();return[2]}})});return tj.apply(this,arguments)}function tG(){return tM.apply(this,arguments)}function tM(){tM=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Inspecting project dependencies",ta.NODE_MODULES_INSPECT)];case 1:e.sent();return[2]}})});return tM.apply(this,arguments)}function tk(){return tF.apply(this,arguments)}function tF(){tF=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Running unit tests",ta.CYBERSKILL.TEST_UNIT)];case 1:e.sent();return[2]}})});return tF.apply(this,arguments)}function tK(){return tx.apply(this,arguments)}function tx(){tx=i(function(){return m(this,function(e){switch(e.label){case 0:return[4,to("Running end-to-end tests",ta.CYBERSKILL.TEST_E2E)];case 1:e.sent();return[2]}})});return tx.apply(this,arguments)}(0,P.default)((0,T.hideBin)(w.default.argv)).scriptName(eV).usage("$0 <command> [options]").command("lint","Check code for linting issues",t_).command("lint:fix","Fix linting issues automatically",tb).command("lint:inspect","View active ESLint configuration",tm).command("lint-staged","Run lint checks on staged files",tg).command("commitlint","Validate commit message format",tS).command("setup","Initialize project setup and dependencies",tL).command("reset","Reset the project and reinstall dependencies",tR).command("inspect","Analyze installed project dependencies",tG).command("test:unit","Run unit test suite",tk).command("test:e2e","Run end-to-end test suite",tK).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").epilog('\uD83D\uDCA1 Tip: Use "--help" with any command to see options\n').parse();
|