Skip to content

Commit

Permalink
Merge pull request #1 from commercelayer/milestone/v1.0.0
Browse files Browse the repository at this point in the history
CLI Links Plugin
  • Loading branch information
pviti authored Jun 28, 2024
2 parents 7d724bf + 5e1180d commit 052e8af
Show file tree
Hide file tree
Showing 41 changed files with 10,016 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": [
"@commercelayer/eslint-config-ts"
],
"ignorePatterns": ["test/**/*.ts", "bin/**"],
"rules": {
"prettier/prettier": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/naming-convention": "off",
"no-return-assign": "off"
}
}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*-debug.log
*-error.log
/.nyc_output
/dist
/lib
/tmp
/yarn.lock
node_modules
.DS_Store
.editorconfig
tsconfig.tsbuildinfo
.oclif.manifest.json
/package-lock.json
7 changes: 7 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default": true,
"MD013": {
"line_length": 500
},
"MD014": false
}
3 changes: 3 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"import": "tsx"
}
23 changes: 23 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"ci": true,
"dryRun": false,
"branches": [
{ "name": "main", "channel": "latest" },
"+([0-9])?(.{+([0-9]),x}).x",
{ "name": "beta", "prerelease": true },
{ "name": "prerelease", "prerelease": "rc" }
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
["@semantic-release/git", {
"assets": [ "package.json", "CHANGELOG.md" ],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) [2024] [Commerce Layer]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# commercelayer-cli-plugin-links
# commercelayer-cli-plugin-links
3 changes: 3 additions & 0 deletions bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\dev" %*
6 changes: 6 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env node_modules/.bin/tsx

;(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: true, dir: __dirname})
})()
3 changes: 3 additions & 0 deletions bin/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
6 changes: 6 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env node

(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: false, dir: __dirname})
})()
88 changes: 88 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"name": "@commercelayer/cli-plugin-linkls",
"description": "Commerce Layer CLI links plugin",
"version": "0.0.1",
"author": "Pierluigi Viti <[email protected]>",
"bugs": "https://github.com/commercelayer/commercelayer-cli-plugin-links/issues",
"engines": {
"node": ">=20"
},
"files": [
"/bin/run.*",
"/lib",
"/npm-shrinkwrap.json",
"/oclif.manifest.json"
],
"homepage": "https://github.com/commercelayer/commercelayer-cli-plugin-links",
"keywords": [
"ecommerce",
"cli",
"commercelayer"
],
"license": "MIT",
"main": "lib/index.js",
"oclif": {
"commands": "./lib/commands",
"bin": "cl-links",
"devPlugins": [
"@oclif/plugin-help"
],
"plugins": [],
"topics": {
"links": {
"description": "Generate short links for shoppable resources",
"hidden": false
}
},
"repositoryPrefix": "<%- repo %>/blob/main/<%- commandPath %>",
"additionalHelpFlags": [
"-h"
],
"topicSeparator": ":"
},
"repository": "commercelayer/commercelayer-cli-plugin-links",
"scripts": {
"postpack": "rm -f oclif.manifest.json",
"posttest": "eslint . --ext .ts --config .eslintrc",
"build": "rm -rf lib && tsc -b",
"prepack": "pnpm build && oclif manifest && pnpm readme",
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
"test-local": "tsx test/spot.ts",
"readme": "cl-cli-dev readme --plugin --bin=commercelayer && git add README.md",
"lint": "eslint src --ext .ts --config .eslintrc",
"lint:fix": "eslint src --fix"
},
"types": "lib/index.d.ts",
"devDependencies": {
"@commercelayer/cli-dev": "^3.0.5",
"@commercelayer/eslint-config-ts": "^1.4.5",
"@oclif/plugin-help": "^6.2.3",
"@oclif/test": "^3.2.15",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/chai": "^4.3.16",
"@types/lodash.isempty": "^4.4.9",
"@types/mocha": "^10.0.7",
"@types/node": "^20.14.9",
"chai": "^4.4.1",
"eslint": "^8.57.0",
"mocha": "^10.5.2",
"nyc": "^15.1.0",
"oclif": "^4.13.10",
"semantic-release": "^24.0.0",
"tsx": "^4.15.8",
"typescript": "5.5.2"
},
"dependencies": {
"@commercelayer/cli-core": "^5.1.1",
"@commercelayer/sdk": "^6.9.1",
"@oclif/core": "^3.27.0",
"cli-table3": "^0.6.5",
"lodash.isempty": "^4.4.0",
"open": "^8.4.2",
"tslib": "^2.6.3"
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 052e8af

Please sign in to comment.