@taiger-common/model 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 LIYUNG
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ npm publish package commands:
2
+
3
+ # Cleanup
4
+ npm run clean
5
+
6
+ # Stage, commit, and push changes
7
+ git add .
8
+ git commit -m "fix: your_commit"
9
+ git push origin main
10
+
11
+ # Run build
12
+ npm run build
13
+
14
+ # Bump version
15
+ npm version patch # or minor/major
16
+
17
+ # Push tags
18
+ git push origin main --tags
19
+
20
+ # Publish to npm
21
+ npm publish
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.helloWorldSring = exports.helloWorldFunc = void 0;
4
+ function helloWorldFunc() {
5
+ return "Hello, world function!";
6
+ }
7
+ exports.helloWorldFunc = helloWorldFunc;
8
+ exports.helloWorldSring = "Hello, world String!";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./helloWorld"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.docspagesSchema = void 0;
4
+ var mongoose_1 = require("mongoose");
5
+ exports.docspagesSchema = new mongoose_1.Schema({
6
+ name: { type: String, default: '' },
7
+ title: { type: String, default: '' },
8
+ category: { type: String, default: '' },
9
+ prop: { type: String, default: '' },
10
+ author: { type: String, default: '' },
11
+ text: { type: String, default: '' },
12
+ country: { type: String, default: '' },
13
+ updatedAt: { type: Date, default: Date.now } // ✅ Fix here
14
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./docspagesSchema"), exports);
@@ -0,0 +1,4 @@
1
+ export function helloWorldFunc() {
2
+ return "Hello, world function!";
3
+ }
4
+ export var helloWorldSring = "Hello, world String!";
@@ -0,0 +1 @@
1
+ export * from './helloWorld';
@@ -0,0 +1,11 @@
1
+ import { Schema } from 'mongoose';
2
+ export var docspagesSchema = new Schema({
3
+ name: { type: String, default: '' },
4
+ title: { type: String, default: '' },
5
+ category: { type: String, default: '' },
6
+ prop: { type: String, default: '' },
7
+ author: { type: String, default: '' },
8
+ text: { type: String, default: '' },
9
+ country: { type: String, default: '' },
10
+ updatedAt: { type: Date, default: Date.now } // ✅ Fix here
11
+ });
@@ -0,0 +1 @@
1
+ export * from './docspagesSchema';
@@ -0,0 +1,2 @@
1
+ export declare function helloWorldFunc(): string;
2
+ export declare const helloWorldSring: string;
@@ -0,0 +1 @@
1
+ export * from './helloWorld';
@@ -0,0 +1,45 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ /// <reference types="mongoose/types/inferrawdoctype" />
26
+ import { Schema, Document } from 'mongoose';
27
+ export interface IDocspages extends Document {
28
+ name: string;
29
+ title: string;
30
+ category: string;
31
+ prop: string;
32
+ author: string;
33
+ text: string;
34
+ country: string;
35
+ updatedAt: Date;
36
+ }
37
+ export declare const docspagesSchema: Schema<IDocspages, import("mongoose").Model<IDocspages, any, any, any, Document<unknown, any, IDocspages> & IDocspages & Required<{
38
+ _id: unknown;
39
+ }> & {
40
+ __v: number;
41
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IDocspages, Document<unknown, {}, import("mongoose").FlatRecord<IDocspages>> & import("mongoose").FlatRecord<IDocspages> & Required<{
42
+ _id: unknown;
43
+ }> & {
44
+ __v: number;
45
+ }>;
@@ -0,0 +1 @@
1
+ export * from './docspagesSchema';
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.exampleTypescriptPackage=t():e.exampleTypescriptPackage=t()}(this,(()=>(()=>{"use strict";var e={61:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.helloWorldSring=t.helloWorldFunc=void 0,t.helloWorldFunc=function(){return"Hello, world function!"},t.helloWorldSring="Hello, world String!"},229:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),n=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||r(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),n(o(61),t)}},t={};return function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,o),i.exports}(229)})()));
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@taiger-common/model",
3
+ "version": "1.0.1",
4
+ "description": "TaiGer core package",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "umd:main": "dist/umd/index.js",
8
+ "types": "dist/types/index.d.js",
9
+ "scripts": {
10
+ "_postinstall": "husky install",
11
+ "prepublishOnly": "pinst --disable",
12
+ "postpublish": "pinst --enable",
13
+ "build": "npm run build:cjs && npm run build:esm && npm run build:umd && npm run build:types",
14
+ "build:cjs": "node tools/cleanup cjs && tsc -p config/tsconfig.cjs.json",
15
+ "build:esm": "node tools/cleanup esm && tsc -p config/tsconfig.esm.json",
16
+ "build:umd": "node tools/cleanup umd && webpack --config config/webpack.config.js",
17
+ "build:types": "node tools/cleanup types && tsc -p config/tsconfig.types.json",
18
+ "clean": "node tools/cleanup",
19
+ "package": "npm run build && npm pack",
20
+ "test": "jest --no-cache --runInBand",
21
+ "test:cov": "jest --coverage --no-cache --runInBand",
22
+ "addscope": "node tools/packagejson name @LIYUNG/taiger-model"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "keywords": [
31
+ "example",
32
+ "typescript",
33
+ "npm",
34
+ "package",
35
+ "sample",
36
+ "boilerplate",
37
+ "starter",
38
+ "demo",
39
+ "cjs",
40
+ "esm",
41
+ "umd"
42
+ ],
43
+ "author": "LIYUNG",
44
+ "license": "MIT",
45
+ "homepage": "https://github.com/LIYUNG/taiger-model",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/LIYUNG/taiger-model.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/LIYUNG/taiger-model/issues"
52
+ },
53
+ "devDependencies": {
54
+ "@commitlint/cli": "^13.1.0",
55
+ "@commitlint/config-conventional": "^13.1.0",
56
+ "@types/jest": "^27.5.2",
57
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
58
+ "@typescript-eslint/parser": "^4.33.0",
59
+ "eslint": "^7.32.0",
60
+ "eslint-config-prettier": "^8.3.0",
61
+ "eslint-plugin-prettier": "^4.0.0",
62
+ "husky": "^7.0.2",
63
+ "jest": "^27.2.0",
64
+ "pinst": "^2.1.6",
65
+ "prettier": "^2.4.0",
66
+ "standard-version": "^9.5.0",
67
+ "ts-jest": "^27.0.5",
68
+ "ts-loader": "^9.2.5",
69
+ "typescript": "^4.9.5",
70
+ "webpack": "^5.52.1",
71
+ "webpack-cli": "^4.8.0"
72
+ },
73
+ "dependencies": {
74
+ "mongoose": "^8.9.5"
75
+ }
76
+ }