gst-common 1.0.0 → 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/README.md CHANGED
@@ -1 +1 @@
1
- # gst-common
1
+ # Say Hello
package/bun.lockb ADDED
Binary file
package/dist/index.cjs ADDED
@@ -0,0 +1,44 @@
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
+ sayHello: () => sayHello
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/functions.ts
28
+ function sayHello({
29
+ firstName,
30
+ lastName,
31
+ age
32
+ }) {
33
+ const name = `${firstName} ${lastName}`;
34
+ const greeting = `Hello, ${name}!`;
35
+ if (age) {
36
+ return `${greeting}, you are ${age} years old.`;
37
+ } else {
38
+ return greeting;
39
+ }
40
+ }
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ sayHello
44
+ });
@@ -0,0 +1,13 @@
1
+ declare function sayHello({ firstName, lastName, age, }: {
2
+ firstName: string;
3
+ lastName: string;
4
+ age?: number;
5
+ }): string;
6
+
7
+ type SayHelloProps = {
8
+ firstName: string;
9
+ lastName: string;
10
+ age?: number;
11
+ };
12
+
13
+ export { type SayHelloProps, sayHello };
@@ -0,0 +1,13 @@
1
+ declare function sayHello({ firstName, lastName, age, }: {
2
+ firstName: string;
3
+ lastName: string;
4
+ age?: number;
5
+ }): string;
6
+
7
+ type SayHelloProps = {
8
+ firstName: string;
9
+ lastName: string;
10
+ age?: number;
11
+ };
12
+
13
+ export { type SayHelloProps, sayHello };
package/dist/index.js ADDED
@@ -0,0 +1,17 @@
1
+ // src/functions.ts
2
+ function sayHello({
3
+ firstName,
4
+ lastName,
5
+ age
6
+ }) {
7
+ const name = `${firstName} ${lastName}`;
8
+ const greeting = `Hello, ${name}!`;
9
+ if (age) {
10
+ return `${greeting}, you are ${age} years old.`;
11
+ } else {
12
+ return greeting;
13
+ }
14
+ }
15
+ export {
16
+ sayHello
17
+ };
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "gst-common",
3
- "version": "1.0.0",
4
- "type": "module",
3
+ "version": "1.0.1",
5
4
  "description": "store all common variables that we need",
6
- "main": "index.js",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "type": "module",
7
9
  "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1"
10
+ "build": "tsup"
9
11
  },
10
12
  "repository": {
11
13
  "type": "git",
@@ -19,5 +21,9 @@
19
21
  "bugs": {
20
22
  "url": "https://github.com/anhtu16122000/gst-common/issues"
21
23
  },
22
- "homepage": "https://github.com/anhtu16122000/gst-common#readme"
24
+ "homepage": "https://github.com/anhtu16122000/gst-common#readme",
25
+ "dependencies": {
26
+ "tsup": "^8.3.6",
27
+ "typescript": "^5.7.3"
28
+ }
23
29
  }
package/index.js DELETED
@@ -1,3 +0,0 @@
1
- export const test = () => {
2
- return "hello world"
3
- }