diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3c38b58..ef74153 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,16 +12,12 @@ on: jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: 18.x cache: 'npm' - run: npm ci - run: npm run build --if-present diff --git a/package.json b/package.json index dde0d33..4913c3f 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Xe's automatic novel generation muse using Plotto and ChatGPT", "main": "dist/index.js", "scripts": { + "build": "tsc", "start": "tsc && node dist/index.js", "test": "mocha", "prepare": "husky install" diff --git a/book.ts b/src/book.ts similarity index 99% rename from book.ts rename to src/book.ts index d2b235b..c7bed96 100644 --- a/book.ts +++ b/src/book.ts @@ -1,6 +1,6 @@ import * as fs from "node:fs/promises"; import { OpenAIApi } from "openai"; -import PlotGenerator, { Plot } from "@xeserv/plottoriffic"; +import PlotGenerator, { Plot } from "@ebooks/plottoriffic"; export const authorBio = `Yasomi Midori is a science fiction author who explores the themes of identity, memory, and technology in her novels. Her debut novel “The Memory Thief” was a critically acclaimed bestseller that captivated readers with its thrilling plot and complex characters. Yasomi also contributes to the Xe Iaso blog as the character Mimi, a hacker and activist who exposes the secrets of the powerful corporations that control the world. Yasomi was born and raised in Tokyo, Japan, where she developed a passion for reading and writing at an early age. She studied computer science and literature at the University of Tokyo, and worked as a software engineer before becoming a full-time writer. She lives in Kyoto with her husband and two cats.`; diff --git a/index.ts b/src/index.ts similarity index 99% rename from index.ts rename to src/index.ts index bc661cb..6b88dca 100644 --- a/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import { Command } from "commander"; import * as dotenv from "dotenv"; import { Configuration, OpenAIApi } from "openai"; -import { Plot } from "@xeserv/plottoriffic"; +import { Plot } from "@ebooks/plottoriffic"; import { generateName } from "@kotofurumiya/th-namegen"; import * as fs from "node:fs/promises"; import { existsSync as fileExists } from "fs"; diff --git a/test/foo.ts b/test/foo.ts new file mode 100644 index 0000000..e69de29 diff --git a/test/test.js b/test/test.js new file mode 100644 index 0000000..7ce67ee --- /dev/null +++ b/test/test.js @@ -0,0 +1,8 @@ +import * as assert from "assert"; +describe("Array", function () { + describe("#indexOf()", function () { + it("should return -1 when the value is not present", function () { + assert.equal([1, 2, 3].indexOf(4), -1); + }); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 88ec98d..0a3b2f2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,5 +12,6 @@ "types": ["node"], "outDir": "dist" }, + "include": ["src/**/*", "tests/**/*", "types/**/*"], "exclude": ["node_modules"] } diff --git a/types/plottoriffic.d.ts b/types/plottoriffic.d.ts index 9469364..aea0021 100644 --- a/types/plottoriffic.d.ts +++ b/types/plottoriffic.d.ts @@ -1,4 +1,4 @@ -declare module "@xeserv/plottoriffic" { +declare module "@ebooks/plottoriffic" { export default PlotGenerator; export type Character = {