From dba3ad75e94fcfd037e3cc6578101adacc5b17be Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Mon, 18 May 2020 19:08:30 +0300 Subject: [PATCH 1/8] Add archived posts and stories feeds. --- src/core/feed.factory.ts | 42 +++-- src/feeds/archived-posts.feed.ts | 30 ++++ src/feeds/archived-stories.feed.ts | 30 ++++ src/feeds/index.ts | 2 + src/responses/archived.feed.response.ts | 202 ++++++++++++++++++++++++ src/responses/index.ts | 1 + 6 files changed, 291 insertions(+), 16 deletions(-) create mode 100644 src/feeds/archived-posts.feed.ts create mode 100644 src/feeds/archived-stories.feed.ts create mode 100644 src/responses/archived.feed.response.ts diff --git a/src/core/feed.factory.ts b/src/core/feed.factory.ts index e45c3ac75..1a99dd57e 100644 --- a/src/core/feed.factory.ts +++ b/src/core/feed.factory.ts @@ -2,12 +2,16 @@ import { IgApiClient } from './client'; import { AccountFollowersFeed, AccountFollowingFeed, + ArchivedStoriesFeed, + ArchivedPostsFeed, BlockedUsersFeed, DirectInboxFeed, DirectPendingInboxFeed, DirectThreadFeed, DiscoverFeed, - PostsInsightsFeed, + IgtvBrowseFeed, + IgtvChannelFeed, + LikedFeed, LocationFeed, MediaCommentsFeed, MusicGenreFeed, @@ -16,6 +20,7 @@ import { MusicTrendingFeed, NewsFeed, PendingFriendshipsFeed, + PostsInsightsFeed, ReelsMediaFeed, ReelsTrayFeed, SavedFeed, @@ -25,28 +30,25 @@ import { TimelineFeed, UserFeed, UsertagsFeed, - IgtvBrowseFeed, - IgtvChannelFeed, - LikedFeed, } from '../feeds'; -import { DirectInboxFeedResponseThreadsItem } from '../responses'; -import { plainToClassFromExist } from 'class-transformer'; -import * as Chance from 'chance'; -import { PostsInsightsFeedOptions, TimelineFeedReason, IgAppModule } from '../types'; -import { UserStoryFeed } from '../feeds/user-story.feed'; -import { ListReelMediaViewerFeed } from '../feeds/list-reel-media-viewer.feed'; -import { MediaInlineChildCommentsFeed } from '../feeds/media.inline-child-comments.feed'; -import { MediaStickerResponsesFeed } from '../feeds/media.sticker-responses.feed'; import { - StorySliderVotersFeedResponseResponseRootObject, - StorySliderVotersFeedResponseResponseVotersItem, + DirectInboxFeedResponseThreadsItem, + StoryPollVotersFeedResponseRootObject, + StoryPollVotersFeedResponseVotersItem, StoryQuestionResponsesFeedResponseRespondersItem, StoryQuestionResponsesFeedResponseRootObject, StoryQuizParticipantsFeedResponseParticipantsItem, StoryQuizParticipantsFeedResponseRootObject, - StoryPollVotersFeedResponseRootObject, - StoryPollVotersFeedResponseVotersItem, + StorySliderVotersFeedResponseResponseRootObject, + StorySliderVotersFeedResponseResponseVotersItem, } from '../responses'; +import { plainToClassFromExist } from 'class-transformer'; +import * as Chance from 'chance'; +import { IgAppModule, PostsInsightsFeedOptions, TimelineFeedReason } from '../types'; +import { UserStoryFeed } from '../feeds/user-story.feed'; +import { ListReelMediaViewerFeed } from '../feeds/list-reel-media-viewer.feed'; +import { MediaInlineChildCommentsFeed } from '../feeds/media.inline-child-comments.feed'; +import { MediaStickerResponsesFeed } from '../feeds/media.sticker-responses.feed'; export class FeedFactory { constructor(private client: IgApiClient) {} @@ -104,6 +106,14 @@ export class FeedFactory { return feed; } + public archivedStories(): any { + return new ArchivedStoriesFeed(this.client); + } + + public archivedPosts(): any { + return new ArchivedPostsFeed(this.client); + } + public tag(tag: string): TagFeed { const feed = new TagFeed(this.client); feed.tag = tag; diff --git a/src/feeds/archived-posts.feed.ts b/src/feeds/archived-posts.feed.ts new file mode 100644 index 000000000..24c96f11f --- /dev/null +++ b/src/feeds/archived-posts.feed.ts @@ -0,0 +1,30 @@ +import { Expose } from 'class-transformer'; +import { Feed } from '../core/feed'; +//import { ArchivedFeedResponseRootObject, ArchivedFeedResponseMedia } from '../responses'; // new +//import { SavedFeedResponseRootObject, SavedFeedResponseMedia } from '../responses'; + +export class ArchivedPostsFeed extends Feed { + @Expose() + private nextMaxId: string; + + set state(body: any) { + this.moreAvailable = body.more_available; + this.nextMaxId = body.next_max_id; + } + + async request(): Promise { + const { body } = await this.client.request.send({ + url: '/api/v1/feed/only_me_feed/', + qs: { + max_id: this.nextMaxId, + }, + }); + this.state = body; + return body; + } + + async items(): Promise { + const { items } = await this.request(); + return items; + } +} diff --git a/src/feeds/archived-stories.feed.ts b/src/feeds/archived-stories.feed.ts new file mode 100644 index 000000000..b1a883b3a --- /dev/null +++ b/src/feeds/archived-stories.feed.ts @@ -0,0 +1,30 @@ +import { Expose } from 'class-transformer'; +import { Feed } from '../core/feed'; +//import { ArchivedFeedResponseRootObject, ArchivedFeedResponseMedia } from '../responses'; // new +//import { SavedFeedResponseRootObject, SavedFeedResponseMedia } from '../responses'; + +export class ArchivedStoriesFeed extends Feed { + @Expose() + private nextMaxId: string; + + set state(body: any) { + this.moreAvailable = body.more_available; + this.nextMaxId = body.next_max_id; + } + + async request(): Promise { + const { body } = await this.client.request.send({ + url: '/api/v1/archive/reel/day_shells/', + qs: { + max_id: this.nextMaxId, + }, + }); + this.state = body; + return body; + } + + async items(): Promise { + const { items } = await this.request(); + return items; + } +} diff --git a/src/feeds/index.ts b/src/feeds/index.ts index 1133cdbf6..b2ed09f67 100644 --- a/src/feeds/index.ts +++ b/src/feeds/index.ts @@ -26,3 +26,5 @@ export * from './stories-insights.feed'; export * from './igtv.browse.feed'; export * from './igtv.channel.feed'; export * from './liked.feed'; +export * from './archived-stories.feed'; +export * from './archived-posts.feed'; diff --git a/src/responses/archived.feed.response.ts b/src/responses/archived.feed.response.ts new file mode 100644 index 000000000..cb5dd2a35 --- /dev/null +++ b/src/responses/archived.feed.response.ts @@ -0,0 +1,202 @@ +export interface ArchivedFeedResponseRootObject { + items: ArchivedFeedResponseItemsItem[]; + num_results: number; + more_available: boolean; + auto_load_more_enabled: boolean; + status: string; + next_max_id: string; +} +export interface ArchivedFeedResponseItemsItem { + media: ArchivedFeedResponseMedia; +} +export interface ArchivedFeedResponseMedia { + taken_at: number; + pk: string; + id: string; + device_timestamp: string | number; + media_type: number; + code: string; + client_cache_key: string; + filter_type: number; + image_versions2?: ArchivedFeedResponseImage_versions2; + original_width?: number; + original_height?: number; + user: ArchivedFeedResponseUser; + can_viewer_reshare: boolean; + caption_is_edited: boolean; + is_external_share_disabled?: boolean; + comment_likes_enabled: boolean; + comment_threading_enabled: boolean; + has_more_comments: boolean; + next_max_id: string; + max_num_visible_preview_comments: number; + preview_comments: ArchivedFeedResponsePreviewCommentsItem[]; + can_view_more_preview_comments: boolean; + comment_count: number; + inline_composer_display_condition: string; + inline_composer_imp_trigger_time: number; + like_count: number; + has_liked: boolean; + photo_of_you: boolean; + product_tags?: ArchivedFeedResponseProduct_tags; + can_see_insights_as_brand?: boolean; + caption: ArchivedFeedResponseCaption; + can_viewer_save: boolean; + has_viewer_saved: boolean; + saved_collection_ids: any[]; + organic_tracking_token: string; + usertags?: ArchivedFeedResponseUsertags; + is_dash_eligible?: number; + video_dash_manifest?: string; + video_codec?: string; + number_of_qualities?: number; + video_versions?: ArchivedFeedResponseVideoVersionsItem[]; + has_audio?: boolean; + video_duration?: number; + view_count?: number; + carousel_media_count?: number; + carousel_media?: ArchivedFeedResponseCarouselMediaItem[]; +} +export interface ArchivedFeedResponseImage_versions2 { + candidates: ArchivedFeedResponseCandidatesItem[]; +} +export interface ArchivedFeedResponseCandidatesItem { + width: number; + height: number; + url: string; + estimated_scans_sizes?: number[]; +} +export interface ArchivedFeedResponseUser { + pk: number; + username: string; + full_name: string; + is_private: boolean; + profile_pic_url: string; + friendship_status?: ArchivedFeedResponseFriendship_status; + is_verified: boolean; + has_anonymous_profile_picture?: boolean; + is_unpublished?: boolean; + is_favorite?: boolean; + show_shoppable_feed?: boolean; + shoppable_posts_count?: number; + can_be_reported_as_fraud?: boolean; + latest_reel_media?: number; + profile_pic_id?: string; +} +export interface ArchivedFeedResponseFriendship_status { + following: boolean; + outgoing_request: boolean; + is_bestie: boolean; + is_restricted: boolean; +} +export interface ArchivedFeedResponsePreviewCommentsItem { + pk: string; + user_id: number; + text: string; + type: number; + created_at: number; + created_at_utc: number; + content_type: string; + status: string; + bit_flags: number; + user: ArchivedFeedResponseUser; + did_report_as_spam: boolean; + share_enabled: boolean; + media_id: string; + has_liked_comment: boolean; + comment_like_count: number; + has_translation?: boolean; + parent_comment_id?: string; +} +export interface ArchivedFeedResponseProduct_tags { + in: ArchivedFeedResponseInItem[]; +} +export interface ArchivedFeedResponseInItem { + product?: ArchivedFeedResponseProduct; + position: string[] | number[]; + user?: ArchivedFeedResponseUser; + start_time_in_video_in_sec?: null; + duration_in_video_in_sec?: null; +} +export interface ArchivedFeedResponseProduct { + name: string; + price: string; + current_price: string; + full_price: string; + product_id: string; + merchant: ArchivedFeedResponseMerchant; + description: string; + retailer_id: string; + has_viewer_saved: boolean; + main_image: ArchivedFeedResponseMain_image; + thumbnail_image: ArchivedFeedResponseThumbnail_image; + review_status: string; + external_url: string; + checkout_style: string; + can_share_to_story: boolean; + full_price_stripped: string; + current_price_stripped: string; + variant_values?: ArchivedFeedResponseVariantValuesItem[]; +} +export interface ArchivedFeedResponseMerchant { + pk: number; + username: string; + profile_pic_url: string; +} +export interface ArchivedFeedResponseMain_image { + image_versions2: ArchivedFeedResponseImage_versions2; + preview: null; +} +export interface ArchivedFeedResponseThumbnail_image { + image_versions2: ArchivedFeedResponseImage_versions2; + preview: null; +} +export interface ArchivedFeedResponseVariantValuesItem { + id: string; + value: string; + name: string; + is_preselected: boolean; + visual_style: string; +} +export interface ArchivedFeedResponseCaption { + pk: string; + user_id: number; + text: string; + type: number; + created_at: number; + created_at_utc: number; + content_type: string; + status: string; + bit_flags: number; + user: ArchivedFeedResponseUser; + did_report_as_spam: boolean; + share_enabled: boolean; + media_id: string; + has_translation?: boolean; +} +export interface ArchivedFeedResponseUsertags { + in: ArchivedFeedResponseInItem[]; +} +export interface ArchivedFeedResponseVideoVersionsItem { + type: number; + width: number; + height: number; + url: string; + id: string; +} +export interface ArchivedFeedResponseCarouselMediaItem { + id: string; + media_type: number; + image_versions2: ArchivedFeedResponseImage_versions2; + original_width: number; + original_height: number; + pk: string; + carousel_parent_id: string; + usertags: ArchivedFeedResponseUsertags; + video_versions?: ArchivedFeedResponseVideoVersionsItem[]; + video_duration?: number; + is_dash_eligible?: number; + video_dash_manifest?: string; + video_codec?: string; + number_of_qualities?: number; +} diff --git a/src/responses/index.ts b/src/responses/index.ts index cb767fa6c..56b818c87 100644 --- a/src/responses/index.ts +++ b/src/responses/index.ts @@ -63,6 +63,7 @@ export * from './media.repository.configure.response'; export * from './media.repository.configure-sidecar.response'; export * from './media.repository.configure-video.response'; export * from './saved.feed.response'; +export * from './archived.feed.response'; export * from './status.response'; export * from './reels-tray.feed.response'; export * from './music.repository.moods.response'; From 694f2eaaa0b842fc8fa92181ce04c23ac29f22e5 Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Mon, 18 May 2020 23:57:24 +0300 Subject: [PATCH 2/8] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 13acc6260..73eb0c2f3 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,13 @@ "type": "git", "url": "https://github.com/dilame/instagram-private-api.git" }, - "homepage": "https://github.com/dilame/instagram-private-api", + "homepage": "https://github.com/Antoxa1081/instagram-private-api", "scripts": { "build": "rimraf dist && tsc -p tsconfig.build.json", "format": "prettier --write \"src/**/*.ts\"", "lint": "tslint -p tsconfig.json -c tslint.json", "typecheck": "tsc -p tsconfig.build.json --noEmit", - "prepare": "npm run build", + "prepublish": "npm run build", "test": "mocha --inline-diffs --timeout 1000000 tests/run.js", "generate-interface": "ts-node ./tools/response-to-interface.ts", "generate-docs": "ts-node ./tools/docs-generator.ts" From 47133d72dbc6ebb642f480b12c05650e87e5b54d Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Tue, 19 May 2020 11:33:06 +0300 Subject: [PATCH 3/8] Update npm package.json --- package-lock.json | 50 +++++++++++++++++++++++++++-------------------- package.json | 10 ++++++---- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f51696bb..ffa0b9868 100644 --- a/package-lock.json +++ b/package-lock.json @@ -161,9 +161,9 @@ "dev": true }, "arg": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", - "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, "argparse": { @@ -1082,9 +1082,9 @@ "integrity": "sha512-Zv/qJb2X1ESTrlniAViWx2aqGwi2cVpeoZFTbPdPiCu4EsadKsmb/QCH8HQjMUpDZKKJIHKHsJxV5Rwpq47HKQ==" }, "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "map-obj": { @@ -1801,9 +1801,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1967,16 +1967,24 @@ "integrity": "sha512-I0FEdfdatDjeigRqh1JFj67bcIKyRNm12UVGheBjs2pXgyELg2xeiQLVaWu1pVmNGXZVnz/fvycSU41moBIpOg==" }, "ts-node": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.1.0.tgz", - "integrity": "sha512-34jpuOrxDuf+O6iW1JpgTRDFynUZ1iEqtYruBqh35gICNjN8x+LpVcPAcwzLPi9VU6mdA3ym+x233nZmZp445A==", + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", + "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", "dev": true, "requires": { "arg": "^4.1.0", - "diff": "^3.1.0", + "diff": "^4.0.1", "make-error": "^1.1.1", - "source-map-support": "^0.5.6", - "yn": "^3.0.0" + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } } }, "ts-xor": { @@ -2122,9 +2130,9 @@ "dev": true }, "typescript": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", - "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==", + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", + "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", "dev": true }, "uglify-js": { @@ -2232,9 +2240,9 @@ "dev": true }, "yn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", - "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true } } diff --git a/package.json b/package.json index 73eb0c2f3..4e47a174f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ - "dist" + "*" ], "license": "MIT", "engines": { @@ -25,8 +25,10 @@ "format": "prettier --write \"src/**/*.ts\"", "lint": "tslint -p tsconfig.json -c tslint.json", "typecheck": "tsc -p tsconfig.build.json --noEmit", - "prepublish": "npm run build", + "prepare": "npm run build", + "postinstall": "npm run build", "test": "mocha --inline-diffs --timeout 1000000 tests/run.js", + "ts-node-test": "ts-node test.ts", "generate-interface": "ts-node ./tools/response-to-interface.ts", "generate-docs": "ts-node ./tools/docs-generator.ts" }, @@ -71,10 +73,10 @@ "prettier": "^1.19.1", "pretty-quick": "^1.10.0", "rimraf": "^2.6.3", - "ts-node": "^8.1.0", + "ts-node": "^8.10.1", "tslint": "^5.16.0", "typedoc": "^0.15.0", "typedoc-plugin-markdown": "^2.0.11", - "typescript": "^3.7.2" + "typescript": "^3.9.2" } } From 2f4a4234b2ee0a5debdfcaa9fc4ebd177d5ee600 Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Tue, 19 May 2020 11:36:09 +0300 Subject: [PATCH 4/8] Update npm package.json --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4e47a174f..7f4cdba10 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ - "*" + "dist" ], "license": "MIT", "engines": { @@ -17,7 +17,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/dilame/instagram-private-api.git" + "url": "https://github.com/Antoxa1081/instagram-private-api.git" }, "homepage": "https://github.com/Antoxa1081/instagram-private-api", "scripts": { @@ -26,7 +26,6 @@ "lint": "tslint -p tsconfig.json -c tslint.json", "typecheck": "tsc -p tsconfig.build.json --noEmit", "prepare": "npm run build", - "postinstall": "npm run build", "test": "mocha --inline-diffs --timeout 1000000 tests/run.js", "ts-node-test": "ts-node test.ts", "generate-interface": "ts-node ./tools/response-to-interface.ts", From 4fe1633838af86c5a6a58bac7f9e540982181335 Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Sat, 23 May 2020 14:42:45 +0300 Subject: [PATCH 5/8] Add error$ next for net errors. --- src/core/request.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/request.ts b/src/core/request.ts index 66326dbec..af6e2fb7c 100644 --- a/src/core/request.ts +++ b/src/core/request.ts @@ -176,6 +176,7 @@ export class Request { try { return await retry(async () => request(options), this.attemptOptions); } catch (err) { + this.error$.next(err); throw new IgNetworkError(err); } } From 26f97f4a3aedb1e00f353f99f15ed46237662e8a Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Tue, 29 Sep 2020 16:31:34 +0300 Subject: [PATCH 6/8] Revert "Update npm package.json" This reverts commit 2f4a4234 --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2db8f6ab8..5ba679a5c 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ - "dist" + "*" ], "license": "MIT", "engines": { @@ -17,7 +17,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/Antoxa1081/instagram-private-api.git" + "url": "https://github.com/dilame/instagram-private-api.git" }, "homepage": "https://github.com/Antoxa1081/instagram-private-api", "scripts": { @@ -26,6 +26,7 @@ "lint": "tslint -p tsconfig.json -c tslint.json", "typecheck": "tsc -p tsconfig.build.json --noEmit", "prepare": "npm run build", + "postinstall": "npm run build", "test": "mocha --inline-diffs --timeout 1000000 tests/run.js", "ts-node-test": "ts-node test.ts", "generate-interface": "ts-node ./tools/response-to-interface.ts", From 12eda3bf8039e1ecacfcb097fdc38b74a50dca34 Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Tue, 29 Sep 2020 16:31:47 +0300 Subject: [PATCH 7/8] Revert "Update npm package.json" This reverts commit 47133d72 --- package-lock.json | 50 ++++++++++++++++++++--------------------------- package.json | 10 ++++------ 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61467de3b..2c58f435d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -161,9 +161,9 @@ "dev": true }, "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz", + "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==", "dev": true }, "argparse": { @@ -1082,9 +1082,9 @@ "integrity": "sha512-Zv/qJb2X1ESTrlniAViWx2aqGwi2cVpeoZFTbPdPiCu4EsadKsmb/QCH8HQjMUpDZKKJIHKHsJxV5Rwpq47HKQ==" }, "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", "dev": true }, "map-obj": { @@ -1801,9 +1801,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1967,24 +1967,16 @@ "integrity": "sha512-I0FEdfdatDjeigRqh1JFj67bcIKyRNm12UVGheBjs2pXgyELg2xeiQLVaWu1pVmNGXZVnz/fvycSU41moBIpOg==" }, "ts-node": { - "version": "8.10.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", - "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.1.0.tgz", + "integrity": "sha512-34jpuOrxDuf+O6iW1JpgTRDFynUZ1iEqtYruBqh35gICNjN8x+LpVcPAcwzLPi9VU6mdA3ym+x233nZmZp445A==", "dev": true, "requires": { "arg": "^4.1.0", - "diff": "^4.0.1", + "diff": "^3.1.0", "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } + "source-map-support": "^0.5.6", + "yn": "^3.0.0" } }, "ts-xor": { @@ -2130,9 +2122,9 @@ "dev": true }, "typescript": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", - "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", + "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==", "dev": true }, "uglify-js": { @@ -2240,9 +2232,9 @@ "dev": true }, "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", + "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", "dev": true } } diff --git a/package.json b/package.json index 5ba679a5c..c8b0a9e9a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ - "*" + "dist" ], "license": "MIT", "engines": { @@ -25,10 +25,8 @@ "format": "prettier --write \"src/**/*.ts\"", "lint": "tslint -p tsconfig.json -c tslint.json", "typecheck": "tsc -p tsconfig.build.json --noEmit", - "prepare": "npm run build", - "postinstall": "npm run build", + "prepublish": "npm run build", "test": "mocha --inline-diffs --timeout 1000000 tests/run.js", - "ts-node-test": "ts-node test.ts", "generate-interface": "ts-node ./tools/response-to-interface.ts", "generate-docs": "ts-node ./tools/docs-generator.ts" }, @@ -73,10 +71,10 @@ "prettier": "^1.19.1", "pretty-quick": "^1.10.0", "rimraf": "^2.6.3", - "ts-node": "^8.10.1", + "ts-node": "^8.1.0", "tslint": "^5.16.0", "typedoc": "^0.15.0", "typedoc-plugin-markdown": "^2.0.11", - "typescript": "^3.9.2" + "typescript": "^3.7.2" } } From 0cd3aa57f85ce44f99433b155d28c04fc21186c3 Mon Sep 17 00:00:00 2001 From: Antoxa1081 Date: Tue, 29 Sep 2020 16:31:53 +0300 Subject: [PATCH 8/8] Revert "Update package.json" This reverts commit 694f2eaa --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c8b0a9e9a..ef98741b2 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,13 @@ "type": "git", "url": "https://github.com/dilame/instagram-private-api.git" }, - "homepage": "https://github.com/Antoxa1081/instagram-private-api", + "homepage": "https://github.com/dilame/instagram-private-api", "scripts": { "build": "rimraf dist && tsc -p tsconfig.build.json", "format": "prettier --write \"src/**/*.ts\"", "lint": "tslint -p tsconfig.json -c tslint.json", "typecheck": "tsc -p tsconfig.build.json --noEmit", - "prepublish": "npm run build", + "prepare": "npm run build", "test": "mocha --inline-diffs --timeout 1000000 tests/run.js", "generate-interface": "ts-node ./tools/response-to-interface.ts", "generate-docs": "ts-node ./tools/docs-generator.ts"