podverse-helpers 5.0.4 → 5.0.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/README.md +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/lib/validation/databaseConstants.d.ts +17 -0
- package/dist/lib/validation/databaseConstants.d.ts.map +1 -0
- package/dist/lib/validation/databaseConstants.js +19 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
1
|
# podverse-helpers
|
|
2
|
+
|
|
2
3
|
helper functions used across multiple podverse apps
|
|
4
|
+
|
|
5
|
+
## Dev Setup
|
|
6
|
+
|
|
7
|
+
### Environment Variables
|
|
8
|
+
|
|
9
|
+
The environment variables for this module must be set within the app that consumes this module (ex. `podverse-api` or `podverse-workers`). See `podverse-helpers/config/index.ts` for a list of the env vars expected.
|
|
10
|
+
|
|
11
|
+
### Local Dev Workflow
|
|
12
|
+
|
|
13
|
+
Podverse uses many modules that are maintained in separate repos, and they need to be linked and running for a local dev workflow. Please read the `podverse-ops/dev/local-dev-setup.md` file to set up the required dependencies and module linking.
|
|
14
|
+
|
|
15
|
+
### Running Locally
|
|
16
|
+
|
|
17
|
+
Install the node_modules:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then to build:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
npm run build
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or if you want the app to auto-build on saved changes:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
npm run build:watch
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Publishing
|
|
36
|
+
|
|
37
|
+
To publish your changes to npm, increment the version number is `package.json` then run `npm publish`.
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,3 +22,4 @@ __exportStar(require("./lib/hash"), exports);
|
|
|
22
22
|
__exportStar(require("./lib/logger"), exports);
|
|
23
23
|
__exportStar(require("./lib/request"), exports);
|
|
24
24
|
__exportStar(require("./lib/sortableTitle"), exports);
|
|
25
|
+
__exportStar(require("./lib/validation/databaseConstants"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const DATABASE_CONSTANTS: {
|
|
2
|
+
short_id_v2: number;
|
|
3
|
+
varchar_short: number;
|
|
4
|
+
varchar_normal: number;
|
|
5
|
+
varchar_long: number;
|
|
6
|
+
varchar_email: number;
|
|
7
|
+
varchar_fqdn: number;
|
|
8
|
+
varchar_guid: number;
|
|
9
|
+
varchar_md5: number;
|
|
10
|
+
varchar_password: number;
|
|
11
|
+
varchar_slug: number;
|
|
12
|
+
varchar_uri: number;
|
|
13
|
+
varchar_url: number;
|
|
14
|
+
varchar_fcm_token: number;
|
|
15
|
+
getMediaPlayerNumeric: (num: number) => string;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=databaseConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databaseConstants.d.ts","sourceRoot":"","sources":["../../../src/lib/validation/databaseConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iCAcA,MAAM;CACpC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DATABASE_CONSTANTS = void 0;
|
|
4
|
+
exports.DATABASE_CONSTANTS = {
|
|
5
|
+
short_id_v2: 15,
|
|
6
|
+
varchar_short: 50,
|
|
7
|
+
varchar_normal: 255,
|
|
8
|
+
varchar_long: 2500,
|
|
9
|
+
varchar_email: 255,
|
|
10
|
+
varchar_fqdn: 253,
|
|
11
|
+
varchar_guid: 36,
|
|
12
|
+
varchar_md5: 32,
|
|
13
|
+
varchar_password: 36,
|
|
14
|
+
varchar_slug: 100,
|
|
15
|
+
varchar_uri: 2083,
|
|
16
|
+
varchar_url: 2083,
|
|
17
|
+
varchar_fcm_token: 255,
|
|
18
|
+
getMediaPlayerNumeric: (num) => num.toFixed(2),
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podverse-helpers",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dist/**/*"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"
|
|
11
|
+
"build:watch": "nodemon --watch 'src' --delay 500ms -x \"npm run build\"",
|
|
12
12
|
"build": "tsc",
|
|
13
13
|
"lint": "eslint ./src --ext .ts",
|
|
14
14
|
"prepare": "npm run build",
|