Skip to content

Commit

Permalink
feat: update triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Apr 11, 2024
1 parent 0644987 commit 1c21a80
Show file tree
Hide file tree
Showing 151 changed files with 2,187 additions and 3,441 deletions.
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/github",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
Expand Down
7 changes: 3 additions & 4 deletions gen/generator.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable no-console, no-eval */
import fs from 'fs'
// import Manifest from '@oclif/dev-cli/lib/commands/manifest'
import { join } from 'path'
import { snakeCase } from 'lodash'
import snakeCase from 'lodash.snakecase'
import { join } from 'node:path'
import { clSchema } from '@commercelayer/cli-core'

const Inflector = require('inflector-js')
Expand Down Expand Up @@ -56,7 +55,7 @@ const getResourceActions = async (): Promise<{ [key: string]: any[] }> => {
Object.entries((t as any).properties.data.properties.attributes.properties).forEach(([k, v]) => {
if (k.startsWith('_')) triggerAttributes.push({ action: k.substring(1), trigger: k, description: (v as any).description })
})
const res = snakeCase(k.replace('Update', ''))
const res = snakeCase(k.replace('Update', '')) as string
if (triggerAttributes.length > 0) actions[res] = triggerAttributes
})

Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": "commercelayer/commercelayer-cli-plugin-triggers",
"bugs": "https://github.com/commercelayer/commercelayer-cli-plugin-triggers/issues",
"engines": {
"node": ">=20.10.0"
"node": ">=20"
},
"files": [
"/bin/run.*",
Expand Down Expand Up @@ -55,31 +55,31 @@
"types": "lib/index.d.ts",
"devDependencies": {
"@commercelayer/cli-dev": "beta",
"@commercelayer/eslint-config-ts": "^1.3.0",
"@oclif/plugin-help": "^6.0.14",
"@oclif/test": "^3.2.0",
"@commercelayer/eslint-config-ts": "^1.4.5",
"@oclif/plugin-help": "^6.0.20",
"@oclif/test": "^3.2.9",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/chai": "^4.3.12",
"@types/chai": "^4.3.14",
"@types/inquirer": "^8.2.10",
"@types/lodash": "^4.14.202",
"@types/lodash.snakecase": "^4.1.9",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.20",
"@types/node": "^20.12.7",
"chai": "^4.4.1",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"inflector-js": "^1.0.1",
"lodash": "^4.17.21",
"mocha": "^10.3.0",
"lodash.snakecase": "^4.1.1",
"mocha": "^10.4.0",
"nyc": "^15.1.0",
"oclif": "^4.4.17",
"oclif": "^4.8.0",
"semantic-release": "^22.0.12",
"ts-node": "^10.9.2",
"typescript": "5.3.2"
},
"dependencies": {
"@commercelayer/cli-core": "beta",
"@commercelayer/sdk": "^5.32.0",
"@oclif/core": "^3.19.5",
"@commercelayer/sdk": "sdk6",
"@oclif/core": "^3.26.2",
"inquirer": "^8.2.6",
"tslib": "^2.6.2"
},
Expand Down
Loading

0 comments on commit 1c21a80

Please sign in to comment.