smule.js 1.2.2 → 1.2.4

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/index.cjs CHANGED
@@ -49,7 +49,6 @@ __export(index_exports, {
49
49
  SingUserProfileRequest: () => SingUserProfileRequest,
50
50
  Smule: () => Smule,
51
51
  SmuleDotCom: () => SmuleDotCom,
52
- SmuleEffects: () => SmuleEffects,
53
52
  SmuleErrorCode: () => SmuleErrorCode,
54
53
  SmuleRegisterErrorCode: () => SmuleRegisterErrorCode,
55
54
  SmuleSession: () => SmuleSession,
@@ -4631,7 +4630,9 @@ var SmuleDotCom = class {
4631
4630
  this.axiosInst = import_axios2.default.create({
4632
4631
  withCredentials: true,
4633
4632
  headers: {
4634
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/237.84.2.178 Safari/537.36"
4633
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/237.84.2.178 Safari/537.36",
4634
+ "Accept": ""
4635
+ // this bitch returns 418 im a teapot! if you have accept set to anything for some fucking reason
4635
4636
  }
4636
4637
  });
4637
4638
  this.cookies = [];
@@ -4887,116 +4888,6 @@ var SmuleDotCom = class {
4887
4888
  return req.data;
4888
4889
  }
4889
4890
  };
4890
-
4891
- // src/smule-effects.ts
4892
- var yauzl = __toESM(require("yauzl"), 1);
4893
- var SmuleEffects;
4894
- ((SmuleEffects2) => {
4895
- function processZipFile(filePath) {
4896
- return new Promise((resolve, reject) => {
4897
- yauzl.open(filePath, { lazyEntries: true, decodeStrings: false }, (err, zipfile) => {
4898
- let filesRead = 0;
4899
- if (err) throw err;
4900
- zipfile.readEntry();
4901
- let data = {
4902
- component_library: {},
4903
- template: {},
4904
- copyright: "my ass",
4905
- files: {}
4906
- };
4907
- zipfile.on("entry", (entry) => {
4908
- let fileName = entry.fileName.toString("utf-8");
4909
- if (fileName.endsWith(".alyc")) {
4910
- if (Object.keys(data.component_library).length > 1) {
4911
- console.warn("[SmuleEffects] Double component_library file? that shouldnt happen i think? Overwriting...");
4912
- }
4913
- zipfile.openReadStream(entry, (err2, stream) => {
4914
- if (err2) throw err2;
4915
- let rawData = [];
4916
- stream.on("data", (chunk) => {
4917
- rawData.push(chunk);
4918
- });
4919
- stream.on("end", () => {
4920
- let componentLibrary = JSON.parse(Buffer.concat(rawData).toString("utf-8"));
4921
- data.component_library = componentLibrary;
4922
- filesRead++;
4923
- });
4924
- });
4925
- } else if (fileName.endsWith(".alyt")) {
4926
- if (Object.keys(data.template).length > 1) {
4927
- console.warn("[SmuleEffects] Double template file? that shouldnt happen i think? Overwriting...");
4928
- }
4929
- zipfile.openReadStream(entry, (err2, stream) => {
4930
- if (err2) throw err2;
4931
- let rawData = [];
4932
- stream.on("data", (chunk) => {
4933
- rawData.push(chunk);
4934
- });
4935
- stream.on("end", () => {
4936
- let template = JSON.parse(Buffer.concat(rawData).toString("utf-8"));
4937
- data.template = template;
4938
- filesRead++;
4939
- });
4940
- });
4941
- } else if (fileName.endsWith(".alyg") || fileName.endsWith(".json")) {
4942
- zipfile.openReadStream(entry, (err2, stream) => {
4943
- if (err2) throw err2;
4944
- let rawData = [];
4945
- stream.on("data", (chunk) => {
4946
- rawData.push(chunk);
4947
- });
4948
- stream.on("end", () => {
4949
- data.files[fileName] = JSON.parse(Buffer.concat(rawData).toString("utf-8"));
4950
- filesRead++;
4951
- });
4952
- });
4953
- } else if (fileName == "copyright.txt") {
4954
- zipfile.openReadStream(entry, (err2, stream) => {
4955
- if (err2) throw err2;
4956
- let rawData = [];
4957
- stream.on("data", (chunk) => {
4958
- rawData.push(chunk);
4959
- });
4960
- stream.on("end", () => {
4961
- data.copyright = Buffer.concat(rawData).toString("utf-8");
4962
- filesRead++;
4963
- });
4964
- });
4965
- } else if (fileName.endsWith(".txt")) {
4966
- zipfile.openReadStream(entry, (err2, stream) => {
4967
- if (err2) throw err2;
4968
- let rawData = [];
4969
- stream.on("data", (chunk) => {
4970
- rawData.push(chunk);
4971
- });
4972
- stream.on("end", () => {
4973
- data.files[fileName] = Buffer.concat(rawData).toString("utf-8");
4974
- filesRead++;
4975
- });
4976
- });
4977
- } else {
4978
- data.files[fileName] = fileName;
4979
- filesRead++;
4980
- }
4981
- zipfile.readEntry();
4982
- });
4983
- zipfile.on("end", () => {
4984
- let entries = zipfile.entriesRead;
4985
- zipfile.close();
4986
- let interval = setInterval(() => {
4987
- if (entries > filesRead) return;
4988
- clearInterval(interval);
4989
- resolve(data);
4990
- }, 1);
4991
- });
4992
- });
4993
- });
4994
- }
4995
- SmuleEffects2.processZipFile = processZipFile;
4996
- function processRawEffects(data) {
4997
- }
4998
- SmuleEffects2.processRawEffects = processRawEffects;
4999
- })(SmuleEffects || (SmuleEffects = {}));
5000
4891
  // Annotate the CommonJS export names for ESM import in node:
5001
4892
  0 && (module.exports = {
5002
4893
  AvTemplateCategoryListRequest,
@@ -5019,7 +4910,6 @@ var SmuleEffects;
5019
4910
  SingUserProfileRequest,
5020
4911
  Smule,
5021
4912
  SmuleDotCom,
5022
- SmuleEffects,
5023
4913
  SmuleErrorCode,
5024
4914
  SmuleRegisterErrorCode,
5025
4915
  SmuleSession,
package/dist/index.d.cts CHANGED
@@ -3672,123 +3672,6 @@ declare namespace SmuleUrls {
3672
3672
  const NoSessionRequired: Set<string>;
3673
3673
  }
3674
3674
 
3675
- declare namespace SmuleEffects {
3676
- type AVFile = {
3677
- component_library: ComponentLibrary;
3678
- template: Template;
3679
- copyright: string;
3680
- files: {
3681
- [key: string]: {} | string;
3682
- };
3683
- };
3684
- type ComponentLibrary = {
3685
- components: Component[];
3686
- copyright: string;
3687
- fallback_component_id: number;
3688
- };
3689
- type Component = {
3690
- component_id: string;
3691
- duration: number;
3692
- file_path: string;
3693
- input_count: number;
3694
- name: string;
3695
- parameters: ComponentParameter[];
3696
- preview_file_path: string;
3697
- tags: string[];
3698
- type: "Audio Effect" | string;
3699
- };
3700
- type ComponentParameter = {
3701
- default_value: number;
3702
- expose_to_joiner: boolean;
3703
- expose_to_singer: boolean;
3704
- max_value: number;
3705
- min_value: number;
3706
- name: string;
3707
- targets: string[];
3708
- type: "Number" | string;
3709
- };
3710
- type Template = {
3711
- copyright: string;
3712
- default_parameter_value: number[];
3713
- description: string;
3714
- inverse_background_color: number[];
3715
- min_renderer_generation: number;
3716
- name: string;
3717
- parameters: TemplateParameter[];
3718
- segments: TemplateSegment[];
3719
- tags: string[];
3720
- type: "standard" | string;
3721
- };
3722
- type TemplateParameter = {
3723
- data_type: "Float" | string;
3724
- default_value: number;
3725
- expose_to_joiner: boolean;
3726
- max_value: number;
3727
- min_value: number;
3728
- name: string;
3729
- };
3730
- type TemplateSegment = {
3731
- afx?: TemplateAFX[];
3732
- always_show_all_participants: boolean;
3733
- apply_global_effects_first: boolean;
3734
- max_performer_count: number;
3735
- override_global_video_effects: boolean;
3736
- type: "Global" | "Intro" | "Verse" | "Pre-Chorus" | "Chorus" | "Bridge" | "Outro" | string;
3737
- };
3738
- type TemplateAFX = {
3739
- metadata_id: string;
3740
- metadata_name: string;
3741
- expressions: {
3742
- [key: string]: AFXExpression;
3743
- };
3744
- };
3745
- type AFXExpression = {
3746
- modifier_end_value: number[];
3747
- modifier_start_value: number[];
3748
- modifiers: any[];
3749
- numeric_value: number[];
3750
- };
3751
- type AFXExpressionModifier = {
3752
- curve: AFXExpressionModifierCurve;
3753
- end_value: number;
3754
- source: "Template Parameter" | string;
3755
- source_parameter_name: string;
3756
- start_value: number;
3757
- };
3758
- type AFXExpressionModifierCurve = {
3759
- key_frames: number[][];
3760
- key_frames_offset_x: number;
3761
- };
3762
- type AlygFile = {
3763
- layout: {
3764
- [key: string]: number[];
3765
- };
3766
- filters: AlygFilter[];
3767
- ui_graph_view_width?: number;
3768
- input_count: number;
3769
- description: string;
3770
- ui_window_frame?: number[];
3771
- parameters: AlygParameter[];
3772
- };
3773
- type AlygParameter = {
3774
- initial_value: number;
3775
- name: string;
3776
- };
3777
- type AlygFilter = {
3778
- shader_type: "filter_graph";
3779
- inputs: string[];
3780
- name: string;
3781
- expressions: string[];
3782
- shader_settings: {
3783
- file_path?: string;
3784
- scale_mode?: "fill_aspect_ratio" | string;
3785
- blend_mode?: "normal" | string;
3786
- };
3787
- };
3788
- function processZipFile(filePath: string): Promise<AVFile>;
3789
- function processRawEffects(data: AVFile): void;
3790
- }
3791
-
3792
3675
  declare enum SmuleUserSinging {
3793
3676
  BOTH = 0,
3794
3677
  PART_ONE = 1,
@@ -3833,4 +3716,4 @@ type SmulePitchesData = {
3833
3716
  smallestNote: number;
3834
3717
  };
3835
3718
 
3836
- export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleEffects, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };
3719
+ export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };
package/dist/index.d.ts CHANGED
@@ -3672,123 +3672,6 @@ declare namespace SmuleUrls {
3672
3672
  const NoSessionRequired: Set<string>;
3673
3673
  }
3674
3674
 
3675
- declare namespace SmuleEffects {
3676
- type AVFile = {
3677
- component_library: ComponentLibrary;
3678
- template: Template;
3679
- copyright: string;
3680
- files: {
3681
- [key: string]: {} | string;
3682
- };
3683
- };
3684
- type ComponentLibrary = {
3685
- components: Component[];
3686
- copyright: string;
3687
- fallback_component_id: number;
3688
- };
3689
- type Component = {
3690
- component_id: string;
3691
- duration: number;
3692
- file_path: string;
3693
- input_count: number;
3694
- name: string;
3695
- parameters: ComponentParameter[];
3696
- preview_file_path: string;
3697
- tags: string[];
3698
- type: "Audio Effect" | string;
3699
- };
3700
- type ComponentParameter = {
3701
- default_value: number;
3702
- expose_to_joiner: boolean;
3703
- expose_to_singer: boolean;
3704
- max_value: number;
3705
- min_value: number;
3706
- name: string;
3707
- targets: string[];
3708
- type: "Number" | string;
3709
- };
3710
- type Template = {
3711
- copyright: string;
3712
- default_parameter_value: number[];
3713
- description: string;
3714
- inverse_background_color: number[];
3715
- min_renderer_generation: number;
3716
- name: string;
3717
- parameters: TemplateParameter[];
3718
- segments: TemplateSegment[];
3719
- tags: string[];
3720
- type: "standard" | string;
3721
- };
3722
- type TemplateParameter = {
3723
- data_type: "Float" | string;
3724
- default_value: number;
3725
- expose_to_joiner: boolean;
3726
- max_value: number;
3727
- min_value: number;
3728
- name: string;
3729
- };
3730
- type TemplateSegment = {
3731
- afx?: TemplateAFX[];
3732
- always_show_all_participants: boolean;
3733
- apply_global_effects_first: boolean;
3734
- max_performer_count: number;
3735
- override_global_video_effects: boolean;
3736
- type: "Global" | "Intro" | "Verse" | "Pre-Chorus" | "Chorus" | "Bridge" | "Outro" | string;
3737
- };
3738
- type TemplateAFX = {
3739
- metadata_id: string;
3740
- metadata_name: string;
3741
- expressions: {
3742
- [key: string]: AFXExpression;
3743
- };
3744
- };
3745
- type AFXExpression = {
3746
- modifier_end_value: number[];
3747
- modifier_start_value: number[];
3748
- modifiers: any[];
3749
- numeric_value: number[];
3750
- };
3751
- type AFXExpressionModifier = {
3752
- curve: AFXExpressionModifierCurve;
3753
- end_value: number;
3754
- source: "Template Parameter" | string;
3755
- source_parameter_name: string;
3756
- start_value: number;
3757
- };
3758
- type AFXExpressionModifierCurve = {
3759
- key_frames: number[][];
3760
- key_frames_offset_x: number;
3761
- };
3762
- type AlygFile = {
3763
- layout: {
3764
- [key: string]: number[];
3765
- };
3766
- filters: AlygFilter[];
3767
- ui_graph_view_width?: number;
3768
- input_count: number;
3769
- description: string;
3770
- ui_window_frame?: number[];
3771
- parameters: AlygParameter[];
3772
- };
3773
- type AlygParameter = {
3774
- initial_value: number;
3775
- name: string;
3776
- };
3777
- type AlygFilter = {
3778
- shader_type: "filter_graph";
3779
- inputs: string[];
3780
- name: string;
3781
- expressions: string[];
3782
- shader_settings: {
3783
- file_path?: string;
3784
- scale_mode?: "fill_aspect_ratio" | string;
3785
- blend_mode?: "normal" | string;
3786
- };
3787
- };
3788
- function processZipFile(filePath: string): Promise<AVFile>;
3789
- function processRawEffects(data: AVFile): void;
3790
- }
3791
-
3792
3675
  declare enum SmuleUserSinging {
3793
3676
  BOTH = 0,
3794
3677
  PART_ONE = 1,
@@ -3833,4 +3716,4 @@ type SmulePitchesData = {
3833
3716
  smallestNote: number;
3834
3717
  };
3835
3718
 
3836
- export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleEffects, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };
3719
+ export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };
package/dist/index.js CHANGED
@@ -4567,7 +4567,9 @@ var SmuleDotCom = class {
4567
4567
  this.axiosInst = axios2.create({
4568
4568
  withCredentials: true,
4569
4569
  headers: {
4570
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/237.84.2.178 Safari/537.36"
4570
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/237.84.2.178 Safari/537.36",
4571
+ "Accept": ""
4572
+ // this bitch returns 418 im a teapot! if you have accept set to anything for some fucking reason
4571
4573
  }
4572
4574
  });
4573
4575
  this.cookies = [];
@@ -4823,116 +4825,6 @@ var SmuleDotCom = class {
4823
4825
  return req.data;
4824
4826
  }
4825
4827
  };
4826
-
4827
- // src/smule-effects.ts
4828
- import * as yauzl from "yauzl";
4829
- var SmuleEffects;
4830
- ((SmuleEffects2) => {
4831
- function processZipFile(filePath) {
4832
- return new Promise((resolve, reject) => {
4833
- yauzl.open(filePath, { lazyEntries: true, decodeStrings: false }, (err, zipfile) => {
4834
- let filesRead = 0;
4835
- if (err) throw err;
4836
- zipfile.readEntry();
4837
- let data = {
4838
- component_library: {},
4839
- template: {},
4840
- copyright: "my ass",
4841
- files: {}
4842
- };
4843
- zipfile.on("entry", (entry) => {
4844
- let fileName = entry.fileName.toString("utf-8");
4845
- if (fileName.endsWith(".alyc")) {
4846
- if (Object.keys(data.component_library).length > 1) {
4847
- console.warn("[SmuleEffects] Double component_library file? that shouldnt happen i think? Overwriting...");
4848
- }
4849
- zipfile.openReadStream(entry, (err2, stream) => {
4850
- if (err2) throw err2;
4851
- let rawData = [];
4852
- stream.on("data", (chunk) => {
4853
- rawData.push(chunk);
4854
- });
4855
- stream.on("end", () => {
4856
- let componentLibrary = JSON.parse(Buffer.concat(rawData).toString("utf-8"));
4857
- data.component_library = componentLibrary;
4858
- filesRead++;
4859
- });
4860
- });
4861
- } else if (fileName.endsWith(".alyt")) {
4862
- if (Object.keys(data.template).length > 1) {
4863
- console.warn("[SmuleEffects] Double template file? that shouldnt happen i think? Overwriting...");
4864
- }
4865
- zipfile.openReadStream(entry, (err2, stream) => {
4866
- if (err2) throw err2;
4867
- let rawData = [];
4868
- stream.on("data", (chunk) => {
4869
- rawData.push(chunk);
4870
- });
4871
- stream.on("end", () => {
4872
- let template = JSON.parse(Buffer.concat(rawData).toString("utf-8"));
4873
- data.template = template;
4874
- filesRead++;
4875
- });
4876
- });
4877
- } else if (fileName.endsWith(".alyg") || fileName.endsWith(".json")) {
4878
- zipfile.openReadStream(entry, (err2, stream) => {
4879
- if (err2) throw err2;
4880
- let rawData = [];
4881
- stream.on("data", (chunk) => {
4882
- rawData.push(chunk);
4883
- });
4884
- stream.on("end", () => {
4885
- data.files[fileName] = JSON.parse(Buffer.concat(rawData).toString("utf-8"));
4886
- filesRead++;
4887
- });
4888
- });
4889
- } else if (fileName == "copyright.txt") {
4890
- zipfile.openReadStream(entry, (err2, stream) => {
4891
- if (err2) throw err2;
4892
- let rawData = [];
4893
- stream.on("data", (chunk) => {
4894
- rawData.push(chunk);
4895
- });
4896
- stream.on("end", () => {
4897
- data.copyright = Buffer.concat(rawData).toString("utf-8");
4898
- filesRead++;
4899
- });
4900
- });
4901
- } else if (fileName.endsWith(".txt")) {
4902
- zipfile.openReadStream(entry, (err2, stream) => {
4903
- if (err2) throw err2;
4904
- let rawData = [];
4905
- stream.on("data", (chunk) => {
4906
- rawData.push(chunk);
4907
- });
4908
- stream.on("end", () => {
4909
- data.files[fileName] = Buffer.concat(rawData).toString("utf-8");
4910
- filesRead++;
4911
- });
4912
- });
4913
- } else {
4914
- data.files[fileName] = fileName;
4915
- filesRead++;
4916
- }
4917
- zipfile.readEntry();
4918
- });
4919
- zipfile.on("end", () => {
4920
- let entries = zipfile.entriesRead;
4921
- zipfile.close();
4922
- let interval = setInterval(() => {
4923
- if (entries > filesRead) return;
4924
- clearInterval(interval);
4925
- resolve(data);
4926
- }, 1);
4927
- });
4928
- });
4929
- });
4930
- }
4931
- SmuleEffects2.processZipFile = processZipFile;
4932
- function processRawEffects(data) {
4933
- }
4934
- SmuleEffects2.processRawEffects = processRawEffects;
4935
- })(SmuleEffects || (SmuleEffects = {}));
4936
4828
  export {
4937
4829
  AvTemplateCategoryListRequest,
4938
4830
  CategoryRequest,
@@ -4954,7 +4846,6 @@ export {
4954
4846
  SingUserProfileRequest,
4955
4847
  Smule,
4956
4848
  SmuleDotCom,
4957
- SmuleEffects,
4958
4849
  SmuleErrorCode,
4959
4850
  SmuleRegisterErrorCode,
4960
4851
  SmuleSession,
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/michei69"
8
8
  },
9
9
  "license": "MIT",
10
- "version": "1.2.2",
10
+ "version": "1.2.4",
11
11
  "scripts": {
12
12
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
13
13
  "dev": "tsup src/index.ts --format esm --watch --dts",