subaya 1.0.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/README.md +156 -0
- package/dist/commands/api/OrpcGeneratorCommand.d.ts +16 -0
- package/dist/commands/api/OrpcGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/api/OrpcGeneratorCommand.js +100 -0
- package/dist/commands/api/OrpcGeneratorCommand.js.map +1 -0
- package/dist/commands/api/generators/ApiMethodGenerator.d.ts +22 -0
- package/dist/commands/api/generators/ApiMethodGenerator.d.ts.map +1 -0
- package/dist/commands/api/generators/ApiMethodGenerator.js +73 -0
- package/dist/commands/api/generators/ApiMethodGenerator.js.map +1 -0
- package/dist/commands/api/generators/QueryStringGenerator.d.ts +7 -0
- package/dist/commands/api/generators/QueryStringGenerator.d.ts.map +1 -0
- package/dist/commands/api/generators/QueryStringGenerator.js +34 -0
- package/dist/commands/api/generators/QueryStringGenerator.js.map +1 -0
- package/dist/commands/api/generators/SchemaGenerator.d.ts +5 -0
- package/dist/commands/api/generators/SchemaGenerator.d.ts.map +1 -0
- package/dist/commands/api/generators/SchemaGenerator.js +61 -0
- package/dist/commands/api/generators/SchemaGenerator.js.map +1 -0
- package/dist/commands/api/services/ApiFileWriter.d.ts +9 -0
- package/dist/commands/api/services/ApiFileWriter.d.ts.map +1 -0
- package/dist/commands/api/services/ApiFileWriter.js +112 -0
- package/dist/commands/api/services/ApiFileWriter.js.map +1 -0
- package/dist/commands/api/services/DependencyChecker.d.ts +6 -0
- package/dist/commands/api/services/DependencyChecker.d.ts.map +1 -0
- package/dist/commands/api/services/DependencyChecker.js +63 -0
- package/dist/commands/api/services/DependencyChecker.js.map +1 -0
- package/dist/commands/api/utils/CommentGenerator.d.ts +6 -0
- package/dist/commands/api/utils/CommentGenerator.d.ts.map +1 -0
- package/dist/commands/api/utils/CommentGenerator.js +52 -0
- package/dist/commands/api/utils/CommentGenerator.js.map +1 -0
- package/dist/commands/api/utils/ParameterExtractor.d.ts +10 -0
- package/dist/commands/api/utils/ParameterExtractor.d.ts.map +1 -0
- package/dist/commands/api/utils/ParameterExtractor.js +29 -0
- package/dist/commands/api/utils/ParameterExtractor.js.map +1 -0
- package/dist/commands/api/utils/ResponseTypeExtractor.d.ts +9 -0
- package/dist/commands/api/utils/ResponseTypeExtractor.d.ts.map +1 -0
- package/dist/commands/api/utils/ResponseTypeExtractor.js +36 -0
- package/dist/commands/api/utils/ResponseTypeExtractor.js.map +1 -0
- package/dist/commands/api/utils/TypeResolver.d.ts +6 -0
- package/dist/commands/api/utils/TypeResolver.d.ts.map +1 -0
- package/dist/commands/api/utils/TypeResolver.js +38 -0
- package/dist/commands/api/utils/TypeResolver.js.map +1 -0
- package/dist/commands/axios/AxiosGeneratorCommand.d.ts +5 -0
- package/dist/commands/axios/AxiosGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/axios/AxiosGeneratorCommand.js +56 -0
- package/dist/commands/axios/AxiosGeneratorCommand.js.map +1 -0
- package/dist/commands/env/EnvGeneratorCommand.d.ts +8 -0
- package/dist/commands/env/EnvGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/env/EnvGeneratorCommand.js +62 -0
- package/dist/commands/env/EnvGeneratorCommand.js.map +1 -0
- package/dist/commands/icon/IconGenerateCommand.d.ts +6 -0
- package/dist/commands/icon/IconGenerateCommand.d.ts.map +1 -0
- package/dist/commands/icon/IconGenerateCommand.js +103 -0
- package/dist/commands/icon/IconGenerateCommand.js.map +1 -0
- package/dist/commands/image/BackgroundRemoveCommand.d.ts +7 -0
- package/dist/commands/image/BackgroundRemoveCommand.d.ts.map +1 -0
- package/dist/commands/image/BackgroundRemoveCommand.js +89 -0
- package/dist/commands/image/BackgroundRemoveCommand.js.map +1 -0
- package/dist/commands/image/ImageOptimizeCommand.d.ts +8 -0
- package/dist/commands/image/ImageOptimizeCommand.d.ts.map +1 -0
- package/dist/commands/image/ImageOptimizeCommand.js +161 -0
- package/dist/commands/image/ImageOptimizeCommand.js.map +1 -0
- package/dist/commands/image/ImageResizeCommand.d.ts +5 -0
- package/dist/commands/image/ImageResizeCommand.d.ts.map +1 -0
- package/dist/commands/image/ImageResizeCommand.js +64 -0
- package/dist/commands/image/ImageResizeCommand.js.map +1 -0
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +4 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/localstorage/LocalstorageGeneratorCommand.d.ts +5 -0
- package/dist/commands/localstorage/LocalstorageGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/localstorage/LocalstorageGeneratorCommand.js +45 -0
- package/dist/commands/localstorage/LocalstorageGeneratorCommand.js.map +1 -0
- package/dist/commands/provider/ProviderGeneratorCommand.d.ts +5 -0
- package/dist/commands/provider/ProviderGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/provider/ProviderGeneratorCommand.js +54 -0
- package/dist/commands/provider/ProviderGeneratorCommand.js.map +1 -0
- package/dist/commands/route/NextRouteGeneratorCommand.d.ts +12 -0
- package/dist/commands/route/NextRouteGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/route/NextRouteGeneratorCommand.js +126 -0
- package/dist/commands/route/NextRouteGeneratorCommand.js.map +1 -0
- package/dist/commands/share/ShareGeneratorCommand.d.ts +5 -0
- package/dist/commands/share/ShareGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/share/ShareGeneratorCommand.js +44 -0
- package/dist/commands/share/ShareGeneratorCommand.js.map +1 -0
- package/dist/commands/state/StateGeneratorCommand.d.ts +10 -0
- package/dist/commands/state/StateGeneratorCommand.d.ts.map +1 -0
- package/dist/commands/state/StateGeneratorCommand.js +99 -0
- package/dist/commands/state/StateGeneratorCommand.js.map +1 -0
- package/dist/commands/supabase/SupabaseCommand.d.ts +7 -0
- package/dist/commands/supabase/SupabaseCommand.d.ts.map +1 -0
- package/dist/commands/supabase/SupabaseCommand.js +140 -0
- package/dist/commands/supabase/SupabaseCommand.js.map +1 -0
- package/dist/config/defaultConfig.d.ts +4 -0
- package/dist/config/defaultConfig.d.ts.map +1 -0
- package/dist/config/defaultConfig.js +15 -0
- package/dist/config/defaultConfig.js.map +1 -0
- package/dist/config/initial.d.ts +5 -0
- package/dist/config/initial.d.ts.map +1 -0
- package/dist/config/initial.js +32 -0
- package/dist/config/initial.js.map +1 -0
- package/dist/core/BaseCommand.d.ts +10 -0
- package/dist/core/BaseCommand.d.ts.map +1 -0
- package/dist/core/BaseCommand.js +36 -0
- package/dist/core/BaseCommand.js.map +1 -0
- package/dist/core/CommandRegistry.d.ts +15 -0
- package/dist/core/CommandRegistry.d.ts.map +1 -0
- package/dist/core/CommandRegistry.js +58 -0
- package/dist/core/CommandRegistry.js.map +1 -0
- package/dist/core/ConfigManager.d.ts +11 -0
- package/dist/core/ConfigManager.d.ts.map +1 -0
- package/dist/core/ConfigManager.js +42 -0
- package/dist/core/ConfigManager.js.map +1 -0
- package/dist/core/EnsureSystem.d.ts +10 -0
- package/dist/core/EnsureSystem.d.ts.map +1 -0
- package/dist/core/EnsureSystem.js +118 -0
- package/dist/core/EnsureSystem.js.map +1 -0
- package/dist/core/FileSystemService.d.ts +20 -0
- package/dist/core/FileSystemService.d.ts.map +1 -0
- package/dist/core/FileSystemService.js +97 -0
- package/dist/core/FileSystemService.js.map +1 -0
- package/dist/core/FrameworkDetector.d.ts +7 -0
- package/dist/core/FrameworkDetector.d.ts.map +1 -0
- package/dist/core/FrameworkDetector.js +33 -0
- package/dist/core/FrameworkDetector.js.map +1 -0
- package/dist/core/ProviderBuilder.d.ts +25 -0
- package/dist/core/ProviderBuilder.d.ts.map +1 -0
- package/dist/core/ProviderBuilder.js +227 -0
- package/dist/core/ProviderBuilder.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +7 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -0
- package/dist/template/api/gen/httpClient.d.ts +2 -0
- package/dist/template/api/gen/httpClient.d.ts.map +1 -0
- package/dist/template/api/gen/httpClient.js +177 -0
- package/dist/template/api/gen/httpClient.js.map +1 -0
- package/dist/template/api/gen/queryApiClient.d.ts +2 -0
- package/dist/template/api/gen/queryApiClient.d.ts.map +1 -0
- package/dist/template/api/gen/queryApiClient.js +27 -0
- package/dist/template/api/gen/queryApiClient.js.map +1 -0
- package/dist/template/api/gen/queryReactQueryClient.d.ts +13 -0
- package/dist/template/api/gen/queryReactQueryClient.d.ts.map +1 -0
- package/dist/template/api/gen/queryReactQueryClient.js +159 -0
- package/dist/template/api/gen/queryReactQueryClient.js.map +1 -0
- package/dist/template/api/type/httpClientType.d.ts +2 -0
- package/dist/template/api/type/httpClientType.d.ts.map +1 -0
- package/dist/template/api/type/httpClientType.js +2 -0
- package/dist/template/api/type/httpClientType.js.map +1 -0
- package/dist/template/axios/instance.d.ts +2 -0
- package/dist/template/axios/instance.d.ts.map +1 -0
- package/dist/template/axios/instance.js +91 -0
- package/dist/template/axios/instance.js.map +1 -0
- package/dist/template/axios/refresh.d.ts +2 -0
- package/dist/template/axios/refresh.d.ts.map +1 -0
- package/dist/template/axios/refresh.js +81 -0
- package/dist/template/axios/refresh.js.map +1 -0
- package/dist/template/imageAsNext.d.ts +2 -0
- package/dist/template/imageAsNext.d.ts.map +1 -0
- package/dist/template/imageAsNext.js +104 -0
- package/dist/template/imageAsNext.js.map +1 -0
- package/dist/template/localstorage/LocalStorageManager.d.ts +2 -0
- package/dist/template/localstorage/LocalStorageManager.d.ts.map +1 -0
- package/dist/template/localstorage/LocalStorageManager.js +64 -0
- package/dist/template/localstorage/LocalStorageManager.js.map +1 -0
- package/dist/template/localstorage/localStorage.d.ts +2 -0
- package/dist/template/localstorage/localStorage.d.ts.map +1 -0
- package/dist/template/localstorage/localStorage.js +9 -0
- package/dist/template/localstorage/localStorage.js.map +1 -0
- package/dist/template/localstorage/localStorageType.d.ts +2 -0
- package/dist/template/localstorage/localStorageType.d.ts.map +1 -0
- package/dist/template/localstorage/localStorageType.js +6 -0
- package/dist/template/localstorage/localStorageType.js.map +1 -0
- package/dist/template/localstorage/useSharedStorage.d.ts +2 -0
- package/dist/template/localstorage/useSharedStorage.d.ts.map +1 -0
- package/dist/template/localstorage/useSharedStorage.js +24 -0
- package/dist/template/localstorage/useSharedStorage.js.map +1 -0
- package/dist/template/logger/api-logger.d.ts +2 -0
- package/dist/template/logger/api-logger.d.ts.map +1 -0
- package/dist/template/logger/api-logger.js +44 -0
- package/dist/template/logger/api-logger.js.map +1 -0
- package/dist/template/logger/styled-console.d.ts +2 -0
- package/dist/template/logger/styled-console.d.ts.map +1 -0
- package/dist/template/logger/styled-console.js +27 -0
- package/dist/template/logger/styled-console.js.map +1 -0
- package/dist/template/provider/defaultProvider.tsx +6 -0
- package/dist/template/provider/providerTemplates.d.ts +9 -0
- package/dist/template/provider/providerTemplates.d.ts.map +1 -0
- package/dist/template/provider/providerTemplates.js +40 -0
- package/dist/template/provider/providerTemplates.js.map +1 -0
- package/dist/template/provider/providerTemplates.ts +47 -0
- package/dist/template/share/copyText.d.ts +2 -0
- package/dist/template/share/copyText.d.ts.map +1 -0
- package/dist/template/share/copyText.js +12 -0
- package/dist/template/share/copyText.js.map +1 -0
- package/dist/template/share/sharer.d.ts +2 -0
- package/dist/template/share/sharer.d.ts.map +1 -0
- package/dist/template/share/sharer.js +211 -0
- package/dist/template/share/sharer.js.map +1 -0
- package/dist/template/share/useSharer.d.ts +2 -0
- package/dist/template/share/useSharer.d.ts.map +1 -0
- package/dist/template/share/useSharer.js +78 -0
- package/dist/template/share/useSharer.js.map +1 -0
- package/dist/template/state/zustand-persist.d.ts +2 -0
- package/dist/template/state/zustand-persist.d.ts.map +1 -0
- package/dist/template/state/zustand-persist.js +53 -0
- package/dist/template/state/zustand-persist.js.map +1 -0
- package/dist/template/state/zustand-provider-store.d.ts +2 -0
- package/dist/template/state/zustand-provider-store.d.ts.map +1 -0
- package/dist/template/state/zustand-provider-store.js +19 -0
- package/dist/template/state/zustand-provider-store.js.map +1 -0
- package/dist/template/state/zustand-provider.d.ts +2 -0
- package/dist/template/state/zustand-provider.d.ts.map +1 -0
- package/dist/template/state/zustand-provider.js +46 -0
- package/dist/template/state/zustand-provider.js.map +1 -0
- package/dist/template/state/zustand.d.ts +2 -0
- package/dist/template/state/zustand.d.ts.map +1 -0
- package/dist/template/state/zustand.js +38 -0
- package/dist/template/state/zustand.js.map +1 -0
- package/dist/template/supabase/actions/supabaseAdmin.d.ts +2 -0
- package/dist/template/supabase/actions/supabaseAdmin.d.ts.map +1 -0
- package/dist/template/supabase/actions/supabaseAdmin.js +21 -0
- package/dist/template/supabase/actions/supabaseAdmin.js.map +1 -0
- package/dist/template/supabase/actions/supabaseCrud.d.ts +3 -0
- package/dist/template/supabase/actions/supabaseCrud.d.ts.map +1 -0
- package/dist/template/supabase/actions/supabaseCrud.js +72 -0
- package/dist/template/supabase/actions/supabaseCrud.js.map +1 -0
- package/dist/template/supabase/actions/supabaseCrudWithAdmin.d.ts +2 -0
- package/dist/template/supabase/actions/supabaseCrudWithAdmin.d.ts.map +1 -0
- package/dist/template/supabase/actions/supabaseCrudWithAdmin.js +57 -0
- package/dist/template/supabase/actions/supabaseCrudWithAdmin.js.map +1 -0
- package/dist/template/supabase/supabaseAdminLayout.d.ts +2 -0
- package/dist/template/supabase/supabaseAdminLayout.d.ts.map +1 -0
- package/dist/template/supabase/supabaseAdminLayout.js +7 -0
- package/dist/template/supabase/supabaseAdminLayout.js.map +1 -0
- package/dist/template/supabase/supabaseAdminLoginLayout.d.ts +2 -0
- package/dist/template/supabase/supabaseAdminLoginLayout.d.ts.map +1 -0
- package/dist/template/supabase/supabaseAdminLoginLayout.js +121 -0
- package/dist/template/supabase/supabaseAdminLoginLayout.js.map +1 -0
- package/dist/template/supabase/supabaseProxy.d.ts +2 -0
- package/dist/template/supabase/supabaseProxy.d.ts.map +1 -0
- package/dist/template/supabase/supabaseProxy.js +42 -0
- package/dist/template/supabase/supabaseProxy.js.map +1 -0
- package/dist/template/supabase/utilBase.d.ts +3 -0
- package/dist/template/supabase/utilBase.d.ts.map +1 -0
- package/dist/template/supabase/utilBase.js +29 -0
- package/dist/template/supabase/utilBase.js.map +1 -0
- package/dist/types/BaseExtensionCommands.d.ts +38 -0
- package/dist/types/BaseExtensionCommands.d.ts.map +1 -0
- package/dist/types/BaseExtensionCommands.js +20 -0
- package/dist/types/BaseExtensionCommands.js.map +1 -0
- package/dist/types/config.d.ts +19 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/env.d.ts +7 -0
- package/dist/types/env.d.ts.map +1 -0
- package/dist/types/env.js +5 -0
- package/dist/types/env.js.map +1 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/PathSearcher.d.ts +8 -0
- package/dist/utils/PathSearcher.d.ts.map +1 -0
- package/dist/utils/PathSearcher.js +40 -0
- package/dist/utils/PathSearcher.js.map +1 -0
- package/dist/utils/askInput.d.ts +10 -0
- package/dist/utils/askInput.d.ts.map +1 -0
- package/dist/utils/askInput.js +12 -0
- package/dist/utils/askInput.js.map +1 -0
- package/dist/utils/askSections.d.ts +13 -0
- package/dist/utils/askSections.d.ts.map +1 -0
- package/dist/utils/askSections.js +14 -0
- package/dist/utils/askSections.js.map +1 -0
- package/dist/utils/coverHyphenToQuotes.d.ts +2 -0
- package/dist/utils/coverHyphenToQuotes.d.ts.map +1 -0
- package/dist/utils/coverHyphenToQuotes.js +4 -0
- package/dist/utils/coverHyphenToQuotes.js.map +1 -0
- package/dist/utils/pathToAlias.d.ts +2 -0
- package/dist/utils/pathToAlias.d.ts.map +1 -0
- package/dist/utils/pathToAlias.js +4 -0
- package/dist/utils/pathToAlias.js.map +1 -0
- package/dist/utils/showSubaya.d.ts +2 -0
- package/dist/utils/showSubaya.d.ts.map +1 -0
- package/dist/utils/showSubaya.js +14 -0
- package/dist/utils/showSubaya.js.map +1 -0
- package/dist/utils/validateConfig.d.ts +3 -0
- package/dist/utils/validateConfig.d.ts.map +1 -0
- package/dist/utils/validateConfig.js +45 -0
- package/dist/utils/validateConfig.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from "../core/BaseCommand.js";
|
|
2
|
+
export class BaseApiCommand extends BaseCommand {
|
|
3
|
+
}
|
|
4
|
+
export class BaseStateCommand extends BaseCommand {
|
|
5
|
+
}
|
|
6
|
+
export class BaseSupabaseCommand extends BaseCommand {
|
|
7
|
+
}
|
|
8
|
+
export class BaseLocalstorageCommand extends BaseCommand {
|
|
9
|
+
}
|
|
10
|
+
export class BaseAxiosCommand extends BaseCommand {
|
|
11
|
+
}
|
|
12
|
+
export class BaseRouteCommand extends BaseCommand {
|
|
13
|
+
}
|
|
14
|
+
export class BaseEnvCommand extends BaseCommand {
|
|
15
|
+
}
|
|
16
|
+
export class BaseShareCommand extends BaseCommand {
|
|
17
|
+
}
|
|
18
|
+
export class BaseProviderCommand extends BaseCommand {
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=BaseExtensionCommands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseExtensionCommands.js","sourceRoot":"","sources":["../../src/types/BaseExtensionCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD,MAAM,OAAgB,cAAe,SAAQ,WAAW;CAMvD;AAED,MAAM,OAAgB,gBAAiB,SAAQ,WAAW;CAKzD;AAED,MAAM,OAAgB,mBAAoB,SAAQ,WAAW;CAG5D;AAED,MAAM,OAAgB,uBAAwB,SAAQ,WAAW;CAAG;AAEpE,MAAM,OAAgB,gBAAiB,SAAQ,WAAW;CAAG;AAE7D,MAAM,OAAgB,gBAAiB,SAAQ,WAAW;CAGzD;AAED,MAAM,OAAgB,cAAe,SAAQ,WAAW;CAEvD;AAED,MAAM,OAAgB,gBAAiB,SAAQ,WAAW;CAAG;AAE7D,MAAM,OAAgB,mBAAoB,SAAQ,WAAW;CAAG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface DefaultConfigType {
|
|
2
|
+
image: {
|
|
3
|
+
optimize: {
|
|
4
|
+
maxWidth: {
|
|
5
|
+
bg?: number;
|
|
6
|
+
mbg?: number;
|
|
7
|
+
thumb?: number;
|
|
8
|
+
icon?: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
removebg: {
|
|
12
|
+
removebgApiKey: string | null;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
api: {
|
|
16
|
+
baseUrl: string | null;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE;QACL,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,EAAE,CAAC,EAAE,MAAM,CAAA;gBACX,GAAG,CAAC,EAAE,MAAM,CAAA;gBACZ,KAAK,CAAC,EAAE,MAAM,CAAA;gBACd,IAAI,CAAC,EAAE,MAAM,CAAA;aACd,CAAA;SACF,CAAA;QACD,QAAQ,EAAE;YACR,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;SAC9B,CAAA;KACF,CAAA;IACD,GAAG,EAAE;QACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KACvB,CAAA;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/types/env.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,oBAAY,WAAW;IACrB,YAAY,iBAAiB;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/types/env.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,4CAA6B,CAAA;AAC/B,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DefaultConfigType } from "./config.js";
|
|
2
|
+
export type ImageConstant = Record<string, {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}>;
|
|
8
|
+
export interface ParsedImageRule {
|
|
9
|
+
targetFilePath: string;
|
|
10
|
+
matchString: string | null;
|
|
11
|
+
matchKey: string | null;
|
|
12
|
+
resizePercent: number | null;
|
|
13
|
+
resizeMaxWidth: number | null;
|
|
14
|
+
}
|
|
15
|
+
export type Framework = "next" | "react" | "unknown";
|
|
16
|
+
export interface CommandContext {
|
|
17
|
+
config: DefaultConfigType;
|
|
18
|
+
framework: Framework;
|
|
19
|
+
}
|
|
20
|
+
export interface ICommand {
|
|
21
|
+
execute(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export interface SearchResult {
|
|
24
|
+
file: string | null;
|
|
25
|
+
msg: string | null;
|
|
26
|
+
}
|
|
27
|
+
export interface ImageMetadata {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,MAAM,EACN;IACE,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CACF,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEpD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,iBAAiB,CAAA;IACzB,SAAS,EAAE,SAAS,CAAA;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SearchResult } from "../types/index.js";
|
|
2
|
+
export declare class PathSearcher {
|
|
3
|
+
private targetRootPath;
|
|
4
|
+
private extensions;
|
|
5
|
+
constructor(targetRootPath: string, extensions: string[]);
|
|
6
|
+
search(): Promise<SearchResult>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=PathSearcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PathSearcher.d.ts","sourceRoot":"","sources":["../../src/utils/PathSearcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,qBAAa,YAAY;IACvB,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,UAAU,CAAU;gBAEhB,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;IAKlD,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;CAkCtC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import search from "@inquirer/search";
|
|
2
|
+
import fg from "fast-glob";
|
|
3
|
+
import path from "path";
|
|
4
|
+
export class PathSearcher {
|
|
5
|
+
targetRootPath;
|
|
6
|
+
extensions;
|
|
7
|
+
constructor(targetRootPath, extensions) {
|
|
8
|
+
this.targetRootPath = targetRootPath;
|
|
9
|
+
this.extensions = extensions;
|
|
10
|
+
}
|
|
11
|
+
async search() {
|
|
12
|
+
const startPath = path.resolve(process.cwd(), this.targetRootPath);
|
|
13
|
+
const files = await fg(`**/*.{${this.extensions.join(",")}}`, {
|
|
14
|
+
cwd: startPath,
|
|
15
|
+
onlyFiles: true,
|
|
16
|
+
deep: Infinity,
|
|
17
|
+
ignore: ["node_modules", ".git", "dist"],
|
|
18
|
+
});
|
|
19
|
+
if (files.length === 0) {
|
|
20
|
+
return { file: null, msg: "No files found in the target directory." };
|
|
21
|
+
}
|
|
22
|
+
const selectedFile = await search({
|
|
23
|
+
message: "Select image:",
|
|
24
|
+
pageSize: 5,
|
|
25
|
+
source: async (input) => {
|
|
26
|
+
const cleanInput = (input || "").toLowerCase();
|
|
27
|
+
const filteredFiles = files.filter((f) => f.toLowerCase().includes(cleanInput));
|
|
28
|
+
return filteredFiles.map((file) => ({
|
|
29
|
+
name: file,
|
|
30
|
+
value: file,
|
|
31
|
+
}));
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
if (!selectedFile) {
|
|
35
|
+
return { file: null, msg: "Selection canceled." };
|
|
36
|
+
}
|
|
37
|
+
return { file: selectedFile, msg: null };
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=PathSearcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PathSearcher.js","sourceRoot":"","sources":["../../src/utils/PathSearcher.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,kBAAkB,CAAA;AACrC,OAAO,EAAE,MAAM,WAAW,CAAA;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAA;AAGvB,MAAM,OAAO,YAAY;IACf,cAAc,CAAQ;IACtB,UAAU,CAAU;IAE5B,YAAY,cAAsB,EAAE,UAAoB;QACtD,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,MAAM;QACV,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;QAElE,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,SAAS,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;YAC5D,GAAG,EAAE,SAAS;YACd,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC;SACzC,CAAC,CAAA;QAEF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,yCAAyC,EAAE,CAAA;QACvE,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC;YAChC,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,KAAK,EAAE,KAAyB,EAAE,EAAE;gBAC1C,MAAM,UAAU,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;gBAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAA;gBAE/E,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBAClC,IAAI,EAAE,IAAI;oBACV,KAAK,EAAE,IAAI;iBACZ,CAAC,CAAC,CAAA;YACL,CAAC;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAA;QACnD,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;IAC1C,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface InputProps {
|
|
2
|
+
message: string;
|
|
3
|
+
defaultValue?: string;
|
|
4
|
+
validate?: (value: string) => boolean | string | Promise<boolean | string>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 터미널에서 사용자에게 텍스트를 입력받고, 필요 시 유효성을 검사하는 유틸리티 함수
|
|
8
|
+
*/
|
|
9
|
+
export declare function askInput({ message, defaultValue, validate }: InputProps): Promise<string>;
|
|
10
|
+
//# sourceMappingURL=askInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askInput.d.ts","sourceRoot":"","sources":["../../src/utils/askInput.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAA;CAC3E;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { input } from "@inquirer/prompts";
|
|
2
|
+
/**
|
|
3
|
+
* 터미널에서 사용자에게 텍스트를 입력받고, 필요 시 유효성을 검사하는 유틸리티 함수
|
|
4
|
+
*/
|
|
5
|
+
export async function askInput({ message, defaultValue, validate }) {
|
|
6
|
+
return await input({
|
|
7
|
+
message,
|
|
8
|
+
...(defaultValue !== undefined && { default: defaultValue }),
|
|
9
|
+
validate: validate || (() => true), // validate가 없으면 무조건 통과
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=askInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askInput.js","sourceRoot":"","sources":["../../src/utils/askInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AASzC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAc;IAC5E,OAAO,MAAM,KAAK,CAAC;QACjB,OAAO;QACP,GAAG,CAAC,YAAY,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;QAC5D,QAAQ,EAAE,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,uBAAuB;KAC5D,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PromptOption<T> {
|
|
2
|
+
name: string;
|
|
3
|
+
value: T;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PromptProps<T> {
|
|
7
|
+
message: string;
|
|
8
|
+
choices: PromptOption<T>[];
|
|
9
|
+
isMultiple?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function askSelection<T>({ message, choices }: PromptProps<T>): Promise<T>;
|
|
12
|
+
export declare function askMultiSelection<T>({ message, choices }: PromptProps<T>): Promise<T[]>;
|
|
13
|
+
//# sourceMappingURL=askSections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askSections.d.ts","sourceRoot":"","sources":["../../src/utils/askSections.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,CAAC,CAAA;IACR,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,wBAAsB,YAAY,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAKtF;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAK7F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { checkbox, select } from "@inquirer/prompts";
|
|
2
|
+
export async function askSelection({ message, choices }) {
|
|
3
|
+
return await select({
|
|
4
|
+
message,
|
|
5
|
+
choices,
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export async function askMultiSelection({ message, choices }) {
|
|
9
|
+
return await checkbox({
|
|
10
|
+
message,
|
|
11
|
+
choices,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=askSections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askSections.js","sourceRoot":"","sources":["../../src/utils/askSections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAepD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAI,EAAE,OAAO,EAAE,OAAO,EAAkB;IACxE,OAAO,MAAM,MAAM,CAAC;QAClB,OAAO;QACP,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAI,EAAE,OAAO,EAAE,OAAO,EAAkB;IAC7E,OAAO,MAAM,QAAQ,CAAC;QACpB,OAAO;QACP,OAAO;KACR,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverHyphenToQuotes.d.ts","sourceRoot":"","sources":["../../src/utils/coverHyphenToQuotes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,WAE9C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverHyphenToQuotes.js","sourceRoot":"","sources":["../../src/utils/coverHyphenToQuotes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAAE,EAAE;IACjD,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAA;AAC7C,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathToAlias.d.ts","sourceRoot":"","sources":["../../src/utils/pathToAlias.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,WAEvC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathToAlias.js","sourceRoot":"","sources":["../../src/utils/pathToAlias.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE;IAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;AACrC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showSubaya.d.ts","sourceRoot":"","sources":["../../src/utils/showSubaya.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,YAatB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
export const showSubaya = () => {
|
|
3
|
+
console.log(chalk.redBright(`
|
|
4
|
+
┌──────────────────────────────────────────────────────────┐
|
|
5
|
+
______ __ __ _____ ______ __ __ ______
|
|
6
|
+
/ _____/ / / / / / ____) / __ / / /_/ / / __ / ======
|
|
7
|
+
\\__ \\ / / / / / /__ / / /_/ / / /_/ / / /_/ / ======
|
|
8
|
+
____\/\// /_/ / / /__ / / __ / | ___ / / __ / ======
|
|
9
|
+
/_____/|_____/ /______)/_/ |_/ |___// /_/ |_/ ======
|
|
10
|
+
|
|
11
|
+
└──────────────────────────────────────────────────────────┘
|
|
12
|
+
`));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=showSubaya.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showSubaya.js","sourceRoot":"","sources":["../../src/utils/showSubaya.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,SAAS,CAAC;;;;;;;;;KASf,CAAC,CACH,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/utils/validateConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAgD3D,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,iBAAiB,CAE3E"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { config as defaultConfig } from "../config/defaultConfig.js";
|
|
2
|
+
function isPlainObject(value) {
|
|
3
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
function mergeWithValidation(external, defaultVal) {
|
|
6
|
+
if (!isPlainObject(external)) {
|
|
7
|
+
return defaultVal;
|
|
8
|
+
}
|
|
9
|
+
const result = { ...defaultVal };
|
|
10
|
+
if (isPlainObject(external.image)) {
|
|
11
|
+
result.image = { ...defaultVal.image };
|
|
12
|
+
if (isPlainObject(external.image.optimize)) {
|
|
13
|
+
result.image.optimize = { ...defaultVal.image.optimize };
|
|
14
|
+
if (isPlainObject(external.image.optimize.maxWidth)) {
|
|
15
|
+
const mw = external.image.optimize.maxWidth;
|
|
16
|
+
const defMw = defaultVal.image.optimize.maxWidth;
|
|
17
|
+
result.image.optimize.maxWidth = { ...defMw };
|
|
18
|
+
["bg", "mbg", "thumb", "icon"].forEach((k) => {
|
|
19
|
+
if (typeof mw[k] === "number") {
|
|
20
|
+
result.image.optimize.maxWidth[k] = mw[k];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (isPlainObject(external.image.removebg)) {
|
|
26
|
+
const rb = external.image.removebg;
|
|
27
|
+
result.image.removebg = { ...defaultVal.image.removebg };
|
|
28
|
+
if (rb.removebgApiKey === null || typeof rb.removebgApiKey === "string") {
|
|
29
|
+
result.image.removebg.removebgApiKey = rb.removebgApiKey;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (isPlainObject(external.api)) {
|
|
34
|
+
const api = external.api;
|
|
35
|
+
result.api = { ...defaultVal.api };
|
|
36
|
+
if (api.baseUrl === null || typeof api.baseUrl === "string") {
|
|
37
|
+
result.api.baseUrl = api.baseUrl;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
export function validateAndMergeConfig(external) {
|
|
43
|
+
return mergeWithValidation(external, defaultConfig);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=validateConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfig.js","sourceRoot":"","sources":["../../src/utils/validateConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGpE,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC7E,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAiB,EAAE,UAA6B;IAC3E,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,MAAM,MAAM,GAAG,EAAE,GAAG,UAAU,EAAE,CAAA;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,CAAC,KAAK,GAAG,EAAE,GAAG,UAAU,CAAC,KAAK,EAAE,CAAA;QACtC,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3C,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;YACxD,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACpD,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAmC,CAAA;gBACtE,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAA;gBAChD,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,GAAG,EAAE,GAAG,KAAK,EAAE,CAC5C;gBAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;oBACvD,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;wBAC9B,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;oBAC3C,CAAC;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;QACD,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3C,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAmC,CAAA;YAC7D,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;YACxD,IAAI,EAAE,CAAC,cAAc,KAAK,IAAI,IAAI,OAAO,EAAE,CAAC,cAAc,KAAK,QAAQ,EAAE,CAAC;gBACxE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc,GAAG,EAAE,CAAC,cAAc,CAAA;YAC1D,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAA8B,CAAA;QACnD,MAAM,CAAC,GAAG,GAAG,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE,CAAA;QAClC,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC5D,MAAM,CAAC,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;QAClC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,QAAiB;IACtD,OAAO,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAA;AACrD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "subaya",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"bin": {
|
|
6
|
+
"subaya": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prepublishOnly": "npm run build",
|
|
10
|
+
"build": "tsc && npm run copy-templates",
|
|
11
|
+
"copy-templates": "mkdir -p dist/template/provider && cp src/template/provider/defaultProvider.tsx dist/template/provider/ && cp src/template/provider/providerTemplates.ts dist/template/provider/",
|
|
12
|
+
"postbuild": "chmod +x dist/index.js",
|
|
13
|
+
"start": "node dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"description": "A CLI tool for generating boilerplate code for Next.js projects.",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"nextjs",
|
|
22
|
+
"react",
|
|
23
|
+
"cli",
|
|
24
|
+
"boilerplate",
|
|
25
|
+
"generator"
|
|
26
|
+
],
|
|
27
|
+
"author": "",
|
|
28
|
+
"license": "ISC",
|
|
29
|
+
"type": "module",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@imgly/background-removal-node": "^1.x.x",
|
|
32
|
+
"@inquirer/prompts": "8.3.0",
|
|
33
|
+
"@inquirer/search": "4.1.4",
|
|
34
|
+
"@svgr/core": "8.1.0",
|
|
35
|
+
"@svgr/plugin-jsx": "8.1.0",
|
|
36
|
+
"@svgr/plugin-svgo": "8.1.0",
|
|
37
|
+
"chalk": "5.6.2",
|
|
38
|
+
"change-case": "5.4.4",
|
|
39
|
+
"fast-glob": "3.3.3",
|
|
40
|
+
"fs-extra": "11.3.3",
|
|
41
|
+
"glob": "13.0.6",
|
|
42
|
+
"imagemin": "9.0.1",
|
|
43
|
+
"imagemin-pngquant": "10.0.0",
|
|
44
|
+
"inquirer": "13.3.0",
|
|
45
|
+
"ora": "9.3.0",
|
|
46
|
+
"sharp": "0.34.5",
|
|
47
|
+
"ts-morph": "27.0.2"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/fs-extra": "11.0.4",
|
|
51
|
+
"@types/imagemin": "9.0.1",
|
|
52
|
+
"@types/inquirer": "9.0.9",
|
|
53
|
+
"@types/node": "25.3.0",
|
|
54
|
+
"@types/sharp": "0.31.1",
|
|
55
|
+
"ts-node": "10.9.2",
|
|
56
|
+
"typescript": "5.9.3"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@imgly/background-removal-node": "^1.x.x"
|
|
60
|
+
},
|
|
61
|
+
"peerDependenciesMeta": {
|
|
62
|
+
"@imgly/background-removal-node": {
|
|
63
|
+
"optional": true
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|