@sunsteel/contracts 0.1.1
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/dist/index.cjs +40 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +13 -0
- package/package.json +32 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
PROGRAM_STYLES: () => PROGRAM_STYLES,
|
|
24
|
+
WEIGHT_UNITS: () => WEIGHT_UNITS,
|
|
25
|
+
WORKOUT_SESSION_STATUSES: () => WORKOUT_SESSION_STATUSES
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
var PROGRAM_STYLES = ["STANDARD", "HYPERTROPHY"];
|
|
29
|
+
var WORKOUT_SESSION_STATUSES = [
|
|
30
|
+
"IN_PROGRESS",
|
|
31
|
+
"COMPLETED",
|
|
32
|
+
"ABORTED"
|
|
33
|
+
];
|
|
34
|
+
var WEIGHT_UNITS = ["KG", "LB"];
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
PROGRAM_STYLES,
|
|
38
|
+
WEIGHT_UNITS,
|
|
39
|
+
WORKOUT_SESSION_STATUSES
|
|
40
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const PROGRAM_STYLES: readonly ["STANDARD", "HYPERTROPHY"];
|
|
2
|
+
type ProgramStyle = (typeof PROGRAM_STYLES)[number];
|
|
3
|
+
declare const WORKOUT_SESSION_STATUSES: readonly ["IN_PROGRESS", "COMPLETED", "ABORTED"];
|
|
4
|
+
type WorkoutSessionStatus = (typeof WORKOUT_SESSION_STATUSES)[number];
|
|
5
|
+
declare const WEIGHT_UNITS: readonly ["KG", "LB"];
|
|
6
|
+
type WeightUnit = (typeof WEIGHT_UNITS)[number];
|
|
7
|
+
type Brand<T, B> = T & {
|
|
8
|
+
readonly __brand: B;
|
|
9
|
+
};
|
|
10
|
+
type UserId = Brand<string, 'UserId'>;
|
|
11
|
+
type RoutineId = Brand<string, 'RoutineId'>;
|
|
12
|
+
type RoutineDayId = Brand<string, 'RoutineDayId'>;
|
|
13
|
+
type WorkoutSessionId = Brand<string, 'WorkoutSessionId'>;
|
|
14
|
+
|
|
15
|
+
export { type Brand, PROGRAM_STYLES, type ProgramStyle, type RoutineDayId, type RoutineId, type UserId, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSessionId, type WorkoutSessionStatus };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const PROGRAM_STYLES: readonly ["STANDARD", "HYPERTROPHY"];
|
|
2
|
+
type ProgramStyle = (typeof PROGRAM_STYLES)[number];
|
|
3
|
+
declare const WORKOUT_SESSION_STATUSES: readonly ["IN_PROGRESS", "COMPLETED", "ABORTED"];
|
|
4
|
+
type WorkoutSessionStatus = (typeof WORKOUT_SESSION_STATUSES)[number];
|
|
5
|
+
declare const WEIGHT_UNITS: readonly ["KG", "LB"];
|
|
6
|
+
type WeightUnit = (typeof WEIGHT_UNITS)[number];
|
|
7
|
+
type Brand<T, B> = T & {
|
|
8
|
+
readonly __brand: B;
|
|
9
|
+
};
|
|
10
|
+
type UserId = Brand<string, 'UserId'>;
|
|
11
|
+
type RoutineId = Brand<string, 'RoutineId'>;
|
|
12
|
+
type RoutineDayId = Brand<string, 'RoutineDayId'>;
|
|
13
|
+
type WorkoutSessionId = Brand<string, 'WorkoutSessionId'>;
|
|
14
|
+
|
|
15
|
+
export { type Brand, PROGRAM_STYLES, type ProgramStyle, type RoutineDayId, type RoutineId, type UserId, WEIGHT_UNITS, WORKOUT_SESSION_STATUSES, type WeightUnit, type WorkoutSessionId, type WorkoutSessionStatus };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
var PROGRAM_STYLES = ["STANDARD", "HYPERTROPHY"];
|
|
3
|
+
var WORKOUT_SESSION_STATUSES = [
|
|
4
|
+
"IN_PROGRESS",
|
|
5
|
+
"COMPLETED",
|
|
6
|
+
"ABORTED"
|
|
7
|
+
];
|
|
8
|
+
var WEIGHT_UNITS = ["KG", "LB"];
|
|
9
|
+
export {
|
|
10
|
+
PROGRAM_STYLES,
|
|
11
|
+
WEIGHT_UNITS,
|
|
12
|
+
WORKOUT_SESSION_STATUSES
|
|
13
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sunsteel/contracts",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com//sunsteel-contracts.git"
|
|
7
|
+
},
|
|
8
|
+
"private": false,
|
|
9
|
+
"type": "module",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"main": "./dist/index.cjs",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
26
|
+
"dev": "tsup src/index.ts --format esm,cjs --dts --watch"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"tsup": "^8.3.5",
|
|
30
|
+
"typescript": "^5.7.3"
|
|
31
|
+
}
|
|
32
|
+
}
|