Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion graphile/graphile-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@launchql/logger": "workspace:^",
"@pgpmjs/logger": "workspace:^",
"lru-cache": "^11.2.4",
"pg": "^8.16.3",
"pg-cache": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion graphile/graphile-cache/src/graphile-cache.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Logger } from '@launchql/logger';
import { Logger } from '@pgpmjs/logger';
import { LRUCache } from 'lru-cache';
import pg from 'pg';
import { pgCache } from 'pg-cache';
Expand Down
4 changes: 2 additions & 2 deletions graphile/graphile-settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"dependencies": {
"@graphile-contrib/pg-many-to-many": "^1.0.2",
"@launchql/env": "workspace:^",
"@launchql/types": "workspace:^",
"@pgpmjs/env": "workspace:^",
"@pgpmjs/types": "workspace:^",
"cors": "^2.8.5",
"express": "^5.1.0",
"graphile-build": "^4.14.1",
Expand Down
6 changes: 3 additions & 3 deletions graphile/graphile-settings/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PgManyToMany from '@graphile-contrib/pg-many-to-many';
import { getEnvOptions } from '@launchql/env';
import { LaunchQLOptions } from '@launchql/types';
import { getEnvOptions } from '@pgpmjs/env';
import { PgpmOptions } from '@pgpmjs/types';
import PgPostgis from 'graphile-postgis';
import FulltextFilterPlugin from 'graphile-plugin-fulltext-filter';
import { NodePlugin, Plugin } from 'graphile-build';
Expand All @@ -19,7 +19,7 @@ import CustomPgTypeMappingsPlugin from 'graphile-pg-type-mappings';
import UploadPostGraphilePlugin, { Uploader } from 'graphile-upload-plugin';

export const getGraphileSettings = (
rawOpts: LaunchQLOptions
rawOpts: PgpmOptions
): PostGraphileOptions => {
const opts = getEnvOptions(rawOpts);

Expand Down
2 changes: 1 addition & 1 deletion graphile/graphile-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"makage": "^0.1.8"
},
"dependencies": {
"@launchql/types": "workspace:^",
"@pgpmjs/types": "workspace:^",
"graphql": "15.10.1",
"mock-req": "^0.2.0",
"pg": "^8.16.3",
Expand Down
2 changes: 1 addition & 1 deletion graphile/graphile-test/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GraphileOptions } from '@launchql/types';
import type { GraphileOptions } from '@pgpmjs/types';
import { DocumentNode, GraphQLError } from 'graphql';

export interface GraphQLQueryOptions<TVariables = Record<string, any>> {
Expand Down
2 changes: 1 addition & 1 deletion graphile/graphile-upload-plugin/__tests__/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { join } from 'path';
import { createReadStream, writeFileSync, unlinkSync } from 'fs';
import { tmpdir } from 'os';
import { S3Client } from '@aws-sdk/client-s3';
import { getEnvOptions } from '@launchql/env';
import { getEnvOptions } from '@pgpmjs/env';
import { createS3Bucket } from '@launchql/s3-utils';
import { getConnections, snapshot, seed } from 'graphile-test';
import type { PgTestClient } from 'pgsql-test/test-client';
Expand Down
2 changes: 1 addition & 1 deletion graphile/graphile-upload-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.948.0",
"@launchql/env": "workspace:^",
"@pgpmjs/env": "workspace:^",
"@launchql/s3-utils": "workspace:^",
"@types/pg": "^8.16.0",
"graphile-test": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion jobs/job-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"url": "https://github.com/launchql/jobs/issues"
},
"dependencies": {
"@launchql/types": "workspace:^",
"@pgpmjs/types": "workspace:^",
"envalid": "6.0.2"
}
}
2 changes: 1 addition & 1 deletion jobs/job-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
RunScheduledJobParams,
ReleaseScheduledJobsParams,
ReleaseJobsParams
} from '@launchql/types';
} from '@pgpmjs/types';
import env from './env';
const { JOBS_SCHEMA } = env;

Expand Down
6 changes: 3 additions & 3 deletions packages/cli/__tests__/extensions.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jest.setTimeout(60000);
process.env.PGPM_SKIP_UPDATE_CHECK = 'true';

import { LaunchQLPackage } from '@launchql/core';
import { PgpmPackage } from '@pgpmjs/core';
import { sync as glob } from 'glob';
import { Inquirerer } from 'inquirerer';
import { ParsedArgs } from 'minimist';
Expand Down Expand Up @@ -68,7 +68,7 @@ describe('cmds:extension', () => {
});

// Step 2b: Snapshot initial control file and module dependencies
const initialProject = new LaunchQLPackage(modulePath);
const initialProject = new PgpmPackage(modulePath);

expect(initialProject.getModuleControlFile()).toMatchSnapshot('initial - control file');
expect(initialProject.getModuleDependencies('my-module')).toMatchSnapshot('initial - module dependencies');
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('cmds:extension', () => {
expect(relativeFiles).toMatchSnapshot('extension-update - files');

// Step 4: Re-init package and validate changes
const updatedProject = new LaunchQLPackage(modulePath);
const updatedProject = new PgpmPackage(modulePath);

expect(updatedProject.getModuleControlFile()).toMatchSnapshot('updated - control file');
expect(updatedProject.getModuleDependencies('my-module')).toMatchSnapshot('updated - module dependencies');
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/__tests__/init.install.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jest.setTimeout(60000);
process.env.PGPM_SKIP_UPDATE_CHECK = 'true';

import { LaunchQLPackage } from '@launchql/core';
import { PgpmPackage } from '@pgpmjs/core';
import * as fs from 'fs';
import * as glob from 'glob';
import * as path from 'path';
Expand Down Expand Up @@ -71,7 +71,7 @@ describe('cmds:install - with initialized workspace and module', () => {
expect(relativeFiles).toMatchSnapshot();

// Snapshot control file
const mod = new LaunchQLPackage(moduleDir);
const mod = new PgpmPackage(moduleDir);
const controlFile = mod.getModuleControlFile();
expect(controlFile).toMatchSnapshot();
});
Expand Down Expand Up @@ -117,7 +117,7 @@ describe('cmds:install - with initialized workspace and module', () => {
expect(relativeFiles).toMatchSnapshot();

// Snapshot control file after both installs
const mod = new LaunchQLPackage(moduleDir);
const mod = new PgpmPackage(moduleDir);
const controlFile = mod.getModuleControlFile();
expect(controlFile).toMatchSnapshot();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/__tests__/init.templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fs from 'fs';
import os from 'os';
import path from 'path';

import { scaffoldTemplate } from '@launchql/core';
import { scaffoldTemplate } from '@pgpmjs/core';

const TEMPLATE_REPO = 'https://github.com/constructive-io/pgpm-boilerplates.git';

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/__tests__/init.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jest.setTimeout(60000);
process.env.PGPM_SKIP_UPDATE_CHECK = 'true';

import { LaunchQLPackage } from '@launchql/core';
import { PgpmPackage } from '@pgpmjs/core';
import { existsSync } from 'fs';
import { sync as glob } from 'glob';
import { Inquirerer } from 'inquirerer';
Expand Down Expand Up @@ -105,7 +105,7 @@ describe('cmds:init', () => {
'module-only'
);

const lql = new LaunchQLPackage(moduleDir);
const lql = new PgpmPackage(moduleDir);
expect(lql.getModuleControlFile()).toMatchSnapshot();
});

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/__tests__/package.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LaunchQLPackage } from '@launchql/core';
import { PgpmPackage } from '@pgpmjs/core';
import * as fs from 'fs';
import { sync as glob } from 'glob';
import { Inquirerer } from 'inquirerer';
Expand Down Expand Up @@ -47,7 +47,7 @@ describe('cmds:package', () => {
fs.cpSync(fixtureWorkspace, workspacePath, { recursive: true });

const modulePath = path.join(workspacePath, 'packages', 'secrets');
const initialProject = new LaunchQLPackage(modulePath);
const initialProject = new PgpmPackage(modulePath);

// Snapshot initial state
expect(initialProject.getModuleControlFile()).toMatchSnapshot('initial - control file');
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
},
"dependencies": {
"@launchql/codegen": "workspace:^",
"@launchql/core": "workspace:^",
"@launchql/env": "workspace:^",
"@pgpmjs/core": "workspace:^",
"@pgpmjs/env": "workspace:^",
"@launchql/explorer": "workspace:^",
"@launchql/logger": "workspace:^",
"@pgpmjs/logger": "workspace:^",
"@launchql/server": "workspace:^",
"@launchql/server-utils": "workspace:^",
"@launchql/types": "workspace:^",
"@pgpmjs/server-utils": "workspace:^",
"@pgpmjs/types": "workspace:^",
"find-and-require-package-json": "^0.8.0",
"inquirerer": "^2.1.11",
"js-yaml": "^4.1.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/commands/explorer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getEnvOptions } from '@launchql/env';
import { getEnvOptions } from '@pgpmjs/env';
import { LaunchQLExplorer as explorer } from '@launchql/explorer';
import { Logger } from '@launchql/logger';
import { LaunchQLOptions } from '@launchql/types';
import { Logger } from '@pgpmjs/logger';
import { PgpmOptions } from '@pgpmjs/types';
import { CLIOptions, Inquirerer, Question } from 'inquirerer';

const log = new Logger('explorer');
Expand Down Expand Up @@ -91,7 +91,7 @@ export default async (
simpleInflection
} = await prompter.prompt(argv, questions);

const options: LaunchQLOptions = getEnvOptions({
const options: PgpmOptions = getEnvOptions({
features: {
oppositeBaseNames,
simpleInflection,
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/src/commands/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getEnvOptions } from '@launchql/env';
import { Logger } from '@launchql/logger';
import { getEnvOptions } from '@pgpmjs/env';
import { Logger } from '@pgpmjs/logger';
import { LaunchQLServer as server } from '@launchql/server';
import { LaunchQLOptions } from '@launchql/types';
import { PgpmOptions } from '@pgpmjs/types';
import { CLIOptions, Inquirerer, OptionValue,Question } from 'inquirerer';
import { getPgPool } from 'pg-cache';

Expand Down Expand Up @@ -187,7 +187,7 @@ export default async (
roleName = selectedRoleName;
}

const options: LaunchQLOptions = getEnvOptions({
const options: PgpmOptions = getEnvOptions({
pg: { database: selectedDb },
features: {
oppositeBaseNames,
Expand All @@ -202,7 +202,7 @@ export default async (
port,
...(origin ? { origin } : {})
}
} as LaunchQLOptions);
} as PgpmOptions);

log.success('✅ Selected Configuration:');
for (const [key, value] of Object.entries(options)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/test-utils/CLIDeployTestFixture.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LaunchQLMigrate } from '@launchql/core';
import { PgpmMigrate } from '@pgpmjs/core';
import { CLIOptions,Inquirerer } from 'inquirerer';
import { ParsedArgs } from 'minimist';
import { Pool } from 'pg';
Expand Down Expand Up @@ -56,7 +56,7 @@ export class CLIDeployTestFixture extends TestFixture {
};

// Initialize migrate schema
const migrate = new LaunchQLMigrate(config);
const migrate = new PgpmMigrate(config);
await migrate.initialize();

// Get pool for test database operations
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test-utils/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Inquirerer } from 'inquirerer';
import { ParsedArgs } from 'minimist';
import os from 'os';
import path from 'path';
import { DEFAULT_TEMPLATE_REPO } from '@launchql/core';
import { DEFAULT_TEMPLATE_REPO } from '@pgpmjs/core';

import { commands } from '../src/commands';
import { setupTests, TestEnvironment } from './cli';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test-utils/init-argv.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ParsedArgs } from 'minimist';
import { DEFAULT_TEMPLATE_REPO } from '@launchql/core';
import { DEFAULT_TEMPLATE_REPO } from '@pgpmjs/core';

export const addInitDefaults = (argv: ParsedArgs): ParsedArgs => {
const baseName = (argv.moduleName as string) || (argv.name as string) || 'module';
Expand Down
5 changes: 3 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@launchql/client",
"name": "@pgpmjs/client",
"version": "2.3.2",
"author": "Constructive <[email protected]>",
"description": "PostgreSQL Client",
Expand Down Expand Up @@ -31,7 +31,8 @@
"keywords": [
"client",
"graphql",
"launchql",
"pgpm",
"pgpmjs",
"frontend",
"api"
],
Expand Down
12 changes: 6 additions & 6 deletions packages/core/__tests__/config-loading.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs';
import os from 'os';
import path from 'path';

import { LaunchQLPackage } from '../src/core/class/launchql';
import { PgpmPackage } from '../src/core/class/pgpm';

describe('Config Loading', () => {
let tempDir: string;
Expand All @@ -25,14 +25,14 @@ describe('Config Loading', () => {
JSON.stringify(configContent, null, 2)
);

const project = new LaunchQLPackage(tempDir);
const project = new PgpmPackage(tempDir);

expect(project.config).toEqual(configContent);
expect(project.config?.packages).toEqual(['packages/*', 'extensions/*']);
});

it('should load JS config with JSDoc types', () => {
const configContent = `/** @type {import('@launchql/types').LaunchQLWorkspaceConfig} */
const configContent = `/** @type {import('@pgpmjs/types').LaunchQLWorkspaceConfig} */
module.exports = {
packages: ['packages/*', 'extensions/*'],
name: 'test-workspace',
Expand All @@ -46,7 +46,7 @@ module.exports = {
configContent
);

const project = new LaunchQLPackage(tempDir);
const project = new PgpmPackage(tempDir);

expect(project.config?.packages).toEqual(['packages/*', 'extensions/*']);
expect(project.config?.name).toBe('test-workspace');
Expand All @@ -73,14 +73,14 @@ module.exports = {
jsConfig
);

const project = new LaunchQLPackage(tempDir);
const project = new PgpmPackage(tempDir);

expect(project.config?.packages).toEqual(['js-packages/*']);
expect(project.config?.name).toBe('js-workspace');
});

it('should have no config when no config file exists', () => {
const project = new LaunchQLPackage(tempDir);
const project = new PgpmPackage(tempDir);
expect(project.config).toBeUndefined();
expect(project.workspacePath).toBeUndefined();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`LaunchQLPackage.writeModulePlan writes a clean plan to disk for a module (no projects) 1`] = `
exports[`PgpmPackage.writeModulePlan writes a clean plan to disk for a module (no projects) 1`] = `
"%syntax-version=1.0.0
%project=secrets
%uri=secrets
procedures/secretfunction 2017-08-11T08:11:51Z launchql <launchql@5b0c196eeb62> # add procedures/secretfunction"
`;

exports[`LaunchQLPackage.writeModulePlan writes a clean plan to disk for a module (with projects) 1`] = `
exports[`PgpmPackage.writeModulePlan writes a clean plan to disk for a module (with projects) 1`] = `
"%syntax-version=1.0.0
%project=secrets
%uri=secrets
procedures/secretfunction [totp:procedures/generate_secret pg-verify:procedures/verify_view] 2017-08-11T08:11:51Z launchql <launchql@5b0c196eeb62> # add procedures/secretfunction"
`;

exports[`LaunchQLPackage.writeModulePlan writes a plan for a dependency-heavy module (totp) 1`] = `
exports[`PgpmPackage.writeModulePlan writes a plan for a dependency-heavy module (totp) 1`] = `
"%syntax-version=1.0.0
%project=totp
%uri=totp
procedures/generate_secret [pg-verify:procedures/verify_view] 2017-08-11T08:11:51Z launchql <launchql@5b0c196eeb62> # add procedures/generate_secret"
`;

exports[`LaunchQLPackage.writeModulePlan writes a plan with project references (utils) 1`] = `
exports[`PgpmPackage.writeModulePlan writes a plan with project references (utils) 1`] = `
{
"ctrl": "# pg-verify extension
comment = 'pg-verify extension'
Expand Down
Loading