Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiAbdou committed Apr 5, 2024
1 parent 8c12454 commit 591713d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
uses: actions/checkout@v4
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test windows
run: yarn workspace @oyster/db windows

Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"seed": "tsx ./src/scripts/seed.ts && yarn types",
"type-check": "tsc --noEmit",
"types": "node ./src/scripts/kysely-codegen.js",
"windows": "node ./src/scripts/windows.js"
"windows": "tsx ./src/scripts/windows.ts"
},
"dependencies": {
"kysely": "^0.26.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import { promises as fs } from 'fs';
import path from 'path';
import { fileURLToPath, pathToFileURL } from 'url';
import { fileURLToPath } from 'url';

class FileMigrationProvider {
#props;
constructor(props) {
this.#props = props;
}
constructor(private props: any) {}

async getMigrations() {
const migrations = {};
console.log('1', this.#props.migrationFolder);
const files = await this.#props.fs.readdir(this.#props.migrationFolder);
console.log('1', this.props.migrationFolder);
const files = await this.props.fs.readdir(this.props.migrationFolder);
console.log('2');
for (const fileName of files) {
const name = this.#props.path.join(
const name = this.props.path.join(
'file://',
this.#props.migrationFolder,
this.props.migrationFolder,
fileName
);
console.log('3', name);
Expand All @@ -39,5 +37,5 @@ class FileMigrationProvider {
path,
}).getMigrations();

console.log(migrations.length);
console.log(migrations);
})();

0 comments on commit 591713d

Please sign in to comment.