@imcms/core 0.0.0-stage → 1.0.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 +18 -0
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +0 -0
- package/package.json +37 -3
- package/pnpm-workspace.yaml +2 -0
- package/src/defaultParams.ts +9 -0
- package/src/index.ts +3 -0
- package/src/logger.ts +9 -0
- package/src/operationResult.ts +3 -0
- package/tsconfig.json +44 -0
- package/README.md +0 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/index.ts
|
|
17
|
+
var index_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(index_exports);
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Logger {
|
|
2
|
+
warn: (message: string, ...items: unknown[]) => void;
|
|
3
|
+
debug: (message: string, ...items: unknown[]) => void;
|
|
4
|
+
info: (message: string, ...items: unknown[]) => void;
|
|
5
|
+
error: (message: string, ...items: unknown[]) => void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface DefaultParams {
|
|
9
|
+
debugMode?: boolean;
|
|
10
|
+
logger?: Logger;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type OperationResult<T = unknown> = {
|
|
14
|
+
message?: string;
|
|
15
|
+
item?: T;
|
|
16
|
+
status: "success";
|
|
17
|
+
} | {
|
|
18
|
+
message?: string;
|
|
19
|
+
error?: unknown;
|
|
20
|
+
status: "error";
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type { DefaultParams, Logger, OperationResult };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Logger {
|
|
2
|
+
warn: (message: string, ...items: unknown[]) => void;
|
|
3
|
+
debug: (message: string, ...items: unknown[]) => void;
|
|
4
|
+
info: (message: string, ...items: unknown[]) => void;
|
|
5
|
+
error: (message: string, ...items: unknown[]) => void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface DefaultParams {
|
|
9
|
+
debugMode?: boolean;
|
|
10
|
+
logger?: Logger;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type OperationResult<T = unknown> = {
|
|
14
|
+
message?: string;
|
|
15
|
+
item?: T;
|
|
16
|
+
status: "success";
|
|
17
|
+
} | {
|
|
18
|
+
message?: string;
|
|
19
|
+
error?: unknown;
|
|
20
|
+
status: "error";
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type { DefaultParams, Logger, OperationResult };
|
package/dist/index.js
ADDED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imcms/core",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"devEngines": {
|
|
22
|
+
"packageManager": {
|
|
23
|
+
"name": "pnpm",
|
|
24
|
+
"version": "12.15.0",
|
|
25
|
+
"onFail": "download"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"tsup": "^9.0.0",
|
|
31
|
+
"tsx": "^4.23.15",
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@types/node": "^26.6.5"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
39
|
+
}
|
|
6
40
|
}
|
package/src/index.ts
ADDED
package/src/logger.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
// core/logger.ts
|
|
3
|
+
|
|
4
|
+
export interface Logger {
|
|
5
|
+
warn: (message: string, ...items: unknown[])=>void
|
|
6
|
+
debug: (message: string, ...items: unknown[])=>void
|
|
7
|
+
info: (message: string, ...items: unknown[])=>void
|
|
8
|
+
error: (message: string, ...items: unknown[])=>void
|
|
9
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
// "rootDir": "./src",
|
|
6
|
+
// "outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"target": "esnext",
|
|
12
|
+
"types": [],
|
|
13
|
+
// For nodejs:
|
|
14
|
+
// "lib": ["esnext"],
|
|
15
|
+
// "types": ["node"],
|
|
16
|
+
// and npm install -D @types/node
|
|
17
|
+
|
|
18
|
+
// Other Outputs
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
|
|
23
|
+
// Stricter Typechecking Options
|
|
24
|
+
"noUncheckedIndexedAccess": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
|
|
27
|
+
// Style Options
|
|
28
|
+
// "noImplicitReturns": true,
|
|
29
|
+
// "noImplicitOverride": true,
|
|
30
|
+
// "noUnusedLocals": true,
|
|
31
|
+
// "noUnusedParameters": true,
|
|
32
|
+
// "noFallthroughCasesInSwitch": true,
|
|
33
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
// Recommended Options
|
|
36
|
+
"strict": true,
|
|
37
|
+
"jsx": "react-jsx",
|
|
38
|
+
"verbatimModuleSyntax": true,
|
|
39
|
+
"isolatedModules": true,
|
|
40
|
+
"noUncheckedSideEffectImports": true,
|
|
41
|
+
"moduleDetection": "force",
|
|
42
|
+
"skipLibCheck": true,
|
|
43
|
+
}
|
|
44
|
+
}
|
package/README.md
DELETED