Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { CliError, slugify, splitList, studly } from '../util.js';

export const STARTER_TEMPLATE = 'https://github.com/fleetbase/starter-extension.git';
/** console 0.7.x and core-api 1.6+ are what the starter targets today */
export const DEFAULT_COMPAT = { console: '>=0.7.0 <0.8.0', api: '^1.6' };
// Registry v2 instances run console 0.8.x (Laravel 12) or later and core-api 2.x.
export const DEFAULT_COMPAT = { console: '>=0.8.0 <0.10.0', api: '^2.0' };
export const INITIAL_VERSION = '0.1.0';

const SKIP = new Set(['.git', 'node_modules', 'server_vendor', 'vendor', 'dist', 'tmp', '.php-cs-fixer.cache']);
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ run init --name "E2E Insights" --template "$TEMPLATE" --yes --author "E2E Develo
cd "$WORK/e2e-insights"
grep -q "\"name\": \"@${USERNAME}/e2e-insights-engine\"" package.json || fail "package name"
grep -q "\"name\": \"${USERNAME}/e2e-insights-api\"" composer.json || fail "composer name"
grep -q '"console": ">=0.7.0 <0.8.0"' extension.json || fail "compat.console"
grep -q '"console": ">=0.8.0 <0.10.0"' extension.json || fail "compat.console"
run build
[ -f .fleetbase/release.json ] || fail "no release.json"
# list to files first: under pipefail, grep -q closing the pipe early makes GNU tar fail
Expand Down
2 changes: 1 addition & 1 deletion test/unit/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('init', () => {
expect(await flb('init', dir, '--name', 'Fleet Insights', '--organization', 'acme', '--template', STARTER, '--yes', '--no-git', '--author', 'Acme Ltd <[email protected]>', '--keywords', 'fleet,analytics', '--console', '>=0.7.60 <0.8.0')).toBe(0);

const manifest = JSON.parse(read(dir, 'extension.json'));
expect(manifest).toMatchObject({ name: 'Fleet Insights', version: '0.1.0', engine: 'package.json', api: 'composer.json', compat: { console: '>=0.7.60 <0.8.0', api: '^1.6' }, keywords: ['fleet', 'analytics'] });
expect(manifest).toMatchObject({ name: 'Fleet Insights', version: '0.1.0', engine: 'package.json', api: 'composer.json', compat: { console: '>=0.7.60 <0.8.0', api: '^2.0' }, keywords: ['fleet', 'analytics'] });

const pkg = JSON.parse(read(dir, 'package.json'));
expect(pkg).toMatchObject({ name: '@acme/fleet-insights-engine', version: '0.1.0', fleetbase: { route: 'fleet-insights' }, author: 'Acme Ltd <[email protected]>' });
Expand Down
Loading