include schema in repository

This commit is contained in:
Evert Prants 2021-10-07 18:36:35 +03:00
parent 080c995438
commit e3d1785a94
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 5 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import tar from 'tar';
import { defaultEnvironment } from '../default/environment.default';
import { execute } from '../execute';
import { REPOSITORY_SCHEMA } from './constants';
import { deploy } from './deploy';
/**
@ -88,7 +89,7 @@ export async function buildRepository(
created: Math.floor(Date.now() / 1000),
name: meta.name,
plugins: meta.plugins,
schema: 1,
$schema: REPOSITORY_SCHEMA,
});
console.log('Copying plugins');

View File

@ -0,0 +1 @@
export const REPOSITORY_SCHEMA = 'https://squeebot.lunasqu.ee/pkg/repository.schema.json';

View File

@ -6,6 +6,7 @@ import { NPMExecutor } from '@squeebot/core/lib/npm';
import { defaultEnvironment } from '../default/environment.default';
import { gitignore } from '../default/gitignore.default';
import { tsConfig } from '../default/tsconfig.default';
import { REPOSITORY_SCHEMA } from './constants';
/**
* Create a new repository, complete with typescript and git.
@ -63,6 +64,7 @@ export async function newRepository(
name,
plugins: [],
typescript,
$schema: REPOSITORY_SCHEMA,
}, { spaces: 2 });
console.log('\nDone! Your repository "%s" lives at:', name, location);