feat: Convert all app files to JS

This commit is contained in:
Faruk AYDIN
2024-01-05 17:44:21 +01:00
parent b95478b635
commit 43dba351c3
1030 changed files with 5114 additions and 6436 deletions

View File

@@ -0,0 +1,6 @@
import newAlbums from './new-albums/index.js';
import newFavoritePhotos from './new-favorite-photos/index.js';
import newPhotos from './new-photos/index.js';
import newPhotosInAlbums from './new-photos-in-album/index.js';
export default [newAlbums, newFavoritePhotos, newPhotos, newPhotosInAlbums];

View File

@@ -1,6 +0,0 @@
import newAlbums from './new-albums';
import newFavoritePhotos from './new-favorite-photos';
import newPhotos from './new-photos';
import newPhotosInAlbums from './new-photos-in-album';
export default [newAlbums, newFavoritePhotos, newPhotos, newPhotosInAlbums];

View File

@@ -1,5 +1,5 @@
import defineTrigger from '../../../../helpers/define-trigger';
import newAlbums from './new-albums';
import defineTrigger from '../../../../helpers/define-trigger.js';
import newAlbums from './new-albums.js';
export default defineTrigger({
name: 'New albums',

View File

@@ -1,5 +1,3 @@
import { IGlobalVariable } from '@automatisch/types';
const extraFields = [
'license',
'date_upload',
@@ -22,7 +20,7 @@ const extraFields = [
'url_o',
].join(',');
const newAlbums = async ($: IGlobalVariable) => {
const newAlbums = async ($) => {
let page = 1;
let pages = 1;
@@ -45,7 +43,7 @@ const newAlbums = async ($: IGlobalVariable) => {
$.pushTriggerItem({
raw: photoset,
meta: {
internalId: photoset.id as string,
internalId: photoset.id,
},
});
}

View File

@@ -1,5 +1,5 @@
import defineTrigger from '../../../../helpers/define-trigger';
import newFavoritePhotos from './new-favorite-photos';
import defineTrigger from '../../../../helpers/define-trigger.js';
import newFavoritePhotos from './new-favorite-photos.js';
export default defineTrigger({
name: 'New favorite photos',

View File

@@ -1,5 +1,3 @@
import { IGlobalVariable } from '@automatisch/types';
const extraFields = [
'description',
'license',
@@ -28,7 +26,7 @@ const extraFields = [
'url_o',
].join(',');
const newPhotos = async ($: IGlobalVariable) => {
const newPhotos = async ($) => {
let page = 1;
let pages = 1;
@@ -51,7 +49,7 @@ const newPhotos = async ($: IGlobalVariable) => {
$.pushTriggerItem({
raw: photo,
meta: {
internalId: photo.date_faved as string,
internalId: photo.date_faved,
},
});
}

View File

@@ -1,5 +1,5 @@
import defineTrigger from '../../../../helpers/define-trigger';
import newPhotosInAlbum from './new-photos-in-album';
import defineTrigger from '../../../../helpers/define-trigger.js';
import newPhotosInAlbum from './new-photos-in-album.js';
export default defineTrigger({
name: 'New photos in album',
@@ -10,7 +10,7 @@ export default defineTrigger({
{
label: 'Album',
key: 'album',
type: 'dropdown' as const,
type: 'dropdown',
required: true,
variables: false,
source: {

View File

@@ -1,5 +1,3 @@
import { IGlobalVariable } from '@automatisch/types';
const extraFields = [
'license',
'date_upload',
@@ -22,7 +20,7 @@ const extraFields = [
'url_o',
].join(',');
const newPhotosInAlbum = async ($: IGlobalVariable) => {
const newPhotosInAlbum = async ($) => {
let page = 1;
let pages = 1;
@@ -32,7 +30,7 @@ const newPhotosInAlbum = async ($: IGlobalVariable) => {
per_page: 11,
user_id: $.auth.data.userId,
extras: extraFields,
photoset_id: $.step.parameters.album as string,
photoset_id: $.step.parameters.album,
method: 'flickr.photosets.getPhotos',
format: 'json',
nojsoncallback: 1,
@@ -46,7 +44,7 @@ const newPhotosInAlbum = async ($: IGlobalVariable) => {
$.pushTriggerItem({
raw: photo,
meta: {
internalId: photo.id as string,
internalId: photo.id,
},
});
}

View File

@@ -1,5 +1,5 @@
import defineTrigger from '../../../../helpers/define-trigger';
import newPhotos from './new-photos';
import defineTrigger from '../../../../helpers/define-trigger.js';
import newPhotos from './new-photos.js';
export default defineTrigger({
name: 'New photos',

View File

@@ -1,5 +1,3 @@
import { IGlobalVariable } from '@automatisch/types';
const extraFields = [
'description',
'license',
@@ -28,7 +26,7 @@ const extraFields = [
'url_o',
].join(',');
const newPhotos = async ($: IGlobalVariable) => {
const newPhotos = async ($) => {
let page = 1;
let pages = 1;
@@ -51,7 +49,7 @@ const newPhotos = async ($: IGlobalVariable) => {
$.pushTriggerItem({
raw: photo,
meta: {
internalId: photo.id as string,
internalId: photo.id,
},
});
}