ignore isolate dir
ci / build (push) Successful in 2m2s Details

This commit is contained in:
CJ_Clippy 2024-07-15 08:07:04 -08:00
parent 9a3f9cf6c0
commit effba4d1d2
65 changed files with 2566 additions and 383 deletions

View File

@ -25,27 +25,6 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
# - uses: mr-smithers-excellent/docker-build-push@v6
# name: Build futureporn/scout-manager
# with:
# image: futureporn/scout-manager
# tags: latest
# target: manager
# registry: gitea.futureporn.net
# dockerfile: d.scout.dockerfile
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - uses: mr-smithers-excellent/docker-build-push@v6
# name: Build futureporn/link2cid
# with:
# image: futureporn/link2cid
# tags: latest
# registry: gitea.futureporn.net
# dockerfile: d.link2cid.dockerfile
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v6 - uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/next name: Build futureporn/next
with: with:

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
**/.env* **/.env*
*~ *~
packages/**/isolate/
charts/**/charts charts/**/charts
.envrc .envrc

View File

@ -1,15 +0,0 @@
---
apiVersion: v1
kind: Pod
metadata:
name: boop
namespace: futureporn
labels:
app.kubernetes.io/name: boop
spec:
containers:
- name: boop
image: fp/boop
resources: {}
restartPolicy: OnFailure

View File

@ -37,5 +37,6 @@ RUN pnpm deploy --filter=temporal-worker --prod /prod/temporal-worker
FROM base as worker FROM base as worker
COPY --from=build /prod/temporal-worker . COPY --from=build /prod/temporal-worker .
RUN ls -la ./
ENTRYPOINT ["pnpm", "start"] ENTRYPOINT ["pnpm", "start"]

View File

@ -9,5 +9,8 @@
"keywords": [], "keywords": [],
"author": "@CJ_Clippy", "author": "@CJ_Clippy",
"license": "Unlicense", "license": "Unlicense",
"packageManager": "pnpm@9.5.0" "packageManager": "pnpm@9.5.0",
"dependencies": {
"types": "^0.1.1"
}
} }

View File

@ -15,40 +15,6 @@ importers:
specifier: ^7.0.1 specifier: ^7.0.1
version: 7.5.0 version: 7.5.0
../..: {}
../boop: {}
../bot: {}
../capture: {}
../image: {}
../infra: {}
../next: {}
../scout: {}
../storage: {}
../strapi: {}
../taco: {}
../temporal-worker: {}
../temporal-workflows: {}
../types: {}
../uppy: {}
../utils: {}
../video: {}
packages: packages:
'@aws-crypto/crc32@5.2.0': '@aws-crypto/crc32@5.2.0':

View File

@ -1,5 +1,5 @@
import { bell } from 'taco' import { bell } from '@futureporn/taco'
import { IPagination } from 'types' import { IPagination } from '@futureporn/types'
function main() { function main() {
const page: IPagination = { const page: IPagination = {

View File

@ -1,5 +1,5 @@
{ {
"name": "boop", "name": "@futureporn/boop",
"type": "module", "type": "module",
"version": "1.0.1", "version": "1.0.1",
"description": "", "description": "",
@ -10,8 +10,8 @@
"build": "tsc --build" "build": "tsc --build"
}, },
"dependencies": { "dependencies": {
"taco": "workspace:*", "@futureporn/taco": "workspace:*",
"types": "workspace:*" "@futureporn/types": "workspace:*"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",

View File

@ -8,10 +8,10 @@ importers:
.: .:
dependencies: dependencies:
taco: '@futureporn/taco':
specifier: workspace:* specifier: workspace:*
version: link:../taco version: link:../taco
types: '@futureporn/types':
specifier: workspace:* specifier: workspace:*
version: link:../types version: link:../types
devDependencies: devDependencies:

View File

@ -2,7 +2,7 @@
import sharp from 'sharp'; import sharp from 'sharp';
import Prevvy from 'prevvy'; import Prevvy from 'prevvy';
import path from 'path'; import path from 'path';
import { getTmpFile } from 'utils'; import { getTmpFile } from '@futureporn/utils';
export async function getProminentColor(imageFile: string): Promise<string> { export async function getProminentColor(imageFile: string): Promise<string> {
const { dominant } = await sharp(imageFile).stats(); const { dominant } = await sharp(imageFile).stats();

View File

@ -1,5 +1,5 @@
{ {
"name": "image", "name": "@futureporn/image",
"type": "module", "type": "module",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
@ -15,7 +15,7 @@
"@types/mocha": "^10.0.7", "@types/mocha": "^10.0.7",
"prevvy": "^7.0.1", "prevvy": "^7.0.1",
"sharp": "^0.33.4", "sharp": "^0.33.4",
"utils": "workspace:^" "@futureporn/utils": "workspace:^"
}, },
"devDependencies": { "devDependencies": {
"chai": "^5.1.1", "chai": "^5.1.1",

View File

@ -8,6 +8,9 @@ importers:
.: .:
dependencies: dependencies:
'@futureporn/utils':
specifier: workspace:^
version: link:../utils
'@types/chai': '@types/chai':
specifier: ^4.3.16 specifier: ^4.3.16
version: 4.3.16 version: 4.3.16
@ -20,9 +23,6 @@ importers:
sharp: sharp:
specifier: ^0.33.4 specifier: ^0.33.4
version: 0.33.4 version: 0.33.4
utils:
specifier: workspace:^
version: link:../utils
devDependencies: devDependencies:
chai: chai:
specifier: ^5.1.1 specifier: ^5.1.1

View File

@ -1,6 +1,6 @@
import { getAllStreamsForVtuber, getStreamCountForVtuber } from "@/app/lib/streams"; import { getAllStreamsForVtuber, getStreamCountForVtuber } from "@/app/lib/streams";
import { getVodsForVtuber } from "@/app/lib/vods"; import { getVodsForVtuber } from "@/app/lib/vods";
import { IVtuber } from "types"; import { IVtuber } from "@futureporn/types";
export interface IArchiveProgressProps { export interface IArchiveProgressProps {
vtuber: IVtuber; vtuber: IVtuber;

View File

@ -1,4 +1,4 @@
import { IStream } from "types"; import { IStream } from "@futureporn/types";
import Link from "next/link" import Link from "next/link"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCalendar } from "@fortawesome/free-solid-svg-icons"; import { faCalendar } from "@fortawesome/free-solid-svg-icons";

View File

@ -1,6 +1,6 @@
'use client'; 'use client';
import { IStream } from "types"; import { IStream } from "@futureporn/types";
// import NotFound from "app/streams/[cuid]/not-found"; // import NotFound from "app/streams/[cuid]/not-found";
import { IVod } from "@/app/lib/vods"; import { IVod } from "@/app/lib/vods";
import Link from "next/link"; import Link from "next/link";

View File

@ -1,4 +1,4 @@
import { IStream } from "types"; import { IStream } from "@futureporn/types";
import NotFound from "@/app/vt/[slug]/not-found"; import NotFound from "@/app/vt/[slug]/not-found";
import { LocalizedDate } from "./localized-date"; import { LocalizedDate } from "./localized-date";
import Link from "next/link"; import Link from "next/link";

View File

@ -1,9 +1,8 @@
import React from 'react' import React from 'react'
import Link from 'next/link'; import Link from 'next/link';
import { IVtuber } from 'types'; import { IVtuber, IStream } from '@futureporn/types';
import { notFound } from 'next/navigation'; import { notFound } from 'next/navigation';
import { getAllStreams } from '@/app/lib/streams'; import { getAllStreams } from '@/app/lib/streams';
import { IStream } from 'types';
import { StreamSummary } from '@/app/components/stream'; import { StreamSummary } from '@/app/components/stream';
interface IStreamsListProps { interface IStreamsListProps {

View File

@ -20,7 +20,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSpinner } from '@fortawesome/free-solid-svg-icons' import { faSpinner } from '@fortawesome/free-solid-svg-icons'
import { fetchStreamData } from '@/app/lib/streams' import { fetchStreamData } from '@/app/lib/streams'
import { IStream } from 'types' import { IStream } from '@futureporn/types'
const queryClient = new QueryClient() const queryClient = new QueryClient()

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { IToy, IToysResponse } from '@/app/lib/toys'; import { IToy, IToysResponse } from '@/app/lib/toys';
import { IVtuber } from 'types'; import { IVtuber } from '@futureporn/types';
import Link from 'next/link'; import Link from 'next/link';
import Image from "next/legacy/image"; import Image from "next/legacy/image";

View File

@ -1,7 +1,7 @@
'use client'; 'use client';
import { IVtuber } from "types"; import { IVtuber } from "@futureporn/types";
import { useSearchParams } from 'next/navigation'; import { useSearchParams } from 'next/navigation';
import React from 'react'; import React from 'react';
import AwsS3 from '@uppy/aws-s3'; import AwsS3 from '@uppy/aws-s3';

View File

@ -1,6 +1,6 @@
import Link from "next/link"; import Link from "next/link";
import { getSafeDate } from '@/app/lib/dates'; import { getSafeDate } from '@/app/lib/dates';
import { IVtuber } from 'types'; import { IVtuber } from '@futureporn/types';
import Image from "next/legacy/image" import Image from "next/legacy/image"
import { LocalizedDate } from '@/app/components/localized-date' import { LocalizedDate } from '@/app/components/localized-date'

View File

@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
import Link from 'next/link'; import Link from 'next/link';
import VodCard from './vod-card'; import VodCard from './vod-card';
import { IVtuber } from 'types'; import { IVtuber } from '@futureporn/types';
import { IVod } from '@/app/lib/vods'; import { IVod } from '@/app/lib/vods';
import { getVodTitle } from './vod-page'; import { getVodTitle } from './vod-page';
import { notFound } from 'next/navigation'; import { notFound } from 'next/navigation';

View File

@ -1,5 +1,5 @@
import Link from "next/link"; import Link from "next/link";
import type { IVtuber } from 'types'; import type { IVtuber } from '@futureporn/types';
import { getVodsForVtuber } from "@/app/lib/vods"; import { getVodsForVtuber } from "@/app/lib/vods";
import Image from "next/legacy/image" import Image from "next/legacy/image"
import NotFound from "@/app/vt/[slug]/not-found"; import NotFound from "@/app/vt/[slug]/not-found";

View File

@ -1,4 +1,4 @@
import { IMeta } from "types"; import { IMeta } from "@futureporn/types";
export interface IB2File { export interface IB2File {
id: number; id: number;

View File

@ -2,8 +2,8 @@
import { siteUrl, strapiUrl } from './constants'; import { siteUrl, strapiUrl } from './constants';
import { getSafeDate } from './dates'; import { getSafeDate } from './dates';
import qs from 'qs'; import qs from 'qs';
import { IStream } from 'types'; import { IStream } from '@futureporn/types';
import { IStreamsResponse } from 'types'; import { IStreamsResponse } from '@futureporn/types';

View File

@ -11,7 +11,7 @@ import { strapiUrl } from './constants'
import { ITagResponse, IToyTagResponse } from './tags'; import { ITagResponse, IToyTagResponse } from './tags';
import { IVod, IVodResponse } from './vods'; import { IVod, IVodResponse } from './vods';
import { IAuthData } from '@/app/components/auth'; import { IAuthData } from '@/app/components/auth';
import { IMeta } from 'types'; import { IMeta } from '@futureporn/types';
export interface ITagVodRelation { export interface ITagVodRelation {
id: number; id: number;

View File

@ -5,7 +5,7 @@ import slugify from 'slugify';
import { IToy } from './toys'; import { IToy } from './toys';
import { IAuthData } from '@/app/components/auth'; import { IAuthData } from '@/app/components/auth';
import qs from 'qs'; import qs from 'qs';
import { IMeta } from 'types'; import { IMeta } from '@futureporn/types';
export interface ITag { export interface ITag {

View File

@ -4,7 +4,7 @@ import qs from 'qs';
import { strapiUrl } from './constants' import { strapiUrl } from './constants'
import { IAuthData } from '@/app/components/auth'; import { IAuthData } from '@/app/components/auth';
import { ITagsResponse, ITag, ITagResponse } from './tags'; import { ITagsResponse, ITag, ITagResponse } from './tags';
import { IMeta } from 'types'; import { IMeta } from '@futureporn/types';
export interface ITimestamp { export interface ITimestamp {
id: number; id: number;

View File

@ -1,6 +1,6 @@
import { ITag, ITagResponse, ITagsResponse } from '@/app/lib/tags' import { ITag, ITagResponse, ITagsResponse } from '@/app/lib/tags'
import { IMeta } from 'types'; import { IMeta } from '@futureporn/types';
export interface IToysResponse { export interface IToysResponse {

View File

@ -1,5 +1,5 @@
import { IVtuberResponse } from "types"; import { IVtuberResponse, IMeta } from "@futureporn/types";
import { IMeta } from "types";
export interface ITweet { export interface ITweet {
id: number; id: number;

View File

@ -1,4 +1,4 @@
import { IMeta } from "types"; import { IMeta } from "@futureporn/types";
export interface IUser { export interface IUser {

View File

@ -1,11 +1,11 @@
import { strapiUrl, siteUrl } from './constants'; import { strapiUrl, siteUrl } from './constants';
import { getDateFromSafeDate, getSafeDate } from './dates'; import { getDateFromSafeDate, getSafeDate } from './dates';
import { IVtuber, IVtuberResponse, IStream, IStreamResponse } from 'types'; import { IVtuber, IVtuberResponse, IStream, IStreamResponse } from '@futureporn/types';
import qs from 'qs'; import qs from 'qs';
import { ITagVodRelationsResponse } from './tag-vod-relations'; import { ITagVodRelationsResponse } from './tag-vod-relations';
import { ITimestampsResponse } from './timestamps'; import { ITimestampsResponse } from './timestamps';
import { IMeta, IMuxAsset, IMuxAssetResponse } from 'types'; import { IMeta, IMuxAsset, IMuxAssetResponse } from '@futureporn/types';
import { IB2File, IB2FileResponse } from '@/app/lib/b2File'; import { IB2File, IB2FileResponse } from '@/app/lib/b2File';
import fetchAPI from './fetch-api'; import fetchAPI from './fetch-api';
import { IUserResponse } from './users'; import { IUserResponse } from './users';

View File

@ -3,7 +3,7 @@
import { IVod } from './vods' import { IVod } from './vods'
import { strapiUrl, siteUrl } from './constants'; import { strapiUrl, siteUrl } from './constants';
import qs from 'qs'; import qs from 'qs';
import { IMeta, IVtuber, IVtubersResponse } from 'types'; import { IMeta, IVtuber, IVtubersResponse } from '@futureporn/types';
const fetchVtubersOptions = { const fetchVtubersOptions = {

View File

@ -4,7 +4,7 @@ import VodCard from "@/app/components/vod-card";
import { getVodTitle } from "@/app/components/vod-page"; import { getVodTitle } from "@/app/components/vod-page";
import { getVods } from '@/app/lib/vods'; import { getVods } from '@/app/lib/vods';
import { IVod } from "@/app/lib/vods"; import { IVod } from "@/app/lib/vods";
import { IVtuber } from 'types'; import { IVtuber } from '@futureporn/types';
import { getVtubers } from "./lib/vtubers"; import { getVtubers } from "./lib/vtubers";
import VTuberCard from "./components/vtuber-card"; import VTuberCard from "./components/vtuber-card";
import Link from 'next/link'; import Link from 'next/link';

View File

@ -1,7 +1,7 @@
import { notFound } from 'next/navigation' import { notFound } from 'next/navigation'
import VTuberCard from '../components/vtuber-card' import VTuberCard from '../components/vtuber-card'
import { getVtubers } from '../lib/vtubers' import { getVtubers } from '../lib/vtubers'
import { IVtuber } from 'types' import { IVtuber } from '@futureporn/types'
export default async function Page() { export default async function Page() {

View File

@ -1,5 +1,5 @@
{ {
"name": "next", "name": "@futureporn/next",
"version": "2.0.0", "version": "2.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -63,7 +63,7 @@
"sharp": "^0.33.4", "sharp": "^0.33.4",
"slugify": "^1.6.6", "slugify": "^1.6.6",
"styled-components": "5.3.3", "styled-components": "5.3.3",
"types": "workspace:*", "@futureporn/types": "workspace:*",
"yup": "^1.4.0" "yup": "^1.4.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -23,6 +23,9 @@ importers:
'@fortawesome/react-fontawesome': '@fortawesome/react-fontawesome':
specifier: ^0.2.2 specifier: ^0.2.2
version: 0.2.2(@fortawesome/fontawesome-svg-core@6.5.2)(react@18.3.1) version: 0.2.2(@fortawesome/fontawesome-svg-core@6.5.2)(react@18.3.1)
'@futureporn/types':
specifier: workspace:*
version: link:../types
'@hookform/error-message': '@hookform/error-message':
specifier: ^2.0.1 specifier: ^2.0.1
version: 2.0.1(react-dom@18.3.1(react@18.3.1))(react-hook-form@7.52.1(react@18.3.1))(react@18.3.1) version: 2.0.1(react-dom@18.3.1(react@18.3.1))(react-hook-form@7.52.1(react@18.3.1))(react@18.3.1)
@ -167,9 +170,6 @@ importers:
styled-components: styled-components:
specifier: 5.3.3 specifier: 5.3.3
version: 5.3.3(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1) version: 5.3.3(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react-is@16.13.1)(react@18.3.1)
types:
specifier: workspace:*
version: link:../types
yup: yup:
specifier: ^1.4.0 specifier: ^1.4.0
version: 1.4.0 version: 1.4.0
@ -187,40 +187,6 @@ importers:
specifier: 5.3.3 specifier: 5.3.3
version: 5.3.3 version: 5.3.3
../..: {}
../archive: {}
../boop: {}
../bot: {}
../capture: {}
../image: {}
../infra: {}
../scout: {}
../storage: {}
../strapi: {}
../taco: {}
../temporal-worker: {}
../temporal-workflows: {}
../types: {}
../uppy: {}
../utils: {}
../video: {}
packages: packages:
'@ampproject/remapping@2.3.0': '@ampproject/remapping@2.3.0':

View File

@ -1,5 +1,5 @@
{ {
"name": "scout", "name": "@futureporn/scout",
"type": "module", "type": "module",
"version": "3.3.0", "version": "3.3.0",
"description": "vtuber data acquisition", "description": "vtuber data acquisition",
@ -45,7 +45,7 @@
"sharp": "^0.33.4", "sharp": "^0.33.4",
"slugify": "^1.6.6", "slugify": "^1.6.6",
"tsx": "^4.7.2", "tsx": "^4.7.2",
"types": "workspace:^", "@futureporn/types": "workspace:^",
"xpath": "^0.0.34" "xpath": "^0.0.34"
}, },
"packageManager": "pnpm@9.2.0", "packageManager": "pnpm@9.2.0",

View File

@ -17,6 +17,9 @@ importers:
'@aws-sdk/s3-request-presigner': '@aws-sdk/s3-request-presigner':
specifier: ^3.588.0 specifier: ^3.588.0
version: 3.614.0 version: 3.614.0
'@futureporn/types':
specifier: workspace:^
version: link:../types
'@paralleldrive/cuid2': '@paralleldrive/cuid2':
specifier: ^2.2.2 specifier: ^2.2.2
version: 2.2.2 version: 2.2.2
@ -89,9 +92,6 @@ importers:
tsx: tsx:
specifier: ^4.7.2 specifier: ^4.7.2
version: 4.16.2 version: 4.16.2
types:
specifier: workspace:^
version: link:../types
xpath: xpath:
specifier: ^0.0.34 specifier: ^0.0.34
version: 0.0.34 version: 0.0.34
@ -115,40 +115,6 @@ importers:
specifier: ^5.4.5 specifier: ^5.4.5
version: 5.5.3 version: 5.5.3
../..: {}
../archive: {}
../boop: {}
../bot: {}
../capture: {}
../image: {}
../infra: {}
../next: {}
../storage: {}
../strapi: {}
../taco: {}
../temporal-worker: {}
../temporal-workflows: {}
../types: {}
../uppy: {}
../utils: {}
../video: {}
packages: packages:
'@aws-crypto/crc32@5.2.0': '@aws-crypto/crc32@5.2.0':

View File

@ -3,7 +3,7 @@ dotenv.config({
path: '../../.env', path: '../../.env',
}); });
import { type IVtuber } from 'types'; import { type IVtuber } from '@futureporn/types';
import twitter from './twitter.js'; import twitter from './twitter.js';
import fansly from './fansly.js'; import fansly from './fansly.js';

View File

@ -1,5 +1,5 @@
{ {
"name": "storage", "name": "@futureporn/storage",
"type": "module", "type": "module",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",

View File

@ -1,5 +1,5 @@
{ {
"name": "taco", "name": "@futureporn/taco",
"type": "module", "type": "module",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",

View File

@ -1,28 +1,35 @@
{ {
"name": "temporal-worker", "name": "@futureporn/temporal-worker",
"type": "module", "type": "module",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"files": [
"dist"
],
"scripts": { "scripts": {
"build": "tsc --build", "build": "tsc --build",
"isolate": "npx isolate-package isolate",
"lint": "eslint .", "lint": "eslint .",
"dev": "nodemon --ext js,ts,json,yaml --watch ./worker.ts --watch ../temporal-workflows --exec \"node --loader ts-node/esm --disable-warning=ExperimentalWarning ./worker.ts\"", "dev": "nodemon --ext js,ts,json,yaml --watch ./worker.ts --watch ../temporal-workflows --exec \"node --loader ts-node/esm --disable-warning=ExperimentalWarning ./worker.ts\"",
"start": "node dist/temporal-worker/worker.js" "start": "node dist/temporal-worker/worker.js"
}, },
"dependencies": { "dependencies": {
"@futureporn/image": "workspace:^",
"@futureporn/scout": "workspace:^",
"@futureporn/storage": "workspace:^",
"@futureporn/temporal-workflows": "workspace:*",
"@futureporn/types": "workspace:*",
"@futureporn/utils": "workspace:*",
"@temporalio/activity": "^1.10.1", "@temporalio/activity": "^1.10.1",
"@temporalio/worker": "^1.9.0", "@temporalio/worker": "^1.9.0",
"@tsconfig/node20": "^20.1.4", "@tsconfig/node20": "^20.1.4",
"date-fns": "^3.6.0",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"image": "workspace:^", "qs": "^6.12.3"
"qs": "^6.12.3",
"scout": "workspace:^",
"storage": "workspace:^",
"temporal-workflows": "workspace:*",
"utils": "workspace:*"
}, },
"packageManager": "pnpm@9.5.0", "packageManager": "pnpm@9.5.0",
"devDependencies": { "devDependencies": {
"isolate-package": "^1.19.0",
"nodemon": "^2.0.15", "nodemon": "^2.0.15",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.5.3" "typescript": "^5.5.3"

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
import { Worker } from '@temporalio/worker'; import { Worker } from '@temporalio/worker';
import { URL } from 'url'; import { URL } from 'url';
import path from 'path'; import path from 'path';
import * as activities from '../temporal-workflows/src/activities.js'; import * as activities from '../../temporal-workflows/src/activities.js';
// import * as workflows from 'temporal-workflows/workflows.js'; // import * as workflows from 'temporal-workflows/workflows.js';
import 'dotenv/config' import 'dotenv/config'

View File

@ -22,8 +22,8 @@
}, },
// Include the necessary files for your project // Include the necessary files for your project
"include": [ "include": [
"**/*.ts", "./src/**/*.ts",
"**/*.tsx" "./src/**/*.tsx"
], ],
"exclude": [ "exclude": [
"node_modules" "node_modules"

View File

@ -1 +1 @@
lib dist

View File

@ -1 +1 @@
lib dist

View File

@ -1,5 +1,5 @@
{ {
"name": "temporal-workflows", "name": "@futureporn/temporal-workflows",
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"type": "module", "type": "module",
@ -17,12 +17,12 @@
"@temporalio/workflow": "^1.10.1", "@temporalio/workflow": "^1.10.1",
"@types/qs": "^6.9.15", "@types/qs": "^6.9.15",
"date-fns": "^3.6.0", "date-fns": "^3.6.0",
"image": "workspace:*", "@futureporn/image": "workspace:*",
"qs": "^6.12.3", "qs": "^6.12.3",
"scout": "workspace:^", "@futureporn/scout": "workspace:^",
"storage": "workspace:^", "@futureporn/storage": "workspace:^",
"types": "workspace:*", "@futureporn/types": "workspace:*",
"utils": "workspace:*" "@futureporn/utils": "workspace:*"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/eslint-plugin": "^5.62.0",

View File

@ -8,6 +8,21 @@ importers:
.: .:
dependencies: dependencies:
'@futureporn/image':
specifier: workspace:*
version: link:../image
'@futureporn/scout':
specifier: workspace:^
version: link:../scout
'@futureporn/storage':
specifier: workspace:^
version: link:../storage
'@futureporn/types':
specifier: workspace:*
version: link:../types
'@futureporn/utils':
specifier: workspace:*
version: link:../utils
'@temporalio/activity': '@temporalio/activity':
specifier: ^1.10.1 specifier: ^1.10.1
version: 1.10.1 version: 1.10.1
@ -20,24 +35,9 @@ importers:
date-fns: date-fns:
specifier: ^3.6.0 specifier: ^3.6.0
version: 3.6.0 version: 3.6.0
image:
specifier: workspace:*
version: link:../image
qs: qs:
specifier: ^6.12.3 specifier: ^6.12.3
version: 6.12.3 version: 6.12.3
scout:
specifier: workspace:^
version: link:../scout
storage:
specifier: workspace:^
version: link:../storage
types:
specifier: workspace:*
version: link:../types
utils:
specifier: workspace:*
version: link:../utils
devDependencies: devDependencies:
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
specifier: ^5.62.0 specifier: ^5.62.0

View File

@ -1,6 +1,6 @@
import { log } from '@temporalio/activity'; import { log } from '@temporalio/activity';
import { type IPlatformNotificationResponse, type IVtuberResponse, type IStreamResponse } from 'types' import { type IPlatformNotificationResponse, type IVtuberResponse, type IStreamResponse } from '@futureporn/types'
if (!process.env.SCOUT_STRAPI_API_KEY) throw new Error('SCOUT_STRAPI_API_KEY is missing from env'); if (!process.env.SCOUT_STRAPI_API_KEY) throw new Error('SCOUT_STRAPI_API_KEY is missing from env');

View File

@ -1,4 +1,4 @@
import { type IStreamResponse, type IStreamsResponse } from 'types'; import { type IStreamResponse, type IStreamsResponse } from '@futureporn/types';
import { subMinutes, addMinutes } from 'date-fns'; import { subMinutes, addMinutes } from 'date-fns';
import qs from 'qs' import qs from 'qs'

View File

@ -1,9 +1,9 @@
import { type IVtubersResponse, type IVtuberResponse, type IVtuber } from 'types'; import { type IVtubersResponse, type IVtuberResponse, type IVtuber } from '@futureporn/types';
import { fpSlugify } from 'utils'; import { fpSlugify } from '@futureporn/utils';
import qs from 'qs'; import qs from 'qs';
import { getProminentColor } from 'image'; import { getProminentColor } from '@futureporn/image';
import { getImage } from 'scout/vtuber.js'; import { getImage } from '@futureporn/scout/vtuber.js';
import { uploadFile } from 'storage/s3.js'; import { uploadFile } from '@futureporn/storage/s3.js';
/** /**
* find or create vtuber in Strapi * find or create vtuber in Strapi

View File

@ -1,5 +1,5 @@
import { proxyActivities, sleep, log } from '@temporalio/workflow'; import { proxyActivities, sleep, log } from '@temporalio/workflow';
import { NotificationData } from 'types'; import { NotificationData } from '@futureporn/types';
// Only import the activity types // Only import the activity types
import type * as upsertVtuberType from './activities/upsertVtuber.js'; import type * as upsertVtuberType from './activities/upsertVtuber.js';
import type * as upsertStreamType from './activities/upsertStream.js'; import type * as upsertStreamType from './activities/upsertStream.js';

View File

@ -1 +1 @@
lib dist

View File

@ -1 +1 @@
lib dist

View File

@ -1,34 +1,37 @@
export = Futureporn;
export as namespace Futureporn;
declare namespace Futureporn {
interface IMuxAsset {
export interface IMuxAsset {
id: number; id: number;
attributes: { attributes: {
playbackId: string; playbackId: string;
assetId: string; assetId: string;
} }
} }
export interface IPagination { interface IPagination {
page: number; page: number;
pageSize: number; pageSize: number;
pageCount: number; pageCount: number;
total: number; total: number;
} }
export interface IMuxAssetResponse { interface IMuxAssetResponse {
data: IMuxAsset; data: IMuxAsset;
meta: IMeta; meta: IMeta;
} }
export interface IMeta { interface IMeta {
pagination: IPagination; pagination: IPagination;
} }
export interface IPlatformNotification { interface IPlatformNotification {
id: number; id: number;
attributes: { attributes: {
source: string; source: string;
@ -37,15 +40,15 @@ export interface IPlatformNotification {
date2: string; date2: string;
vtuber: number; vtuber: number;
} }
} }
export interface IPlatformNotificationResponse { interface IPlatformNotificationResponse {
data: IPlatformNotification; data: IPlatformNotification;
meta: IMeta; meta: IMeta;
error?: any; error?: any;
} }
export interface IStream { interface IStream {
id: number; id: number;
attributes: { attributes: {
date: string; date: string;
@ -59,21 +62,21 @@ export interface IStream {
isFanslyStream: boolean; isFanslyStream: boolean;
platformNotifications: IPlatformNotification[]; platformNotifications: IPlatformNotification[];
} }
} }
export interface IStreamResponse { interface IStreamResponse {
data: IStream; data: IStream;
meta: IMeta; meta: IMeta;
error?: any; error?: any;
} }
export interface IStreamsResponse { interface IStreamsResponse {
data: IStream[]; data: IStream[];
meta: IMeta; meta: IMeta;
} }
export interface IVtuber { interface IVtuber {
id: number; id: number;
attributes: { attributes: {
slug: string; slug: string;
@ -105,19 +108,19 @@ export interface IVtuber {
chaturbateId?: string; chaturbateId?: string;
twitterId?: string; twitterId?: string;
} }
} }
export interface IVtuberResponse { interface IVtuberResponse {
data: IVtuber; data: IVtuber;
meta: IMeta; meta: IMeta;
} }
export interface IVtubersResponse { interface IVtubersResponse {
data: IVtuber[]; data: IVtuber[];
meta: IMeta; meta: IMeta;
} }
export type NotificationData = { type NotificationData = {
isMatch?: boolean; isMatch?: boolean;
url: string; url: string;
platform: string; platform: string;
@ -127,3 +130,4 @@ export type NotificationData = {
userId: string | null; userId: string | null;
avatar: string; avatar: string;
}; };
}

View File

@ -1,12 +1,13 @@
{ {
"name": "types", "name": "@futureporn/types",
"type": "module", "type": "module",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.d.ts",
"scripts": { "scripts": {
"test": "echo \"Warn: no test specified\" && exit 0" "test": "echo \"Warn: no test specified\" && exit 0",
"build": "tsc --build"
}, },
"main": "index.d.ts",
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "Unlicense", "license": "Unlicense",

View File

@ -15,15 +15,20 @@
"noImplicitOverride": true, "noImplicitOverride": true,
// Transpile our TypeScript code to JavaScript // Transpile our TypeScript code to JavaScript
"module": "NodeNext", "module": "NodeNext",
"outDir": "dist",
"lib": [ "lib": [
"es2022" "es2022"
] ],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}, },
// Include the necessary files for your project // Include the necessary files for your project
"include": [ "files": [
"**/*.ts", "index.d.ts"
"**/*.tsx"
], ],
"exclude": [ "exclude": [
"node_modules" "node_modules"

View File

@ -3,7 +3,7 @@ import { basename, join } from 'path';
import os from 'node:os'; import os from 'node:os';
import fs from 'node:fs'; import fs from 'node:fs';
import { createId } from '@paralleldrive/cuid2'; import { createId } from '@paralleldrive/cuid2';
import { ua0 } from 'scout/ua.js'; import { ua0 } from '@futureporn/scout/ua.js';
import { Readable } from 'stream'; import { Readable } from 'stream';
import { finished } from 'stream/promises'; import { finished } from 'stream/promises';
import pRetry from 'p-retry'; import pRetry from 'p-retry';

View File

@ -1,5 +1,5 @@
{ {
"name": "utils", "name": "@futureporn/utils",
"type": "module", "type": "module",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
@ -14,7 +14,7 @@
"@paralleldrive/cuid2": "^2.2.2", "@paralleldrive/cuid2": "^2.2.2",
"@types/node": "^20.14.9", "@types/node": "^20.14.9",
"p-retry": "^5.1.2", "p-retry": "^5.1.2",
"scout": "workspace:^", "@futureporn/scout": "workspace:^",
"slugify": "^1.6.6" "slugify": "^1.6.6"
}, },
"devDependencies": { "devDependencies": {

View File

@ -8,6 +8,9 @@ importers:
.: .:
dependencies: dependencies:
'@futureporn/scout':
specifier: workspace:^
version: link:../scout
'@paralleldrive/cuid2': '@paralleldrive/cuid2':
specifier: ^2.2.2 specifier: ^2.2.2
version: 2.2.2 version: 2.2.2
@ -17,9 +20,6 @@ importers:
p-retry: p-retry:
specifier: ^5.1.2 specifier: ^5.1.2
version: 5.1.2 version: 5.1.2
scout:
specifier: workspace:^
version: link:../scout
slugify: slugify:
specifier: ^1.6.6 specifier: ^1.6.6
version: 1.6.6 version: 1.6.6

View File

@ -6,4 +6,18 @@ settings:
importers: importers:
.: {} .:
dependencies:
types:
specifier: ^0.1.1
version: 0.1.1
packages:
types@0.1.1:
resolution: {integrity: sha512-JuntZtJj4MKLE9x/XBs7IjsznYhzETwr34pw3XJTKvgYtAMdeMG+o8x8U85E5Lm6eCPa1DdOdGVsHMwq4ZnZAg==}
engines: {node: '>= 0.6.0'}
snapshots:
types@0.1.1: {}