41 Commits

Author SHA1 Message Date
280d5a4137 Update branch [skip ci] 2024-09-15 15:39:32 +00:00
0c4aec4886 Actions: Update build branch name
All checks were successful
Build and Save Artifact / build (pull_request) Successful in 13s
2024-09-15 17:38:36 +02:00
56381e5c8f Build 2024-09-15 15:36:28 +00:00
6d5dd2125a Merge branch 'dev' of https://git.kozelkaricsi.hu/Cyanoure/NodeTest into dev
All checks were successful
Build and Save Artifact / build (pull_request) Successful in 14s
2024-09-15 17:35:50 +02:00
0d1725d93c Actions: build -> autobuild 2024-09-15 17:35:48 +02:00
ef603893d4 Merge branch 'main' into dev
All checks were successful
Build and Save Artifact / build (pull_request) Successful in 12s
2024-09-15 15:22:39 +00:00
f437c74634 Test commit
All checks were successful
Build and Save Artifact / build (pull_request) Successful in 13s
2024-09-15 17:19:02 +02:00
a1439f7c3d Test commit
All checks were successful
Build and Save Artifact / build (pull_request) Successful in 11s
2024-09-15 17:18:10 +02:00
7578ff60f0 Update Actions
All checks were successful
Build and Save Artifact / build (pull_request) Successful in 12s
2024-09-15 17:16:34 +02:00
02d87f88da Update Actions
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 5s
2024-09-15 17:15:34 +02:00
0945bb417f Update Actions
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 6s
2024-09-15 17:12:04 +02:00
44498fed29 Update Actions: Source branch name
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 7s
2024-09-15 17:09:36 +02:00
8a4a11caf6 Actions: Other method for branch name
Some checks failed
Build and Save Artifact / build (pull_request) Failing after 6s
2024-09-15 17:06:27 +02:00
afb015fed1 Actions: Remove dev branch 2024-09-15 17:02:55 +02:00
1ba617e863 Update Actions
Some checks failed
Build and Save Artifact / build (push) Successful in 12s
Build and Save Artifact / build (pull_request) Failing after 6s
2024-09-15 17:02:26 +02:00
c06b06c748 Actions: New username
Some checks failed
Build and Save Artifact / build (push) Successful in 12s
Build and Save Artifact / build (pull_request) Failing after 6s
2024-09-15 16:54:54 +02:00
fad9d4279b Test commit
All checks were successful
Build and Save Artifact / build (push) Successful in 14s
2024-09-15 16:52:37 +02:00
d11bca611e Actions: Add unshallow to fetch
All checks were successful
Build and Save Artifact / build (push) Successful in 12s
2024-09-15 16:51:42 +02:00
d596c6caba Update Actions
Some checks failed
Build and Save Artifact / build (push) Failing after 7s
2024-09-15 16:45:57 +02:00
2990d65a63 Actions: Revert revert git merge command
Some checks failed
Build and Save Artifact / build (push) Failing after 9s
2024-09-15 16:42:17 +02:00
0110936f32 Test
Some checks failed
Build and Save Artifact / build (push) Failing after 6s
2024-09-15 16:41:35 +02:00
158d85d821 Actions: Redo merge command
All checks were successful
Build and Save Artifact / build (push) Successful in 11s
2024-09-15 16:40:41 +02:00
c3710d152e Actions: Remove -a from commit
Some checks failed
Build and Save Artifact / build (push) Failing after 5s
2024-09-15 16:39:29 +02:00
b6cbdce51f Move git config
Some checks failed
Build and Save Artifact / build (push) Failing after 6s
2024-09-15 16:37:20 +02:00
81baa4f3d4 Actions: --allow-unrelated-histories
Some checks failed
Build and Save Artifact / build (push) Failing after 6s
2024-09-15 16:36:21 +02:00
cff26ff339 Actions: Add "Nothing to commit" to prevent fail
Some checks failed
Build and Save Artifact / build (push) Failing after 5s
2024-09-15 16:33:40 +02:00
f37033a178 Update Actions as ChatGPT recommended
Some checks failed
Build and Save Artifact / build (push) Failing after 9s
2024-09-15 16:30:38 +02:00
da25dac794 Actions: Switch branch first
All checks were successful
Build and Save Artifact / build (push) Successful in 11s
2024-09-15 16:27:23 +02:00
cbcdb66417 Actions: Merge if branch exists
All checks were successful
Build and Save Artifact / build (push) Successful in 11s
2024-09-15 16:25:33 +02:00
bdd36603df Version bump
All checks were successful
Build and Save Artifact / build (push) Successful in 11s
2024-09-15 16:17:33 +02:00
cc86f845a2 Hello, World!
All checks were successful
Build and Save Artifact / build (push) Successful in 12s
2024-09-15 16:16:10 +02:00
1ae8cbeef5 Update Actions
All checks were successful
Build and Save Artifact / build (push) Successful in 11s
2024-09-15 16:12:38 +02:00
28e3afafae Update Actions - Fix upstream error
Some checks failed
Build and Save Artifact / build (push) Failing after 10s
2024-09-15 16:10:46 +02:00
76f4106fd7 Update Actions
Some checks failed
Build and Save Artifact / build (push) Failing after 9s
2024-09-15 16:09:39 +02:00
8b72c4d148 Build with actions
Some checks failed
Build and Save Artifact / build (push) Failing after 0s
2024-09-15 16:06:59 +02:00
974597fd16 Update actions
All checks were successful
Build and Save Artifact / build (push) Successful in 12s
2024-09-15 15:10:30 +02:00
c753270446 Actions
All checks were successful
Build and Save Artifact / build (push) Successful in 1m17s
2024-09-15 15:07:13 +02:00
849d2f96aa Merge pull request 'Remove default export' (#9) from dev into main
Reviewed-on: #9
2024-09-15 12:57:15 +00:00
aa3fe02fd1 Remove default export 2024-09-15 14:56:38 +02:00
32e046b048 Merge pull request 'Build' (#8) from dev into main
Reviewed-on: #8
2024-09-15 12:48:35 +00:00
d536f73f9f Build 2024-09-15 14:48:08 +02:00
10 changed files with 88 additions and 15 deletions

67
.github/workflows/Build.yml vendored Normal file
View File

@ -0,0 +1,67 @@
name: Build and Save Artifact
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
# Initialize build branch
- name: Initialize build branch
run: |
SOURCE_BRANCH_NAME=${{ steps.extract_branch.outputs.branch }}
git config --global user.name 'Git Workflow Bot'
git config --global user.email 'noreply@kozelkaricsi.hu'
git fetch origin
git checkout ${SOURCE_BRANCH_NAME}
BRANCH_NAME="autobuild/${SOURCE_BRANCH_NAME}"
git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist
git switch $BRANCH_NAME || git switch -c $BRANCH_NAME
git merge ${SOURCE_BRANCH_NAME} -m "Update branch [skip ci]"
rm -rf dist
# Install dependencies
- name: Install dependencies
run: npm install
# Build the project
- name: Run npm build
run: npm run build
# Commit build files
- name: Commit build files to build branch
run: |
git add -f dist
git commit -m "Build" || echo "Nothing to commit"
git push origin HEAD --force # Push to the current branch
# Upload the build directory as an artifact
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: |
./dist
./package.json

1
.gitignore vendored
View File

@ -90,6 +90,7 @@ out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/

2
dist/index.d.mts vendored
View File

@ -1,3 +1,3 @@
declare function startTest(): void;
export { startTest as default };
export { startTest };

2
dist/index.d.ts vendored
View File

@ -1,3 +1,3 @@
declare function startTest(): void;
export { startTest as default };
export { startTest };

7
dist/index.js vendored
View File

@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
// src/index.ts
var src_exports = {};
__export(src_exports, {
default: () => startTest
startTest: () => startTest
});
module.exports = __toCommonJS(src_exports);
@ -31,10 +31,15 @@ function test(i) {
// src/index.ts
function startTest() {
console.log("Hello, World!");
let i = 0;
setInterval(() => {
i++;
test(i);
}, 1e3);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
startTest
});
//# sourceMappingURL=index.js.map

2
dist/index.js.map vendored
View File

@ -1 +1 @@
{"version":3,"sources":["../src/index.ts","../src/test.ts"],"sourcesContent":["import test from \"./test\";\r\n\r\nexport default function startTest() {\r\n let i: number = 0;\r\n setInterval(() => {\r\n i++;\r\n test(i);\r\n }, 1000);\r\n}\r\n","export default function test(i: number) {\r\n console.log(`Hello, World! (#${i})`);\r\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAe,SAAR,KAAsB,GAAW;AACpC,UAAQ,IAAI,mBAAmB,CAAC,GAAG;AACvC;;;ADAe,SAAR,YAA6B;AAChC,MAAI,IAAY;AAChB,cAAY,MAAM;AACd;AACA,SAAK,CAAC;AAAA,EACV,GAAG,GAAI;AACX;","names":[]}
{"version":3,"sources":["../src/index.ts","../src/test.ts"],"sourcesContent":["import test from \"./test\";\n\nexport function startTest() {\n console.log(\"Hello, World!\");\n let i: number = 0;\n setInterval(() => {\n i++;\n test(i);\n }, 1000);\n}\n","export default function test(i: number) {\n console.log(`Hello, World! (#${i})`);\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAe,SAAR,KAAsB,GAAW;AACpC,UAAQ,IAAI,mBAAmB,CAAC,GAAG;AACvC;;;ADAO,SAAS,YAAY;AACxB,UAAQ,IAAI,eAAe;AAC3B,MAAI,IAAY;AAChB,cAAY,MAAM;AACd;AACA,SAAK,CAAC;AAAA,EACV,GAAG,GAAI;AACX;","names":[]}

3
dist/index.mjs vendored
View File

@ -5,6 +5,7 @@ function test(i) {
// src/index.ts
function startTest() {
console.log("Hello, World!");
let i = 0;
setInterval(() => {
i++;
@ -12,6 +13,6 @@ function startTest() {
}, 1e3);
}
export {
startTest as default
startTest
};
//# sourceMappingURL=index.mjs.map

2
dist/index.mjs.map vendored
View File

@ -1 +1 @@
{"version":3,"sources":["../src/test.ts","../src/index.ts"],"sourcesContent":["export default function test(i: number) {\r\n console.log(`Hello, World! (#${i})`);\r\n}","import test from \"./test\";\r\n\r\nexport default function startTest() {\r\n let i: number = 0;\r\n setInterval(() => {\r\n i++;\r\n test(i);\r\n }, 1000);\r\n}\r\n"],"mappings":";AAAe,SAAR,KAAsB,GAAW;AACpC,UAAQ,IAAI,mBAAmB,CAAC,GAAG;AACvC;;;ACAe,SAAR,YAA6B;AAChC,MAAI,IAAY;AAChB,cAAY,MAAM;AACd;AACA,SAAK,CAAC;AAAA,EACV,GAAG,GAAI;AACX;","names":[]}
{"version":3,"sources":["../src/test.ts","../src/index.ts"],"sourcesContent":["export default function test(i: number) {\n console.log(`Hello, World! (#${i})`);\n}","import test from \"./test\";\n\nexport function startTest() {\n console.log(\"Hello, World!\");\n let i: number = 0;\n setInterval(() => {\n i++;\n test(i);\n }, 1000);\n}\n"],"mappings":";AAAe,SAAR,KAAsB,GAAW;AACpC,UAAQ,IAAI,mBAAmB,CAAC,GAAG;AACvC;;;ACAO,SAAS,YAAY;AACxB,UAAQ,IAAI,eAAe;AAC3B,MAAI,IAAY;AAChB,cAAY,MAAM;AACd;AACA,SAAK,CAAC;AAAA,EACV,GAAG,GAAI;AACX;","names":[]}

View File

@ -1,6 +1,6 @@
{
"name": "node-module-test",
"version": "1.0.0",
"version": "1.0.1",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",

View File

@ -1,11 +1,10 @@
import test from "./test";
export default class NodeTest {
static startTest() {
export function startTest() {
console.log("Hello, World!");
let i: number = 0;
setInterval(() => {
i++;
test(i);
}, 1000);
}
}