Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dbpath

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbpath - npm Package Compare versions

Comparing version 0.2.18 to 0.2.19

dist/src/malformed.integration.spec.d.ts

5

dist/src/cli.js

@@ -50,2 +50,3 @@ "use strict";

const init_1 = require("./init");
const dal_1 = require("@dbpath/dal");
exports.configFileName = 'dbpath.config.json';

@@ -104,7 +105,7 @@ function makeConfig(cwd, envVars) {

const page = options.page ? parseInt(options.page) : 1;
const fullOptions = Object.assign(Object.assign({}, options), { limitBy: dialect.limitFn, page });
const fullOptions = Object.assign(Object.assign({}, options), { limitBy: (0, dal_1.checkLimitOrThrow)(dialect.limitFn), page });
if (page < 1)
throw new Error("Page must be greater than 0");
const where = fullOptions.where ? fullOptions.where : [];
let pathSpec = (0, tables_1.makePathSpec)(path, meta.tables, id, fullOptions, where);
let pathSpec = (0, tables_1.makePathSpec)(env.schema, path, meta.tables, id, fullOptions, where);
if (fullOptions.trace) {

@@ -111,0 +112,0 @@ const pps = yield (0, path_1.tracePlan)(envAndNameOrErrors, config.summary, meta, pathSpec, fullOptions);

@@ -11,14 +11,6 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const integration_fixture_1 = require("./integration.fixture");
const path_1 = __importDefault(require("path"));
const environments_1 = require("@dbpath/environments");
const files_1 = require("@dbpath/files");
const mockTestDir = integration_fixture_1.testRoot + '/empty';
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
const p = (s) => path_1.default.join(mockTestDir, environments_1.dbPathDir, s);
}));
const expected = (0, files_1.readTestFile)(mockTestDir, 'expected.txt');

@@ -25,0 +17,0 @@ describe("the behaviour of dbpath when it is misconfigured", () => {

@@ -243,1 +243,42 @@ "use strict";

});
describe("paging", () => {
const asJson = (pageNum, pageSize, env) => __awaiter(void 0, void 0, void 0, function* () {
let string = yield (0, integration_fixture_1.executeDbAuto)(mockTestDir, `driver --page ${pageNum} --pageSize ${pageSize} --json -e ${env}`);
try {
return JSON.parse(string);
}
catch (e) {
console.log(string);
console.error(e);
throw e;
}
});
it("should page for postgres", () => __awaiter(void 0, void 0, void 0, function* () {
expect(yield asJson(1, 1, "dev")).toEqual([
{
"driverid": 1,
"name": "phil"
}
]);
expect(yield asJson(2, 1, "dev")).toEqual([
{
"driverid": 2,
"name": "joe"
}
]);
}));
it("should page for oracle", () => __awaiter(void 0, void 0, void 0, function* () {
expect(yield asJson(1, 1, "oracle")).toEqual([
{
"driverid": 1,
"name": "phil"
}
]);
expect(yield asJson(2, 1, "oracle")).toEqual([
{
"driverid": 2,
"name": "joe"
}
]);
}));
});

12

package.json
{
"name": "dbpath",
"description": "",
"version": "0.2.18",
"version": "0.2.19",
"main": "dist/index",

@@ -24,7 +24,7 @@ "types": "dist/index",

"commander": "^10.0.0",
"@dbpath/tables": "0.2.18",
"@dbpath/pathparser": "0.2.18",
"@dbpath/utils": "0.2.18",
"@dbpath/files": "0.2.18",
"@dbpath/environments": "0.2.18"
"@dbpath/tables": "0.2.19",
"@dbpath/pathparser": "0.2.19",
"@dbpath/utils": "0.2.19",
"@dbpath/files": "0.2.19",
"@dbpath/environments": "0.2.19"
},

@@ -31,0 +31,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc