mobiletto-orm-scan-typedef 1.0.0
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/lib/esm/constants.d.ts +3 -0
- package/lib/esm/constants.js +5 -0
- package/lib/esm/index.d.ts +2 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/types.d.ts +25 -0
- package/lib/esm/types.js +29 -0
- package/package.json +56 -0
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MobilettoOrmTypeDef, MobilettoOrmTypeDefConfig } from "mobiletto-orm-typedef";
|
|
2
|
+
export declare const MobilettoScanLockTypeDefConfig: MobilettoOrmTypeDefConfig;
|
|
3
|
+
export declare const MobilettoScanLockTypeDef: MobilettoOrmTypeDef;
|
|
4
|
+
export type MobilettoScanData = {
|
|
5
|
+
scheduled?: number;
|
|
6
|
+
started?: number;
|
|
7
|
+
promise?: Promise<void>;
|
|
8
|
+
finished?: number;
|
|
9
|
+
opCount?: number;
|
|
10
|
+
errCount?: number;
|
|
11
|
+
log?: string[];
|
|
12
|
+
error?: Error | string | object;
|
|
13
|
+
};
|
|
14
|
+
export type MobilettoScan = {
|
|
15
|
+
name: string;
|
|
16
|
+
interval?: number;
|
|
17
|
+
delay?: number;
|
|
18
|
+
scan?: MobilettoScanData;
|
|
19
|
+
history?: MobilettoScanData[];
|
|
20
|
+
};
|
|
21
|
+
export type MobilettoScanStatus = "pending" | "started" | "finished";
|
|
22
|
+
export declare const MobilettoScanObjectTypeDefConfig: MobilettoOrmTypeDefConfig;
|
|
23
|
+
export type MobilettoClock = {
|
|
24
|
+
now: () => number;
|
|
25
|
+
};
|
package/lib/esm/types.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MobilettoOrmTypeDef } from "mobiletto-orm-typedef";
|
|
2
|
+
// export type MobilettoScanLock = MobilettoOrmObject & {
|
|
3
|
+
// lock: string;
|
|
4
|
+
// owner: string;
|
|
5
|
+
// };
|
|
6
|
+
export const MobilettoScanLockTypeDefConfig = {
|
|
7
|
+
typeName: "scanLock",
|
|
8
|
+
fields: {
|
|
9
|
+
lock: { primary: true, type: "string" },
|
|
10
|
+
owner: { index: true, type: "string" },
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
export const MobilettoScanLockTypeDef = new MobilettoOrmTypeDef(MobilettoScanLockTypeDefConfig);
|
|
14
|
+
// export type MobilettoScanObject = MobilettoOrmObject & {
|
|
15
|
+
// status: MobilettoScanStatus;
|
|
16
|
+
// owner?: string;
|
|
17
|
+
// started?: number;
|
|
18
|
+
// finished?: number;
|
|
19
|
+
// errorCount?: number;
|
|
20
|
+
// };
|
|
21
|
+
export const MobilettoScanObjectTypeDefConfig = {
|
|
22
|
+
fields: {
|
|
23
|
+
status: { index: true, values: ["pending", "started", "finished"], default: "pending" },
|
|
24
|
+
owner: { required: false, type: "string", control: "label" },
|
|
25
|
+
started: { required: false, type: "number", render: "datetime", control: "label" },
|
|
26
|
+
finished: { required: false, type: "number", render: "datetime", control: "label" },
|
|
27
|
+
errorCount: { required: false, type: "number", control: "label" },
|
|
28
|
+
},
|
|
29
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobiletto-orm-scan-typedef",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Mobiletto-orm typedefs and constants for mobiletto-orm-scan",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"storage",
|
|
8
|
+
"s3",
|
|
9
|
+
"b2",
|
|
10
|
+
"simple",
|
|
11
|
+
"filesystem",
|
|
12
|
+
"orm",
|
|
13
|
+
"tool",
|
|
14
|
+
"mobiletto",
|
|
15
|
+
"mobiletto-orm"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/cobbzilla/mobiletto-orm-scan-typedef",
|
|
18
|
+
"author": "Jonathan Cobb <udo9jqld@duck.com> (https://github.com/cobbzilla)",
|
|
19
|
+
"funding": {
|
|
20
|
+
"type": "patreon",
|
|
21
|
+
"url": "https://www.patreon.com/cobbzilla"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/cobbzilla/mobiletto-orm-scan-typedef.git"
|
|
26
|
+
},
|
|
27
|
+
"license": "Apache-2.0",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"tsc": "tsc --module es2020 -p tsconfig.json",
|
|
30
|
+
"lint": "npx eslint src",
|
|
31
|
+
"lint:fix": "npm run lint -- --fix",
|
|
32
|
+
"prettier": "npx prettier src --check",
|
|
33
|
+
"prettier:fix": "npm run prettier -- --write"
|
|
34
|
+
},
|
|
35
|
+
"main": "./lib/esm/index.js",
|
|
36
|
+
"module": "./lib/esm/index.js",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": "./lib/esm/index.js"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"lib/"
|
|
42
|
+
],
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^20.4.2",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
46
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
47
|
+
"eslint": "^8.44.0",
|
|
48
|
+
"eslint-config-prettier": "^8.8.0",
|
|
49
|
+
"prettier": "^3.0.0",
|
|
50
|
+
"tslint-config-prettier": "^1.18.0",
|
|
51
|
+
"typescript": "^5.1.6"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"mobiletto-orm-typedef": "^2.3.30"
|
|
55
|
+
}
|
|
56
|
+
}
|