vls-openapi-generator 1.14.0 → 1.15.0
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/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/__w/vls-openapi-generator/vls-openapi-generator/.commitlintrc.js":"1","/__w/vls-openapi-generator/vls-openapi-generator/dist/generate-openapi.js":"2","/__w/vls-openapi-generator/vls-openapi-generator/dist/index.js":"3","/__w/vls-openapi-generator/vls-openapi-generator/dist/lambda-type.js":"4","/__w/vls-openapi-generator/vls-openapi-generator/dist/openapi-type.js":"5","/__w/vls-openapi-generator/vls-openapi-generator/dist/postman-service.js":"6","/__w/vls-openapi-generator/vls-openapi-generator/dist/upload-openapi.js":"7","/__w/vls-openapi-generator/vls-openapi-generator/eslint.config.mjs":"8","/__w/vls-openapi-generator/vls-openapi-generator/release.config.js":"9","/__w/vls-openapi-generator/vls-openapi-generator/src/generate-openapi.ts":"10","/__w/vls-openapi-generator/vls-openapi-generator/src/index.ts":"11","/__w/vls-openapi-generator/vls-openapi-generator/src/lambda-type.ts":"12","/__w/vls-openapi-generator/vls-openapi-generator/src/openapi-type.ts":"13","/__w/vls-openapi-generator/vls-openapi-generator/src/postman-service.ts":"14","/__w/vls-openapi-generator/vls-openapi-generator/src/upload-openapi.ts":"15"},{"size":103,"mtime":1764155630302,"results":"16","hashOfConfig":"17"},{"size":6644,"mtime":1764169300649,"results":"18","hashOfConfig":"17"},{"size":530,"mtime":1764169300693,"results":"19","hashOfConfig":"17"},{"size":77,"mtime":1764169300629,"results":"20","hashOfConfig":"17"},{"size":77,"mtime":1764169300637,"results":"21","hashOfConfig":"17"},{"size":3073,"mtime":1764169300665,"results":"22","hashOfConfig":"17"},{"size":5361,"mtime":1764169300693,"results":"23","hashOfConfig":"17"},{"size":1247,"mtime":1764155630302,"results":"24","hashOfConfig":"17"},{"size":401,"mtime":1764155630302,"results":"25","hashOfConfig":"17"},{"size":5552,"mtime":1764169293749,"results":"26","hashOfConfig":"27"},{"size":441,"mtime":1764155630302,"results":"28","hashOfConfig":"27"},{"size":243,"mtime":1764155630302,"results":"29","hashOfConfig":"27"},{"size":1634,"mtime":1764155630302,"results":"30","hashOfConfig":"27"},{"size":3666,"mtime":1764155630302,"results":"31","hashOfConfig":"27"},{"size":3960,"mtime":1764155630302,"results":"32","hashOfConfig":"27"},{"filePath":"33","messages":"34","suppressedMessages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"47mvrp",{"filePath":"36","messages":"37","suppressedMessages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","suppressedMessages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","suppressedMessages":"44","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","suppressedMessages":"47","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","suppressedMessages":"50","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","suppressedMessages":"53","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","suppressedMessages":"56","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"57","messages":"58","suppressedMessages":"59","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","suppressedMessages":"62","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1fhi8uz",{"filePath":"63","messages":"64","suppressedMessages":"65","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","suppressedMessages":"68","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"69","messages":"70","suppressedMessages":"71","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"72","messages":"73","suppressedMessages":"74","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"75","messages":"76","suppressedMessages":"77","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/__w/vls-openapi-generator/vls-openapi-generator/.commitlintrc.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/dist/generate-openapi.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/dist/index.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/dist/lambda-type.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/dist/openapi-type.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/dist/postman-service.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/dist/upload-openapi.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/eslint.config.mjs",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/release.config.js",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/src/generate-openapi.ts",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/src/index.ts",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/src/lambda-type.ts",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/src/openapi-type.ts",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/src/postman-service.ts",[],[],"/__w/vls-openapi-generator/vls-openapi-generator/src/upload-openapi.ts",[],[]]
|
package/dist/generate-openapi.js
CHANGED
|
@@ -48,7 +48,10 @@ const OUTPUT_FILE = path.join(process.cwd(), 'openapi.json');
|
|
|
48
48
|
const generateOpenAPI = async () => {
|
|
49
49
|
await (0, node_util_1.promisify)(node_child_process_1.exec)('rm -rf ./dist');
|
|
50
50
|
await (0, node_util_1.promisify)(node_child_process_1.exec)('npx tsc');
|
|
51
|
-
const handlerFiles = await node_fs_1.promises.readdir(HANDLERS_DIR).catch(() =>
|
|
51
|
+
const handlerFiles = await node_fs_1.promises.readdir(HANDLERS_DIR).catch((error) => {
|
|
52
|
+
console.error(error);
|
|
53
|
+
return [];
|
|
54
|
+
});
|
|
52
55
|
if (handlerFiles.length === 0) {
|
|
53
56
|
console.log('No handler found in handlers folder.');
|
|
54
57
|
return;
|
|
@@ -61,7 +64,10 @@ const generateOpenAPI = async () => {
|
|
|
61
64
|
if (fileName.match(/^([a-z]+-)+queue-(publisher|consumer)$/)) {
|
|
62
65
|
continue;
|
|
63
66
|
}
|
|
64
|
-
const { bodySchema, queryParametersSchema, eventResponseParametersSchema, eventResponseModulesSchema, OPENAPI_CONFIG: openAPIConfig } = (await Promise.resolve(`${path.join(SCHEMAS_DIR, fileName + '.js')}`).then(s => __importStar(require(s))).catch(() =>
|
|
67
|
+
const { bodySchema, queryParametersSchema, eventResponseParametersSchema, eventResponseModulesSchema, OPENAPI_CONFIG: openAPIConfig } = (await Promise.resolve(`${path.join(SCHEMAS_DIR, fileName + '.js')}`).then(s => __importStar(require(s))).catch((error) => {
|
|
68
|
+
console.error(error);
|
|
69
|
+
return {};
|
|
70
|
+
}));
|
|
65
71
|
if (!openAPIConfig) {
|
|
66
72
|
throw new Error(`${fileName} handler schema not found.`);
|
|
67
73
|
}
|
package/package.json
CHANGED
package/src/generate-openapi.ts
CHANGED
|
@@ -17,7 +17,11 @@ export const generateOpenAPI = async (): Promise<void> => {
|
|
|
17
17
|
await promisify(exec)('rm -rf ./dist');
|
|
18
18
|
await promisify(exec)('npx tsc');
|
|
19
19
|
|
|
20
|
-
const handlerFiles = await fs.readdir(HANDLERS_DIR).catch(() =>
|
|
20
|
+
const handlerFiles = await fs.readdir(HANDLERS_DIR).catch((error) => {
|
|
21
|
+
console.error(error);
|
|
22
|
+
|
|
23
|
+
return [];
|
|
24
|
+
});
|
|
21
25
|
|
|
22
26
|
if (handlerFiles.length === 0) {
|
|
23
27
|
console.log('No handler found in handlers folder.');
|
|
@@ -44,7 +48,11 @@ export const generateOpenAPI = async (): Promise<void> => {
|
|
|
44
48
|
eventResponseParametersSchema,
|
|
45
49
|
eventResponseModulesSchema,
|
|
46
50
|
OPENAPI_CONFIG: openAPIConfig
|
|
47
|
-
} = (await import(path.join(SCHEMAS_DIR, fileName + '.js')).catch(() =>
|
|
51
|
+
} = (await import(path.join(SCHEMAS_DIR, fileName + '.js')).catch((error) => {
|
|
52
|
+
console.error(error);
|
|
53
|
+
|
|
54
|
+
return {};
|
|
55
|
+
})) as {
|
|
48
56
|
bodySchema?: OpenApiZodAny;
|
|
49
57
|
eventResponseParametersSchema?: OpenApiZodAny;
|
|
50
58
|
eventResponseModulesSchema?: OpenApiZodAny;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
name: CI/CD Pipeline
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
contents: write
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
release:
|
|
16
|
-
if: github.event_name == 'push'
|
|
17
|
-
runs-on: [mb-runner]
|
|
18
|
-
container:
|
|
19
|
-
image: ubuntu:latest
|
|
20
|
-
steps:
|
|
21
|
-
- name: Install Git
|
|
22
|
-
run: apt-get update && apt-get -y install git
|
|
23
|
-
|
|
24
|
-
- name: Checkout code
|
|
25
|
-
uses: actions/checkout@v4
|
|
26
|
-
with:
|
|
27
|
-
fetch-depth: 0
|
|
28
|
-
|
|
29
|
-
- name: Setup Node
|
|
30
|
-
uses: actions/setup-node@v4
|
|
31
|
-
with:
|
|
32
|
-
node-version: 20
|
|
33
|
-
cache: 'npm'
|
|
34
|
-
|
|
35
|
-
- name: Set ownership
|
|
36
|
-
run: chown -R $(whoami) .
|
|
37
|
-
|
|
38
|
-
- name: Install dependencies
|
|
39
|
-
run: npm install
|
|
40
|
-
|
|
41
|
-
- name: Build project
|
|
42
|
-
run: npm run build
|
|
43
|
-
|
|
44
|
-
- name: Release with Semantic
|
|
45
|
-
run: npx semantic-release
|
|
46
|
-
env:
|
|
47
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN_FOR_VLS }}
|
|
48
|
-
|
|
49
|
-
build:
|
|
50
|
-
if: github.event_name == 'pull_request'
|
|
51
|
-
runs-on: [mb-runner]
|
|
52
|
-
container:
|
|
53
|
-
image: ubuntu:latest
|
|
54
|
-
steps:
|
|
55
|
-
- name: Checkout code
|
|
56
|
-
uses: actions/checkout@v4
|
|
57
|
-
|
|
58
|
-
- name: Setup Node
|
|
59
|
-
uses: actions/setup-node@v4
|
|
60
|
-
with:
|
|
61
|
-
node-version: 20
|
|
62
|
-
cache: 'npm'
|
|
63
|
-
|
|
64
|
-
- name: Install dependencies
|
|
65
|
-
run: npm install
|
|
66
|
-
|
|
67
|
-
- name: Run Prettier check
|
|
68
|
-
run: npx prettier --check .
|
|
69
|
-
|
|
70
|
-
- name: Lint check
|
|
71
|
-
run: npx eslint .
|
|
72
|
-
|
|
73
|
-
- name: Build project
|
|
74
|
-
run: npm run build
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: Security AllInOne
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- feature/*
|
|
6
|
-
pull_request:
|
|
7
|
-
types:
|
|
8
|
-
- opened
|
|
9
|
-
- closed
|
|
10
|
-
- ready_for_review
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
runs-on:
|
|
14
|
-
group: default
|
|
15
|
-
labels: self-hosted
|
|
16
|
-
steps:
|
|
17
|
-
- name: Trigger to Insider Security
|
|
18
|
-
run: |
|
|
19
|
-
curl -X POST -H "Content-Type: application/json" \
|
|
20
|
-
-d '{"type": "security-allinone", "version": "v1", "repository": "${{ github.event.repository.name }}", "ref": "${{ github.head_ref || github.ref_name }}", "event_name": "${{ github.event_name }}", "event_action": "${{ github.event.action }}", "default_branch": "${{ github.event.repository.default_branch }}"}' \
|
|
21
|
-
$INSECPROXY_HOOK
|
|
22
|
-
env:
|
|
23
|
-
INSECPROXY_HOOK: ${{ secrets.INSECPROXY_HOOK }}
|