@form8ion/gitea-workflows 1.0.0-beta.3 → 1.0.0-beta.5
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 +3 -0
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/package.json +6 -1
- package/src/index.js +1 -0
- package/src/lifter.js +7 -0
- package/src/lifter.test.js +18 -0
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ form8ion plugin for managing Gitea workflows
|
|
|
25
25
|
|
|
26
26
|
[![npm][npm-badge]][npm-link]
|
|
27
27
|
[![license][license-badge]][license-link]
|
|
28
|
+
![node][node-badge]
|
|
28
29
|
|
|
29
30
|
<!--consumer-badges end -->
|
|
30
31
|
|
|
@@ -112,3 +113,5 @@ $ npm test
|
|
|
112
113
|
[license-link]: LICENSE
|
|
113
114
|
|
|
114
115
|
[license-badge]: https://img.shields.io/github/license/form8ion/gitea-workflows.svg?logo=opensourceinitiative
|
|
116
|
+
|
|
117
|
+
[node-badge]: https://img.shields.io/node/v/@form8ion/gitea-workflows?logo=node.js
|
package/lib/index.js
CHANGED
|
@@ -14,5 +14,11 @@ function test({projectRoot}) {
|
|
|
14
14
|
return directoryExists(`${projectRoot}/.gitea/workflows`);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
async function lift({projectRoot}) {
|
|
18
|
+
await promises.rm(`${projectRoot}/.gitea/.gitkeep`, {force: true});
|
|
19
|
+
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { lift, scaffold, test };
|
|
18
24
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/scaffolder.js","../src/tester.js"],"sourcesContent":["import {promises as fs} from 'node:fs';\nimport {directoryExists} from '@form8ion/core';\n\nexport default async function scaffold({projectRoot}) {\n if (await directoryExists(`${projectRoot}/.gitea`)) {\n await fs.mkdir(`${projectRoot}/.gitea/workflows`);\n await fs.writeFile(`${projectRoot}/.gitea/workflows/.gitkeep`, '');\n }\n\n return {};\n}\n","import {directoryExists} from '@form8ion/core';\n\nexport default function test({projectRoot}) {\n return directoryExists(`${projectRoot}/.gitea/workflows`);\n}\n"],"names":["fs"],"mappings":";;;AAGe,eAAe,QAAQ,CAAC,CAAC,WAAW,CAAC,EAAE;AACtD,EAAE,IAAI,MAAM,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE;AACtD,IAAI,MAAMA,QAAE,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACrD,IAAI,MAAMA,QAAE,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,0BAA0B,CAAC,EAAE,EAAE,CAAC;AACtE,EAAE;;AAEF,EAAE,OAAO,EAAE;AACX;;ACRe,SAAS,IAAI,CAAC,CAAC,WAAW,CAAC,EAAE;AAC5C,EAAE,OAAO,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAC3D;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/scaffolder.js","../src/tester.js","../src/lifter.js"],"sourcesContent":["import {promises as fs} from 'node:fs';\nimport {directoryExists} from '@form8ion/core';\n\nexport default async function scaffold({projectRoot}) {\n if (await directoryExists(`${projectRoot}/.gitea`)) {\n await fs.mkdir(`${projectRoot}/.gitea/workflows`);\n await fs.writeFile(`${projectRoot}/.gitea/workflows/.gitkeep`, '');\n }\n\n return {};\n}\n","import {directoryExists} from '@form8ion/core';\n\nexport default function test({projectRoot}) {\n return directoryExists(`${projectRoot}/.gitea/workflows`);\n}\n","import {promises as fs} from 'node:fs';\n\nexport default async function lift({projectRoot}) {\n await fs.rm(`${projectRoot}/.gitea/.gitkeep`, {force: true});\n\n return {};\n}\n"],"names":["fs"],"mappings":";;;AAGe,eAAe,QAAQ,CAAC,CAAC,WAAW,CAAC,EAAE;AACtD,EAAE,IAAI,MAAM,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE;AACtD,IAAI,MAAMA,QAAE,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;AACrD,IAAI,MAAMA,QAAE,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,0BAA0B,CAAC,EAAE,EAAE,CAAC;AACtE,EAAE;;AAEF,EAAE,OAAO,EAAE;AACX;;ACRe,SAAS,IAAI,CAAC,CAAC,WAAW,CAAC,EAAE;AAC5C,EAAE,OAAO,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAC3D;;ACFe,eAAe,IAAI,CAAC,CAAC,WAAW,CAAC,EAAE;AAClD,EAAE,MAAMA,QAAE,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;;AAE9D,EAAE,OAAO,EAAE;AACX;;;;"}
|
package/package.json
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
"name": "@form8ion/gitea-workflows",
|
|
3
3
|
"description": "form8ion plugin for managing Gitea workflows",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.0.0-beta.
|
|
5
|
+
"version": "1.0.0-beta.5",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": "^22.21.0 || >=24.12"
|
|
9
|
+
},
|
|
7
10
|
"author": "Matt Travi <npm@travi.org> (https://matt.travi.org)",
|
|
8
11
|
"repository": "form8ion/gitea-workflows",
|
|
9
12
|
"bugs": "https://github.com/form8ion/gitea-workflows/issues",
|
|
@@ -14,6 +17,7 @@
|
|
|
14
17
|
"scripts": {
|
|
15
18
|
"pretest": "run-s build",
|
|
16
19
|
"test": "npm-run-all --print-label --parallel lint:* --parallel test:*",
|
|
20
|
+
"lint:engines": "ls-engines",
|
|
17
21
|
"lint:gherkin": "gherkin-lint --config=.gherkin-lintrc.json",
|
|
18
22
|
"lint:js": "eslint . --cache",
|
|
19
23
|
"lint:js:fix": "run-s 'lint:js -- --fix'",
|
|
@@ -63,6 +67,7 @@
|
|
|
63
67
|
"gherkin-lint": "4.2.4",
|
|
64
68
|
"husky": "9.1.7",
|
|
65
69
|
"lockfile-lint": "5.0.0",
|
|
70
|
+
"ls-engines": "0.10.0",
|
|
66
71
|
"mock-fs": "5.5.0",
|
|
67
72
|
"npm-run-all2": "8.0.4",
|
|
68
73
|
"publint": "0.3.18",
|
package/src/index.js
CHANGED
package/src/lifter.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {promises as fs} from 'node:fs';
|
|
2
|
+
|
|
3
|
+
import {describe, it, vi, expect} from 'vitest';
|
|
4
|
+
import any from '@travi/any';
|
|
5
|
+
|
|
6
|
+
import liftWorkflows from './lifter.js';
|
|
7
|
+
|
|
8
|
+
vi.mock('node:fs');
|
|
9
|
+
|
|
10
|
+
describe('gitea workflows lifter', () => {
|
|
11
|
+
it('should lift workflow details', async () => {
|
|
12
|
+
const projectRoot = any.string();
|
|
13
|
+
|
|
14
|
+
expect(await liftWorkflows({projectRoot})).toEqual({});
|
|
15
|
+
|
|
16
|
+
expect(fs.rm).toHaveBeenCalledWith(`${projectRoot}/.gitea/.gitkeep`, {force: true});
|
|
17
|
+
});
|
|
18
|
+
});
|