gst-common 1.0.2 → 1.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 ADDED
@@ -0,0 +1,50 @@
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
+ CUSTOMER_TYPE: () => CUSTOMER_TYPE,
24
+ REGISTER_METHOD: () => REGISTER_METHOD,
25
+ sayHello: () => sayHello
26
+ });
27
+ module.exports = __toCommonJS(index_exports);
28
+
29
+ // src/functions.ts
30
+ function sayHello() {
31
+ console.log("HELLO WORLD");
32
+ }
33
+
34
+ // src/type.ts
35
+ var CUSTOMER_TYPE = /* @__PURE__ */ ((CUSTOMER_TYPE2) => {
36
+ CUSTOMER_TYPE2["TUTOR"] = "tutor";
37
+ CUSTOMER_TYPE2["STUDENT"] = "student";
38
+ return CUSTOMER_TYPE2;
39
+ })(CUSTOMER_TYPE || {});
40
+ var REGISTER_METHOD = /* @__PURE__ */ ((REGISTER_METHOD2) => {
41
+ REGISTER_METHOD2["EMAIL"] = "email";
42
+ REGISTER_METHOD2["GOOGLE"] = "google";
43
+ return REGISTER_METHOD2;
44
+ })(REGISTER_METHOD || {});
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ CUSTOMER_TYPE,
48
+ REGISTER_METHOD,
49
+ sayHello
50
+ });
package/dist/index.d.cts CHANGED
@@ -1,9 +1,12 @@
1
- type SayHelloProps = {
2
- firstName: string;
3
- lastName: string;
4
- age?: number;
5
- };
1
+ declare function sayHello(): void;
6
2
 
7
- declare function sayHello({ firstName, lastName, age }: SayHelloProps): string;
3
+ declare enum CUSTOMER_TYPE {
4
+ TUTOR = "tutor",
5
+ STUDENT = "student"
6
+ }
7
+ declare enum REGISTER_METHOD {
8
+ EMAIL = "email",
9
+ GOOGLE = "google"
10
+ }
8
11
 
9
- export { type SayHelloProps, sayHello };
12
+ export { CUSTOMER_TYPE, REGISTER_METHOD, sayHello };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,12 @@
1
- type SayHelloProps = {
2
- firstName: string;
3
- lastName: string;
4
- age?: number;
5
- };
1
+ declare function sayHello(): void;
6
2
 
7
- declare function sayHello({ firstName, lastName, age }: SayHelloProps): string;
3
+ declare enum CUSTOMER_TYPE {
4
+ TUTOR = "tutor",
5
+ STUDENT = "student"
6
+ }
7
+ declare enum REGISTER_METHOD {
8
+ EMAIL = "email",
9
+ GOOGLE = "google"
10
+ }
8
11
 
9
- export { type SayHelloProps, sayHello };
12
+ export { CUSTOMER_TYPE, REGISTER_METHOD, sayHello };
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ // src/functions.ts
2
+ function sayHello() {
3
+ console.log("HELLO WORLD");
4
+ }
5
+
6
+ // src/type.ts
7
+ var CUSTOMER_TYPE = /* @__PURE__ */ ((CUSTOMER_TYPE2) => {
8
+ CUSTOMER_TYPE2["TUTOR"] = "tutor";
9
+ CUSTOMER_TYPE2["STUDENT"] = "student";
10
+ return CUSTOMER_TYPE2;
11
+ })(CUSTOMER_TYPE || {});
12
+ var REGISTER_METHOD = /* @__PURE__ */ ((REGISTER_METHOD2) => {
13
+ REGISTER_METHOD2["EMAIL"] = "email";
14
+ REGISTER_METHOD2["GOOGLE"] = "google";
15
+ return REGISTER_METHOD2;
16
+ })(REGISTER_METHOD || {});
17
+ export {
18
+ CUSTOMER_TYPE,
19
+ REGISTER_METHOD,
20
+ sayHello
21
+ };
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "gst-common",
3
- "version": "1.0.2",
4
- "description": "Store all common variables that we need",
5
- "main": "./dist/index.cjs",
3
+ "version": "1.1.1",
4
+ "description": "store all common variables that we need",
5
+ "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
8
  "type": "module",
9
- "exports": {
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
9
  "scripts": {
14
10
  "build": "tsup",
15
11
  "publish:npm": "npm publish",
package/dist/index.mjs DELETED
@@ -1,46 +0,0 @@
1
- // src/functions.ts
2
- function sayHello({ firstName, lastName, age }) {
3
- const name = `${firstName} ${lastName}`;
4
- const greeting = `Hello, ${name}!`;
5
- if (age) {
6
- return `${greeting}, are ${age} years old.`;
7
- } else {
8
- return greeting;
9
- }
10
- }
11
- export {
12
- sayHello
13
- };
14
- __defProp(target, name, { get: all[name], enumerable: true });
15
- };
16
- var __copyProps = (to, from, except, desc) => {
17
- if (from && typeof from === "object" || typeof from === "function") {
18
- for (let key of __getOwnPropNames(from))
19
- if (!__hasOwnProp.call(to, key) && key !== except)
20
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
- }
22
- return to;
23
- };
24
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
-
26
- // src/index.ts
27
- var index_exports = {};
28
- __export(index_exports, {
29
- sayHello: () => sayHello
30
- });
31
- module.exports = __toCommonJS(index_exports);
32
-
33
- // src/functions.ts
34
- function sayHello({ firstName, lastName, age }) {
35
- const name = `${firstName} ${lastName}`;
36
- const greeting = `Hello, ${name}!`;
37
- if (age) {
38
- return `${greeting}, are ${age} years old.`;
39
- } else {
40
- return greeting;
41
- }
42
- }
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- sayHello
46
- });