graphile-worker
Advanced tools
Comparing version 0.14.0 to 0.15.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.migrate = void 0; | ||
const fs_1 = require("./fs"); | ||
const sql_1 = require("./generated/sql"); | ||
const lib_1 = require("./lib"); | ||
@@ -29,3 +29,3 @@ function checkPostgresVersion(versionString) { | ||
const { escapedWorkerSchema } = (0, lib_1.processSharedOptions)(options); | ||
const rawText = await (0, fs_1.readFile)(`${__dirname}/../sql/${migrationFile}`, "utf8"); | ||
const rawText = sql_1.migrations[migrationFile]; | ||
const text = rawText.replace(/:GRAPHILE_WORKER_SCHEMA\b/g, escapedWorkerSchema); | ||
@@ -65,5 +65,3 @@ await client.query("begin"); | ||
} | ||
const migrationFiles = (await (0, fs_1.readdir)(`${__dirname}/../sql`)) | ||
.filter((f) => f.match(/^[0-9]{6}\.sql$/)) | ||
.sort(); | ||
const migrationFiles = Object.keys(sql_1.migrations); | ||
for (const migrationFile of migrationFiles) { | ||
@@ -70,0 +68,0 @@ const migrationNumber = parseInt(migrationFile.slice(0, 6), 10); |
{ | ||
"name": "graphile-worker", | ||
"version": "0.14.0", | ||
"version": "0.15.0", | ||
"description": "Job queue for PostgreSQL", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"prepack": "rm -Rf dist && tsc && chmod +x dist/cli.js", | ||
"watch": "mkdir -p dist && touch dist/cli.js && chmod +x dist/cli.js && tsc --watch", | ||
"build:sql": "node scripts/buildSqlModule.js", | ||
"prepack": "rm -Rf dist && npm run build:sql && tsc && chmod +x dist/cli.js", | ||
"watch": "mkdir -p dist && touch dist/cli.js && chmod +x dist/cli.js && npm run build:sql && tsc --watch", | ||
"lint": "yarn prettier:check && eslint --ext .js,.jsx,.ts,.tsx,.graphql .", | ||
@@ -10,0 +11,0 @@ "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx,.graphql . --fix; prettier --ignore-path .eslintignore --write '**/*.{js,jsx,ts,tsx,graphql,md,json}'", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
423600
101
5640