@pgpm/utils 0.15.3 → 0.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +1 -1
- package/README.md +1 -1
- package/package.json +4 -4
- package/pgpm-utils.control +1 -1
- package/__tests__/__snapshots__/utils.test.ts.snap +0 -9
- package/__tests__/utils.test.ts +0 -46
- package/base32/node_modules/.bin/pgpm +0 -21
- package/faker/node_modules/.bin/pgpm +0 -21
- package/inflection/node_modules/.bin/pgpm +0 -21
- package/jest.config.js +0 -15
- package/utils/node_modules/.bin/pgpm +0 -21
- package/verify/node_modules/.bin/pgpm +0 -21
- /package/sql/{pgpm-utils--0.15.2.sql → pgpm-utils--0.15.3.sql} +0 -0
package/Makefile
CHANGED
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<img height="20" src="https://github.com/constructive-io/pgpm-modules/actions/workflows/ci.yml/badge.svg" />
|
|
10
10
|
</a>
|
|
11
11
|
<a href="https://github.com/constructive-io/pgpm-modules/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
|
|
12
|
-
<a href="https://www.npmjs.com/package/@pgpm/utils"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Futils%
|
|
12
|
+
<a href="https://www.npmjs.com/package/@pgpm/utils"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgpm-modules?filename=packages%2Futils%2Fpackage.json"/></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
General utility functions for PostgreSQL modules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpm/utils",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
4
4
|
"description": "General utility functions for PostgreSQL extensions",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"test:watch": "jest --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@pgpm/verify": "0.15.
|
|
24
|
+
"@pgpm/verify": "0.15.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"pgpm": "^1.
|
|
27
|
+
"pgpm": "^1.3.0"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/constructive-io/pgpm-modules/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "f6bbdfb20760e308b02968038b6f54191a9fd527"
|
|
38
38
|
}
|
package/pgpm-utils.control
CHANGED
package/__tests__/utils.test.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { getConnections, PgTestClient } from 'pgsql-test';
|
|
2
|
-
|
|
3
|
-
let pg: PgTestClient;
|
|
4
|
-
let teardown: () => Promise<void>;
|
|
5
|
-
|
|
6
|
-
beforeAll(async () => {
|
|
7
|
-
({ pg, teardown } = await getConnections());
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
afterAll(async () => {
|
|
11
|
-
await teardown();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('more', async () => {
|
|
15
|
-
const { mask_pad } = await pg.one(
|
|
16
|
-
`SELECT utils.mask_pad($1, $2) AS mask_pad`,
|
|
17
|
-
['101', 20]
|
|
18
|
-
);
|
|
19
|
-
expect(mask_pad).toMatchSnapshot();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('less', async () => {
|
|
23
|
-
const { mask_pad } = await pg.one(
|
|
24
|
-
`SELECT utils.mask_pad($1, $2) AS mask_pad`,
|
|
25
|
-
['101', 2]
|
|
26
|
-
);
|
|
27
|
-
expect(mask_pad).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
describe('bitmask', () => {
|
|
31
|
-
it('more', async () => {
|
|
32
|
-
const { bitmask_pad } = await pg.one(
|
|
33
|
-
`SELECT utils.bitmask_pad($1::varbit, $2) AS bitmask_pad`,
|
|
34
|
-
['101', 20]
|
|
35
|
-
);
|
|
36
|
-
expect(bitmask_pad).toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('less', async () => {
|
|
40
|
-
const { bitmask_pad } = await pg.one(
|
|
41
|
-
`SELECT utils.bitmask_pad($1::varbit, $2) AS bitmask_pad`,
|
|
42
|
-
['101', 2]
|
|
43
|
-
);
|
|
44
|
-
expect(bitmask_pad).toMatchSnapshot();
|
|
45
|
-
});
|
|
46
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../pgpm/index.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../pgpm/index.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../pgpm/index.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../pgpm/index.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../pgpm/index.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../pgpm/index.js" "$@"
|
|
21
|
-
fi
|
package/jest.config.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
preset: 'ts-jest',
|
|
4
|
-
testEnvironment: 'node',
|
|
5
|
-
|
|
6
|
-
// Match both __tests__ and colocated test files
|
|
7
|
-
testMatch: ['**/?(*.)+(test|spec).{ts,tsx,js,jsx}'],
|
|
8
|
-
|
|
9
|
-
// Ignore build artifacts and type declarations
|
|
10
|
-
testPathIgnorePatterns: ['/dist/', '\\.d\\.ts$'],
|
|
11
|
-
modulePathIgnorePatterns: ['<rootDir>/dist/'],
|
|
12
|
-
watchPathIgnorePatterns: ['/dist/'],
|
|
13
|
-
|
|
14
|
-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
15
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../pgpm/index.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../pgpm/index.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules/pgpm/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/pgpm@1.0.0_@babel+core@7.28.0_@pgsql+types@17.6.2/node_modules:/Users/pyramation/code/constructive/pgpm-modules/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../pgpm/index.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../pgpm/index.js" "$@"
|
|
21
|
-
fi
|
|
File without changes
|