Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
fix: Remove file extension from imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjuaneight committed Nov 6, 2021
1 parent 19dff26 commit 10256f5
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/airtable-upload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AirtableError, AirtableResp, RecordData } from './typings.d.ts';
import { AirtableError, AirtableResp, RecordData } from './typings.d';

/**
* Upload podcast record object to Airtable
Expand Down
24 changes: 9 additions & 15 deletions src/bookmark-page.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
import { airtableUpload } from './airtable-upload.ts';
import { airtableUpload } from './airtable-upload';

import { BookmarkingResponse } from './typings.d.ts';
import { BookmarkingResponse, PageData } from './typings.d';

/**
* Upload article|comic to Airtable.
* @function
* @async
*
* @param {string} table table name
* @param {string} title page title
* @param {string} creator page creator
* @param {string} url page url
* @param {string[]} tags record tags
* @param {string} table airtable table name
* @param {PageData} data page data
* @returns {Promise<BookmarkingResponse>} result of record upload
*/
export const bookmarkPage = async (
table: string,
title: string,
creator: string,
url: string,
tags: string[]
data: PageData
): Promise<BookmarkingResponse> => {
try {
const airtableResp = await airtableUpload(table, {
title,
creator,
url,
tags,
title: data.title,
creator: data.creator,
url: data.url,
tags: data.tags,
});

return { success: true, message: airtableResp, source: 'bookmarkPage' };
Expand Down
4 changes: 2 additions & 2 deletions src/bookmark-podcasts.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { airtableUpload } from './airtable-upload.ts';
import { airtableUpload } from './airtable-upload';

import {
BookmarkingResponse,
ParsingPatterns,
ParsingService,
BookmarkData,
} from './typings.d.ts';
} from './typings.d';

// list of regular expressions to find and replace
const parsing: ParsingPatterns = {
Expand Down
4 changes: 2 additions & 2 deletions src/bookmark-reddits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { airtableUpload } from './airtable-upload.ts';
import { airtableUpload } from './airtable-upload';

import { BookmarkingResponse, RedditData } from './typings.d.ts';
import { BookmarkingResponse, RedditData } from './typings.d';

/**
* Get post details via Reddit API.
Expand Down
4 changes: 2 additions & 2 deletions src/bookmark-tweets.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { airtableUpload } from './airtable-upload.ts';
import { airtableUpload } from './airtable-upload';

import {
BookmarkingResponse,
TwitterData,
TwitterResponse,
} from './typings.d.ts';
} from './typings.d';

// Match unicode and convert to emoji code
const emojiRange = new RegExp(
Expand Down
4 changes: 2 additions & 2 deletions src/bookmark-vimeos.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { airtableUpload } from './airtable-upload.ts';
import { airtableUpload } from './airtable-upload';

import {
BookmarkData,
BookmarkingResponse,
VimeoResponse,
} from './typings.d.ts';
} from './typings.d';

/**
* Convert video url to API ready endpoint. Extracts video ID.
Expand Down
4 changes: 2 additions & 2 deletions src/bookmark-youtubes.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { airtableUpload } from './airtable-upload.ts';
import { airtableUpload } from './airtable-upload';

import {
BookmarkData,
BookmarkingResponse,
YouTubeAPIEndpoint,
YouTubeResponse,
} from './typings.d.ts';
} from './typings.d';

/**
* Convert video url to API ready endpoint. Extracts youtube ID.
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-restricted-globals */
import { handleRequest } from './handler.ts';
import { handleRequest } from './handler';

addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
Expand Down

0 comments on commit 10256f5

Please sign in to comment.