Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
63 changes: 63 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"env": {
"browser": true,
"es2024": true,
"node": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:n/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"plugins": ["n", "import", "promise"],
"rules": {
"no-console": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"no-magic-numbers": "off",
"no-underscore-dangle": "off",
"comma-dangle": ["error", "never"],
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "always"],
"indent": ["error", 2, { "SwitchCase": 1 }],
"brace-style": ["error", "1tbs"],
"padded-blocks": "off",
"spaced-comment": ["warn", "always"],
"quote-props": "off",
"prefer-arrow-callback": "off",
"space-before-function-paren": "off",
"no-new": "off",
"func-names": "off",
"new-cap": "off",
"arrow-body-style": "off",
"class-methods-use-this": "off",
"consistent-return": "off",
"max-len": ["warn", { "code": 140, "ignoreUrls": true }],
"n/no-missing-import": ["error", { "tryExtensions": [".js", ".json"] }],
"n/no-extraneous-import": "off",
"n/no-extraneous-require": "off",
"n/no-unsupported-features/es-syntax": "off",
"n/no-process-exit": "off",
"import/no-unresolved": ["error", { "ignore": ["^@platformos/"] }],
"import/extensions": ["error", "ignorePackages", { "js": "always" }]
},
"ignorePatterns": [
"node_modules/",
"gui/*/node_modules/",
"gui/*/dist/",
"gui/*/build/",
"coverage/",
"*.min.js"
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".json"]
}
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
version: ['18', '20', '20.11']
version: ['20.20.0', '22', '24']

steps:
- name: Checkout repository
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## Unreleased


## 6.0.0

* Feature: `pos-cli exec liquid` command to execute Liquid code directly on an instance (supports `-f` flag to load from file, requires confirmation on production)
* Feature: `pos-cli exec graphql` command to execute GraphQL queries directly on an instance (supports `-f` flag to load from file, requires confirmation on production)
* Feature: `pos-cli test run` command to run tests using the tests module

### Major Dependency Upgrades

We've completed a comprehensive modernization of the CLI including:

**Node.js Version Requirement**: Now requires Node.js 20 or higher (up from Node.js 18)

**Breaking Changes** that may require action from users:

1. **Yeoman generators**: If you have custom generators using `yeoman-generator`, they need to be rewritten for the v7.x update:
- No kebab-case in option names (e.g., `skip-install` → `skipInstall`)
- `composeWith()` is now async (use `await`)
- The `install()` action has been removed; use `addDependencies()` instead
- See [yeoman-generator v5 to v7 migration guide](https://yeoman.github.io/generator/v5-to-v7-migration/)

2. **Express v5 route syntax**: Routes using wildcards have changed from `/*` to `/*splat` format. This is handled automatically, but if you have custom Express middleware in your project, you may need to update route patterns.

**Package Upgrades**: All major dependencies have been updated to their latest stable versions including:
- chalk v5.6, chokidar v5.0, express v5.2, ora v9.0, open v11.0
- inquirer v13.2, mime v4.1, multer v2.0, yeoman-environment v5.1, yeoman-generator v7.5
- And many other dependency updates for security and stability

**Test Framework Migration**: Migrated from Jest to Vitest to better support ESM

## 5.5.0

* Feature: (GUI) Ability to add, edit and remove users
Expand Down
24 changes: 16 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ pos-cli/
Example:
```javascript
// bin/pos-cli-deploy.js
const fetchAuthData = require('../lib/settings').fetchSettings;
const deployStrategy = require('../lib/deploy/strategy');
import { fetchSettings } from '../lib/settings';
import deployStrategy from '../lib/deploy/strategy.js';

program
.argument('[environment]', 'name of environment')
.option('-p --partial-deploy', 'Partial deployment')
.action(async (environment, params) => {
const authData = fetchAuthData(environment);
const authData = fetchSettings(environment);
deployStrategy.run({ strategy: 'directAssetsUpload', opts: { ... } });
});
```
Expand Down Expand Up @@ -139,11 +139,17 @@ Two deployment strategies:

Strategy selection:
```javascript
import defaultStrategy from './defaultStrategy.js';
import directAssetsUploadStrategy from './directAssetsUploadStrategy.js';

const strategies = {
default: require('./defaultStrategy'),
directAssetsUpload: require('./directAssetsUploadStrategy'),
default: defaultStrategy,
directAssetsUpload: directAssetsUploadStrategy,
};
module.exports = { run: ({ strategy, opts }) => strategies[strategy](opts) };

const run = ({ strategy, opts }) => strategies[strategy](opts);

export { run };
```

#### 3. File Watching Pattern - Sync Mode
Expand Down Expand Up @@ -354,6 +360,8 @@ GUI apps are pre-built (in dist/ or build/ directories). To modify:
- **CDN** - Asset delivery and verification

## Node.js Version
- **Minimum**: Node.js 18
- **Tested on**: 18, 20, 20.11

- **Minimum**: Node.js 20
- **Recommended**: Node.js 20+
- **Tested on**: 20, 20.11, 22, 24
- Check enforced by `scripts/check-node-version.js` postinstall hook
Loading
Loading